Timeline picker to setup heating, light and so on

Hi Ricardo,

it’s real nice to hear that you can use this widget.
But let me answer to your questions:

Yes it’s possible, though more then one thought is nessesary.

  • the resolution
    The complete switch pattern is stored in an String item and for each interval exist one entry with with up to 4 characters. So we have up to 2688 characters at a resolution of 15 minutes for one week. If we reduce the resoltion to 5min then we have 8064 characters. I mean this is possible to store in an String item.
    Is an interval of 5 minutes small enought?

  • the user interface
    Now we can click in the timeline and change the switch state. When someone is using a tablet or mobile it’s a little bit tricky to hit the correct slot.
    An idea is as default to set the timeline in 15 minutes steps and additionally to add a zoom button. But how can we see the switch point (5min, 10min) when the timeline is not zoomed?

  • The cron job is started in this case every 5 minutes. But i think this is no problem.

  • The changes at the code base are some greater.
    I would repeat my question. Is an intervall of 5 minutes small enought?

A better way is to add a additional language to the code in the repository. So is it usefull for others. Would you post your axis labels in this form:

'mo - su','mo - fr','monday','tuesday','wednesday','thursday','friday','saturday','sunday','sa - su'

Then i can add your labels. Don’t forget the language and the shortcut.

Cheers Torsten

Hello @tose good morning,

Thank you very much for your prompt reply.

Regarding your points above, a 5 minute intervall is perfect from my point of view. I understand that when interacting with the widget in a tablet or mobile the resolution, in a 5 minute intervall, without a zoom feature is kind of difficult. If it is possible to add a zoom feature I think that all get’s sorted out. I would be happy to try it out and tested if you want.

I totally agree with you on this subject. So here are the details for the language:

  • Language: portuguese

  • Shortcut: pt

  • Labels:

'Seg - Dom','Seg - Sex','Segunda','Terça','Quarta','Quinta','Sexta','Sábado','Domingo','Sáb - Dom'

Thanks again for your work.

Best regards.

I not fully get the feature of event=YES.

For what is this usefull?

@HomeAutomation Look in Point two. This is the explanation to event mode.

Yes, I know it, but it looks like it is not working:

My test:

I would expect, that at 3pm the switch goes off but it is not.

If I understand the graph correct. Blue should switch ON, full grey should switch OFF, grey with unterlying brown should do nothing special. The last status should stay as before?

I do a crosscheck with a different item and this one is working, but I do not use the event flag:

After my test. it looks like grey and light grey with brown is mixed.

grafik

At 15:45 nothing is happen but on 16:00 the switch goes to off. The logic should be reverse?

The logic is right. From 14:30 to 16:00 is one event. At 16:00 should be restore the state befor the event is started. If the the switch turned off at 14:29, it should be switched off again at 16:00. On the other hand is the switch on at 14:29, it should be switch on again at 16:00.

The next event is from 16:30 to 16:45 and the next event is from 17:00 to 17:15.

Is the switch toggelt at 15:00, 15:30 and 15:45?

No it is not toggling at 15:00 or 15:15. only at 16:00 it is toggling to off.

For me it looks like dark grey (OFF) is not working and light grey (manual) will toggle OFF.

I will make a full test tomorrow and send the log.

Test case for tomorrow:
grafik

I will expect:
8:00 switch to ON due to blue mark
8:30 switch to OFF due to dark grey mark
9:00 does nothing due to manual mark
9:30 switch or stays to OFF due to dark grey mark
10:00 switch to ON due to blue mark

What is expected to happen on the manual phase (9:00)? Stay at off because it was OFF before (8:45 = OFF)?

Not nothing, the state before 8:45 is restored.
Correct:
if it was OFF, it will be OFF again
if it was ON, it will be ON again

But at 8:30 the switch must toggelt.

So, the Portuguese y-axis label is added.
@rjduraocosta Please check it out and when everything is fine i will merge the change in the master.

Here is the link to the updated files: https://gitlab.com/RNTs_3/openhab-timeline-picker/tree/adding_axis_label_portuguese
You must only exchange the file switchPointSet.js in openhab-conf/html/time-line-picker/js/ with the file from the branch in the link above.

The README is also updated. The parameter is &lang=pt

Hello @tose,

Thank you for adding the portuguese language to your project. As soon as I test it I will post the results for you to know how it went.

Thanks again foe your work.

This was not happen.

At 9:00 the switch goes OFF
Again, I think the colors/icons are mixed and I must reverse them?

At 9:03 I switch manually to ON
At 9:15 it is switched OFF.

Hello @tose good morning,

I have exchanged the file switchPointSet.js to test the new added portuguese language but the result is that the widget displays the default language german. Do we have to restart openHAB to the changes to have an effect?

Thank you in advanced.

@rjduraocosta
please clear the browser cache and try again

@HomeAutomation
In the past each event consist only of one switch state. The second, third, … was ignored.
This was corrected. You can download the updated rules file and exchange with yours in openhab-conf/rules. The new rules file you will find here: https://gitlab.com/RNTs_3/openhab-timeline-picker/tree/adding_axis_label_portuguese Please change also the the switchPointSet.js. I have added the portuguese language. It’s not related to your problem but it’s the newest version. :wink:
Don’t forget, clear the browser cach after the replacing the files.

Now it should be right. I have corrected the spezial characters c an a in portuguese language. :sunglasses:

1 Like

Hello @tose,

After updating all files with the latest version and clearing the browser cache the portuguese language is up and running.

Thanks again for all your work.

sorry, me again. For what is the event/manual feature useful? I not really get it.

I changed your rule file in a way I need the manual function feature.

If the timeline is set to manual the rule does not hard set any status. This can be used to give manual changes a possibility to do what every is needed. If the next non manual status is reached it overrules the manual set status.

I think this is the usecase of @nakh_Home

Exactly the same use case.

The manuel mode restore the previous state

Did you succeed to update the rules in order to restore the previous state?

If yes, I will be grateful, if you can share your code

I do not get what “restore previous state” means.

Example:
grafik

I will expect:
8:00 switch to ON due to blue mark
8:30 switch to OFF due to dark grey mark
9:00 previous state is restored??? it is OFF and will restored to OFF?
9:15 if I change the state to ON before 9:15 it will be restored to OFF (previous state?)
9:30 switch or stays to OFF due to dark grey mark
10:00 switch to ON due to blue mark

What will the manual state really do? Restore state from before manual task, makes no sense because it is restored because OFF was the state before, no restore needed.
If I change the state after a while in manual state it will be restored to OFF because this was the last state. But I see no difference to setting OFF instead of manual. Does the same? Sorry, but I do not get the usa case for manual. Maybe I’m an the wrong way?

More useful for me is to have manual as do nothing at all. Do anything only if OFF or ON is selected in the timeline. Then in manual phase the state will not be overwritten by ON or OFF.