debug serial gateway (homeassistant raspberry py 4)

  • hello all,
    I have changed my gateway from wireles (Wemos-D1 Mini) to serial.
    among other things, i have also activated the led for errors and connected it to pin-4.
    now this errror-led flashes every few minutes, 3-4 times in a row in short intervals.

    because the Wemos mini was connected to my PC, i could log via the usb-port to maybe detect the error with the parser.

    But since the serial gateway is directly connected to my raspberry, i don't know how to log the communication.

    is there a way to detect what causes this error in the serial gateway?

    (please understand, i am still a newbie)
    best regards

  • I have stopped the time between the erros several times.
    the error led is triggered exactly every 20 minutes.
    I have had all my analog sensors in view. all send in their set time without error.
    this gateway error seems to have nothing to do with my transmitters (car voltmeter, home powermeter, 3 thermometers).
    exactly every 20 minutes, what can that be?
    Can it be triggered by zigbee or wifi?
    I have here a Sonof Zigbee dongle and a Fritzbox Lan/Wlan router
    If I can not find the cause I will probably disconnect the LED, which is getting on my nerves 🙂

    best regards

  • ohh, did i choose the wrong area for my request?
    i ask the admins to move it to the troubleshooter section if possible.
    thank you

  • Hello

    "I changed my wireles gateway (Wemos-D1 Mini) to serial. "... yes but what is it?
    Arduino Usb Gateway?

    reading the log files can be useful, their location is different depending on the system.

    some info :

  • thanks for the links
    it didn't occur to me that you can also connect the serial usb-gateway to the pc to debug it.
    i thought that has to be done in the linux terminal on the raspi.

    what turns out is that exactly every 20 minutes a
    "Send transport network discovery request"
    (could have been noticed before, if you know how the gateway works)
    is sent but in RED this message :
    "Sent Message without radio ACK"
    is displayed in the parser.
    Well, I suspected that the 10mF capacitor is not enough and replaced it with a 100mF capacitor.
    Since then the above message is displayed but the ERROR-LED is not activated anymore.
    Here is the output at the parser:

    • Sent Message without radio ACK
      Transmitter: 0
      Last Node: 0
      Next Node: 255
      Destination: 255
      Sensor Id: 255
      Command: INTERNAL
      Message Type:I_DISCOVER_REQUEST
      Payload Type: P_STRING
      Payload Length: 0
      Signing: 0
      Failed uplink counter: 0
      Status: OK (OK=success, NACK=no radio ACK received)

    Seemingly OK!!?*

    The gateway is powered by the Raspi via USB.
    It is an Atmel328P 16MHz. 5V Arduino. The voltage for the nrf24 is fed from the 3,3V output of the Arduino.

    i think my problem is solved with this. no error led is activated anymore. It was probably due to the too small Elco. exchanged from 10mF to 100mF.
    I will continue to monitor it (whether I want or not 🙄 )


    best regards.

  • have a language translation problem or a bad formulation of me.

    my question was what kind of gateway you used, but yes your solution is good.

    but the solution that is "the linux terminal of raspi" to read the Logs is the best.

    In my case my controller puts the logs in /opt/apps/mycontroller, reading the file gives useful information, but of course it's better with the options enabled in the gateway
    #define MY_DEBUG
    // #define MY_SPECIAL_DEBUG //maybe also ? (see the utility?)

    Translated with (free version)

  • hi, yes, thank you again
    i also use DeepL for my posts. my english is not very good.
    yes i use an arduino serial usb gateway
    the my_debug protocol is enabled.
    #define MY_SPECIAL_DEBUG i didn't know, that's new to me. I will test it.

    /opt/apps/mycontroller i will have a look, thanks.

    however my problem was not solved after all.
    after i reconnected the GW to my raspi, the error-led was activated again every 20minutes.
    despite the new electrolytic capacitor (100mF)

    after that i suspected that the 3,3v power supply of the arduino nano is not enough to supply the nrf with enough current when sending.
    i looked in the shematics and found that the 3.3v comes from the USB-Uart (CH340) of the nano and delivers only little current.
    So i installed an AMS1117 3,3V direct on USB-5v which can supply at least 800mA.

    i will keep watching but i guess that will not solve the problem.
    i think it's a power problem because the raspi can't supply enough power to the usb port either.
    ohh, that reminds me, why don't i use the usb-3 port?
    i will test it.

    next i will connect an external power supply and keep watching.

  • The change from USB-2 to USB-3, the new 100mF electrolytic capacitor and the 3.3v power supply via an AMS1117 3.3v brought the solution.
    Finally no more error led.
    thanks best regards

    by the way, /opt/apps/mycontroller i don't have this directory.

  • which controller you use ? :

    congratulations for having found the solution

  • thank you,
    i use Homeassistant

    I have additionally discovered that the WLAN from my LG TV also causes interference.
    Then I disabled the wifi on the LG. I do not need it because I have an additional TV receiver.
    Now this has also become better.

  • "harmonic disturbance"
    (wired or wireless )

    yes a problem more and more frequent with the saturation of the hertzian frequencies

  • thank you for the link. 👍

  • Just for reference, as this solution was no yet mentioned:
    You could also use a second UART on your controller or a software serial for debuging with the following defines:

    #define MY_SERIALDEVICE Serial  // Interface for controller connection
    #define MY_DEBUGDEVICE Serial1  // Interface for debug output

    Regards, Edi

Log in to reply

Suggested Topics