!TSM:ID:FAIL need help
-
Hi
it's my first post and i need help.
I want to use mysensors as move sensor and my problem is sender probably doesn't want exit from init mode ??10093 !TSM:ID:FAIL Did not receive a node id from controller. Is your controller connected and correctly configured? 10094 TSM:FAIL:CNT=1 Transition to Failure state, consecutive failure counter is 1 10096 TSM:FAIL:DIS Disable transport 10098 TSF:TDI:TSL Set transport to sleep
program never goes to void loop
I need a hint to sketch to work.
Power is ok ; messages go thru gateway to mqttTest sketch:
#define MY_DEBUG #define MY_RADIO_RF24 #include <MySensors.h> uint32_t SLEEP_TIME = 120000; // Sleep time between reports (in milliseconds) #define DIGITAL_INPUT_SENSOR 3 // The digital input you attached your motion sensor. (Only 2 and 3 generates interrupt!) #define CHILD_ID 1 // Id of the sensor child #define MY_NODE_ID 1 MyMessage msg(CHILD_ID, V_TRIPPED); void setup() { pinMode(DIGITAL_INPUT_SENSOR, INPUT); // sets the motion sensor digital pin as input } void presentation() { sendSketchInfo("Motion Sensor", "1.0");// Send the sketch version information to the gateway and Controller present(CHILD_ID, S_MOTION);// Register all sensors to gw (they will be created as child devices) } void loop() { Serial.println(" - = T E S T L O O P = -"); bool tripped = digitalRead(DIGITAL_INPUT_SENSOR) == HIGH; // Read digital motion value send(msg.set(tripped?"1":"0")); // Send tripped value to gw // Sleep until interrupt comes in on motion sensor. Send update every two minute. sleep(digitalPinToInterrupt(DIGITAL_INPUT_SENSOR), CHANGE, SLEEP_TIME); }
Log from sender
__ __ ____ | \/ |_ _/ ___| ___ _ __ ___ ___ _ __ ___ | |\/| | | | \___ \ / _ \ `_ \/ __|/ _ \| `__/ __| | | | | |_| |___| | __/ | | \__ \ _ | | \__ \ |_| |_|\__, |____/ \___|_| |_|___/\___/|_| |___/ |___/ 2.3.2 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: 944 TSF:MSG:READ,0-0-255,s=255,c=3,t=8,pt=1,l=1,sg=0:0 949 TSF:MSG:FPAR OK,ID=0,D=1 2048 TSM:FPAR:OK 2049 TSM:ID 2050 TSM:ID:REQ 2053 TSF:MSG:SEND,255-255-0-0,s=2,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK: 4060 TSM:ID 4061 TSM:ID:REQ 4063 TSF:MSG:SEND,255-255-0-0,s=221,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK: 6071 TSM:ID 6072 TSM:ID:REQ 6074 TSF:MSG:SEND,255-255-0-0,s=184,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK: 8082 TSM:ID 8083 TSM:ID:REQ 8085 TSF:MSG:SEND,255-255-0-0,s=147,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK: 10093 !TSM:ID:FAIL 10094 TSM:FAIL:CNT=1 10096 TSM:FAIL:DIS 10098 TSF:TDI:TSL
Log from gateway:
39 MCO:BGN:INIT GW,CP=RNNGF---,FQ=240,REL=255,VER=2.3.2 44 TSF:LRT:OK 47 TSM:INIT 51 TSF:WUR:MS=0 60 TSM:INIT:TSP OK 61 TSM:INIT:GW MODE 66 TSM:READY:ID=0,PAR=0,DIS=0 70 MCO:REG:NOT NEEDED 186 GWT:TPC:CONNECTING... 1189 MCO:BGN:STP 1191 MCO:BGN:INIT OK,TSP=1 1195 GWT:TPC:IP=192.168.1.88 1200 GWT:RMQ:CONNECTING... 1222 GWT:RMQ:OK 1224 GWT:TPS:TOPIC=/mysens-out/0/255/0/0/18,MSG SENT 1232 TSM:READY:NWD REQ 1237 ?TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK: 31573 TSF:MSG:READ,255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0: 31578 TSF:MSG:BC 31582 TSF:MSG:FPAR REQ,ID=255 31587 TSF:PNG:SEND,TO=0 31591 TSF:CKU:OK 31595 TSF:MSG:GWL OK 32480 ?TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0 33587 TSF:MSG:READ,255-255-0,s=2,c=3,t=3,pt=0,l=0,sg=0: 33592 GWT:TPS:TOPIC=/mysens-out/255/2/3/0/3,MSG SENT 35598 TSF:MSG:READ,255-255-0,s=221,c=3,t=3,pt=0,l=0,sg=0: 35603 GWT:TPS:TOPIC=/mysens-out/255/221/3/0/3,MSG SENT 37609 TSF:MSG:READ,255-255-0,s=184,c=3,t=3,pt=0,l=0,sg=0: 37614 GWT:TPS:TOPIC=/mysens-out/255/184/3/0/3,MSG SENT 39620 TSF:MSG:READ,255-255-0,s=147,c=3,t=3,pt=0,l=0,sg=0: 39625 GWT:TPS:TOPIC=/mysens-out/255/147/3/0/3,MSG SENT
My Gateway is ESP32/NRF24 +MQTT and message to mqtt is ok (this is defferent log)
27.12.2020, 17:21:33node: edf01ef4.eb25f /mysens-out/255/2/3/0/3 : msg.payload : string[0]"" 27.12.2020, 17:21:35node: edf01ef4.eb25f /mysens-out/255/221/3/0/3 : msg.payload : string[0]"" 27.12.2020, 17:21:37node: edf01ef4.eb25f /mysens-out/255/184/3/0/3 : msg.payload : string[0]"" 27.12.2020, 17:21:39node: edf01ef4.eb25f /mysens-out/255/147/3/0/3 : msg.payload : string[0]""
-
Welcome @robos!
The gateway is sending an ID request via MQTT to the controller, but doesn't get a reply.
From the Building a MQTT Gateway guide:
NOTE: No controller supports dynamic ID assignment through MQTT. All nodes must have MY_NODE_ID defined in the sketch to work with MQTT. If you don't set MY_NODE_ID, nodes will complain with the message "!TSM:ID:FAIL".
If you want to keep using MQTT, you have to add
#define MY_NODE_ID n
before(!)#include <MySensors.h>
, wherebyn
may be any (unused) number between 1 and 254.For automatic ID assignment through the controller, select a different gateway, like serial or ethernet.
-
Thanks
#define MY_NODE_ID n before(!) #include <MySensors.h> that helped a lot !!!