Sending motion V_TRIPPED and light V_STATUS
-
Yes. Both motion sensors report back fine. I also have a node with door, motion and temperature and they all report back their respective values according to child-sensor-id.
I'm going to try update and re-compiling the code for the master node. Then watch debugging on the master node. Finally if that doesn't work I'll read through the source code for domoticz and mysensors to see why the light is not reporting back.
-
Yes. Both motion sensors report back fine. I also have a node with door, motion and temperature and they all report back their respective values according to child-sensor-id.
I'm going to try update and re-compiling the code for the master node. Then watch debugging on the master node. Finally if that doesn't work I'll read through the source code for domoticz and mysensors to see why the light is not reporting back.
-
OK while doing some serial debugging I noticed that the gateway node did not get the right message type: V_TEMP (t=0) should be V_STATUS (t=2).
TSF:MSG:READ,1-1-0,s=14,c=1,t=0,pt=1,l=1,sg=0:1 Received Message
Sender: 1
Last Node: 1
Destination: 0
Sensor Id: 14
Command: SET
Message Type: V_TEMP
Payload Type: P_BYTE
Payload Length: 1
Signing: 0
Payload: 1 -
It may be because the enum is clobbering V_STATUS with old V_LIGHT. Arduino/libraries/MySensors/core/MyMessage.h
typedef enum { V_TEMP = 0, //!< S_TEMP. Temperature S_TEMP, S_HEATER, S_HVAC V_HUM = 1, //!< S_HUM. Humidity V_STATUS = 2, //!< S_BINARY, S_DIMMER, S_SPRINKLER, S_HVAC, S_HEATER. Used for setting/reporting binary (on/off) status. 1=on, 0=off V_LIGHT = 2, //!< \deprecated Same as V_STATUS, **** DEPRECATED, DO NOT USE **** V_PERCENTAGE = 3, //!< S_DIMMER. Used for sending a percentage value 0-100 (%). -
Version 2.1.1
This morning I found I did some serial debugging on the sender and master node.
I had to re-initiate the Sensor ID and the Sensor Type before sending.isLightOn = 1; msg_S_LIGHTS.setSensor(ID_S_LIGHT); msg_S_LIGHTS.setType(V_STATUS); send(msg_S_LIGHTS.set(isLightOn),true);Without doing this the wrong type is sent from the node itself.
9234 TSF:MSG:SEND,1-1-0-0,s=15,c=0,t=3,pt=0,l=10,sg=0,ft=0,st=OK:SdGrgLight 9243 TSF:MSG:READ,0-0-1,s=15,c=0,t=3,pt=0,l=10,sg=0:SdGrgLight 9249 TSF:MSG:ACK 9991 MCO:REG:REQ 9996 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=0,st=OK:2 10002 TSF:MSG:READ,0-0-1,s=255,c=3,t=27,pt=1,l=1,sg=0:1 10007 MCO:PIM:NODE REG=1 10009 MCO:BGN:STP 10150 MCO:BGN:INIT OK,TSP=1 27173 TSF:MSG:SEND,1-1-0-0,s=9,c=1,t=16,pt=1,l=1,sg=0,ft=0,st=OK:1 27938 TSF:MSG:SEND,1-1-0-0,s=15,c=1,t=0,pt=1,l=1,sg=0,ft=0,st=OK:1Sent Message
Sender: 1
Last Node: 1
Next Node: 0
Destination: 0
Sensor Id: 15
Command: SET
Message Type:V_TEMP
Payload Type: P_BYTE
Payload Length: 1
Signing: 0
Failed uplink counter: 0
Status: OK (OK=success, NACK=no radio ACK received)
Payload: 1 -
I tried uploading a simple Light on/off delay loop sending only light status from the node. I can confirm that the master node receives the message on the serial interface. However Domoticz does not log any incoming actions. So my thoughts are now that Domoticz does not handle light-status send-updates from the nodes.
msg_S_LIGHTS.setSensor(ID_S_LIGHT); msg_S_LIGHTS.setType(V_STATUS); send(msg_S_LIGHTS.set(isLightOn==1 ? "1" : "0"),true);Message Type: V_STATUS
Payload Type: P_STRINGmsg_S_LIGHTS.setSensor(ID_S_LIGHT); msg_S_LIGHTS.setType(V_STATUS); send(msg_S_LIGHTS.set(isLightOn),true);Message Type: V_STATUS
Payload Type: P_BYTEmsg_S_LIGHTS.setSensor(ID_S_LIGHT); msg_S_LIGHTS.setType(V_TRIPPED); send(msg_S_LIGHTS.set(isLightOn),true);Message Type: V_TRIPPED
Payload Type: P_BYTE