Timeline picker to setup heating, light and so on

OK, so I downloaded latest time-line picker files from git and replaced it, reconfigured and still got same problem :confused:

==> /var/log/openhab2/events.log <==
2020-03-04 09:22:13.304 [ome.event.ItemCommandEvent] - Item ‘TransferItem1’ received command {“1”:{“key”:“17”,“value”:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},“99”:“OFF,ON”,“100”:{“event”:false,“lastItemState”:-1,“inactive”:false}}
2020-03-04 09:22:13.320 [vent.ItemStateChangedEvent] - TransferItem1 changed from NULL to {“1”:{“key”:“17”,“value”:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},“99”:“OFF,ON”,“100”:{“event”:false,“lastItemState”:-1,“inactive”:false}}

==> /var/log/openhab2/openhab.log <==
2020-03-04 09:22:13.365 [ERROR] [se.smarthome.model.script.timepicker] - error in transfer string
2020-03-04 09:22:20.089 [ERROR] [se.smarthome.model.script.timepicker] - error in transfer string

OK, so what I figured out, is that I haven’t installed JSONpath transformation. After installing it all worked. Sorry for bothering you and thanks for helping!

Ah, here is a mistake:

change to

Switch switch12 “Showroom [%s]” 

This would be a description for the error in the log. But i think it’s not the reason for the not switching Switch. Let’ s take the this step and look into the log file.

Another question: is there a way to disable specified item from schedule?
For example, I have that one TransferItem1 and I setup the schedule. After some time I want to disable auto-turning on and off and make it manual. Is there a way to make it in rules for example?

It’s not nessesary to write a rule. You can use the the deactivation feature. See the table in the OP.

Is it just me or are there a lot of little mistakes in de rule code?
I’ve downloaded the latest version from

But VSCode gives 13 errors, mostly all this kind:
Cannot refer to the non-final variable currTimeInterval inside a lambda expression
And a duplicate var declaration
Duplicate local variable newState

I can fix it, no problem, but am I the only one?

These are not errors, just “Problems” detected from the VSCode extension.
The rule works without issues, so you can just ignore the “Problems”.

1 Like

Thanks for your work, works like a charm.

Thats nice. Thanks for your feedback.

I got it since a while working with no problem but I have a question
how it works with Google home?

If I set the temperature with the Timelinpicker the commands from Google are overwritten on every 15 min and cannot be set for longer time because of Timelinpicker. How can this be handled?

I’m new to Openhab (just in the middle of migrating from FHEM) and found this soooo cool Picker. Many, many thanks for this. For me it works like a charm and I’m using the Timeline Picker to control my heating.

But there is one “use case” for me, that I’m missing and I’m wondering if anyone can help me:

  • on “special” days, like banking holidays or home office days I would like to use an other heating plan, than the one for the “normal” workdays?

For example: normally my heating plans switch from “Komfort” to “Standby” at 08:00 during weekdays and switch back to “Komfort” at 17:00.
On banking holidays I would like to use a heating plan that does not switch to Standby.

Yes, on these “special days” I could disable all Timeline Picker Items via Browser and Control heating manually, but with 12 (!) different heating plans for the different rooms this is not funny :wink:

Is there a way to “exchange” heating plans via rule or switch between different plans for the same controlled Item?

@Br3Ak3R
Yes, this is the task from timelinepicker. Each 15 minutes will checked the state from the corresponding items in the transferstring. In the standard case the timelinepicker has the highst prority.
Please check out the event mode. But note, then you overwrite the current state, configured in the timeline, the automatic mode will interrupted until you switched back in state befor manual change.

In most cases the event mode is used when the corresponding elements are controlled manually and in special cases an automatic event is required: e.g. as light wake up timer.

@NoMercyMike
Wow 12 heating plans :astonished:
We use one plan for the complete house and can control each room with separat setponits for standard and reduced temperatures and we can control heating off for each room and we can determine for each room whether it should be reduced or heated continuously.

But yes there are the “spezial” days.
This is not directly releated to the timeline picker. In my own enviroment control exist an butten “one time on - 1x on” This button overwrite the heating auto mode for:

  • one reduce interval and change from reduce setpoints (for me night) to standard setpoints (for me day)
  • will deactivated at the latest two minutes befor midnight
  • will deactivated, when manuel set to off

This is a global switch for the complete heating system.

Thanks for the reply, I understand it now, I’ll let my Fritzbox manage the timeline for now. I am sure I got it needed for other future upgrades like garden watering, Christmas lights, outdoor lights.

Many thanks for your work.

Hello Torsten,
This Timline picker is a great idea and wonderful to adjust!
Thank you for sharing this masterpiece.
I was wondering if it is possible to control it with touch devices the same way like in a browser.
So that you dont have to make so many clicks but can swipe through the timeline to set it up.
Maybe something like this: https://www.mediaevent.de/javascript/touch-events.html
but i am not that good with js to understand your code.
Thanks for your help!
Best Regards

@Tillv Oh sorry, my answer was pending. :innocent:
Yes, the integration of touch events should be possible. As first i will test this in the newest version from timeline picker. https://gitlab.com/RNTs_3/openhab-timeline-picker/-/tree/develop-migrationToJSR223_javascript
The code here is migrated to jsr223. But i’m using a very old version of helper library’s and have extended this. On the other hand this is working very stable. Not only the timeline picker also OH 2.4.

Actually I didn’t want to change the old version (with rules DSL) anymore. I will have a look at it, if it works in the new version.

Hello Gooman,

Would you mind sharing the small rules you came up with ? This “edge trigger” is exactly what I am looking for in a specific WiFi module I am setting up.

Thanks

Jonathan

Sure.

My config in timeLinePicker.rules is:

val HashMap<String,ArrayList> timePicker = newHashMap(
“TransferItem1” → newArrayList(‘Timed_Heating’),
“TransferItem2” → newArrayList(‘Timed_Hot_Water’)
)

I then have these rules in a separate file:

rule HeatingTriggersOn
when
Item Timed_Heating changed to ON
then
Heating.sendCommand(ON)
logInfo(“HeatingTriggers”, “Trapped timed heating change to ON”)
end

rule HeatingTriggersOff
when
Item Timed_Heating changed to OFF
then
Heating.sendCommand(OFF)
logInfo(“HeatingTriggers”, “Trapped timed heating change to OFF”)
end

The crucial thing is the use of “changed to ON” (or OFF).

1 Like

Dear @tose

Thank you for sharing this project.

I’m just wondering how to assign my items to the timepicker.

I have a rollershutter item

Switch   EG_wzsued_r_switch             "WZ-sĂŒd: Rollladen (auf/zu)"                          <rollershutter> (gM)

which is persited with mapdb (via (gM) ).

Do I need to put this item into timelinepicker.rules "part of config?

val HashMap<String,ArrayList<String>> timePicker = newHashMap(
    // "TransferItem1" -> newArrayList('Timelinepicker_item1','Thermostat2'), 
    "TransferItem2" -> newArrayList('EG_wzsued_r_switch')

My sitemap

sitemap timelinepickerexample label="example of timeline picker" {
    Frame label="heating Example" {
        Webview url="http://192.168.178.31:8080/static/time-line-picker/index.html?ip=192.168.178.31:8080&transferItem=TransferItem&yAxisLabel=1,2,3,4,5,6,7" height=14
    }
}

Hi @Selter,

yes, the config part of the rule is the right place.
Please note, when you define your shutter in the list “TransferItem2” you must call in your sitemap:

Webview url="http://192.168.178.31:8080/static/time-line-picker/index.html?ip=192.168.178.31:8080&transferItem=TransferItem2&yAxisLabel=1,2,3,4,5,6,7" height=14

Thanks for the quick reply.

What is the reason for the missing picture above the time table?