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
Yes and no.
You can’t have a time picker in a sitmap, there is no such widget. There are many workarounds though:
Edit: I still use this example, but for new users I suggest having a look at
What makes this solution different is that you have only a minimal set of items (3) per alarm, but still be able to restrict it to days. The Day item contains the a string which defines start and end day,e g. 15 is monday to friday.
Number ALARM1_PERSON1_H "Hour [%s]"
Number ALARM1_PERSON1_M "Minute [%s]"
There are two steps to make this happen.
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.
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?
openhab timeline picker
This project extends openHAB basicUI by a sitemap component to setup timebased processes. (e.g. heating control, light control or rollershutter)
In the component you can edit one or multiple scales. The scales represent the day’s of the week and the time of day from 0.00am to 12.00pm. By url parameter you can specify the displayed day’s of the week and whose grouping. It’s possible to choose monday to sunday, monday to friday, saturday to sunday and each day one at a tim…
that might be an elegant solution