I discovered a problem with persistent rollershutter items in combination with the rollershutterposition-profile: The position is not restored as numeric e.g. after a system restart.
I guess this started during the milestones (but I’m not sure):
When a rollershutter item (I tried mapdb and rrd4j) is restored after a system restart, the position is not defined as numeric. I noticed this because the rollershutter-profile always failed to change the position after a system restart if the position of a blind is <> 0 (after e full UP it worked again).
My current workaround is to overwrite all items at startup with the current numeric values like this:
Err not sure what you mean. “The position” is stored in the actuator and propagated via a channel to an item as soon as the thing/channel gets online. You can use but don’t need persistence to restore it.
Also, persistence only restores item values but does not issue a send command so if you restore a persisted position value of x but the rollershutter is at y, blinds won’t change to x (restoration is no “send”, just “update”).
And to the best of my knowledge it has been like that more or less ever.
Sorry if this is off-topic for milestones. I could start a new post too.
The position is tracked by the rollershutterposition-profile from the addon-store (sorry, I didn’t provide that information). This is a profile (part of the release) to track the position even for shutters that don’t have hardware for that. The profile manages the position by controlling the time the shutter needs for UP and DOWN-movements. As the hardware has no position you need persistence if the position should be available after a restart.
I can of course live with my workaround but I thought it might be good to provide the information of this little bug. I saw in git that the profile was not touched for a year so maybe it’s always been like that and I just didn’t notice.
Hi, I just upgraded 4.3.0-1.
I get the error message:
2024-12-15 20:18:36.920 [INFO ] [el.core.internal.ModelRepositoryImpl] - Validation issues found in configuration model ‘fussball.rules’, using it anyway:
The method getZonedDateTime() from the type DateTimeType is deprecated
The method getZonedDateTime() from the type DateTimeType is deprecated
The code in the rule is:
val Number Differenz = ( ( (i_fb_naechstes_Bayernspiel.state as DateTimeType).zonedDateTime.toInstant.toEpochMilli) -( (Jetzt).zonedDateTime.toInstant.toEpochMilli) ) / 1000
I think I should use getZonedDateTime(ZoneId.systemDefault()) instead.
Can someone assist to find the correct syntax for the rule above?
Thanks in advance!
UPDATE:
I changed it to this:
val Number Differenz = ( ( (i_fb_naechstes_Bayernspiel.state as DateTimeType).getZonedDateTime(ZoneId.systemDefault()).toInstant.toEpochMilli) -( (Jetzt).getZonedDateTime(ZoneId.systemDefault()).toInstant.toEpochMilli) ) / 1000
Then again, I also replaced with getZonedDateTime(ZoneId.systemDefault()) but still keep seeing deprecated warnings.
So is the replacement wrong or the warning ?