I am very new to openhab. I recently just got it installed on an Ubuntu 14.04 VM in hyper-v. I need to find a function where we can send rs232 script commands from the server to a LED lighting control DMX module sitting next to it.
The DMX controller is a pharos LPC shown here and is connected to the same network as the openhab server.
I am really not sure with bindings I should install on the server and how to configure it to push rs232 commands to the DMX box just like it was any other PLC
Please any help will be greatly appreciated.
I’m a newbie too but am attempting something similar in that I want to interface a legacy Comfort HA system that speaks serial with openHAB.
The solution I’m working on is using a Perl program on a machine directly connected by RS232 to the Comfort system to manage the serial comms and interface with IoT protocol MQTT for sending messages to and from openHAB. (there’s a binding for MQTT)
Just today, I got the Perl ‘driver’ working and can now send commands to Comfort via a MQTT channel and receive responses on another channel. Next step is to get MQTT hooked up to openHAB.
I’ll be writing up details of the solution on my blog in the coming days if that’s any good to you.
In the meantime, the general principle as well as some code you might find useful is described here;
Thanks a lot for your feedback meep.
Do you think i need a perl program on a seperate machine in my case considering the LPC is connected over the network and not directly to openHAB?
Next question, I already added installed the mqtt addons by downloading them to the addons folder. As for the configuration, I basically just edited the lines below in openhab.cfg.
# URL to the MQTT broker, e.g. tcp://localhost:1883 or ssl://localhost:8883
# Optional. Client id (max 23 chars) to use when connecting to the broker.
# If not provided a default one is generated.
Is there anything else I need to do?
P.S. You dont really sound like a newbie.
I hadn’t realised that your LPC is on the network. Mine is not. It’s a direct serial connection between the PC and the alarm system so that’s why my ‘driver’ needs to be on that machine, for direct access to the COM port. In your case, I’d imagine the script could be on any network attached system,
Indeed, it wouldn’t need to be Perl either. I’d imagine it could be any tool that allows access to the COM port. Python maybe, or whatever you would be comfortable with. I’m using Perl as the original script for nitration with Comfort was in Perl (as linked above) and I used that as a starting point although I needed to implement a complete re-write as it’s quite different on Windows.
My newbie-ness will now be revealed…
I can’t help with the MQTT binding as I haven’t got that far just yet. I’ve just managed to get the Comfort system interacting with MQTT and am monitoring it in Node-Red. I can issue MQTT publish commands from a CL and see the responses etc. The next task is to hook it all up to openHAB, with which I have 1 weeks experience.