Noob : Cant get Sensor talking to gateway
-
@mfalkvidd In my case I think if the log had said, No Controller provided SensorID, that would have been my first clue
-
@angeloS Fully agree - a warning instead of just sending a message with an empty payload would have been easier to spot. Maybe something to propose in Github?
-
@manutremo which message are you referring to?
@mfalkvidd Without being an specialist in the MySensors protocol, it could be something like
-
a debug message at some point in the gateway log when a node ID is requested and there is no ID to provide (no controller available),
-
something similar in the node log when an empty ID is provided form the gw
-
additionally, a warning in the log parser to check the controller when the payload is empty.
-
-
We could add a sample message, in the troubleshooting guide, when the node has no Node ID and the gateway is responding an empty message, so a Node ID must be defined in the sketch
-
@gohan and @manutremo when does the gateway respond with an empty message? I am not able to find that in the logs posted earlier in this thread.
@mfalkvidd Just reviewed the gw log and you're right, the gw just doesn't answer... I guess in this case it's just not possible to separate the cases when the gateway doesn't have a controller, or is off, or communication didn't arrive, or... in all cases, the node seems to end up with a ID=255.
As I said, not familiar with the protocol...
-
@mfalkvidd Without being an specialist in the MySensors protocol, it could be something like
-
a debug message at some point in the gateway log when a node ID is requested and there is no ID to provide (no controller available),
-
something similar in the node log when an empty ID is provided form the gw
-
additionally, a warning in the log parser to check the controller when the payload is empty.
@manutremo the gateway is just a dumb forwarder. When the ID request is received from the sensor node, the gateway forwards that message to it's configured interface (mqtt, ethernet, serial, ...). If the controller responds, the gateway will forward the response.
To do your suggested no 1, the gateway would have to keep track of all ID requests and set some time to know when the response from the controller is deemed too slow. That could probably be done, but would require quite a lot of work to get right and to keep compact enough to still fit the gateway in popular constrained devices like the atmega328.
The message in no 2 doesn't exist, as we have agreed on, so this is unfortunately not viable either.
Your suggestion no 3 sounds promising I think. Whenever the node prints !TSM:ID:FAIL, the log parser should spell out that the most likely cause is that no controller is present. I'm not sure how to update the log parser, but maybe @hek can chip in here? At the moment, the log parser seems unable to parse that message at all.
https://www.mysensors.org/apidocs/group__MyTransportgrp.html#details should be updated to mention the controller on the line where TSM ID FAIL is mentioned.
It would also be nice if the !TSM:ID:FAIL message was more verbose (for people who don't immediately use the log parser), but the log messages need to be kept very short to keep the binary size small.
-
-
A suggestion for updating the documentation is available at https://github.com/mysensors/MySensors/pull/984
Feedback is welcome. -
I have been facing the same problem all day today. Actually as far as I remember my old nodes used to setup the node assignation to AUTO by default.
Was that changed during the last month ? because I was busy at that period.
-
I have been facing the same problem all day today. Actually as far as I remember my old nodes used to setup the node assignation to AUTO by default.
Was that changed during the last month ? because I was busy at that period.
-
@ahmedadelhosni auto id has been default since inception, as far as I know. It was default 2.5 years ago when I first learned about MySensors. So nothing has changed.
@mfalkvidd That's what I know but as I have said, I have been facing the same error to assign an ID for my node and it was solved when I change it to static ID... strange !
-
i was thinking about this, perhaps as part of a welcome tutorial we connect the GW to a gateway (pick one , an easy one). And whilst doing this we simply explain why the Controller is needed.. this would help newbies like me from the start..
Which controller.. well Ive been looking at openhab but settled on Homeassistant, appears more active that OH
Angelo
-
i was thinking about this, perhaps as part of a welcome tutorial we connect the GW to a gateway (pick one , an easy one). And whilst doing this we simply explain why the Controller is needed.. this would help newbies like me from the start..
Which controller.. well Ive been looking at openhab but settled on Homeassistant, appears more active that OH
Angelo
@angeloS do you mean to add information to this page? https://www.mysensors.org/build/select_gateway
The getting started guide already mentions (twice actually) that the controller is responsible for handling automatic node id assignment.
If people don't read the getting started guide, will they really read the Select gateway page?
-
@angeloS do you mean to add information to this page? https://www.mysensors.org/build/select_gateway
The getting started guide already mentions (twice actually) that the controller is responsible for handling automatic node id assignment.
If people don't read the getting started guide, will they really read the Select gateway page?
I have the same situation - mysensors relay node can not find parent. I cleared eeprom and entered manually MY_NODE_ID, but it seems that gateway and node communicate, but fail to make final arrengement.
Gateway log:
22:54:33.173 [DEBUG] [orsAbstractConnection$MySensorsReader] - Message from gateway received: 0;255;3;0;9;Will not sign message for destination 102 as it does not require it
22:54:33.216 [DEBUG] [orsAbstractConnection$MySensorsReader] - Message from gateway received: 0;255;3;0;9;!TSF:MSG:SEND,0-0-102-102,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=NACK:0
22:54:34.691 [DEBUG] [orsAbstractConnection$MySensorsReader] - Message from gateway received: 0;255;3;0;9;TSF:MSG:READ,102-102-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
22:54:34.692 [DEBUG] [orsAbstractConnection$MySensorsReader] - Message from gateway received: 0;255;3;0;9;TSF:MSG:BC
22:54:34.694 [DEBUG] [orsAbstractConnection$MySensorsReader] - Message from gateway received: 0;255;3;0;9;TSF:MSG:FPAR REQ,ID=102
22:54:34.697 [DEBUG] [orsAbstractConnection$MySensorsReader] - Message from gateway received: 0;255;3;0;9;TSF:CKU:OK,FCTRL
22:54:34.701 [DEBUG] [orsAbstractConnection$MySensorsReader] - Message from gateway received: 0;255;3;0;9;TSF:MSG:GWL OKMySensors node log:
91296 TSM:INIT
791303 TSM:INIT:TSP OK
791305 TSM:INIT:STATID=102
791308 TSF:SID:OK,ID=102
791310 TSM:FPAR
791347 TSF:MSG:SEND,102-102-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
793354 !TSM:FPAR:NO REPLY
793356 TSM:FPAR
793393 TSF:MSG:SEND,102-102-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
795400 !TSM:FPAR:NO REPLY
795402 TSM:FPAR
795439 TSF:MSG:SEND,102-102-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
797446 !TSM:FPAR:NO REPLY
797448 TSM:FPAR
797485 TSF:MSG:SEND,102-102-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
799492 !TSM:FPAR:FAIL
799494 TSM:FAIL:CNT=7
799496 TSM:FAIL:PDT
859499 TSM:FAIL:RE-INIT
859501 TSM:INIT
859508 TSM:INIT:TSP OK
859510 TSM:INIT:STATID=102
859513 TSF:SID:OK,ID=102
859515 TSM:FPAR
859552 TSF:MSG:SEND,102-102-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
861559 !TSM:FPAR:NO REPLY
861561 TSM:FPAR
861598 TSF:MSG:SEND,102-102-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
863605 !TSM:FPAR:NO REPLY
863607 TSM:FPAR
863644 TSF:MSG:SEND,102-102-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
865651 !TSM:FPAR:NO REPLY
865653 TSM:FPAR
865690 TSF:MSG:SEND,102-102-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
867697 !TSM:FPAR:FAIL
867699 TSM:FAIL:CNT=7
867701 TSM:FAIL:PDTany ideas what I have to check?
regards,
rimantas