I’m new to Openhab, but like DIY-projects. Receantly I bought a set of remote switches (http://www.harald-nyborg.dk/p10047/stikkontakt-fjernbetjent-3-stk) and started reading about home automation. After som reading I settled on Openhab for many reasons - for one, I could make good use of my Raspberry Pi. The easy solution would be to buy for instance a Tellstick Duo, but there isn’t that much DIY in that, so I went for the cheap and more DIY-solution and bought a set of RF receiver and transmitter (http://www.dx.com/p/geeetech-superheterodyne-3400-wirelesss-receiver-433mhz-rf-transmitter-kit-green-370793)
After a bit of tinkering I got Pilight to record the remote signal and am able to toggle the switches via Pilight-send. So one way to go is to setup Pilight and maybe some scripts and make use of the Pilight-binding, to control it from Openhab.
Or should I use the exec-binding and call the scripts directly from Openhab (the Pilight-deamon needs to be running)?
Or is there some way to send the “codes” directly from Openhab, which I haven’t discovered yet?
There is a enter link description here Pilight binding for OH. You will still need the Pilight daemon running but you can send codes directly through the binding rather than needing to use the exec binding.
Yes, okay. What is the benefits of sending code through the Pilight-binding rather than using the exec-binding?
I have a server running 24/7. Should I run Openhab on the server and Pilight on the pi (or maybe pi’s) or should I run Pilight and Openhab side by side on the pi?
I just read about running multible Openhab-instances with MQTT. I don’t yet understand the concept, but it’s something about - if one Openhab-instance crashes, you are still able to turn on and off lights etc. because the other(s) take over. That might influence the decision of the question of where to run Openhab…
I don’t use Pilight so I can’t really tell you. However, as a general rule using a native binding rather than exec is more flexible and allows one to send and receive data with a lot less work creating translators, maps, parsers, and error handling code. All that is done for you already in the binding.
Its up to you. Which is better wholly depends on what hardware you have, how things are wired, desirability for expansion, etc. I can’t answer that for you. For me I ended up hosting it on an old laptop and I have a couple Raspberry Pis deployed close to what I want to control or sense reporting back to the “Server”.
Most of the discussions I’ve seen with wanting to run more than one OH instance has to do with people having two buildings and wanting to control both from the same sitemap. I’ve not seen too much discussion about running redundant OH instances (there was one thread but I can’t seem to find it). There are only a limited number of configurations where it would even be possible (e.g. wouldn’t work if you are using a binding like the zwave binding which requires access to a single USB dongle unless you figure out how to give both machines access to the same dongle).
Thank you very much. I will try to work on setting up the Pilight and using the binding in Openhab.
My intention is to make some intelligent control of the light at our frontdoor and with a PIR-sensor in our entre.
After the idea hopefully is sold to my wife I can continue expanding to the bathrooms and dining room, etc.
The plight binding does subscriptions. So if you also control the lights with an existing remote, plight will know and update the state in OH. This won’t work with exec binding.
I do run the plight binding myself but moving slowly to more robust systems. The WAF is bad when the lights dont go on,cause RF signal was bad.
It’s not a problem of the binding or OH in general. It’s more the 433mhz system that is not stable enough when controlling multiple receivers across the house.
Have fun experimenting.
can you paste your config from plight ?
i am struggling with the problem that plight is only sending the state to openhab when the state is changing in plight.
it would be handy if plight processes the command to openhab without looking to the state in plight
any suggestion ?
I am not there yet. Till now I have made a default install of Pilight and is using the commandline pilight-send to turn on and off my switch. But if anybody else has a “real” config-file I also would like to see it.
the pilight wiki is quite good. Grab the content from config.json there.
Only keep in mind, that you have to stop pilight-deamon before editing config.json.
Else, pilight will write the last state into config file and overwrites your changes.
Heres some sample code from my config.json:
"protocol": [ "elro_800_switch" ],
"group": [ "Lampen" ],
"media": [ "all" ]