Hydreon RG-15

Moderators: grovkillen, Stuntteam, TD-er

Message
Author
Rob73
Normal user
Posts: 86
Joined: 25 May 2022, 15:05

Hydreon RG-15

#1 Post by Rob73 » 19 Apr 2025, 21:39

I have a few of those RG-15 rain sensors. It has a serial connection and a normal output when it detects a raindrop. I can talk to them with an esp32-s3-zero through a regular Arduino IDE serial sketch on the serial line. So I verified its working as its supposed to. I can not get it to respond to any serial commands from ESP-EASY.

Is anyone successfully using one of these devices?

I have done some serial stuff with ESP-EASY, I think I have it configured correctly but I am not sure I completely understand it all. The sensor should respond to a handful of commands per the data sheet, which I do through the regular Arduino IDE sketch. I am curious if I am sending it the command from ESP-EASY correctly. I have it setup as a Serial Server under a Communication device. Sending the device a simple "R" command initiates the sensor to spit out all available data. I have a scope and it looks like there is activity on the tx gpio when i give it a serialsend,"R" command. I show activity on the tx line of the sensor coming back to the esp32 suggesting that it is spitting out the data. I have tried formatting it every way with quotes, without, carriage returns and newlines & without.

Am I correct that I should be able to see the data come in on the serialserver on the tools - log page? Or am I missing something there also? I have it set for generic event processing and process events without client selected.

I have the latest build, collection c on an esp32-s3-zero.

Rob

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

Re: Hydreon RG-15

#2 Post by Ath » 19 Apr 2025, 22:05

To be able to see all data in the log and events, it's needed to either connect to the configured TCP (or since recently UDP) port, OR check the "Process events without client" checkbox. That'll help a lot in the logging.

And, watching the log via the USB-serial port of the ESP has a clear advantage over the web-log, as that's updated immediately, instead of via a (small) script running in the browser, so nothing is lost 'in translation' there.
/Ton (PayPal.me)

Rob73
Normal user
Posts: 86
Joined: 25 May 2022, 15:05

Re: Hydreon RG-15

#3 Post by Rob73 » 20 Apr 2025, 07:10

I never thought about watching the log through the usb serial console. That sounds like a good idea. I will watch that and see what comes through there.
I do have the process events without client checked.

Thanks.
I will get back to testing....


Rob

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

Re: Hydreon RG-15

#4 Post by Ath » 21 Apr 2025, 11:57

For receiving less small 'chunky' parts of data from a serial device, you can set the RX Receive Timeout to ~5 msec, to make the plugin wait a little longer for incoming data, especially on a slower rate like 9600 baud.
/Ton (PayPal.me)

Rob73
Normal user
Posts: 86
Joined: 25 May 2022, 15:05

Re: Hydreon RG-15

#5 Post by Rob73 » 22 Apr 2025, 07:15

I will have to try that. I need to learn more about talking over uart. I struggle working with it. I dont understand enough about it for sure.

Rob

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

Re: Hydreon RG-15

#6 Post by chiuaua » 01 May 2025, 22:00

An old post from me (about RG-9) with someone else with an RG-15 as well: https://www.letscontrolit.com/forum/vi ... 815#p55815.

I have had the RG-9 running OK with a wemos D1 mini pro and espeasy serial server where it responded to my R\n and K\n appropriately. For some reason the RG-9 serial seemed to have died after which I have used the “does it rain” relay in it for a while as a “switch” on one of the GPIO’s.

One year ago I overhauled my box with a new RG-9 and rewiring with some home made dupont cables. That worked until two weeks ago. The RG-9 already had sent a reboot due to “low voltage” two weeks prior and not long after that the D1 mini pro became unreachable, even after power cycling, not even transmitting my light sensor’s MQTT messages. Investigation at my box revealed that one year ago I have supplied the 5v input voltage to the 3.3v pin of the D1 mini pro :shock:

I replaced the D1 mini pro, flashed a newly built espeasy, wired it up correctly last week and am unable to read or reach the RG-9. I possibly fried it as well :x. On top of that I of course never saved the setup from espeasy so had to redo it all manually again.

Long story: I have been able in the last years to properly communicate with a hydreon sensor via espeasy (with a socat connection linked to openhab). Will fiddle a little bit next weeks to get everything going again otherwise buy a new RG-9 (again)…

Would love to hear if you get it going in the meantime.

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

Re: Hydreon RG-15

#7 Post by TD-er » 01 May 2025, 22:55

If you still have the old ESP, maybe you can make a dump of the flash chip using the Python esptool.py ?

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

Re: Hydreon RG-15

#8 Post by chiuaua » 03 May 2025, 16:57

I swapped the board on the roof with another one I revived and tested with the same espeasy image but on a nodeMCU. On the nodeMCU no special settings and working flawlessly for the Hydroen, both sending and receiving.

The D1 mini pro on the roof does not, although the led on the RG9 shows good response. Hence it is in my serial wiring between hydreon and D1 mini pro (or possibly the different custom port number I’ve chosen). Have to troubleshoot further, but all in all my NodeMCU is the proof that everything works with espeasy in both directions.

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

Re: Hydreon RG-15

#9 Post by Ath » 03 May 2025, 17:06

chiuaua wrote: 03 May 2025, 16:57 The D1 mini pro on the roof does not, although the led on the RG9 shows good response. Hence it is in my serial wiring between hydreon and D1 mini pro (or possibly the different custom port number I’ve chosen). Have to troubleshoot further, but all in all my NodeMCU is the proof that everything works with espeasy in both directions.
What exact serial settings have you used in the plugin? Is the "Enable Serial Port Console" setting unchecked on the Tools/Advanced page?
/Ton (PayPal.me)

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

Re: Hydreon RG-15

#10 Post by chiuaua » 04 May 2025, 09:07

Nothing special. The device settings are standard (the prefilled ones), except for name and port.
For port I’ve used 32908 on my D1 mini pro (just like the board that died) and 1234 for the nodeMCU.

And I turned off the serial port console in Advanced settings.

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

Re: Hydreon RG-15

#11 Post by chiuaua » 06 May 2025, 11:51

I just got everything working again. It didn’t work on the regular TX/RX of my D1 mini pro. So I set the serial server to D7 and D8 and connected the pins to there. That gave some response, but apparently I had TX and RX also mixed up. So after swapping these, all joy.

Retried the regular TX/RX (D9/D10), but now swapped. Again no joy. It might be possible that I brought too much heat in the board near the regular TX/RX while changing the antenna resistor to the external antenna position? Anyway, got it working with D7/D8, so why would I want to troubleshoot any further :D

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

Re: Hydreon RG-15

#12 Post by Ath » 06 May 2025, 12:38

Ok, great.

Now let's see what @Rob73 can achieve with testing/trying his setup ;)
/Ton (PayPal.me)

Rob73
Normal user
Posts: 86
Joined: 25 May 2022, 15:05

Re: Hydreon RG-15

#13 Post by Rob73 » 06 May 2025, 17:32

@chiuaua why did you use port 32908 on your D1 mini pro?

I cant get my RG-15 to respond on espeasy with my esp32-s3-zero. I flashed it with a custom tasmota build and it communicates and gets readings, so I know my wiring configuration is correct.
I still think I am not understanding something and probably missing something basic.

Rob

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

Re: Hydreon RG-15

#14 Post by chiuaua » 06 May 2025, 22:03

Port 32908 is just a random port that I used back in 2021 when I set up my first espeasy with the hydreon. Since then I am using it because it is in all the other automations that want to interact with the hydreon.

Rob73
Normal user
Posts: 86
Joined: 25 May 2022, 15:05

Re: Hydreon RG-15

#15 Post by Rob73 » 07 May 2025, 14:52

I finally got espeasy to communicate with the RG-15. I set it up as a serialproxy device on hw serial0. Which was odd, I thought it would have worked on hw serial 1 or hw serial 2, but no. When I just rolled the dice and set it to hw serial 0, i was able to send commands to the RG-15 and it would reply back on the log. I am getting the message in the log "Command unknown: Line overlow", but as of right now I at least have a baseline to tweak around from.


Rob

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

Re: Hydreon RG-15

#16 Post by Ath » 07 May 2025, 15:31

You should turn off Console logging on Tools/Advanced to get rid of the Command unknown messages, as you currently have the device talking to the Console.
/Ton (PayPal.me)

Rob73
Normal user
Posts: 86
Joined: 25 May 2022, 15:05

Re: Hydreon RG-15

#17 Post by Rob73 » 11 May 2025, 20:08

When I turn off Console Logging on the Advanced page, the command unknown message goes away. But I also lose communication with my RG-15.

It seems like it takes a reflash with erase device to get it back working again. I have some more testing to do but that seems to be what is happening to my current setup.

Rob

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

Re: Hydreon RG-15

#18 Post by TD-er » 11 May 2025, 20:15

I doubt you really need to wipe + reflash to get it working again...

Have you tried to reboot ESPEasy after turning off the serial console?
It might be that the task trying to access the serial port needs to re-init this serial port.

This can also be done via commands like

Code: Select all

disableTask,<tasknr>
enableTask,<tasknr>
Or trying to save the task again.

But a reboot is easier :)

Rob73
Normal user
Posts: 86
Joined: 25 May 2022, 15:05

Re: Hydreon RG-15

#19 Post by Rob73 » 11 May 2025, 23:35

I did try to reboot. I tried deleting the serial device and starting over, even renaming it. Once I disabled the serial console, it appears that I lose communications with the rg-15. I could not figure out how to get it going again. I reflashed it and that seemed to get me going again, but only if i gave it an erase first.

I will give the commands you suggested a go and see what I can come up with.

I will continue my testing and post back my results.

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

Re: Hydreon RG-15

#20 Post by Ath » 12 May 2025, 08:07

Can you share a screenshot of the configuration page for the Serial Server device?
/Ton (PayPal.me)

Rob73
Normal user
Posts: 86
Joined: 25 May 2022, 15:05

Re: Hydreon RG-15

#21 Post by Rob73 » 12 May 2025, 22:56

Here is a screen shot of my device config

1.gif
2.gif


Rob
You do not have the required permissions to view the files attached to this post.

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

Re: Hydreon RG-15

#22 Post by Ath » 12 May 2025, 23:14

Hmm, I already anticipated this a bit, you're using the Serial Proxy plugin (P087), but from earlier conversations I got the impression we where talking about using the Serial Server (P020), and I think that user chiuaua is also using that, as we talked about (TCP) Port 32908, and SerialProxy doesn't have a setting for that...

When you have that set up, Select HW Serial1 for the Serial Port setting, so it doesn't conflict with the Console log on HW Serial0. The "Serial Config" and GPIO pins can be set the same as used in the screenshot.
Then also set "Event processing" to "Generic", the "Process events without client" checkbox enabled, and "RX Receive Timeout (mSec)" to 5

From there on things will have a better chance of giving the expected response
/Ton (PayPal.me)

Rob73
Normal user
Posts: 86
Joined: 25 May 2022, 15:05

Re: Hydreon RG-15

#23 Post by Rob73 » 13 May 2025, 17:03

I tried the serial server and I couldnt get any response from the rg-15. So following one of those serial proxy examples, I was able to get that to communicate. I will make some setting changes and see what results I can get.


Rob

User avatar
chromo23
Normal user
Posts: 1070
Joined: 10 Sep 2020, 16:02
Location: germany

Re: Hydreon RG-15

#24 Post by chromo23 » 17 Jul 2025, 13:26

Rob73 wrote: 13 May 2025, 17:03 I tried the serial server and I couldnt get any response from the rg-15.
I am having similar issues when using the serialserver.
With serialproxy, I can receive messages.
With the serial console set to the TX port for the other device (RPI), I receive the log messages there.

But using serialserver, I neither receive anything nor can I send something (or at least not in a format the receiver understands).

I smell a bug… (or I am using it wrong :) )

User avatar
chromo23
Normal user
Posts: 1070
Joined: 10 Sep 2020, 16:02
Location: germany

Re: Hydreon RG-1

#25 Post by chromo23 » 17 Jul 2025, 13:53

Maybe I am using it wrong?

I send a String to the ESP like "3413,23,1242"

This will only generate an event by the serial server when "Event processing" is set to "generic" and "Event data hex format" is enabled.

So i guess I am also using serialsend wrong...

User avatar
chromo23
Normal user
Posts: 1070
Joined: 10 Sep 2020, 16:02
Location: germany

Re: Hydreon RG-15

#26 Post by chromo23 » 17 Jul 2025, 14:31

Ok, first mistake: Using hardware serial gpios but somehow chose SW Serial from the drpopdown :oops:
Receiving plain messages now works..

But sending does not. I use:

Code: Select all

 serialsend,test
How is serialsend beeing used correctly and what can i do to make it work

User avatar
chromo23
Normal user
Posts: 1070
Joined: 10 Sep 2020, 16:02
Location: germany

Re: Hydreon RG-15

#27 Post by chromo23 » 17 Jul 2025, 14:59

chromo23 wrote: 17 Jul 2025, 14:31 How is serialsend beeing used correctly and what can i do to make it work

And here is the answer. I use send

Code: Select all

SerialSendMix,<text>
followed by

Code: Select all

SerialSendMix,0x0A
0x0A = Hex for newline

I was using cat on linux to display the serial input. But apparently it only displays received data after a new line... :)

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

Re: Hydreon RG-15

#28 Post by Ath » 17 Jul 2025, 15:42

chromo23 wrote: 17 Jul 2025, 14:59 And here is the answer. I use send

Code: Select all

SerialSendMix,<text>
followed by

Code: Select all

SerialSendMix,0x0A
0x0A = Hex for newline
That can of course be combined as:

Code: Select all

SerialSendMix,"<text>",0x0A
chromo23 wrote: 17 Jul 2025, 14:59 I was using cat on linux to display the serial input. But apparently it only displays received data after a new line... :)
Ah, yes, cat does that (it's (a) cat, of course... :lol:)
/Ton (PayPal.me)

User avatar
chromo23
Normal user
Posts: 1070
Joined: 10 Sep 2020, 16:02
Location: germany

Re: Hydreon RG-15

#29 Post by chromo23 » 17 Jul 2025, 16:06

Ath wrote: 17 Jul 2025, 15:42 That can of course be combined as:
Ahh great, thanks :)

Rob73
Normal user
Posts: 86
Joined: 25 May 2022, 15:05

Re: Hydreon RG-15

#30 Post by Rob73 » 19 Jul 2025, 06:57

I have had mine on the back burner. I will have to revisit it and give that a try!

Rob

Who is online

Users browsing this forum: Ahrefs [Bot], Anthropic Claude Bot [bot] and 2 guests