The delay happened if the screensaver was active only for a longer time. I’ve switched my device to ethernet now to rule out a WiFi connection issue but that didn’t help.
I noticed that with openHAB as backend when trying to switch on a dimmer it stays at “Turning on” for a long time and then eventually switches to “Off” again, even though the light is on. Only after restarting HomeHabit it picks up the “On” Status after a few seconds.
The Constraint errors were gone after a reboot, unfortunately I forgot to actually submit my post until I had a look at it again today.
One thing I noticed today aswell: In the connection to openHAB you seem to be subscribing to something like /rest/events?topics=openhab/items
, while all you are really interested in seems to be something like /rest/events?topics=openhab/items/*/statechanged
. In my case there are many events per second being pushed to HomeHabit this way (even if there were no changes, just because some device told openHAB that the state hasn’t changed). If you only need the statechanged then it is sufficient to subscribe to those. I suggest having a connection just for the statechanged/Dashboard refreshing, and in case you need other events aswell (for example for automatically detecting new items) have a separate connection for those. That would lower the CPU and network usage of HomeHabit quite a bit in my case I guess.