Signing changes presentation message?
-
Hi all,
I upgraded a working HomeAssistant setup from version 1.5.4 without signing to use signing.
Although I can still see message being exchanged, HomeAssistant stopped from autodiscovering the nodes.
Watching the protocol exchange for a new powered up node reveal a small difference:This is what the serial gateway sees with signing disabled:
0;0;3;0;14;Gateway startup complete.
97;255;0;0;17;1.5.4
97;255;3;0;6;0
97;255;3;0;11;Sensebender Motion
97;255;3;0;12;1.3.1
97;1;0;0;6;onboard
97;2;0;0;7;onboard
97;3;0;0;1;PIR
97;1;1;0;0;24.5
97;2;1;0;1;37
97;255;3;0;0;101
97;3;1;0;16;1
97;3;1;0;16;0And this is with signing:
0;0;3;0;14;Gateway startup complete.
97;255;3;0;6;0
97;255;3;0;11;Sensebender Motion
97;255;3;0;12;1.3.1
97;1;0;0;6;onboard
97;2;0;0;7;onboard
97;3;0;0;1;PIR
97;1;1;0;0;23.9
97;2;1;0;1;38
97;255;3;0;0;101
97;3;1;0;16;1
97;3;1;0;16;0The signed version is missing the message where the protocol version used to be. I am quite new to MySensors, so question is if that is an intended behaviour?
-
Hi!
Have you confirmed that all sent messages were received by the gateway? Signing maximizes the strain on the radio comms. Signing will expose a not perfect radio environment.
-
Hi!
Have you confirmed that all sent messages were received by the gateway? Signing maximizes the strain on the radio comms. Signing will expose a not perfect radio environment.
Yes, the two are sitting next to each other. It is consistant that the message with the release (1.5.4) is missing.
May be my init sub is not correct? I am using this:void setup() { pinMode(LED_PIN, OUTPUT); digitalWrite(LED_PIN, LOW); pinMode(PIR_SENSOR_DIGITAL, INPUT); // Activate internal pull-ups digitalWrite(PIR_SENSOR_DIGITAL, HIGH); Serial.begin(115200); Serial.print(F("Sensebender Motion FW ")); Serial.print(RELEASE); Serial.flush(); ... // Make sure that ATSHA204 is not floating pinMode(ATSHA204_PIN, INPUT); digitalWrite(ATSHA204_PIN, HIGH); digitalWrite(TEST_PIN,LOW); digitalWrite(OTA_ENABLE, LOW); // remove pullup, save some power. digitalWrite(LED_PIN, HIGH); gw.begin(NULL, NODE_ADDRESS, false); humiditySensor.begin(); digitalWrite(LED_PIN, LOW); Serial.flush(); Serial.println(F(" - Online!")); gw.sendSketchInfo("Sensebender Motion", RELEASE, REQ_ACK); gw.present(CHILD_ID_TEMP,S_TEMP,"onboard", REQ_ACK); gw.present(CHILD_ID_HUM,S_HUM,"onboard", REQ_ACK); gw.present(CHILD_ID_PIR, S_MOTION, "PIR", REQ_ACK); isMetric = gw.getConfig().isMetric; Serial.print(F("isMetric: ")); Serial.println(isMetric); raHum.clear(); sendTempHumidityMeasurements(false); sendBattLevel(false); if (ota_enabled) Serial.println("OTA FW update enabled"); } -
Having the nodes next to eachother doesn't guarantee good radio comms. You have to verify by connecting a serial monitor to the node, looking at that output, and look at the log from the controller/gateway. Then compare these two lists of sent vs received messages.
-
This is output from Serial Gateway with Debug turned on:
0;0;3;0;9;gateway started, id=0, parent=0, distance=0 0;0;3;0;14;Gateway startup complete. 0;0;3;0;9;read: 97-97-0 s=255,c=3,t=15,pt=2,l=2,sg=0:1 0;0;3;0;9;send: 0-0-97-97 s=255,c=3,t=15,pt=2,l=2,sg=0,st=ok:1 0;0;3;0;9;read: 97-97-0 s=255,c=3,t=16,pt=0,l=0,sg=0: 0;0;3;0;9;send: 0-0-97-97 s=255,c=3,t=17,pt=6,l=25,sg=0,st=ok:0171638 0;0;3;0;9;verify fail 0;0;3;0;9;read: 97-97-0 s=255,c=3,t=16,pt=0,l=0,sg=0: 0;0;3;0;9;send: 0-0-97-97 s=255,c=3,t=17,pt=6,l=25,sg=0,st=ok:01C94B5 0;0;3;0;9;read: 97-97-0 s=255,c=3,t=6,pt=1,l=1,sg=1:0 97;255;3;0;6;0 0;0;3;0;9;read: 97-97-0 s=255,c=3,t=16,pt=0,l=0,sg=0: 0;0;3;0;9;send: 0-0-97-97 s=255,c=3,t=17,pt=6,l=25,sg=0,st=ok:01E5044 0;0;3;0;9;read: 97-97-0 s=255,c=3,t=11,pt=0,l=18,sg=1:Sensebender Mot 97;255;3;0;11;Sensebender Motion 0;0;3;0;9;read: 97-97-0 s=255,c=3,t=16,pt=0,l=0,sg=0: 0;0;3;0;9;send: 0-0-97-97 s=255,c=3,t=17,pt=6,l=25,sg=0,st=ok:0127A06 0;0;3;0;9;read: 97-97-0 s=255,c=3,t=12,pt=0,l=5,sg=1:1.3.1 97;255;3;0;12;1.3.1And this is with DEBUG and DEBUG_SIGNING turned on:
0;0;3;0;9;gateway started, id=0, parent=0, distance=0 0;0;3;0;14;Gateway startup complete. 0;0;3;0;9;read: 97-97-0 s=255,c=3,t=15,pt=2,l=2,sg=0:1 0;0;3;0;9;send: 0-0-97-97 s=255,c=3,t=15,pt=2,l=2,sg=0,st=ok:1 0;0;3;0;9;read: 97-97-0 s=255,c=3,t=16,pt=0,l=0,sg=0: 0;0;3;0;9;send: 0-0-97-97 s=255,c=3,t=17,pt=6,l=25,sg=0,st=ok:01B45E7 SIM: 015F593B6382705C14D1165A91896D854A8336D1 MSG: 61002E0011FF312E352E34 CNC: 01B45E76EEFF4F7F35A50615EBA02F23ECA22B336B6008C39BAAAAAAAAAAAAAA HMAC: CA16F9C17D683DE7074FEE542CF8B26F41200DCB4AA70072BF96CB6DAE78C5D1 SNOK: 0116F9C17D683DE7074FEE542CF8B26F41200DCB 0;0;3;0;9;verify fail 0;0;3;0;9;read: 97-97-0 s=255,c=3,t=16,pt=0,l=0,sg=0: 0;0;3;0;9;send: 0-0-97-97 s=255,c=3,t=17,pt=6,l=25,sg=0,st=ok:01E7FED SIM: 010D119CDCF58D40871D2BE7F9DF050CF2D10F956E3D5C69 MSG: 61000E2306FF00 CNC: 01E7FED0F1F7A2BFC3B8CF302DF6077DA5BC74DF6388C54F8EAAAAAAAAAAAAAA HMAC: 670D119CDCF58D40871D2BE7F9DF050CF2D10F956E3D5C6967D5DA168E46CEAC SOK 0;0;3;0;9;read: 97-97-0 s=255,c=3,t=6,pt=1,l=1,sg=1:0 97;255;3;0;6;0 0;0;3;0;9;read: 97-97-0 s=255,c=3,t=16,pt=0,l=0,sg=0: 0;0;3;0;9;send: 0-0-97-97 s=255,c=3,t=17,pt=6,l=25,sg=0,st=ok:01E5A12 SIM: 01B22062689F9E MSG: 610096030BFF53656E736562656E646572204D6F74696F6E CNC: 01E5A122848F72F8A4D2D18F979904FDB389DC6980BD8493AAAAAAAAAAAAAAAA HMAC: 28B22062689F9E3ECC79E3E5CAD58827D1DA38C88C4DE87974C1E05CE8C8068D SOK 0;0;3;0;9;read: 97-97-0 s=255,c=3,t=11,pt=0,l=18,sg=1:Sensebender Mot 97;255;3;0;11;Sensebender Motion 0;0;3;0;9;read: 97-97-0 s=255,c=3,t=16,pt=0,l=0,sg=0: 0;0;3;0;9;send: 0-0-97-97 s=255,c=3,t=17,pt=6,l=25,sg=0,st=ok:011B6BD SIM: 017ABA174BDC2555F1A4BB1E2CFE844937C86442 MSG: 61002E030CFF312E332E31 CNC: 011B6BD4E168AD907C4F8596A93D78FFF19A39E39144BB3DE6AAAAAAAAAAAAAA HMAC: E67ABA174BDC2555F1A4BB1E2CFE844937C864424509AF34FA335C677A953BE7 SOK 0;0;3;0;9;read: 97-97-0 s=255,c=3,t=12,pt=0,l=5,sg=1:1.3.1The verify fail message is consistent always there which I hardly believe can be from transmission errors?