Is openhab suitable for me?

I’m currently starting out with home automation, having started with a raspberry pi with a webcam which is currently using ‘motion’ to detect motions and notify via twitter and send image files via sendgrid.
Currently the system is running very simply by motion invoking python scripts, but I was going to replace this with a system running scala + akka (What I normally use for programming - software developer).

  1. Is it easy to integrate custom gadgets (like the pi+webcam, but also I’m adding a bunch of arduino stuff: sensors, plant watering, blinders, detecting when washer/dryer are done, etc… that will all be controlled via the pi)?

  2. would the rest interface be the easiest way to integrate for reading stuff from openHab, and also posting new values for ‘Items’ defined in my openHab?

I’ll also be getting some zmap devices in the future (door lock, light switches, etc…) which is why I think openHab might be a good alternative (dependent on the answer to question 1).

  1. Currently using twitter to enable/stop motion detection, or disabled it for x hours/minutes. Is this kind of integration easy with openhab?

  2. For some things I might want a bit of complicated, cpu/code heavy tasks which I’d rather not do in Java (10 years was enough), can you from the Rules access “full java”, i.e. launch Akka and send the Objects directly to my scala code?

Could be, could not be depending on the route you take with the arduino stuff. I’ve found on this forum that lots of people have a terrible time getting MySensors based arduino sensors working with OH, though most of those people have little to no experience with either coding or arduino so it is difficult for us on the forum to pinpoint their problems.

On the other hand, MQTT is very well supported and understood as is REST. These are really quite easy to get up and running. I personally use MQTT to command/receive data with my remote sensors/actuators.

Also, if power isn’t a major concern, consider the ESP8266 boards instead of straight arduinos. The big advantage is they have WiFi built in and can run MQTT clients freeing you of the need to create a bridge (for example an RFM69 to ethernet/MQTT) to get your arduinos talking to OH.

It would be an easy way. I don’t think there is an easiest way. It also largely depends on whether OH needs to poll for updates or if updates get push to it. If it needs to poll, an HTTP REST api on your device would probably be easiest. If your devices push updates, MQTT or the REST API would probably be the easiest. Though Serial and TCP/UDP are also supported.

zwave? If that is what you meant instead of “zmap” which I’ve never heard of, you should be aware that the z-wave binding doesn’t yet fully support the Security command class, meaning the door locks will not integrate with OH directly. There is an experimental in work support (search the forum for “kwickset” and you will find a many hundred posting thread of people working on the support) but it only works with the 1.9 binding, not the new OH 2 binding.

If you must have door lock support, you will need to get a hub (e.g. Wink or Vera) to control the locks and integrate OH with that hub. Its a pain but can be done.

There is a Twitter action to send out Twitter events. I don’t think there is a way to receive Twitter. But there are other push notification type platforms that are supported and support two-way.

NOTE: openHAB will not replace your motion service. It can be configured to send commands/receive updates to/from it, but video processing it not something openHAB does. So, for example, you can have a simple switch on your openHAB sitemap which you trigger which will send a command to your motion server (e.g MQTT, TCP/UDP, HTTP) to disable/enable it.

As long as your interface to the motion server is there, this kind of integration is relatively easy.

You can access “full java” (base libraries plus openHAB libraries) from the Rules DSL. It would take a little bit of work but you could add the Akka jars to the classpath to get access to them from the Rules DSL as well.

However, a more appropriate approach would be to write an Akka binding (if the direction is only sending than an Action would probably be the appropriate binding type).

You could also write the Akka based stuff external to openHAB and interact with that through the Exec binding, HTTP binding/actions, or some other API you write.

I can’t say if OH is for you or not. In my opinion it is an exceptionally flexible and solid platform upon which to built home automation so I would encourage you to give it a try.


Yup. There’s a GPIO “binding” (that’s how technology-specific mapping modules are called in OH) to map the Pi’s pins to items (if you run OH on that Pi), or there’s a MQTT and HTTP bindings to talk to servers using these protocols, or the generic exec binding (to call external programs).

Possibly yes. But there’s tons of other possibilities.

you mean zwave, I assume ?

Rather not. You can send tweets from OH, but I don’t believe it can do the opposite direction well.
There’s better interfaces available such as REST or the ESH console or the habdroid app.

I’m not familiar with Akka. You can call external programs from within a rule, but for sure the whole thing isn’t built to do the processing elsewhere than in java in the rule itself, so expect this to become cumbersome.
But you can also develop a binding or action module once you’re more familiar with OH.

I’m too ignorant to use REST, so have integrated custom stuff with the HTTP interface.

e.g. reading a state with:


and writing with:


Works very straightforwardly.

You can use “executeCommand” to pass values to Python/C/whatever programs and then read the result back.


Hate to break it to you, but that is REST. :slight_smile:


Thanks for all the replies, they have been very helpful. I think I’ll have a look at and the REST interface as potential solutions.

Excellent! Turns out I am clever enough to use REST, just not clever enough to know what REST is…

Thank you for this. I’m new to home automation, but I am not new to sensors and embedded controllers. I was wondering what might be the best way forward to get custom sensors and openhab to communicate and MQTT seems like the way to go. I really like the fact that mutual TLS authentication is already a working part of Mosquitto.