Can a gateway talk to itself?



  • Hello,
    Recently I updated my gateway to add 3 status leds to it. They are working great and they allowed me to notice a singular pattern. Yesterday was the first day with the three leds and my hassio wasn't working very well. From time to time, I was seeing the green led turning on. Normal, it is looking for devices, I told myself. But today that I restarted my hassio after fixing some networking problems, I am noticing a much more frequent led blinking and not only the send one, but also the receiving one. This is what I see on the logs:

    2020-07-29 09:57:15 DEBUG (MainThread) [mysensors] Sending 0;255;3;0;2;
    2020-07-29 09:57:15 DEBUG (MainThread) [mysensors] Receiving 0;255;3;0;2;2.3.1
    2020-07-29 09:57:25 DEBUG (MainThread) [mysensors] Sending 0;255;3;0;2;
    2020-07-29 09:57:25 DEBUG (MainThread) [mysensors] Receiving 0;255;3;0;2;2.3.1
    2020-07-29 09:57:35 DEBUG (MainThread) [mysensors] Sending 0;255;3;0;2;
    2020-07-29 09:57:35 DEBUG (MainThread) [mysensors] Receiving 0;255;3;0;2;2.3.1
    

    I only have two nodes, and the other node is battery powered and turned off, so, who is my gateway talking to? Is it sending packets to itself?



  • This is the controller (Home Assistant) pinging the gateway, to see if it's still running. It does this every 10 seconds by requesting the GW's sketch version (an internal command of type I_VERSION). The GW responds with 2.3.1. If the GW wouldn't reply, HA would disconnect from the GW and try to establish a new connection.

    See Serial Protocol - 2.x to make sense out of the string in the log.

    If you want to get rid of those ping-pong messages (and the constant blinking of the LEDs), you can switch to an MQTT gateway (per Ethernet or WiFi, doesn't matter).



  • @BearWithBeard thanks for your response.
    Yesterday it was way less common to see this blinking, probably due to my networking problems and probably longer disconnected periods.

    It is not annoying me at all, it is just that I didn't expected the RX and TX leds to blink with communication that is not about the radio and the nodes, but it probably makes sense.

    Thanks


  • Mod

    @Danielo-Rodríguez it is possible to use MY_INDICATION_HANDLER to see the reason for the blink. I am not sure, but maybe it is possible to also redefine which actions cause a blink. See https://github.com/mysensors/MySensors/blob/master/core/MyIndication.h#L23 and https://forum.mysensors.org/search?term=My_indication_handler&in=titlesposts&matchWords=all&sortBy=relevance&sortDirection=desc&showAs=posts



  • Wow, that is very nice @mfalkvidd
    So I can override the indication function and it will be called on the same events that are now handled automatically right? So if I define this function I have to handle all the enum options right?
    Thanks


  • Mod

    @Danielo-Rodríguez yes, that is correct


Log in to reply
 

Suggested Topics

0
Online

11.4k
Users

11.1k
Topics

112.7k
Posts