I have a couple of DHT22 Temperature and Humidity sensors running and in the Gateway log file, I see the following errors when the Sensor node “starts”:
50 02/08/14 15:15:58.974 luup_log:76: Arduino: Log: Relaying message back to gateway. <0x2e633680>
50 02/08/14 15:15:58.985 luup_log:76: Arduino: Log: Sending: from=0, to=2, childId=255, mtype=4, type=13, crc=177, 'I <0x2e633680>
01 02/08/14 15:15:58.986 luup_log:76: Arduino: Receive error: Unknown data: ', sent via 0 <0x2e633680>
If I capture the Arduino Node console output and paste it into an editor, you can see there is a carriage return before the closing ’
Sent successfully
Received: from=0, to=2, childId=255, mtype=4, type=13, crc=177, 'I
'
Mess crc ok.
Message addressed for this node.
Relaying message back to gateway.
Here is an example from an S_DIMMER node that I am developing (I will share it here when it is done). The issue occurs whenever I change the dim level using UI5 - the gateway sends the message to the Sensor and when it is relayed back to the gateway, you see the error.
Gateway log
50 02/08/14 15:38:00.062 luup_log:76: Arduino: Sending: 1;0;1;3;10 <0x2f433680>
50 02/08/14 15:38:00.075 luup_log:76: Arduino: Log: Relaying message back to gateway. <0x2e633680>
50 02/08/14 15:38:00.085 luup_log:76: Arduino: Log: Sending: from=0, to=1, childId=0, mtype=1, type=3, crc=174, '10 <0x2e633680>
01 02/08/14 15:38:00.086 luup_log:76: Arduino: Receive error: Unknown data: ', sent via 0 <0x2e633680>
50 02/08/14 15:38:00.087 luup_log:76: Arduino: Log: Sent successfully <0x2e633680>
50 02/08/14 15:38:00.105 luup_log:76: Arduino: Log: Received: from=1, to=0, childId=0, mtype=1, type=3, crc=183, '10 <0x2e633680>
01 02/08/14 15:38:00.106 luup_log:76: Arduino: Receive error: Unknown data: ' <0x2e633680>
50 02/08/14 15:38:00.107 luup_log:76: Arduino: Log: Message crc ok. <0x2e633680>
50 02/08/14 15:38:00.114 luup_log:76: Arduino: Log: Message addressed for this node. <0x2e633680>
50 02/08/14 15:38:00.115 luup_log:76: Arduino: Set Var: 1;0;1;3;10 <0x2e633680>
50 02/08/14 15:38:00.116 luup_log:76: Arduino: Setting variable 'LoadLevelStatus' to value '10' <0x2e633680>
50 02/08/14 15:38:00.116 luup_log:76: Arduino: urn:upnp-org:serviceId:Dimming1,LoadLevelStatus, 10, 88 <0x2e633680>
50 02/08/14 15:38:00.117 luup_log:76: Arduino: urn:micasaverde-com:serviceId:HaDevice1,LastUpdate, 1391902680, 88 <0x2e633680>
Sensor log
Received: from=0, to=1, childId=0, mtype=1, type=3, crc=174, '10
'
Mess crc ok.
Message addressed for this node.
Relaying message back to gateway.
Sending: from=1, to=0, childId=0, mtype=1, type=3, crc=183, '10
', sent via 0
Sent successfully
Incoming change for dimmer on pin:0, New status: 10
It seems it only happens when Relaying messages back to the gateway (seems like a newline is appended to the relay message before it is sent back to the gateway). I poked around in the Gateway and Sensor code to see if I could fix it but the root cause isn’t obvious to me. It doesn’t seem to affect the overall functionality but it is a bug of some sort…