Hi, is there any way to active/deactivate any single timelinepicker by rules (instead of by sitemap)?
For instance,
I use a timelinepicker as crono-Thermostat with weekly program (i.e. morning cold while we are at work/school).
I want to create a rule based on presence detection that if my kids are at home instead of school (as often happen due to COVID restriction), deactive the timelinepicker in the morning and force hot temperature till moon or till they left home and then active the timelinepicker again.
@Foxejoe No, there is no api to activate/ deactivate from a rules.
Perhaps i can help with an idea:
In my own heating configuration i have a switch ‘1x on’. That means the next ‘redeuce’ periode is ignored and heating is active. For this a have a proxy item. The state of this item is controlled from the timelinepicker and the state of the ‘1x on’ switch.
A second approch are three states:
‘reduce’, ‘heating’, ‘heating when inhabitant’.
You need a proxy item again. In a rule you can check is ‘heating when inhabitant’ aktive and someone is home (switch, or MAC- Adress) then heating else reduce.
You might be able to display the two heatingstates well in the timeline picker with a customized color scheme.
@tose
thank you for this wunderful time line picker. I use it with the event option on. However in my use case I do not want to restore the status when “manuel” mode is activated, but remain the status as is. Therefore I removed some lines in the rule. Can you add an extra option for this?
thanks for your feedback. Yes, i will introduce an event mode 2. In this mode the command will be sendet to the item one times. At the moment i have finished v3.0. I have to write the docs and adapt this version to OH3. After that i will realize event mode 2 with v3.1.
now the ip parameter is optional and when you leave it out, it switches automattically to the right url when used through externally with myopenhab.org.
the 1st change, I stole from another thread where a UI 3 widget for the timepline is proposed.
i have finished the first version of v3 of timeline picker.
This is for openHAB 2.4 and earlier with installed new rule engine.
The version for openHAB 3 is coming as next.
Some new features:
sun events
admin widget added
headline in single timeline
alias for switch states
translations for complete timeline picker
Who has running an 2.4 installation and is willing to test?
Also i need help for translations.
Here you can find the new version: see on GitLab
Feedback would be helpful.
@tose, I am trying to use v3 on OH3
After some changes to several paths in the javascript, the server side seems to execute.
However the client side fails when requesting the thing tlpicker:tlp:home, due to authentication needed for /rest/things. I can manually add the credentials in the code, but do not see how to solve this structural, since the client does not know them.
How did you envision this?
as first many thanks for your translations.
You are right, the authorisation is nessesary - on the front end and on the backend side.
I push my running OH3 solution on a separte brunch. But i think it’s not smart or nice. It’s nessesary to paste a token in the code. This is not smart. But on the pro it’s running and i will think about a better solution.
I create the brunch now (without a step by step doc, this must wait)
Hi, I would also like to test this, but I have problems decoding the token. Can I also just log in with user and password? What change in the headers vector would I have to make?
@tose, thanks for the OH3 version with GraalVM.
I have it running after some juggling with base64, it appears you to have the encode function on https://www.base64decode.org to get the right token.
I found 2 issues:
when you change the sunset/rise delay something gets mingled up in the data, the widget showed additonal item states. I could only resolved this by erasing the timeline and restart.
when using the android app or through home.myopenhab.org the widget shows “loading data” in a green square, nothing else.
when you can use the widget it’s fine and thanks for your your feedback.
Is this behavior when the event mode is active? I think i remember me, that i have seen this and then ignored. I’m going to take a look at that.
Is the mobile with the android app running in the same network or connected via VPN? This should run but i will test it tomorrow. Probably the access through home.myopenhba.org not possible, because it’s a CORS- problem. Can you open the dev tools in your browser and open a side with the timelinepicker? I think you will see a CORS- Error/Warn.
I use the tlp in event mode, so yes to your 1st question.
With respect to the access problems: I use the android app on the local network. When I access the widget through home.myopenhab.org , it shows the message below in the dev tools. I does not sound related to CORS. As mentioned in previous posts, I used the 2.4 version (DSL) succesfully with the app and with myopenhab.org. If I can help further let me know.
Even without touching the sunset/sunrise offsets de timeline data gets messed up. See below only de AAN and UIT state are set in url, the other two states are added by itself.