Timeline picker to setup heating, light and so on

Hi Attila,

you are right, this is the correkt branch.

The timelinepicker runs with OH 3.1 and yes i will support the 3.2. In case of breaking changes in 3.2 i will find a solution for it, but you are completely right, i’m prefer the javascript version.

HI Torsten,

Thanks for your positive answer! One more question regarding this control: how can I include it in HabPanel? Using a simple frame? Or is there any widget?

Thanks,
Attila

Hi Attila,
for my self i’m using only the basic UI.I don’t know,
but i’m pretty sure someone else is using the timelinepicker in this situation and will answer … :roll_eyes:

Hi Torsten,

I’m still at setup and investigation side on the JS rules. I’m a little bit confused but the picture is slowly clearing up. Now I know, that there are two JS rule engines in OH, the old Nashorn and the new GralJS. Which one is your library using? The Nashorn one?

Thanks,
Attila

Yes, the version in the link befor is for nashorn. There is a running version for the new GraalVM but i think it’s tricky to install GraalVM and the nessesary helper. So i have never shared the link for this version.

hello to all,

i need help for improve this widget!

Currently i’m on the finishline to add new features. Take a look at the images for a small view. The most interesting part is to removing dependencies (map db), not creating items and groups, including the timelines into the backup of OH and easyer install the widget, but this is under the hood.

New features:

  • alias for commands … so you can set 26 as command and show comfort
  • You can add an headline
  • And preatty cool: Switching in dependence of sunset/sunrise

The logic behind it:
You see in icons for sun events above the switching states (reduce, power). This icons means:

  • switching befor sunrise, switching after sunrise
  • switching befor sunset, switching after sunset

Here is the difficulty or question: Does anyone have an idea for the graphical representation of sun events in the timeline? I need an idea and/or a graphic that can overlayed/shown in the timeline ‘over’ the selected switchstate.

Cheers Torsten

P.S. more beautiful icons for the sun events i also like to take

2 Likes

Hi,
thats a little weird.
Noone has an idea or is the sun function not interesseded.
I have spent a lot of time to answer tons of questions in this thread and now? One questeion… ?

All we need is a graphically fancy idea to display the sun events in the timeline. I can package it in software, the visual part is more difficult.

Maybe someone can think of something else.
Torsten

Why don’t you change the line background with yellow when sun is there ? Yellow for daylight, grey for night

@karld Thanks for your response. But i see two problems:

  • you must see the underlaying switch state (on the first view)
  • For a user is a changed background color not enough. One can’t not immediatly knew wich color is standing for sunset, not sunset, sunrise, not sunrise.

I think about it for a few days and struggle.

I think that a simple possibility would be to draw only half of the bar( in the vertical direction) if the highlighted period is relative to sunrise or sunset.

You could also highlight the sunrise and sunset times where the hours are written (e.g. red for day hours, black for night hours)

The vertical alignment of the “half bar” could tell if both start and end are relative to sunset (up) or mixed (middle) or both relative to sunset (down).

But there are many more possibilities, when events start with sun but end at a fixed time or viceversa: in this case my suggestion does not apply. In my case, for example, I switch on a lamp 30 minutes before sunset but I switch it off at 23.00 and I am using a rule for that.

In any case, thanks for your useful work

I don’t know if you have already had a look at this project but it may give some ideas: https://github.com/nielsfaber/scheduler-card

The issue is that this UI uses draggable time markers between period whereas your UI is controlled through the time period.

Hello @Lionello_Marrelli and @tarag,

thanks for your thoughts. I agree with you Lionello the vertical division would show an unique assignment. But we would not achieve one thing: A second person who is not familiar with the system can’t assign this states. This must be go better. :roll_eyes: I have another tougth (but i think it’s it must become even better):

I want describe the screenshot:

  • monday from 6am to 7am light(or what else) is ON

  • monday from 7am to 9am light is ON when no sun (befor sunrise)

  • monday from 4pm to 6pm light is ON when no sun (after sunset)

  • Monday from 6pm to 8pm light is ON

  • thursday from 9am to 11am shutter is OPEN when sun (after sunrise)

  • thursday from 11am to 4pm shutter is always OPEN

  • thursday from 4pm to 6pm shutter is OPEN when sun (befor sunset)

So i can reduce the sun events in the UI to two. Processing of sunset and sunrise is passed to the software.
But the circle for the sun in the timeline is terrible. :weary:

@tarag I did not know the widget. This is much to technical in my opinon. I would not go this way.

What do you mean?





P.S. A second screenshot:


Here one can adjust the offset for sunrise and sunset set individually for each timeline.

I was thinking that your aim was to allow defining events with variable start and end times, relative to sunset or sunrise. That’s why I was suggesting to highlight differently sun and night hours and show with a different vertical position of the internal is relative to sunset, to sunrise or absolute.

Reading your example, If I understand it, you are basically defining different conditional events, but with fixed start and end times.
You define “on always”, “on when sun”, “on when not sun”: but this can already be done with the present version of your timeline, it is simply matter of defining directly the states and a rule that implements the logic, using the astro binding.

In fact, the link I posted does not implement sunset/sunrise relative offset in their timeline view yet. It is an open issue also. I agree that a good UX seems quite difficult to achieve for this feature.

Yet I think you proposal makes sense and could in fact cover many additional cases. One should only think of this feature as “additional condition for timeline setting to be applied”. And then, you’d have another screen of your widget allowing you to define these conditions relatively to the sun (or this could even be the value of a Switch or Contact item later on…)

So in you condition view you could create as many conditions as you want with:
1 - Letter in sequence (A, B, C …) to have something short displayed in the timeline UI
2 - User entered alias for condition
3 - Event (sunrise, sunset, but I think you should not forget civil dusk, civil dawn… provided by astro binding – I use these)
4 - Offset in minutes/hours

In the main view, you can simply select a condition like you select a value and overlay it to the timeline by displaying a line as you did and the condition letter.

I’ve no idea if this all makes sense…

@Lionello_Marrelli

Yes this is the goal.

yes - you achiev this with a proxy item and an additional rule.
no - this is not userfriendly nor flexible.

I can imagine from a programming view but the prersentation in UI → it has to be dynamic in relation to the changinmg sun events

The first task is done. I have found a solution for better icons in the timeline:

@tarag

You must actually enter an item name that represents the sunrise. For the sunset the same. The sunrise and sunset information then comes from the ASTRO binding. But: It’s the same two item’s for all timelines in the system.
When i would define different items (civil dusk, civil dawn,…) noone would knew what is the base condition for the switchinmg event. Separatly one can adapt the offset for each timeline.

It’s really quite difficult to find a UI for “non-specialists”. Each additional function throws a lot of questions. :roll_eyes:

Hi Torsten, Finally I got to this topic back again and already updated to OH 3.2. This version already has the GraalVM installed. So, the question comes live, do you have a picker control version for JS2021? Can you share it?

Is it possible to have the timelinepicker show mapped values for the statuses? I’d like to be able to display “Off”, “Night”, “Low”, “Medium” and “High” on the timelinepicker but have those descriptions mapped to 0, 1, 2, 3 and 4. My OH controls lighting in my house and in each room I have four lighting presets (night, low, medium and high) that allow a preset item to be copied to the real lighting item. E.g. the state of item “LightCeilingKitchen_preset4” to be copied to item “LightCeilingKitchen”. It would be more user friendly for the other users in the house to be able to set “Night” in the timelinepicker overnight rather than “1”.

I hope I explained that clearly enough to be understood and many thanks, Torsten, for this excellent addition to OH.

Hi Steve,
yes this feature is finished and implemented in the next version of timeline picker (v3).
Wich OH version are you using? Perhaps you can test v3? In the moment i must remove my own helper files, write the doc and i want implement an additional event mode.

That’s fantastic news. I’m running OH 3.2, let me know if I can help with testing and I’ll build a new VM to test on.