@dimmenhau, @ghof thank’s for your help. The solution form dimmenau is a bit shorter, so i will create a new brunch on gitlab with a timelinepicker version for OH3 and update the OP with a note and the link. At first i thought for OH3 i will only use the javascript version. But the discussions around helper libraries are odd, and i’m not sure if or when a file-based development is possible. So it’s good to get a runnable version with the Rules-DSL.
Sorry bro, not meant what u understand… i meant to say my effort to upgrade to OH3 without making sure that ur fantastic time picker solution will work on OH3…sorry again for misunderstanding… off course i appreciate what u did, all we do… i have been using this for the last 1.5 year… u r a life saver…
Hi Torsten,
After upgrading to OH3 i had some problems with the timelinepicker, at first (as above) with the: (now.getMinuteOfDay() / 15).intValue` the change to (now.getMinute() / 15).intValue
did not give an error but there was also no action from the timelinepicker I eventually chanced it to:
((now.getHour() * 60 + now.getMinute()) / 15).intValue
I also had issues with the ScriptServiceUtil. It took me a while and changed the following:
import org.eclipse.smarthome.model.script.ScriptServiceUtil
to
import org.openhab.core.model.script.ScriptServiceUtil
Hi Robert,
i have also read a report on gitlab and changed the import line. (timeLinePicker.rules)
Please can you check if it really nessesary this to change:
as you can see getMinute = getMinuteOfHour and not getMinuteOfDay so to get the previous getMinuteOfDay we must take the hours*60 and add the getMinute. I’m sure there are other (nicer) options but it works fine.
i have edit the rules file. But another question. In Line 86 of timeLinePicker.rules (v 0.8.1) is
var Number currDay = now.getDayOfWeek()
Can you confirm that this works? The old and expected output is: 0 - monday, 1 - tuesday, … 6 - sunday (edited after the post from rmvdmrl)
1 - monday, 2 - tuesday, … 7 - sunday
Hi Torsten that is a good question, I only use mode 17 (all day’s) and i didn’t get an error (and it works). So had to do some testing.
As it is now (today) the now.getDayOfWeek() returns “Friday”
so it must be chanced aswell to:
var Number currDay = now.getDayOfWeek.getValue()
then today(on friday) it returns 5 (I did try -1 to get to the above values (0-6) but then it switches on the wrong day so i quess 5 is good for friday).
Hi Robert,
thank you for your help. I have edited the file on gitlab and you are right. The correct values are:
1 - monday, 2 - tuesday, … 7 - sunday (i have edit the post above to avoid irritations)
P.S. In the javascript version is sunday - 0. This was my confusion.
Hello everybody,
I have now managed to set up a heating control system with the timeline. There are a total of 4 heating modes (normal, vacation, absent and summer mode). In summer mode, all radiators are off. Every other heating mode has its own timeline with different heating times.
Now I have the problem that no matter which mode I have selected (except summer mode, of course), it always triggers all timelines at the respective set times.
Can you somehow configure it in such a way that only the respective timeline that was selected using the heating mode is triggered?
Hi @Mohammad_Chaaban , yes of course. It’s open source and you can change what ever you want.
But this lines are to prevent for multiple sending a command. This will not change the functionality.
@Didschu You can’t disable a timeline from a rule.
You should work with separate items for each season. Then you can define a item that’s represent the current season. The last item is the gate.
For the next one you need a separate rule. Here you can select the setpoint correspondeing to seson and send it to your valves or devices.
@Mohammad_Chaaban Ah i remember me that someone posted this here. I think you are using the event mode.
If this approach works for you, it’s ok, but much better would be not to use event mode. Then you don’t have to change the codebase.
i have the latest OH3 docker container in use, it is a new install, i have everytihng like in the example, i use the openhab-timeline-picker-openHAB3_oldRuleDSL, also i have TransferItem1 and TransferItem2, both with one item in the ().
For the sitemap i used a working one from the oh 2.5 setup, ony with the change of days, 1,3,5
The downloaded files also the latest