I've recently started tinkering with sensors, and I'm running into a couple of problems I'm having a hard time sorting.
I've built a serial gateway and a couple of motion sensors as described in the examples. The first motion sensor I built is working well, connecting to the gateway, and communicating when it trips. Horray!
But when I tried building a second motion sensor, it fails to receive an ID from the gateway.
I'm using the latest example sketches for both the gateway and the motion sensors and the same hardware for all my devices. I've checked the wiring carefully, completely redone the wiring, and swapped out each hardware component individually with no change in the behavior of the sensor. I've also tried restarting, reflashing, and clearing EEPROM on all sensors and the gateway.
Any thoughts on what might be causing this?
Also, is there any good resource for how node/child IDs get assigned? I didn't find anything super clear when I looked. I have a suspicion that it may be something to do with ID assignment because when I try to use the pymysensors Python library, it gets confused over which IDs are assigned versus which it expects to be assigned.
Serial Gateway log (with failing sensor active):
0;255;3;0;9;682089 TSF:MSG:READ,255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
0;255;3;0;9;682095 TSF:MSG:BC
0;255;3;0;9;682098 TSF:MSG:FPAR REQ,ID=255
0;255;3;0;9;682102 TSF:PNG:SEND,TO=0
0;255;3;0;9;682105 TSF:CKU:OK
0;255;3;0;9;682107 TSF:MSG:GWL OK
0;255;3;0;9;682240 ?TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0
0;255;3;0;9;690179 TSF:MSG:READ,255-255-0,s=75,c=3,t=3,pt=0,l=0,sg=0:
255;75;3;0;3;
Motion sensor log for failing sensor:
10:11:48.404 ->
10:11:48.404 -> 17 MCO:BGN:INIT NODE,CP=RNNNA---,FQ=16,REL=0,VER=2.4.0-alpha
10:11:48.404 -> 27 TSM:INIT
10:11:48.404 -> 28 TSF:WUR:MS=0
10:11:48.404 -> 35 TSM:INIT:TSP OK
10:11:48.440 -> 37 TSM:FPAR
10:11:48.440 -> 39 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
10:11:50.440 -> 2048 !TSM:FPAR:NO REPLY
10:11:50.440 -> 2050 TSM:FPAR
10:11:50.440 -> 2052 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
10:11:52.462 -> 4060 !TSM:FPAR:NO REPLY
10:11:52.462 -> 4062 TSM:FPAR
10:11:52.462 -> 4064 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
10:11:52.599 -> 4212 TSF:MSG:READ,0-0-255,s=255,c=3,t=8,pt=1,l=1,sg=0:0
10:11:52.599 -> 4217 TSF:MSG:FPAR OK,ID=0,D=1
10:11:54.487 -> 6072 TSM:FPAR:OK
10:11:54.487 -> 6073 TSM:ID
10:11:54.487 -> 6074 TSM:ID:REQ
10:11:54.487 -> 6077 TSF:MSG:SEND,255-255-0-0,s=186,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
10:11:56.509 -> 8084 TSM:ID
10:11:56.509 -> 8085 TSM:ID:REQ
10:11:56.509 -> 8087 TSF:MSG:SEND,255-255-0-0,s=149,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
10:11:58.501 -> 10095 TSM:ID
10:11:58.501 -> 10096 TSM:ID:REQ
10:11:58.501 -> 10099 TSF:MSG:SEND,255-255-0-0,s=112,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
10:12:00.522 -> 12106 TSM:ID
10:12:00.522 -> 12107 TSM:ID:REQ
10:12:00.556 -> 12110 TSF:MSG:SEND,255-255-0-0,s=75,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
Serial Gateway log (with working sensor active):
0;255;3;0;9;0 MCO:BGN:INIT GW,CP=RNNGA---,FQ=16,REL=0,VER=2.4.0-alpha
0;255;3;0;9;6 TSM:INIT
0;255;3;0;9;8 TSF:WUR:MS=0
0;255;3;0;9;15 TSM:INIT:TSP OK
0;255;3;0;9;18 TSM:INIT:GW MODE
0;255;3;0;9;21 TSM:READY:ID=0,PAR=0,DIS=0
0;255;3;0;9;24 MCO:REG:NOT NEEDED
0;255;3;0;14;Gateway startup complete.
0;255;0;0;18;2.4.0-alpha
0;255;3;0;9;29 MCO:BGN:STP
0;255;3;0;9;36 MCO:BGN:INIT OK,TSP=1
0;255;3;0;9;39 TSM:READY:NWD REQ
0;255;3;0;9;45 ?TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK:
0;255;3;0;9;555 TSF:MSG:READ,1-1-0,s=1,c=1,t=16,pt=0,l=1,sg=0:0
1;1;1;0;16;0
0;255;3;0;9;1930 TSF:MSG:READ,1-1-0,s=1,c=1,t=16,pt=0,l=1,sg=0:0
1;1;1;0;16;0
0;255;3;0;9;3302 TSF:MSG:READ,1-1-0,s=1,c=1,t=16,pt=0,l=1,sg=0:0
1;1;1;0;16;0
0;255;3;0;9;4676 TSF:MSG:READ,1-1-0,s=1,c=1,t=16,pt=0,l=1,sg=0:0
1;1;1;0;16;0
0;255;3;0;9;6050 TSF:MSG:READ,1-1-0,s=1,c=1,t=16,pt=0,l=1,sg=0:0
1;1;1;0;16;0
0;255;3;0;9;7424 TSF:MSG:READ,1-1-0,s=1,c=1,t=16,pt=0,l=1,sg=0:0
1;1;1;0;16;0
0;255;3;0;9;8796 TSF:MSG:READ,1-1-0,s=1,c=1,t=16,pt=0,l=1,sg=0:0
1;1;1;0;16;0
0;255;3;0;9;10181 TSF:MSG:READ,1-1-0,s=1,c=1,t=16,pt=0,l=1,sg=0:0
1;1;1;0;16;0
0;255;3;0;9;11553 TSF:MSG:READ,1-1-0,s=1,c=1,t=16,pt=0,l=1,sg=0:0
1;1;1;0;16;0
0;255;3;0;9;12487 TSF:MSG:READ,1-1-0,s=1,c=1,t=16,pt=0,l=1,sg=0:1
1;1;1;0;16;1
0;255;3;0;9;13859 TSF:MSG:READ,1-1-0,s=1,c=1,t=16,pt=0,l=1,sg=0:1
1;1;1;0;16;1
0;255;3;0;9;15232 TSF:MSG:READ,1-1-0,s=1,c=1,t=16,pt=0,l=1,sg=0:1
1;1;1;0;16;1
0;255;3;0;9;16604 TSF:MSG:READ,1-1-0,s=1,c=1,t=16,pt=0,l=1,sg=0:1
1;1;1;0;16;1
0;255;3;0;9;17613 TSF:MSG:READ,1-1-0,s=1,c=1,t=16,pt=0,l=1,sg=0:0
1;1;1;0;16;0
0;255;3;0;9;18985 TSF:MSG:READ,1-1-0,s=1,c=1,t=16,pt=0,l=1,sg=0:0
1;1;1;0;16;0
0;255;3;0;9;20358 TSF:MSG:READ,1-1-0,s=1,c=1,t=16,pt=0,l=1,sg=0:0
Motion sensor log for working sensor:
10:20:33.848 -> 17 MCO:BGN:INIT NODE,CP=RNNNA---,FQ=16,REL=0,VER=2.4.0-alpha
10:20:33.848 -> 27 TSM:INIT
10:20:33.848 -> 28 TSF:WUR:MS=0
10:20:33.848 -> 35 TSM:INIT:TSP OK
10:20:33.848 -> 37 TSF:SID:OK,ID=1
10:20:33.886 -> 38 TSM:FPAR
10:20:33.886 -> 43 ?TSF:MSG:SEND,1-1-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
10:20:35.879 -> 2050 !TSM:FPAR:NO REPLY
10:20:35.879 -> 2052 TSM:FPAR
10:20:35.879 -> 2056 ?TSF:MSG:SEND,1-1-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
10:20:36.158 -> 2318 TSF:MSG:READ,0-0-1,s=255,c=3,t=8,pt=1,l=1,sg=0:0
10:20:36.158 -> 2323 TSF:MSG:FPAR OK,ID=0,D=1
10:20:37.900 -> 4063 TSM:FPAR:OK
10:20:37.900 -> 4064 TSM:ID
10:20:37.900 -> 4065 TSM:ID:OK
10:20:37.900 -> 4067 TSM:UPL
10:20:37.900 -> 4072 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=OK:1
10:20:37.900 -> 4080 TSF:MSG:READ,0-0-1,s=255,c=3,t=25,pt=1,l=1,sg=0:1
10:20:37.900 -> 4085 TSF:MSG:PONG RECV,HP=1
10:20:37.900 -> 4088 TSM:UPL:OK
10:20:37.900 -> 4089 TSM:READY:ID=1,PAR=0,DIS=1
10:20:37.933 -> 4097 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100
10:20:37.933 -> 4104 TSF:MSG:READ,0-0-1,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
10:20:37.933 -> 4114 TSF:MSG:SEND,1-1-0-0,s=255,c=0,t=17,pt=0,l=11,sg=0,ft=0,st=OK:2.4.0-alpha
10:20:37.933 -> 4123 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=6,pt=1,l=1,sg=0,ft=0,st=OK:0
10:20:39.983 -> 6170 !TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=11,pt=0,l=13,sg=0,ft=0,st=NACK:Motion Sensor
10:20:40.020 -> 6215 !TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=12,pt=0,l=3,sg=0,ft=1,st=NACK:1.0
10:20:40.088 -> 6257 !TSF:MSG:SEND,1-1-0-0,s=1,c=0,t=1,pt=0,l=0,sg=0,ft=2,st=NACK:
10:20:40.088 -> 6263 MCO:REG:REQ
10:20:40.122 -> 6300 !TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=3,st=NACK:2
10:20:42.148 -> 8342 !TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=4,st=NACK:2
10:20:42.184 -> 8349 TSF:MSG:READ,0-0-1,s=255,c=3,t=27,pt=1,l=1,sg=0:1
10:20:42.184 -> 8354 MCO:PIM:NODE REG=1
10:20:42.184 -> 8356 MCO:BGN:STP
10:20:42.184 -> 8358 MCO:BGN:INIT OK,TSP=1
10:20:42.184 -> 0
10:20:42.184 -> 8372 TSF:MSG:SEND,1-1-0-0,s=1,c=1,t=16,pt=0,l=1,sg=0,ft=5,st=OK:0
10:20:42.184 -> 8378 MCO:SLP:MS=1200,SMS=0,I1=1,M1=1,I2=255,M2=255
10:20:42.184 -> 8382 TSF:TDI:TSL
10:20:42.834 -> 8384 MCO:SLP:WUP=1
10:20:42.834 -> 8385 TSF:TRI:TSB
10:20:42.834 -> 1
10:20:42.834 -> 8400 TSF:MSG:SEND,1-1-0-0,s=1,c=1,t=16,pt=0,l=1,sg=0,ft=0,st=OK:1
10:20:42.834 -> 8407 MCO:SLP:MS=1200,SMS=0,I1=1,M1=1,I2=255,M2=255
10:20:42.834 -> 8411 TSF:TDI:TSL
10:20:44.195 -> 8413 MCO:SLP:WUP=-1
10:20:44.195 -> 8415 TSF:TRI:TSB
10:20:44.195 -> 1
10:20:44.195 -> 8427 TSF:MSG:SEND,1-1-0-0,s=1,c=1,t=16,pt=0,l=1,sg=0,ft=0,st=OK:1
10:20:44.195 -> 8433 MCO:SLP:MS=1200,SMS=0,I1=1,M1=1,I2=255,M2=255
10:20:44.195 -> 8437 TSF:TDI:TSL
10:20:45.554 -> 8439 MCO:SLP:WUP=-1
10:20:45.554 -> 8441 TSF:TRI:TSB
10:20:45.589 -> 1
10:20:45.623 -> 8483 !TSF:MSG:SEND,1-1-0-0,s=1,c=1,t=16,pt=0,l=1,sg=0,ft=0,st=NACK:1
10:20:45.623 -> 8489 MCO:SLP:MS=1200,SMS=0,I1=1,M1=1,I2=255,M2=255
10:20:45.623 -> 8495 TSF:TDI:TSL
10:20:45.623 -> 8496 MCO:SLP:WUP=1
10:20:45.623 -> 8498 TSF:TRI:TSB
10:20:45.659 -> 0