Timeline picker to setup heating, light and so on

No, in this description you can find this example for items:

Switch  demoItem1
Switch  demoItem2
Dimmer  demoItem3
Dimmer  demoItem4

So i guess you have wrong files. Install the timeline picker again. It’s much more easyer as to check each single file.
To install the last posted link is correct.

Hi
I deleted everything and recopied the files.
But everything as before.
Question…my OH 3.2.0 version is on Windows…can this be a problem?
I realized it’s missing…

And the automation folder was not there.
I copied it when I copied the files.

Have you installed the JS Scripting Add-on?

yes

Have you another javascript rule running in your system?

Like automation only JS

ZULU 11 JRT is installed in the system

This is not the answer on my question.
Have you running another js rule?

I do not think so.

Okay, then let’s test this first.
Create a file in automation/js. Call it test.js and paste in this line.

console.log('hello world') 

After some seconds you must see this message in openhab.log.

unfortunately nothing

Your problem is not releated to the timelinepicker!
On your system is something wrong with the scriptengine or JS script add-on.
You have installed Zulu 11 JRT. So in my minds i think you must install the JavaScript Scripting (Nashorn) Add-on. Please check this.

When not installed, do it. Change the String ‘hello world’ in ‘hello world1’ and save the file again.

Hi,
Do I need to remove JSScripting first?
or do I have to keep both?

You must install both in parallel.
I mean without the Nashorn Add-on your rules will never loaded.

Nothing done!
The engine doesn’t want to start!
Installed, rebooted OH.
Nashorn is active, since upon restarting OH the message “Warning: Nashorn engine is planned to be removed from a future JDK release” was displayed

Sorry, i have no clue.
Maybe you should open a new topic or here is someone reading and willing to help. As long your javascript engine is not running we will have no progress with the timelinepicker.

Hi @tose,

Finally I got back to your excellent control. I want to use if to schedule the heating. I’ve 8 circles for floor heating, what I can control separately. The plan is, that I’ll create separate schedules for these circles with separate schedules. BUT, the requirement is also to have an override for different events. An event is for example: holiday, everyone is at home, so the workday heating schedule should be overridden by the weekend schedule. Another event is a vacation, we are out of house. The heating can be turned off, or to a minimal temp.
What would be the recommended scheduling configuration? Can I somehow combine the heating circles and heating modes into one or more scheduler?

Thanks!

Hi Attila,

i know your usecase. I think the timelinepicker here is a small part of all. In the past i describt my own solution for this. Perhaps you find a point for your own:

Basicly i prefer to persist target tempertures in separat items for each room. So for each room you have a set:
Target temperature ‘day’
Target tempearture ‘reduce or night’
Heating mode

For your complete Heating System mode you can define an item. This is for spezial days like vacation, holiday, … and represent e.g.
auto mode
heating system off
forced reduce

Here, the timelinepicker is for switching the mode over the days.

Hi,

I do like your timeline picker and also received very positive feedback at home on this. Very easy to use. Thanks a lot :slight_smile:

There was just 1 downside for my use-case, where I needed to adjust your code and want to share this back, in case this is also relevant for others:

Example:
Radiator setpoint should be set to 21 degrees between 8am and 5pm (working hours), but only 18 degrees between 5pm and 8am (non-working hours).

Whats happening with your regular script:
every 2 minutes the setpoint item will receive a command to set the configured temperature

Whats not working:
If during the day, for any reason, the setpoint temperature is controlled manually, than the setpoint is updated latest after 2 minutes again by the rules and the manual change is reverted back.

What I want to achieve:
Only issue an command to the setpoint, in case the value is changing → only at 8am and 5pm, not at any other time. This should help, if you e.g. at 1pm decide to increase / decrease the setpoint for the rest of the day.

What I have done:
Within conf-openHAB/automation/js/RNTs-tlp3.js I added the following line:
below line 134:

let newStateIndex = channel_conf[currDay][currTimeInterval]
let prvStateIndex = channel_conf[currDay][Math.max(0,currTimeInterval-1)]-1

changed line 182 from:

if ((newState != undefined) && (items.getItem(iTS).state != newState)) items.getItem(iTS).sendCommandIfDifferent(newState)

to:

 if ((newState != undefined) && (items.getItem(iTS).state != newState) && (newStateIndex != prvStateIndex)) items.getItem(iTS).sendCommandIfDifferent(newState)

With this change, a command to the item will only be issued within the first 15 minutes after a change is configured via timeline picker. After the first 15 minutes timeline picker will not send any further command.

Also please note, that this is not perfect, as this will only consider changes during the day. If there are changes exactly at midnight, this will not work.

Maybe its helpful for others and an inspiration :slight_smile:

@Matze0211 Thanks for your feedback :smiley:

It’s pretty fine with your solution. I prefer personally solutions with proxy items. This is a little bit more generic but more elaborate.
But the question has been asked more than one time. Thanks for sharing Matthias.

Hi,
I am having some trouble getting the sun state triggered timelines to work. Here’s an example of an outdoor light that I would like to go on a few hours before sunrise, and switch off after sunrise. Similarly, I would like it to go on after sunset and switch off at 10pm. Astro binding is installed, and my correct lon/lat is set.

So I set the condition “no sun” and defined at which times the light should be switched on. I verified that the timeline works with statically defined times, so the basic configuration should be ok. Adding the solar state however leads to my light never turning on at all. What am I missing?

Thanks,

Tom