Add the static single hub BOM.

This commit is contained in:
Mark Milligan 2021-02-11 18:52:19 -06:00
parent 7075c702df
commit c0815ac0f9
8 changed files with 83 additions and 3 deletions

BIN
bom/BOM.xlsx Normal file

Binary file not shown.

View File

@ -3,7 +3,7 @@
<groupId>com.lanternsoftware.currentmonitor</groupId> <groupId>com.lanternsoftware.currentmonitor</groupId>
<artifactId>lantern-currentmonitor</artifactId> <artifactId>lantern-currentmonitor</artifactId>
<packaging>jar</packaging> <packaging>jar</packaging>
<version>0.9.5</version> <version>0.9.6</version>
<name>lantern-currentmonitor</name> <name>lantern-currentmonitor</name>
<properties> <properties>

View File

@ -118,6 +118,8 @@ public abstract class ResourceLoader {
try { try {
os = new FileOutputStream(_sFile, false); os = new FileOutputStream(_sFile, false);
os.write(_btData); os.write(_btData);
os.flush();
os.getFD().sync();
} }
catch (Throwable t) { catch (Throwable t) {
LOG.error("Failed to write file: " + _sFile, t); LOG.error("Failed to write file: " + _sFile, t);

View File

@ -161,7 +161,7 @@ public class Controller {
callbacks.put(callback, message.getNodeId()); callbacks.put(callback, message.getNodeId());
log += " callback: " + callback; log += " callback: " + callback;
} }
logger.info(log); logger.debug(log);
byte[] data = message.toByteArray((byte) 0, callback); byte[] data = message.toByteArray((byte) 0, callback);
logger.debug("Sending outbound: {}", NullUtils.toHexBytes(data)); logger.debug("Sending outbound: {}", NullUtils.toHexBytes(data));
responseReceived = false; responseReceived = false;
@ -206,7 +206,7 @@ public class Controller {
sendRaw(new byte[]{ACK}); sendRaw(new byte[]{ACK});
Message message = MessageEngine.decode(_buffer); Message message = MessageEngine.decode(_buffer);
if (message != null) { if (message != null) {
logger.info("Received message inbound: {}", message.describe()); logger.debug("Received message inbound: {}", message.describe());
MessageEngine.publish(message); MessageEngine.publish(message);
if (message instanceof ResponseMessage) { if (message instanceof ResponseMessage) {
synchronized (responseMutex) { synchronized (responseMutex) {

View File

@ -42,6 +42,7 @@ public enum CommandClass {
SCHEDULE_ENTRY_LOCK((byte)0x4E, "SCHEDULE_ENTRY_LOCK"), SCHEDULE_ENTRY_LOCK((byte)0x4E, "SCHEDULE_ENTRY_LOCK"),
BASIC_WINDOW_COVERING((byte)0x50, "BASIC_WINDOW_COVERING"), BASIC_WINDOW_COVERING((byte)0x50, "BASIC_WINDOW_COVERING"),
MTP_WINDOW_COVERING((byte)0x51, "MTP_WINDOW_COVERING"), MTP_WINDOW_COVERING((byte)0x51, "MTP_WINDOW_COVERING"),
CRC_16_ENCAP((byte)0x5B, "CRC_16_ENCAP"),
MULTI_INSTANCE((byte)0x60, "MULTI_INSTANCE"), MULTI_INSTANCE((byte)0x60, "MULTI_INSTANCE"),
DOOR_LOCK((byte)0x62, "DOOR_LOCK"), DOOR_LOCK((byte)0x62, "DOOR_LOCK"),
USER_CODE((byte)0x63, "USER_CODE"), USER_CODE((byte)0x63, "USER_CODE"),

View File

@ -0,0 +1,28 @@
package com.lanternsoftware.zwave.message.impl;
import com.lanternsoftware.zwave.message.CommandClass;
import com.lanternsoftware.zwave.message.ControllerMessageType;
import com.lanternsoftware.zwave.message.RequestMessage;
public class CRC16EncapRequest extends RequestMessage {
private boolean on;
public CRC16EncapRequest() {
super(ControllerMessageType.ApplicationCommandHandler, CommandClass.CRC_16_ENCAP, (byte) 0x03);
}
@Override
public void fromPayload(byte[] _payload) {
nodeId = _payload[5];
on = _payload[11] == 1;
}
public boolean isOn() {
return on;
}
@Override
public String describe() {
return name() + " node: " + nodeId + " on: " + on;
}
}

View File

@ -0,0 +1,47 @@
package com.lanternsoftware.zwave.message.impl;
import com.lanternsoftware.util.CollectionUtils;
import com.lanternsoftware.util.NullUtils;
import com.lanternsoftware.zwave.message.CommandClass;
import com.lanternsoftware.zwave.message.SendDataRequestMessage;
public class ConfigurationSetRequest extends SendDataRequestMessage {
private byte parameter;
private byte[] value;
public ConfigurationSetRequest() {
this((byte)0, (byte)0, null);
}
public ConfigurationSetRequest(byte _nodeId, byte _parameter, byte[] _value) {
super(_nodeId, CommandClass.CONFIGURATION, (byte) 0x04);
parameter = _parameter;
value = _value;
}
public byte getParameter() {
return parameter;
}
public void setParameter(byte _parameter) {
parameter = _parameter;
}
public byte[] getValue() {
return value;
}
public void setValue(byte[] _value) {
value = _value;
}
@Override
public byte[] getPayload() {
return CollectionUtils.merge(asByteArray(parameter), asByteArray((byte)CollectionUtils.length(value)), value);
}
@Override
public String describe() {
return name() + " node: " + nodeId + " parameter: " + parameter + " value: " + NullUtils.toHex(value);
}
}

View File

@ -2,10 +2,12 @@ com.lanternsoftware.zwave.message.impl.ApplicationUpdateRequest
com.lanternsoftware.zwave.message.impl.BinarySwitchSetRequest com.lanternsoftware.zwave.message.impl.BinarySwitchSetRequest
com.lanternsoftware.zwave.message.impl.BinarySwitchReportRequest com.lanternsoftware.zwave.message.impl.BinarySwitchReportRequest
com.lanternsoftware.zwave.message.impl.ByteMessage com.lanternsoftware.zwave.message.impl.ByteMessage
com.lanternsoftware.zwave.message.impl.ConfigurationSetRequest
com.lanternsoftware.zwave.message.impl.ControllerCapabilitiesRequest com.lanternsoftware.zwave.message.impl.ControllerCapabilitiesRequest
com.lanternsoftware.zwave.message.impl.ControllerCapabilitiesResponse com.lanternsoftware.zwave.message.impl.ControllerCapabilitiesResponse
com.lanternsoftware.zwave.message.impl.ControllerInitialDataRequest com.lanternsoftware.zwave.message.impl.ControllerInitialDataRequest
com.lanternsoftware.zwave.message.impl.ControllerInitialDataResponse com.lanternsoftware.zwave.message.impl.ControllerInitialDataResponse
com.lanternsoftware.zwave.message.impl.CRC16EncapRequest
com.lanternsoftware.zwave.message.impl.DeviceManufacturerActionRequest com.lanternsoftware.zwave.message.impl.DeviceManufacturerActionRequest
com.lanternsoftware.zwave.message.impl.GetControllerIdRequest com.lanternsoftware.zwave.message.impl.GetControllerIdRequest
com.lanternsoftware.zwave.message.impl.GetControllerIdResponse com.lanternsoftware.zwave.message.impl.GetControllerIdResponse