NodeID assignment not working? MY_INCLUSION_MODE_FEATURE enabled
-
Hi,
The myscontroller node does not seem to assign IDs.
Only nodes with a defined MY_NODE_ID work.
MY_INCLUSION_MODE_FEATURE is enabled on the gateway.
Pressing the button does not change the behavior (I see taht the inclusion mode is enabled when I press the button, and resets after 60s)When I omit the MY_NODE_ID in my sketch, the node keeps asking for a node id several times.
On the NodeRED side, I connected a debug msg node at the output of the myscontroller node.
The debug shows that a different ID is tried but the sqlite base is not populated and the asking node does not receive the ID.
Do I need to connect the myscontroller output to the input of the gateway to send a message back to the node?Here is the node debug messages:
16 MCO:BGN:INIT NODE,CP=RNNNA---,FQ=16,REL=255,VER=2.3.2 26 TSM:INIT 28 TSF:WUR:MS=0 34 TSM:INIT:TSP OK 36 TSM:FPAR 38 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK: 2048 !TSM:FPAR:NO REPLY 2050 TSM:FPAR 2052 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK: 4060 !TSM:FPAR:NO REPLY 4062 TSM:FPAR 4064 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK: 6072 !TSM:FPAR:NO REPLY 6074 TSM:FPAR 6076 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK: 8084 !TSM:FPAR:FAIL 8085 TSM:FAIL:CNT=1 8087 TSM:FAIL:DIS 8089 TSF:TDI:TSL 18091 TSM:FAIL:RE-INIT 18093 TSM:INIT 18099 TSM:INIT:TSP OK 18101 TSM:FPAR 18104 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK: 18848 TSF:MSG:READ,0-0-255,s=255,c=3,t=8,pt=1,l=1,sg=0:0 18853 TSF:MSG:FPAR OK,ID=0,D=1 20112 TSM:FPAR:OK 20113 TSM:ID 20115 TSM:ID:REQ 20117 TSF:MSG:SEND,255-255-0-0,s=147,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK: 22125 TSM:ID 22126 TSM:ID:REQ 22129 TSF:MSG:SEND,255-255-0-0,s=110,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK: 24136 TSM:ID 24137 TSM:ID:REQ 24140 TSF:MSG:SEND,255-255-0-0,s=73,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK: 26147 TSM:ID 26148 TSM:ID:REQ 26151 TSF:MSG:SEND,255-255-0-0,s=36,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK: 28160 !TSM:ID:FAIL 28161 TSM:FAIL:CNT=2 28163 TSM:FAIL:DIS 28165 TSF:TDI:TSL 38168 TSM:FAIL:RE-INIT 38170 TSM:INIT 38176 TSM:INIT:TSP OK 38178 TSM:FPAR 38181 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK: 38538 TSF:MSG:READ,0-0-255,s=255,c=3,t=8,pt=1,l=1,sg=0:0 38543 TSF:MSG:FPAR OK,ID=0,D=1 40190 TSM:FPAR:OK 40192 TSM:ID 40194 TSM:ID:REQ 40196 TSF:MSG:SEND,255-255-0-0,s=2,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK: 42203 TSM:ID 42204 TSM:ID:REQ 42207 TSF:MSG:SEND,255-255-0-0,s=220,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK: 44214 TSM:ID 44215 TSM:ID:REQ 44218 TSF:MSG:SEND,255-255-0-0,s=183,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK: 46225 TSM:ID 46226 TSM:ID:REQ 46229 TSF:MSG:SEND,255-255-0-0,s=146,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK: 48236 !TSM:ID:FAIL 48237 TSM:FAIL:CNT=3 48239 TSM:FAIL:DIS 48241 TSF:TDI:TSL 58244 TSM:FAIL:RE-INIT 58246 TSM:INIT 58252 TSM:INIT:TSP OK 58254 TSM:FPAR 58257 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK: 60265 !TSM:FPAR:NO REPLY 60267 TSM:FPAR 60270 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK: 61234 TSF:MSG:READ,0-0-255,s=255,c=3,t=8,pt=1,l=1,sg=0:0 61239 TSF:MSG:FPAR OK,ID=0,D=1 62277 TSM:FPAR:OK 62278 TSM:ID 62280 TSM:ID:REQ 62282 TSF:MSG:SEND,255-255-0-0,s=71,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK: 64290 TSM:ID 64291 TSM:ID:REQ 64294 TSF:MSG:SEND,255-255-0-0,s=35,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK: 66302 TSM:ID 66304 TSM:ID:REQ 66307 TSF:MSG:SEND,255-255-0-0,s=0,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK: 68314 TSM:ID 68315 TSM:ID:REQ 68318 TSF:MSG:SEND,255-255-0-0,s=219,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK: 70325 !TSM:ID:FAIL
And here is the message I get from the output of the myscontroller node:
{"payload":"255;6;3;0;4;1","port":"/dev/ttyUSB-MysGW","_msgid":"cd1b9bbf.44ae08","nodeId":255,"childSensorId":6,"messageType":3,"ack":0,"subType":4,"origin":1,"messageTypeStr":"C_INTERNAL","subTypeStr":"I_ID_REQUEST","topicRoot":"mys-out"} {"payload":"255;225;3;0;4;1","port":"/dev/ttyUSB-MysGW","_msgid":"c0995566.b1b318","nodeId":255,"childSensorId":225,"messageType":3,"ack":0,"subType":4,"origin":1,"messageTypeStr":"C_INTERNAL","subTypeStr":"I_ID_REQUEST","topicRoot":"mys-out"} {"payload":"255;188;3;0;4;1","port":"/dev/ttyUSB-MysGW","_msgid":"4a91ca08.1fcce4","nodeId":255,"childSensorId":188,"messageType":3,"ack":0,"subType":4,"origin":1,"messageTypeStr":"C_INTERNAL","subTypeStr":"I_ID_REQUEST","topicRoot":"mys-out"}
I don't use MQTT, my gateway is a serial one.
Any clue? thanks a lot.
-
I reply to myself, I succeeded to make it work.
The\n
was missing in the payload before sending it back to the gateway.
This took me months to see this...Works like a charm now, I just need to implement the inclusion feature in NodeRED.