Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
OpenHAB Driver
OpenHAB is a JAVA-based open source automation software, It can run on almost all hardware, including Windows and Raspberry PI. It has apps for both android and IOS, and has a number of connection options, such as MQTT, SNMP, HTTP, and has a number of various interface/display options. Here's the summary from their website:

  1. is designed to be absolutely vendor-neutral as well as hardware/protocol-agnostic
  2. can run on any device that is capable of running a JVM (Linux, Mac, Windows)
  3. lets you integrate an abundance of different home automation technologies into one
  4. has a powerful rule engine to fulfill all your automation needs
  5. comes with different web-based UIs as well as native UIs for iOS and Android
  6. is fully open source
  7. is maintained by a passionate and growing community
  8. is easily extensible to integrate with new systems and devices
  9. provides APIs for being integrated in other systems

OpenHAB has also joined the cloud (band-wagon), and has a free, no-limits cloud service that connects and allows item values to be logged and uploaded to an external secure site,

IMHO, the documentation for version 2.x is great for the beginner but advanced subjects are difficult to locate or unavailable. OpenHAB has an active community and is actively developing new bindings (i.e., device drivers) for external connections. I found the community forum a better resource, than the online docs, but the built-in docs for the REST API are very comprehensive.

Attached is a CQC device driver for monitoring events, such as changes to an OpenHAB item's (field's) value. Other events could be monitored, but the driver does not support any other event types (yet). The driver's connection is only one-way, as any commands to the openhab instance can be completed using the REST API.

A TCP connection to the device running OpenHAB is required for the driver, since it implements a SSE (Server-side Event) protocol, where a persistent, one-way connection is created after a HTTP request.

The driver config file allows for multiple items to listened for (subscribed). Config file format, is as follows, (keyword names are not case-sensitive):

###############        CONFIG FILE - for OpenHAB Device Driver        ###############
#### ---- One config item per line, Use '~' for seperator. Lines with '#' will be ignored. ---- ####
# PollInterval will polling define interval, in milliseconds, default is 500

# Add additional custom fields on seperate lines, driver requires at least 1

# DebugEnable will dump debugging and detailed logging to a local file in MacroFileRoot

Attached Files
.cqcdrvpack   OpenHAB-v1-0.CQCDrvPack (Size: 10.64 KB / Downloads: 0)
Excellent stuff - I am aware of OpenHAB but have never used it. I know many have though and it is very popular. What is the use case scenario you are thinking of with this driver. Isn't OpenHAB its own automation system?

My first immediate thought was to use CQC with OpenHAB for MQTT, but I think a Node Red driver would be better if its just for that reason.

Is this meant to be a gateway to those protocol that are not currently supported in CQC but are in OpenHAB
Mykel Koblenz
Illawarra Smart Home
(05-08-2018, 12:00 PM)znelbok Wrote: What is the use case scenario you are thinking of with this driver.  Isn't OpenHAB its own automation system?

Is this meant to be a gateway to those protocol that are not currently supported in CQC but are in OpenHAB

Yes, OpenHAB is another automation system, but designed to be run on lighter hardware. For me, openHAB is a backup or redundant monitor, depending on how stable I see it. I haven't enjoyed everything about OpenHAB, and I by-no means see it as a replacement to CQC, just another horse in the stable.

Recently, I've been experimenting with the various cloud automation services, integration capabilities, and I really appreciated the free cloud service for upload of data/events. I also found OpenHAB to be the only FREE service that allows me to send a string (or number) parameter via IFTTT to my home automation system, without exposing an open port to the internet.

So all this pushed me to develop and release the driver, and I thought others might find other use cases, as well, such as MQTT.
Driver updated to version 1.1

Change Log:
-- Each ItemChange entry has a corresponding field created by the driver, with the same name and a standard field item prefix
-- Driver connects to OpenHAB and requests the current value of these field(s) upon startup
-- ItemChange fields are writable and send the corresponding command to OpenHAB
-- Field item prefix default string is 'oh_' , but can be updated in config file
-- Debug filename set be set in config file

Config File - Examples:

# FieldPrefix will prefix all item change field names, default is 'oh_' (lowercase o, lowercase h, underscore)

# DebugFile is filename and full path of debug lof file, but only used when DebugEnable is set to true

Attached Files
.cqcdrvpack   OpenHAB-v1-1.CQCDrvPack (Size: 13.84 KB / Downloads: 4)
There isn't actually a ~ in the field names is there?
Dean Roddey
Explorans limites defectum
(05-27-2018, 04:53 PM)Dean Roddey Wrote: There isn't actually a ~ in the field names is there?

No, I needed a delimiter character for the config file, each line typically is a key/value pair. Below is from the config template:

#### ---- One config item per line, Use '~' for separator. Lines with '#' will be ignored. ---- ####
Hi whozeawhat!

Thanks for taking the time to put this together!  I had been playing with OpenHAB a while back as it was bundled with the emonCMS instance I stood up to play with.  Upon taking a second look I found that they have some pretty interesting bindings and specifically the one for Asterisk!  That being said, I stood up a full instance of OpenHAB2 as a docker to do some further testing as I always wanted to be able to get my Asterisk data into CQC!  MQTT is another bonus!

I am happy to report that your driver was able to connect to both my instances of OpenHAB and is getting the data I setup for testing successfully into CQC!

I can't say I do doing very much with it at this point, but just being one step closer to automating things based on pbx call activity is a game changer for me!

Thanks again!


PS i see they have a GPS binding for owntracks as well!!

Possibly Related Threads…
Thread Author Replies Views Last Post
  RainMachine Sprinkler Irrigation Controller Driver kblagron 50 3,522 06-01-2020, 01:18 PM
Last Post: Dean Roddey
  Russound MCA-66 on TCP driver 5 327 05-24-2020, 06:23 AM
Last Post: gReatAutomation
  Samsung SmartTV Driver George M 0 103 05-20-2020, 09:04 AM
Last Post: George M
  OpenWeatherMap Weather Driver Using OneCall API kblagron 11 540 05-18-2020, 04:09 AM
Last Post: dlmorgan999
  Tesla Driver Driver kfly 10 1,048 05-08-2020, 08:49 AM
Last Post: gReatAutomation
  JVC D-ILA Driver jokermac 34 4,877 04-13-2020, 01:28 AM
Last Post: Mark Stega
  LIFX Driver bobskie708 15 6,201 01-05-2020, 11:00 AM
Last Post: simplextech
  Universal Devices ISY Insteon Driver wuench 369 175,672 12-28-2019, 05:15 PM
Last Post: simplextech
  RunTimer2 driver rbroders 18 7,933 10-17-2019, 04:38 PM
Last Post: rbroders
  Writing Driver - Varying commands based on checksum gReatAutomation 3 877 07-22-2019, 01:08 PM
Last Post: Dean Roddey

Forum Jump:

Users browsing this thread: 1 Guest(s)