Page 1 of 1

Serial proxy help

Posted: 10 Nov 2021, 17:21
by chiuaua
I created my own outside sensorbox containing a TSL2591 light sensor and a Hydreon RG-9 RAIN SENSOR. Both are attached to a NodeMCU running ESPEasy. The TSL2591 runs with the TSL2591 plugin. The rain sensor is attached to the RX and TX pins. Until now the rain sensor communication was via the serial server (ser2net) plugin, but the serial plugin in the Openhab software that I run stops every few days, which is the only problematic openhab plugin. And as the rain sensor is an additional security to pull up the sunshades when it starts to rain it should simply work.

The light sensor is connected to an MQTT server and works flawless. So my idea is to have the serial values sent to MQTT as well. Last week I built my own ESPEasy mega to incorporate the TSL2591 and serial proxy plugins at the same time. However the Serial Proxy is not sending any data to the MQTT controller. The Serial proxy device is showing data received, but not assigning a value to “Regen”. I’ve tried without regex and with several different regex’s, but to no avail. What is my mistake?
3EAC5736-382D-4DF8-B4B1-1AA1D725043A.png
3EAC5736-382D-4DF8-B4B1-1AA1D725043A.png (219.62 KiB) Viewed 5526 times
22A2EF9E-EE4A-4475-B0EF-31C09502AFF0.png
22A2EF9E-EE4A-4475-B0EF-31C09502AFF0.png (197.63 KiB) Viewed 5526 times
76DFD67C-C85C-4243-9BAE-31B533CECF7D.png
76DFD67C-C85C-4243-9BAE-31B533CECF7D.png (250.79 KiB) Viewed 5526 times

Re: Serial proxy help

Posted: 10 Nov 2021, 17:58
by TD-er
SerialProxy only considers the \n character as the end of a line.
Make sure your device is sending that char.

Do you have an example of the strings you want to parse?

Re: Serial proxy help

Posted: 10 Nov 2021, 22:10
by chiuaua
The specification can be found in https://rainsensors.com/wp-content/uplo ... ctions.pdf. It states the following:
All lines are terminated with a carriage return followed by a new line, this is used for all output. But only the new line is required for commands.

The unit is sending regularly “Line overlow Line overlow” messages (supposedly with \r\n). I’m interested in the messages “R 0” to “R 7” that indicate the rain intensity.

I will try to get some raw data the coming days.

Re: Serial proxy help

Posted: 18 Feb 2023, 14:00
by bigfin75
Hello everyone,

I see exactly the same behavior from Rainsensors.com's RG-15 sensor:
- The RG-15 clearly receives what I send from putty, since it sends "Line overlow" after every 50 characters
- It even talks to me, I receive a rain accumulation message every hour or so.

- HOWEVER, it completely ignores my commands :evil:

- I've tried two different USB-to-serial adapters with two different chipsets
- I've tried different "implicit CR with every LF" and "implicit LF with every CR" settings in putty
- I use a very short cable (< 20 cm)
- I've tried powering it with 3.3V or 5V (on the appropriate pins) - makes no difference

@chiuaua, were you able to solve your problem?

Any ideas/suggestions very welcome!

Many thanks,

Bigfin

Re: Serial proxy help

Posted: 18 Feb 2023, 15:16
by Ath
Hi Bigfin, welcome to ESPEasy.

Have you ensured that the signal voltage on your USB-Serial adapter was configured for 3.3V, as these sensors seem to not be 5V tolerant on the serial lines...

Re: Serial proxy help

Posted: 19 Feb 2023, 16:08
by bigfin75
Hi Ath,

Thank you!

Yes, I've used the correct signal voltage for each of the two adapters I've tried (after trying an incorrect one with one of the two...).