OH2 Homematic ON_TIME just works sometimes


I have a Homematic HM-ES-PMSw1-Pl and use it for an electrical towel-heating (i use OH2).
Because of safety reasons, i would like to use the ON_TIME Datapoint.
For example when the ON-Command is received and later, because of any error, the OFF won’t reach the device. With ON_TIME i am sure the heating will stop after a timout.

My Items:

Number wohnzSk_phy_onTime “SK ON_TIME [%d s]” { channel=“homematic:HM-ES-PMSw1-Pl:ccu:NEQ040xxxx:1#ON_TIME”, forceUpdate=“true” }

Switch wohnzSk_phy_state “Relaiskontakt” { channel=“homematic:HM-ES-PMSw1-Pl:ccu:NEQ04xxxx:1#STATE” }

Number wohnzSk_virt_onTimeSoll “SK ON_TIME SOLL [%d s]” (persistrr_change) { channel=“homematic:HM-ES-PMSw1-Pl:ccu:NEQ040xxxx:1#ON_TIME” }

The Switch ON-Rule THEN-Part:
wohnzSk_phy_onTime.sendCommand(wohnzSk_virt_onTimeSoll.state as DecimalType + 0)

Switch OFF-Rule THEN-Part:

First time it works…the device is just for 40s or whatever on and then switches off without a command from OH.After that i HAVE TO send 1 OFF command (i know its already off but otherwise it wont work) before i can turn it on again with an ON-Command. This is exactly what i want. But this last ON command (and all the following tries) seems to work without ON_TIME (no blinking LED, no automatic switching after time).

Maybe anyone has ideas?
And how i can use this AUTOMATIC ON TIME channel (i found no syntax or example).

AND last question: How can i use UNREACH?

Thank you

The ON_TIME is a special datapoint that must always be sent before the ON command. You have to set forceUpdate in the channel configuration.

forceUpdate=“true” does not work in the items file, currently only in PaperUI. I think it’s possible to configure it in the things file, but i don’t know how.

But you can user the ON_TIME_AUTOMATIC datapoint. Each device with a ON_TIME datapoint also has a ON_TIME_AUTOMATIC.


Just set the duration only once and then send ON. The ON_TIME datapoint is set automatically.

Hello Gerhard and thank you for your help.
Today i changed following code based on your tipps:

I added 1 Item:
Number wohnzSk_phy_onTimeAutomatic “ON_TIME_AUTOMATIC” { channel=“homematic:HM-ES-PMSw1-Pl:ccu:NEQ040yyyy:1#ON_TIME_AUTOMATIC”} //really channel 1?

And within my rule with the “System started” Trigger I added following 2 lines (these lines are executed just once at bootup, arent they?):

And now I also dont send the ONTIME anymore within the SWITCH-ON-RULe, except once at systemStarted (like you see above.)
So my new “SWITCH-ON-RULE” looks like:

INFO&Question: I have multiple different “System started” rules over my *.rules files…i hope thats no probleme…maybe just ONE such rule is allowed within the whole OH2 program?

And within paperui i enabled(will enable soon) the forceUpdate option at channel:
“homematic:HM-ES-PMSw1-Pl:ccu:NEQ040xxxx:1#ON_TIME” and also removed this option again within my ITEMS-File.
I will test these changes maybe on saturday because know i dont have a ccu anymore (i sent it back yesterday because it lost its teached devices 2 times within the last 2 weeks :-/)
So when i get the new one i will report fail or success the next days.
Thank you again very much for your help…cu

If you user ON_TIME_AUTOMATIC, you don’t need ON_TIME anymore.

Just set the duration at startup:


And then, every time you send ON, the ON_TIME is set automatically from the binding:


The UNREACH datapoint is not bound to a channel, it’s in the Thing status now.

hmmm…dont know why but the new code alsoe does not work.

its nearly the same as when i am using ONTIME.
It works at the beginning (once…i see it at the blinking led and the devices switches off) und after that never again (no blinking, so the device stays ON).

As you said I send the value for onTimeAutomatic once at SystemStart and after that I only send ON and OFF commands…nothing more.

Within homematic i did nothing with the device settings (so its set to OnOff-switch without any times = default).

I just tried it and it works as expected.

You can check what commands are sent to the gateway.

log:set DEBUG org.openhab.binding.homematic

then send ON.

If you enable ON_TIME_AUTOMATIC, there should always be two entries in the openhab.log:

Sending datapoint 'NEQ040xxxx:1#ON_TIME' with value ...
Sending datapoint 'NEQ040xxxx:1#STATE' with value ...