debug serial gateway (homeassistant raspberry py 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 -
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.
- Sent Message without radio ACK
-
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)
-
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.
-
-
which controller you use ? : https://www.mysensors.org/controller
congratulations for having found the solution
-
-
"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
-
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 outputRegards, Edi