Posts: 1
Joined: Mon Oct 09, 2017 1:54 pm

2 x RS232 in -> 1 x RS232 out + web interface

Mon Oct 09, 2017 2:01 pm

Hi All,

Please forgive me if i use incorrect terminology. I'm new to the world of Pi & have a requirement that I'm struggling to find advice on. I have basic coding experience in Python, and C, and i'm not afraid to get my hands dirty!

I have a lighting system that can be controlled by sending ASCII RS232 commands to the controller. Unfortunately, RS232 "splitters" haven't provided my with any great success with regards to being able to send commands from 2 separate systems to the lighting controller.

To be able to pass-through RS232 commands from 2 sources out to one destination. Commands will never be sent from the 2 systems in parallel, this is merely a method to manage the signals using the Pi. That being said, I'd like to have a web based interface that would allow me to send commands out to the lighting controller to activate lighting scenes etc. remotely by sending the appropriate RS232 commands.

Has anyone ever done something like this before? Would it be possible to achieve and does anyone have any pointers?

I'm currently researching options at the moment so any advice you have would be appreciated!

Kind regards,


User avatar
Posts: 711
Joined: Tue Aug 01, 2017 10:06 am

Re: 2 x RS232 in -> 1 x RS232 out + web interface

Mon Oct 09, 2017 8:18 pm

You can buy a adapter board for the RPi to convert the 3.3v serial pins to 5v RS232 with the correct output plug. Then it should just be a case of knowing what commands is needed to be send to the lighting controller.

I would set it up that only the RPi can talk to the controller then you won't need a splitter and then have everything else talk to the RPi.

Most people wanting to control the RPi over WiFi or internet with their phones use a messaging system like MQTT. Search this forum and the net for lots info using MQTT

Posts: 119
Joined: Sun Sep 23, 2012 7:19 pm

Re: 2 x RS232 in -> 1 x RS232 out + web interface

Thu Oct 12, 2017 6:48 pm

Though the Pi does have multiple RS232 capability, one is done in software and isn't very good. Also, if the RS232 input on the lighting system is standard RS232 voltage, you'll need adaptors. It may be best to just get three USB to RS232 adaptors so you can use two for the inputs and one for the output. A quick program to receive the data on two of them and forward through the third it should be fairly simple, and adding your own commands into the stream from a UI as you mentioned should also be easily within the Pi capability.

Return to “Automation, sensing and robotics”