RS485 Serial options?

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
TommySharp
Normal user
Posts: 19
Joined: 20 Oct 2017, 14:30

RS485 Serial options?

#1 Post by TommySharp » 15 Jun 2019, 23:04

I'm trying to find a way to get reading out of a ventilation fan that apparently outputs data as "RS485 Serial"....
Is this something I can do with ESPEasy?

User avatar
ThomasB
Normal user
Posts: 1064
Joined: 17 Jun 2018, 20:41
Location: USA

Re: RS485 Serial options?

#2 Post by ThomasB » 16 Jun 2019, 04:29

Hardware wise, you can adapt the ESP serial port to RS485 with something like these:
https://ebay.to/2WEm3O4
https://ebay.to/2INiC2x

But software wise, I suspect you will need to create your own custom plugin for the ventilation fan.

- Thomas

TommySharp
Normal user
Posts: 19
Joined: 20 Oct 2017, 14:30

Re: RS485 Serial options?

#3 Post by TommySharp » 16 Jun 2019, 12:06

Hey Thomas, does ESPEasy have any support for "serial" data coming in and just pushing the values out over MQTT?

User avatar
ThomasB
Normal user
Posts: 1064
Joined: 17 Jun 2018, 20:41
Location: USA

Re: RS485 Serial options?

#4 Post by ThomasB » 16 Jun 2019, 18:07

... does ESPEasy have any support for "serial" data coming in and just pushing the values out over MQTT?
It seems to me that the closest thing would be the Ser2Net plugin. It's for use with controllers that have Ser2Net gateways.
https://www.letscontrolit.com/wiki/inde ... le=Ser2Net

Your application will most likely need a custom plugin for your fan.

- Thomas

rayE
Normal user
Posts: 144
Joined: 12 Oct 2017, 12:53
Location: Philippines

Re: RS485 Serial options?

#5 Post by rayE » 17 Jun 2019, 02:31

I did something similar BUT very different many moons ago without any devices/controllers using events in rules.
viewtopic.php?f=6&t=3693&p=20179#p20181

To test this you could connect a terminal to the serial input/output on the esp device and send some text like fanon,1 using rules, this tests the serial output and should be logged on the terminal. Now send some text from the terminal back to the ESP unit. If the latter is logged in the debug window on the esp then set up a rule to catch the event then do what ever you need. It should be easy to try and see if it works.

Obviously to connect to your RS485 unit you need a 232 to 485 transceiver AND a clear understanding of the protocol being used. Im sure it's doable whatever method you come up with.

Regards
Ray

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

Re: RS485 Serial options?

#6 Post by TD-er » 24 Jun 2019, 00:38

RS485 is not RS232.
On top of that there is often some kind of protocol like Modbus RTU to address the device(s).

For example the AccuEnergy sensors are being supported in a plugin and SenseAir sensors.
These use the same Modbus RTU layer I wrote.
The Eastron sensors do also communicate via Modbus, but that's being implemented in a separate library for these sensors.

You first have to look into the documentation of your ventilation system to see what protocol it is using.

In short, Modbus RTU does address a device on the RS485 bus and does read or write single registers to operate the device.
This addressing does also add some issues when converting it to serial or operating it via MQTT or something similar.
But Modbus is not the only protocol using RS485 as a communication layer.

TommySharp
Normal user
Posts: 19
Joined: 20 Oct 2017, 14:30

Re: RS485 Serial options?

#7 Post by TommySharp » 15 Aug 2019, 11:17

I have a Serial TTL to RS485 converter so hopefully that will let me get this done?
I know that the fan I am trying to connect to simply puts out a string of hex values every 10 seconds and that will tell me the fan speed, temp, humidity and mode.... I just need to get that string and push it through to the home automation system using MQTT and I'll decode it there.
Thoughts on if this will be possible?

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

Re: RS485 Serial options?

#8 Post by TD-er » 17 Aug 2019, 21:33

If you can read the string by sending a standard reply, then you could try the "serial proxy" plugin.
It is still in development, but it should be able to send out a string to the serial port and echo the received text to a controller.

Post Reply

Who is online

Users browsing this forum: No registered users and 20 guests