Issue of the topic:
I am looking for a solution for controlling Shelly relays and having the ability to turn them on and off in 5 minute intervals per hour. I need to be able to run a fan for 5 minutes at a time and shut it off for a period of time before I run it again. The problem is I need to do this at least 1 time per hour. Shelly devices don’t allow you to put in more than so many entries to their internal scheduler.
I set up and configured the Time Line Picker program for Openhab and it appears to be working correctly. I’m just looking at being able to break my timeline down to 5 minute intervals instead of 15 minute intervals as it is by default.
I couldn’t decipher the rules file to figure out what I needed to change in order to do this nor could I find where it was already explained on the forum.
Unfortunally no. The main concept of timeline picker is the fixed division of the day into intervals.
My approach is 96 intervals (15min). I think this is a good compromise to make the usage clear and to serve as many scenarios as possible. Changeing this approch is a big task and needs a new possibility for setting up. For 5min intervalls the day has 288. This is not so nice in the UI.
I have applications that need to be more precise. In this case I use the timeline picker and the associated item as a gate to control my real items with another rule that is triggered when the associated item is changed. Is this a way for you?
fan_gate_item = ON
–> triggered a rule: fan.item = ON for 5min, OFF for 5min, ON for 5min, … (loop in a rule)
fan_gate_item = OFF
–> triggered the same rule as befor: stop the loop, fan.item = OFF
In a real scenario i would look how often the the fan is running. This example is blocking a task and in case of a restart of OH …? It’s quick but perhaps its better to run a rlue every 5min and look for the fan_gate_item. You can store the last switch point for your real fan item in an object. This is more complex but i think it’s clear.
Thanks for the quick response! I couldn’t agree with you more about the current time interval for most folks and the case use in the UI. That makes a lot of since.
I am very green with OH programming and have been out of programming for quite some time outside of OH. But that logic does make since to me.
So I just looked at my records and I need this to be triggered to run every 15 minutes but for only 5 minutes at a time 24 hrs per day 7 days a week. I grow gourmet mushrooms and they need proper air exchange which requires running a fan. I could run the fan constant but that really is over kill. That’s where this rule comes into play.
What would that logic look like in OH? Is that simpler to do via CRON?
Well after a little digging on this end on the forum I think I came up with a solution… I can use the built in Auto Off from the Shelly device to turn the fan off after 300 seconds and use the following rule to trigger the fan On with Cron.
rule “Grow Room Fan”
Time cron “0 0/12 0 ? * * *”
logInfo("Grow Room Fan", "The rule triggered")
Any advice on if this will work is appreciated.
Thanks again for all of your work on the Time Line Picker add on. It is a great addition to OH!