mirror of
https://github.com/zyphlar/LanternPowerMonitor.git
synced 2024-03-08 14:07:47 +00:00
Add the static single hub BOM.
This commit is contained in:
parent
7075c702df
commit
c0815ac0f9
BIN
bom/BOM.xlsx
Normal file
BIN
bom/BOM.xlsx
Normal file
Binary file not shown.
|
@ -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>
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
|
@ -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"),
|
||||||
|
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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);
|
||||||
|
}
|
||||||
|
}
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user