Own Time Events

Hi all,

is it possible, to define a time as an item, which can be used as a trigger, when the time will be true.

i.e In the morning at 7:00 o’Clock the Shutters will open, but the next day, i will open the shutters at 8 o’clock. Therefore i will have an item in my sitemap, where i can define a time which will be then used in the rule as the trigger time.

Is it possible?

Thanks and regards
Danyo

Hi Danyo

have a look at https://www.openhab.org/docs/configuration/rules-dsl.html#time-based-triggers

E

Yes and no.
You can’t have a time picker in a sitmap, there is no such widget. There are many workarounds though:

for example

There are two steps to make this happen.

  1. Enter and adjust the time. As Vincent points out, this is poorly supported in Sitemaps. I do think there is a widget in Habpanel though.

  2. Generate the event. For this you need to create a timer based on the state of the Item. The other approach is to have a rule trigger every minute to see if it’s time to do the action.

But remember, a DateTime Item stores an instant in time. You will need to reset the Item every day to get the DateTime for today.

See the Python implantation on the Time if Day DP for generating the events based on DateTime and Timers.

what are you trying to achieve?
different times per weekday to open stuff?

have you seen Timepicker?

that might be an elegant solution