Is it possible to have OpenHAB server running on a real server (Centos linux) and one of the clients (devices) be Raspberry Pi with a relay board controlling irrigation valves?
I know there is OpenSprinkler binding, but I already have the Pi and the relay board and do not want to use OpenSprinkler.
My thinking is using a server is much more reliable than running the whole OpenHAB system on Raspberry and if I later add mode devices (lights, Sonos, …) it would be more convenient and robust. I could also power off the Pi during winter …
If this setup is possible and reasonable, how do I connect the client Pi and control it’s GPIO ports?
Thanks for help and sorry if the question was alredy answered …
Yes, use MQTT. Setup a MQTT server, enable MQTT binding on your openHAB server and run a script like this or this on the client.
Thank you, Markus,
This is exactly what I needed to know. I’ll test it in a test environment.
I use RPi 3 for my OH, Broker and remote clients controlling SainSmart 16 channel relays. Here is a link to my GitHub with my items and sitemap. I use sensorReporter on the remote RPis to send MQTT messages to Broker then pass to OH.
I have a central server running OH2 communicating via MQTT with satellite Raspberry Pi 3s running smaller OH2 installations.
The Pi 3 has wifi and can boot off a USB stick, so you literally just plug it in.
I’m very pleased with the result, though I’ve had to set up a cron job to restart the satellites once a week bcause they were seizing up.
Hi, I wanted to connect openhab and raspberry pi too. So, you mean to install MQTT server on Raspberry pi? Then enable MQTT binding on Openhab server to connect to Raspberry pi and send commands?