Migrating Domoticz to openHAB

Hi everyone,

I’m in the process of migrating (slowly) the functionality I have in my running Domoticz setup to openHAB.

As openHAB have the binding I need for my type of system (IHC Binding) I have all along used openHAB as middleware between my IHC Controller and Domoticz but only with things in the items file.

Domoticz is easy to setup compared to openHAB. You get a lot of functionality by default where in openHAB “you have to work for it”.

But there are some downsides by doing it this way. When Domoticz turns on a switch > openHAB is updated and does the actually turning on in the IHC Controller. Then openHAB returns the new state to Domoticz resulting in a loop. I have tried to solve this by a Lua script in Domoticz, that a switch can only be turned on one time within 2 secs. This as solved my main issue but is is quite a workaround and is not flawless.

So now I decided to try and expand my openHAB installation and se how far I can get.

One thing I have noticed is the lack of information in the GUI.

In Domoticz I can see when a item (or devices as called in Domoticz) was last turned on/off. I can get a list of ON and OFF’s and a chart.

Is this somehow possiable with openHAB?

I have been trying the two logging and rrd4j persistence but it is not quite the same :slight_smile:

If someone have made a nice looking GUI please feel free to show it off :smile:


BR Søren

The GUI is one area where OH is not as advanced as it could be and it is really designed as the user interface, not an administration GUI.

There is Habmin which is a third party developed UI which is more geared towards administration and is all but required if you are using the zwave binding.

Also, if you set up the my.openhab and send all your Items to it through the myopenhab.persist file then you can get a log of all your events on the my.openhab.org website.

OH 2 has the PaperUI but I don’t know as much about what you can do and see on it.

Or you can work with the log files. All events get logged out to the events.log file by default so you can read and grep through that file to see all events and when they occurred.

Some people will create a DateTime Item to store the most recent time an Item received an event and populate it with a rule and put this DateTime Item on your sitemap.

I would approach this using two Items and a rule to combine them rather than linking everything in one Item definition. One Switch represents the IHC device and the other the Domoticz. When the Domoticz sends the command that triggers a rule which sends the command to the IHC device. Then in this rule or another rule you can block the update from going back to Domoticz or stop the command that bounces back from the Domoticz from triggering the IHC again.

Hi Rich,


It’s going to be interesting to see what OH2 will bring.

Hmm… I never thought about doing this way. Then openHAB will have the control and update the systems accordingly.
I will give that a try and see if I can figure out making en rule that suits.

I 'm trying to work on this. With the rule I’ve created the two systems are getting updated when a change happens in the other system. I have not yet implemented any kind of blocking mechanism - I need to figure out how - so a loop is stilling occurring in some situations.

This is how it look so fare. - Is this what you had in mind @rlkoshak?


Switch IHC_Garage_Loftlampe			"Loftlamper"			(Garage, Lights)							{ihc="0xdf5b"}
Switch Domoticz_Garage_Loftlampe		"Loftlamper"											


// This rule updates device/item state in Domoticz, when the state is changed in openHAB by the IHC Binding 
rule "Turn Garage_Loftlampe on"
    Item IHC_Garage_Loftlampe changed to ON

// This rule updates device/item state in Domoticz, when the state is changed in openHAB by the IHC Binding
rule "Turn Garage_Loftlampe off"
    Item IHC_Garage_Loftlampe changed to OFF

// This rule updates device/item state in openHAB, when the state is changed in Domoticz
// Domoticz call or OFF in a Lua script
rule "Turn Garage_Loftlampe "
    Item Domoticz_Garage_Loftlampe changed
    sendHttpGetRequest("" + Domoticz_Garage_Loftlampe.state)

If only Domoticz had a command equivalent to postUpdate - that would have made things alot easier. Domoticz only have a command equivalent to sendCommand.