Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Feature Requests
  3. debug serial gateway (homeassistant raspberry py 4)

debug serial gateway (homeassistant raspberry py 4)

Scheduled Pinned Locked Moved Feature Requests
13 Posts 3 Posters 79 Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    JeeLet
    wrote on last edited by
    #4

    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 :
    https://www.mysensors.org/build/debug
    https://www.mysensors.org/build/parser

    1 Reply Last reply
    0
    • B Offline
      B Offline
      Branther
      wrote on last edited by
      #5

      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.

      ok.
      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)
        Payload:

      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 :face_with_rolling_eyes: )

      ...solved...

      best regards.

      1 Reply Last reply
      0
      • J Offline
        J Offline
        JeeLet
        wrote on last edited by
        #6

        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 www.DeepL.com/Translator (free version)

        1 Reply Last reply
        0
        • B Offline
          B Offline
          Branther
          wrote on last edited by
          #7

          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
          "https://github.com/mysensors/MySensors/blob/master/examples/GatewaySerial/GatewaySerial.ino"
          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.

          1 Reply Last reply
          0
          • B Offline
            B Offline
            Branther
            wrote on last edited by
            #8

            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.

            1 Reply Last reply
            0
            • J Offline
              J Offline
              JeeLet
              wrote on last edited by
              #9

              which controller you use ? : https://www.mysensors.org/controller

              congratulations for having found the solution

              1 Reply Last reply
              0
              • B Offline
                B Offline
                Branther
                wrote on last edited by
                #10

                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.

                1 Reply Last reply
                0
                • J Offline
                  J Offline
                  JeeLet
                  wrote on last edited by JeeLet
                  #11

                  "harmonic disturbance" https://www.electronics-tutorials.ws/accircuits/harmonics.html
                  (wired or wireless )

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

                  1 Reply Last reply
                  0
                  • B Offline
                    B Offline
                    Branther
                    wrote on last edited by
                    #12

                    thank you for the link. :+1:

                    1 Reply Last reply
                    0
                    • E Offline
                      E Offline
                      eiten
                      wrote on last edited by
                      #13

                      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

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      5

                      Online

                      11.7k

                      Users

                      11.2k

                      Topics

                      113.1k

                      Posts


                      Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • MySensors
                      • OpenHardware.io
                      • Categories
                      • Recent
                      • Tags
                      • Popular