Pro mini: Did not receive a node id from controller.



  • I successfully implemented a MQTT gateway on a PI and my Nano based sensors are working fine. 😊

    As a next step I'm trying to build a Pro mini 3.3 V based sensor.
    However the allocation of the node id seems not to work.
    The protocol received on the serial interface of the Pro mini looks always like this:

     __  __       ____
    |  \/  |_   _/ ___|  ___ _ __  ___  ___  _ __ ___
    | |\/| | | | \___ \ / _ \ `_ \/ __|/ _ \| `__/ __|
    | |  | | |_| |___| |  __/ | | \__ \  _  | |  \__ \
    |_|  |_|\__, |____/ \___|_| |_|___/\___/|_|  |___/
            |___/                      2.3.2
    
    16 MCO:BGN:INIT NODE,CP=RNNNA---,FQ=8,REL=255,VER=2.3.2
    28 TSM:INIT
    28 TSF:WUR:MS=0
    36 TSM:INIT:TSP OK
    38 TSM:FPAR
    40 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    339 TSF:MSG:READ,0-0-255,s=255,c=3,t=8,pt=1,l=1,sg=0:0
    346 TSF:MSG:FPAR OK,ID=0,D=1
    2050 TSM:FPAR:OK
    2050 TSM:ID
    2052 TSM:ID:REQ
    2056 TSF:MSG:SEND,255-255-0-0,s=4,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
    4063 TSM:ID
    4063 TSM:ID:REQ
    4067 TSF:MSG:SEND,255-255-0-0,s=223,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
    6074 TSM:ID
    6074 TSM:ID:REQ
    6078 TSF:MSG:SEND,255-255-0-0,s=186,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
    8085 TSM:ID
    8085 TSM:ID:REQ
    8089 TSF:MSG:SEND,255-255-0-0,s=149,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
    10096 !TSM:ID:FAIL
    10098 TSM:FAIL:CNT=1
    10100 TSM:FAIL:DIS
    10102 TSF:TDI:TSL
    20105 TSM:FAIL:RE-INIT
    20107 TSM:INIT
    20113 TSM:INIT:TSP OK
    20115 TSM:FPAR
    20119 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    21071 TSF:MSG:READ,0-0-255,s=255,c=3,t=8,pt=1,l=1,sg=0:0
    21078 TSF:MSG:FPAR OK,ID=0,D=1
    22128 TSM:FPAR:OK
    22130 TSM:ID
    22130 TSM:ID:REQ
    22134 TSF:MSG:SEND,255-255-0-0,s=114,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
    24143 TSM:ID
    24143 TSM:ID:REQ
    24147 TSF:MSG:SEND,255-255-0-0,s=79,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
    26157 TSM:ID
    26157 TSM:ID:REQ
    26161 TSF:MSG:SEND,255-255-0-0,s=45,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
    28170 TSM:ID
    28170 TSM:ID:REQ
    28174 TSF:MSG:SEND,255-255-0-0,s=10,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
    30183 !TSM:ID:FAIL
    30185 TSM:FAIL:CNT=2
    

    I tried with a new upload of the code, but the results is always the same.
    (As mentioned above the other sensors are working fine).

    Is there something else I have to consider, while using a Pro mini instead of a Nano?
    Thanks in advance for your feedback.

    Alberto


  • Mod

    @Alberto77 said in Pro mini: Did not receive a node id from controller.:

    TSM:ID:REQ

    You need to have a controller to hand out node IDs, or use static node IDs.
    See https://www.google.com/search?q=TSM%3AID%3AREQ&oq=TSM%3AID%3AREQ



  • ... and as no controller supports dynamic ID assignment through MQTT (see https://www.mysensors.org/build/mqtt_gateway), your only option is to set static NODE_IDs.



  • I also tried with the static Node_ID 24, there was no change in the behaviour. Then I tried with 25 and it is working now.

    #define MY_RADIO_RF24
    
    #include <MySensors.h>
    
    #define MY_NODE_ID 25
    #define OPEN 1
    #define CLOSE 0
    

    But the Node_ID seems to be 3 and not 25. 😧

    16 MCO:BGN:INIT NODE,CP=RNNNA---,FQ=8,REL=255,VER=2.3.2
    28 TSM:INIT
    28 TSF:WUR:MS=0
    36 TSM:INIT:TSP OK
    38 TSF:SID:OK,ID=3
    40 TSM:FPAR
    45 ?TSF:MSG:SEND,3-3-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    653 TSF:MSG:READ,0-0-3,s=255,c=3,t=8,pt=1,l=1,sg=0:0
    659 TSF:MSG:FPAR OK,ID=0,D=1
    2054 TSM:FPAR:OK
    2054 TSM:ID
    2056 TSM:ID:OK
    2058 TSM:UPL
    2062 TSF:MSG:SEND,3-3-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=OK:1
    2070 TSF:MSG:READ,0-0-3,s=255,c=3,t=25,pt=1,l=1,sg=0:1
    2076 TSF:MSG:PONG RECV,HP=1
    2078 TSM:UPL:OK
    2080 TSM:READY:ID=3,PAR=0,DIS=1
    2086 TSF:MSG:SEND,3-3-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100
    2095 TSF:MSG:READ,0-0-3,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
    2103 TSF:MSG:SEND,3-3-0-0,s=255,c=0,t=17,pt=0,l=5,sg=0,ft=0,st=OK:2.3.2
    2111 TSF:MSG:SEND,3-3-0-0,s=255,c=3,t=6,pt=1,l=1,sg=0,ft=0,st=OK:0
    2164 TSF:MSG:READ,0-0-3,s=255,c=3,t=6,pt=0,l=1,sg=0:M
    2172 TSF:MSG:SEND,3-3-0-0,s=5,c=0,t=0,pt=0,l=0,sg=0,ft=0,st=OK:
    2181 MCO:REG:REQ
    

    Is there a kind of offeset in the ID?

    Alberto


  • Mod

    @Alberto77 set the node id before the include of mysensors



  • Thanks! this made the change. Now the ID is 25 as intended.
    But how to explain that a Node_ID of 3 was set, when the #define statement was after the MySensors?



  • @frits: if the MQTT GW do not support the dynamic ID assignement, then what happened to my other sensors (those based on the Nano) 🤔 They got the Node_IDs from the GW. All the sensors are on the same GW.



  • @Alberto77 said in Pro mini: Did not receive a node id from controller.:

    @frits: if the MQTT GW do not support the dynamic ID assignement, then what happened to my other sensors (those based on the Nano) 🤔 They got the Node_IDs from the GW. All the sensors are on the same GW.

    The gateway doesn't issue NODE_IDs. The controller does, i.e. OpenHAB or Home Assistant (but not for MQTT connections).
    The NODE_ID will survive flashing (as long as you don't erase EEPROM). Have you used another Gateway before, say SerialGateway? This would explain why you have valid NODE_IDs on some nodes.



  • @frits : This is my first GW, but during my early experiments I run it as an Ethernet GW, then I reconfigured to MQTT.
    Currently I don't have a controller running but I'm using Node-Red + Influx-DB + Grafana.

    So probably during these first experiments, while in Ethernet mode, the Node_IDs were distributed.
    I will erase the EEPROMs by the next opportunity and will check the behaviour of my Nano sensors after re-boot.

    Thanks for your explanation frits, it helped me to learn more about MySensors.👍


Log in to reply
 

Suggested Topics

  • 3
  • 1
  • 5
  • 2
  • 1

8
Online

11.4k
Users

11.1k
Topics

112.7k
Posts