What do the Error led flashes mean?



  • I have a gateway talking successfully to a four relay board and a soil moisture sensor. The gateway is connected to a Vera controller via ethernet.

    Everything is working. I get voltage levels and moisture percentage from the moisture sensor displayed on the Vera dashboard. I can also switch the relays on and off from the Vera dashboard.

    I have connected the status leds to the gateway. The transmit and receive seem to flash at the appropriate time.

    However the error led also flashes each time there is a transmit/receive. The number of flashes varies depending on the activity from a couple of flashes to what seems about 20. It flashes too quickly to accurately count.

    There are no error message in the gateway serial monitor.

    Is this normal behavior?
    Do the number of flashes mean anything
    If everything is working what is the worth of the error led?


  • Mod

    I haven't used much the status leds but I never seen that


  • Hardware Contributor

    @Woodside I can see the error flash when a node is requesting time or count from the controller and the answer back doesn't reach and/or get ack from the node. Not sure the general use for the led and curious as well but this is one thing I noticed.

    If you are a code guy (I'm not) I'm pretty sure it's easy to find out by looking at the source code.



  • Has nobody implemented the error LED and wondered what the flashes mean?😟


  • Mod

    What do you see in the serial log when you see the red led flashing?


  • Mod

    @Woodside In fact, I have implemented the current Indication-code, which controls the error led behavior 😉
    The number of red flashes indicate the type of error occurred.
    For 2.1.1 (it's defined in https://github.com/mysensors/MySensors/blob/2.1.1/core/MyIndication.h, in principle it can change with MySensors releases) the list is as follows:

    INDICATION_ERR_HW_INIT             HW initialization error
    INDICATION_ERR_TX                  Failed to transmit message.
    INDICATION_ERR_TRANSPORT_FAILURE   Transport failure.
    INDICATION_ERR_INIT_TRANSPORT      MySensors transport hardware (radio) init failure.
    INDICATION_ERR_FIND_PARENT         Failed to find parent node.
    INDICATION_ERR_GET_NODEID          Failed to receive node ID.
    INDICATION_ERR_CHECK_UPLINK        Failed to check uplink
    INDICATION_ERR_SIGN                Error signing.
    INDICATION_ERR_LENGTH              Invalid message length.
    INDICATION_ERR_VERSION             Protocol version mismatch.
    INDICATION_ERR_NET_FULL            Network full. All node IDs are taken.
    INDICATION_ERR_INIT_GWTRANSPORT    Gateway transport hardware init failure.
    INDICATION_ERR_LOCKED              Node is locked.
    INDICATION_ERR_FW_FLASH_INIT       Firmware update flash initialisation failure.
    INDICATION_ERR_FW_TIMEOUT          Firmware update timeout.
    INDICATION_ERR_FW_CHECKSUM         Firmware update checksum mismatch.
    

    The first error gives 1 flash, the 2nd 2 flashes etc. Count the flashes and this table tells you exactly what is wrong.

    I admit it sometimes is hard to count the flashes, especially when multiple errors are reported sequentially, but the basis is there.
    Always open to suggestions!



  • @Yveaux That is useful information, thank you.

    Rather than trying to count the flashes to work out what is going on, can I output the error message(s) to the serial monitor?

    @gohan Attached is the serial log from startup and some successful commands from Vera to turn the relays on and off. I cannot see any errors? When the Gateway starts up there are about 29 flashes of the error led (difficult to count exactly).

    For a successful relay on or off there are two error flashes. According to the MyIndication.h extract from @Yveaux, corresponds to 'Failed to transmit message'. But the relay switches correctly and there are no transmit errors in the serial log.😕

    0;255;3;0;9;MCO:BGN:INIT GW,CP=RNNGA--,VER=2.1.1
    0;255;3;0;9;TSM:INIT
    0;255;3;0;9;TSF:WUR:MS=0
    0;255;3;0;9;TSM:INIT:TSP OK
    0;255;3;0;9;TSM:INIT:GW MODE
    0;255;3;0;9;TSM:READY:ID=0,PAR=0,DIS=0
    IP: 192.168.0.40
    0;255;3;0;9;MCO:BGN:STP
    0;255;3;0;9;MCO:BGN:INIT OK,TSP=1
    0;255;3;0;9;TSF:MSG:READ,3-3-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    0;255;3;0;9;TSF:MSG:BC
    0;255;3;0;9;TSF:MSG:FPAR REQ,ID=3
    0;255;3;0;9;TSF:CKU:OK,FCTRL
    0;255;3;0;9;TSF:MSG:GWL OK
    0;255;3;0;9;TSF:MSG:SEND,0-0-3-3,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0
    0;255;3;0;9;TSF:MSG:READ,3-3-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
    0;255;3;0;9;TSF:MSG:PINGED,ID=3,HP=1
    0;255;3;0;9;TSF:MSG:SEND,0-0-3-3,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=OK:1
    0;255;3;0;9;TSF:MSG:READ,3-3-0,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
    0;255;3;0;9;TSF:MSG:SEND,0-0-3-3,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100
    0;255;3;0;9;TSF:MSG:READ,3-3-0,s=255,c=0,t=18,pt=0,l=5,sg=0:2.1.1
    0;255;3;0;9;TSF:MSG:READ,3-3-0,s=255,c=3,t=6,pt=1,l=1,sg=0:0
    0;255;3;0;9;TSF:MSG:READ,3-3-0,s=255,c=3,t=11,pt=0,l=5,sg=0:Relay
    0;255;3;0;9;TSF:MSG:READ,3-3-0,s=255,c=3,t=12,pt=0,l=3,sg=0:1.1
    0;255;3;0;9;TSF:MSG:READ,3-3-0,s=1,c=0,t=3,pt=0,l=0,sg=0:
    0;255;3;0;9;TSF:MSG:READ,3-3-0,s=2,c=0,t=3,pt=0,l=0,sg=0:
    0;255;3;0;9;TSF:MSG:READ,3-3-0,s=3,c=0,t=3,pt=0,l=0,sg=0:
    0;255;3;0;9;TSF:MSG:READ,3-3-0,s=4,c=0,t=3,pt=0,l=0,sg=0:
    0;255;3;0;9;TSF:MSG:READ,3-3-0,s=255,c=3,t=26,pt=1,l=1,sg=0:2
    0;255;3;0;9;TSF:MSG:SEND,0-0-3-3,s=255,c=3,t=27,pt=1,l=1,sg=0,ft=0,st=OK:1
    0;255;3;0;9;Eth: connect
    0;255;3;0;9;Eth: 3;4;1;1;2;1
    0;255;3;0;9;TSF:MSG:SEND,0-0-3-3,s=4,c=1,t=2,pt=0,l=1,sg=0,ft=0,st=OK:1
    0;255;3;0;9;Eth: 
    0;255;3;0;9;TSF:MSG:READ,3-3-0,s=4,c=1,t=2,pt=0,l=1,sg=0:1
    0;255;3;0;9;TSF:MSG:ACK
    0;255;3;0;9;Eth: 3;4;1;1;2;0
    0;255;3;0;9;TSF:MSG:SEND,0-0-3-3,s=4,c=1,t=2,pt=0,l=1,sg=0,ft=0,st=OK:0
    0;255;3;0;9;Eth: 
    0;255;3;0;9;TSF:MSG:READ,3-3-0,s=4,c=1,t=2,pt=0,l=1,sg=0:0
    0;255;3;0;9;TSF:MSG:ACK
    0;255;3;0;9;Eth: 3;3;1;1;2;1
    0;255;3;0;9;TSF:MSG:SEND,0-0-3-3,s=3,c=1,t=2,pt=0,l=1,sg=0,ft=0,st=OK:1
    0;255;3;0;9;Eth: 
    0;255;3;0;9;TSF:MSG:READ,3-3-0,s=3,c=1,t=2,pt=0,l=1,sg=0:1
    0;255;3;0;9;TSF:MSG:ACK
    0;255;3;0;9;Eth: 3;3;1;1;2;0
    0;255;3;0;9;TSF:MSG:SEND,0-0-3-3,s=3,c=1,t=2,pt=0,l=1,sg=0,ft=0,st=OK:0
    0;255;3;0;9;Eth: 
    0;255;3;0;9;TSF:MSG:READ,3-3-0,s=3,c=1,t=2,pt=0,l=1,sg=0:0
    0;255;3;0;9;TSF:MSG:ACK
    0;255;3;0;9;Eth: 3;2;1;1;2;1
    0;255;3;0;9;TSF:MSG:SEND,0-0-3-3,s=2,c=1,t=2,pt=0,l=1,sg=0,ft=0,st=OK:1
    0;255;3;0;9;Eth: 
    0;255;3;0;9;TSF:MSG:READ,3-3-0,s=2,c=1,t=2,pt=0,l=1,sg=0:1
    0;255;3;0;9;TSF:MSG:ACK
    0;255;3;0;9;Eth: 3;2;1;1;2;0
    0;255;3;0;9;TSF:MSG:SEND,0-0-3-3,s=2,c=1,t=2,pt=0,l=1,sg=0,ft=0,st=OK:0
    0;255;3;0;9;Eth: 
    0;255;3;0;9;TSF:MSG:READ,3-3-0,s=2,c=1,t=2,pt=0,l=1,sg=0:0
    0;255;3;0;9;TSF:MSG:ACK```

  • Mod

    Did you try with a gateway with version 2.2.0?


  • Mod

    @Woodside You can define MY_INDICATION_HANDLER and implement your own indication handler which translates the callbacks to serial output (or to a different LED indication pattern), e.g.:

    #define MY_INDICATION_HANDLER 
    // ....
    void indication(indication_t ind)
    {
      switch(ind)
      {
        case INDICATION_TX:          Serial.println(F("TX")); break;
        case INDICATION_RX:          Serial.println(F("RX")); break;
        // ....etc...
        case INDICATION_ERR_HW_INIT: Serial.println(F("ERR_HW_INIT")); break;
        case INDICATION_ERR_TX:      Serial.println(F("ERR_TX")); break;
        // ....etc...
      }
    }
    

  • Mod

    @Yveaux this could be an idea to have a lcd on the gateway that reports the error description and node affected.


  • Mod

    @gohan Have a look at this gateway from @Japio : https://www.openhardware.io/view/349/MySensors-ESP8266-MQTT-gateway
    He used the indications to get more feedback using LEDs.



  • Thanks both.

    I will try the gateway with version 2.2.0 first.


Log in to reply
 

Suggested Topics

  • 87
  • 3
  • 1
  • 5
  • 8
  • 5

68
Online

11.4k
Users

11.1k
Topics

112.7k
Posts