RS232 via WiFi/ESP32 possible?

My heating central unit provides an serial interface (old school RS232), for which I’ve written a script to use it for home automation

I’d like to reduce devices and logic, so I’m thinking on replacing a whole RaspberryPi for this with a “RS232 over WiFi”-kind of thing or an ESP32.

I’m searching all over with no real solution, but perhaps someone here has similar requirements. Is there any way to either port a python script to ESP32 or some decent RS232-over-WiFi-dongles or whatever?

Why not use a pi zero ?? What’s wrong with a pi?
You’re not reducing the number of devices. You’ll barely reduce energy costs even…

You’re right. Pi Zero didn’t even cross my mind, but yeah. Thanks.

1 Like

Always a question worth asking but there can be some reasons one might want to move something like this to an ESP32 or ESP8266 (none of which apply to @binderth’s case I think).

  • space available, an RPi Zero may be too big
  • Analog GPIO pin support, for example I know that ESP8266’s usually have at least one analog pin where the RPi 0 has only digital pins
  • a microcontroller is going to be way more reliable and require much less maintenance than a SBC (single board computer), especially if you don’t have deployment and monitoring tools like Ansible/Chef/Puppet/etc and Zabbix/Prometheus/etc.
  • if you have a lot of them to deploy, it’s less work to deploy lots of cloned configs to microcontrollers than SBCs

There can be lots of really fantastic reasons to choose a microcontroller even if you happen to have a working version on a SBC.

As an example, I myself have as a todo (very low priority) to replace my RPi 3 in the garage that controls and senses the garage doors with a NodeMCU. The reason why is even though I do use Ansible and Zabbix, I’m kind of tired of maintaining it. It doesn’t take much but it does consume some time to keep the OS patched and the configuration running as I want. I’m also looking to replace the RPi 0 I have in the utility room which is connected to the door sensors for the same reasons.

2 Likes

Always great content from you :wink: excellent points. Indeed, maintaining a pi is more work than an esp or similar. And to say nothing of the rest, like the pin requirements.
Great read, thank you!

Regarding question you placed in topic - “RS232 via WiFi/ESP32 possible?” - all depends on serial protocol and latency it can accept. There are protocols which have strict rules on how much time bus participants have to make or answer call. If your wifi based routing is slow, this thing will not work.

I recall there was a ebus-rs232+wifi (or even ethernet) adapter was terminated exactly this reason.

I’m using for some years this project, e.g. to connect RS232 devices on my boat to a RPI without need for wiring. Indeed it just routes the serial info from/to your device

1 Like

I have been using ESP-Link for a few years, too.

I used it to control my Epson projector.