OH Time problems

I have a strange problem with data modification around midnight time.
Because I want be sure, that around midnight will value of item goes to 0, I made a rules :

this rules only simply reads a values of Modbus_Data_PV_yield_today_784_Value_as_Number into item in the time 0:30 - 23:30

and second rule will set at 23:35 items into 0 :

my problem is that last week was working as expected :

so at time 23:35 value was set to 0

but today item modification wasn’t working correctly :

value change was at 0:19

really strange.

When I will look on the original data of Modbus_Data_PV_yield_today_784_Value_as_Number, I can see that originaly value changed at 0:29. So rule started, but at wrong time. I don’t know why :

Do you have any idea what’s wrong ?



Maybe an XY-Problem. So my question:

Why at all? My guess, the value isn’t reset properly at the source. So better ensure that the source does its job correctly (maybe an issue with time settings?)

It’s value about actual day production of the PV.
OH reads it via modbus from PV main unit. I’m not able change, how main unit of PV is sending this value.
So I must make a small modification of this value to have zero before midnight - for correct aggregation chart.

But it’s not important. If I configured a rule to set value to zero before midnight (23:35) and it’s not done, it’s error of OH not of source.

My point is, you get a summed value, which is set to zero by source round about 0:30, but the reset has to be done at 0:00:00. You’re using openHAB and two additional Items to circumvent an issue of the source.

What’s your openHAB hardware? How do you set the time of this hardware?

Try using Time cron instead of Time is. The correct Time cron expression here is 0 0 0 * * ? or (if you really want the reset at 23:35 - which doesn’t make sense, but anyway…) 0 35 23 * * ?

my pc time is the same as Local time :


so this rule definition isn’t ok ? :

so use this ?:

what’s difference between this two time definitions ?

I did a change with time definition and today it was ok.

so we will see

1 Like

Fingers crossed :slight_smile: