Serial proxy help

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
chiuaua
New user
Posts: 2
Joined: 10 Nov 2021, 16:59

Serial proxy help

#1 Post by chiuaua » 10 Nov 2021, 17:21

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 5461 times
22A2EF9E-EE4A-4475-B0EF-31C09502AFF0.png
22A2EF9E-EE4A-4475-B0EF-31C09502AFF0.png (197.63 KiB) Viewed 5461 times
76DFD67C-C85C-4243-9BAE-31B533CECF7D.png
76DFD67C-C85C-4243-9BAE-31B533CECF7D.png (250.79 KiB) Viewed 5461 times

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Serial proxy help

#2 Post by TD-er » 10 Nov 2021, 17:58

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?

chiuaua
New user
Posts: 2
Joined: 10 Nov 2021, 16:59

Re: Serial proxy help

#3 Post by chiuaua » 10 Nov 2021, 22:10

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.

bigfin75
New user
Posts: 2
Joined: 18 Feb 2023, 13:51

Re: Serial proxy help

#4 Post by bigfin75 » 18 Feb 2023, 14:00

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

User avatar
Ath
Normal user
Posts: 3417
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Serial proxy help

#5 Post by Ath » 18 Feb 2023, 15:16

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...
/Ton (PayPal.me)

bigfin75
New user
Posts: 2
Joined: 18 Feb 2023, 13:51

Re: Serial proxy help

#6 Post by bigfin75 » 19 Feb 2023, 16:08

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...).

Post Reply

Who is online

Users browsing this forum: No registered users and 35 guests