Any idea of a time picker functionallity?

To get my OH2 installation more flexible I want not to hard code time settings. Is there any idea to pick time settings from gui into a variable?

Something like the setpoint for numbers?

And how to implement a rule which checks if the configured time is reached to do any action.

At the moment I user a cron config to reach this functionallity but this is not very flexbile. I have to edit source code to change time settings and cannot enter it via gui.

1 Like

Not really. There might be a custom widget for HABPanel but for the Sitemaps you have to break the time and date into parts and use a separate slider or SetPoint for each part.

Alternatively you can set up one of the calendar based bindings and enter the schedule into your calendar.

It is a major limitation on Sitemaps.

Another approach is to base as much as possible on state and events (e.g. presence, astro events, current temperatures, etc.) rather than hard coded our configurable times.

Thanks for your hints.

any idea how to implement it in a rule?

At the moment I use a cron job with the specifice time settings.

rule "roller shutter down"
when
Time cron “0 0 6 * * ? *” or // Morning start
Item Sunrise_Event received update ON // Day start
then
RollerShutter01.sendCommand(0)
}
end

Is it possible to configure a cron job with a value of a string or something else?

Something like:
val cronsettings = “0 0 6 * * ? *”

rule "roller shutter down"
when
Time cron cronsettings or // Morning start by manipulating the cronsettings from a string
Item Sunrise_Event received update ON // Day start
then
RollerShutter01.sendCommand(0)
}
end

Instead I have to run a cron job every minute and check, if the specific time is reached.

We have an issue for that since a long time, but it has never been so important to anyone so that (s)he would have implemented it…

Ah, ok. I can wait and do it the static way unitl another solution is ready.

But will be great, my customers need that. Until now I can earn a little money to do this for them hard coded :wink:

The open source compatible way would be you have your customers pay for having this feature implemented in the project and not as a closed custom proprietary workaround :worried:

hello kai,

you misunderstood me. I earn a little money to go there and configure it by hand.

Who can send me an offer about how much this will cost? I will ask my customers then.

Check out these links:

This approach is one of the work arounds for this. Another is to use Timers. There are a ton of Alarm Clock Examples which illustrate several approaches. Personally, I would think that using a Calendar would be the best workaround for having your customers to enter a schedule but I don’t know enough to say so definitively.

The best would be to have someone implement the feature. And if you can get your customers to pay a bug bounty that would potentially encourage someone to develop the feature sooner.

Added an 100$ Bounty (maximum 3 Month) for the implementation in the basicui