[SOLVED] OpenHAB 2.4 Binding homematic ON_TIME

homematic
Tags: #<Tag:0x00007fe053f33320>

(Tj2000bch) #1

The function ON_Time for homematic actuators does not work anymore since the update to 2.4.


(Vincent Regaud) #2

(Tj2000bch) #3

Hi Vincent.
Yeah, I realize that, I didn’t mean it that way either.

I have a rule in which I use the ON_Time.
An item as nummber:
{channel=“homematic:HM-LC-Sw1-FM:ccu2:KEQ105xxxx:1#ON_TIME_AUTOMATIC”}

Since I updated to 2.4 it doesn’t work anymore.
Does anyone know this problem, or have the parameters changed?


(Vincent Regaud) #4

So, can you post your system config,

The rule
The item

And did you search the forum about changes to homematic binding with 2.4. There was lots…


(Tj2000bch) #5

Yes, I searched the forum, but found nothing.

Openhab 2.4 ond Debian 9
Java java version “1.8.0_191”
Homematic Binding 2.4

Item
Number Licht_Schlafzimmer_Kasten_ON_TIME “Schlafzimmer-Kasten [%d Sec.]” (ON_TIME) {channel=“homematic:HM-LC-Sw1-FM:ccu2:KEQ1054261:1#ON_TIME_AUTOMATIC”}

Rule
var DateTime sunrise = new DateTime((Sunrise_Time.state as DateTimeType).zonedDateTime.toInstant.toEpochMilli)
var sunriseMinute = sunrise.getMinuteOfDay()
var minutesRandom = (new java.util.Random).nextInt(15)
var onTime = sunriseMinute - 360
var onTimeRandom = (onTime + minutesRandom) * 60
val finalOnTime = onTimeRandom; // make it final so we can use it in closure

createTimer(now.plusMinutes(1)) [|Licht_Schlafzimmer_Kasten_ON_TIME.sendCommand(0)]
createTimer(now.plusMinutes(2)) [|Licht_Schlafzimmer_Kasten_ON_TIME.sendCommand(finalOnTime + (20 * 60))]
createTimer(now.plusMinutes(3)) [|Licht_Schlafzimmer_Kasten.sendCommand(ON)]
createTimer(now.plusMinutes(5)) [|Licht_Schlafzimmer_Kasten_ON_TIME.sendCommand(0)]


(Vincent Regaud) #6

Please use the code fences

Your rule code is incomplete

Link:

You need to delete ALL your homematic things and recreate them again
This was a breaking change


(Tj2000bch) #7

I deleted a homematic things, but it still doesn’t work.
Everything else works fine.
I configured the things with Text file and not with Paper UI.
I don’t have any errors in the logs either.
2019-01-12 12:52:00.603 [vent.ItemStateChangedEvent] - Light_GangEG_ON_TIME changed from 0 to 20


(Vincent Regaud) #8

So it works then


(Tj2000bch) #9

No, everything looks good in the log, but nothing seems to arrive on the homematic actuator.
If I switch on the actuator now, it won’t switch off after 20 seconds.


(Tj2000bch) #10

I found the following logs in debug mode. Isn’t the item Nummber?

openhab> log:tail homematic

17:02:08.134 [WARN ] [mematic.handler.HomematicThingHandler] - Can't convert type DecimalType with value '0' to FLOAT value with QuantityTypeConverter for 'MEQ0402217:1#ON_TIME', please check the item type and the commands in your scripts
17:02:08.136 [WARN ] [mematic.handler.HomematicThingHandler] - Can't convert type DecimalType with value '0' to FLOAT value with QuantityTypeConverter for 'MEQ0402217:1#ON_TIME_AUTOMATIC', please check the item type and the commands in your scripts
17:02:12.127 [WARN ] [mematic.handler.HomematicThingHandler] - Can't convert type DecimalType with value '20' to FLOAT value with QuantityTypeConverter for 'MEQ0402217:1#ON_TIME', please check the item type and the commands in your scripts
17:02:12.160 [WARN ] [mematic.handler.HomematicThingHandler] - Can't convert type DecimalType with value '20' to FLOAT value with QuantityTypeConverter for 'MEQ0402217:1#ON_TIME_AUTOMATIC', please check the item type and the commands in your scripts
17:02:50.947 [WARN ] [mematic.handler.HomematicThingHandler] - Can't convert type DecimalType with value '0' to FLOAT value with QuantityTypeConverter for 'MEQ0402217:1#ON_TIME', please check the item type and the commands in your scripts
17:02:50.969 [WARN ] [mematic.handler.HomematicThingHandler] - Can't convert type DecimalType with value '0' to FLOAT value with QuantityTypeConverter for 'MEQ0402217:1#ON_TIME_AUTOMATIC', please check the item type and the commands in your scripts

(Vincent Regaud) #11

It’s not Number (1 m) anymore.
It should be Number:Temperature or Number:Dimensionless
Depending on the channel


(Tj2000bch) #12

Thanks for the note.
It should be Number:Time.

On Time
homematic:HM-LC-Dim1T-FM:ccu2:MEQ0x02xx:1#ON_TIME
Number:Time

But I still get the same error message.
When I use “Number:Temperature or Number:Dimensionless”, I get a Java error message.


(Vincent Regaud) #13

Which one?


(Tj2000bch) #14

This one and added it via text file again

Thing HM-LC-Dim1T-FM MEQ0402217 "Licht-Gang-EG" @ "Homematic"


(Vincent Regaud) #15

The instruction for migrating Homematic to 2.4 is to delete ALL the things.
Did you clear the cache?


(Tj2000bch) #16

I have reinstalled everything and reconfigured via text file.
I have not done any migration.


(Vincent Regaud) #17

Yes you did
Then it’s probably worth calling for more help from a Homematic power user

Anyone else?

Or post an issue on gitHub


(Tj2000bch) #18

Yeah, I think I’ll do that.


(Tj2000bch) #19

I switched to version 2.5.0 M1 and now On Time works again.