Timeline picker to setup heating, light and so on

Many Thank’s…
I’ll try to see how it goes :slight_smile:
Goodnight

Hi @tose :frowning:
==> /var/log/openhab2/openhab.log <==
2020-07-20 23:02:58.960 [ERROR] [ipt.internal.ScriptEngineManagerImpl] - Error during evaluation of script ‘file:/etc/openhab2/automation/jsr223/jslib/JSRule.js’: java.lang.ClassNotFoundException: org.eclipse.smarthome.automation.core.util.RuleBuilder
2020-07-20 23:02:58.968 [INFO ] [me.core.service.AbstractWatchService] - Loading script ‘jslib/PersistenceExtensions.js’
2020-07-20 23:02:59.223 [INFO ] [me.core.service.AbstractWatchService] - Loading script ‘jslib/triggersAndConditions.js’
2020-07-20 23:02:59.582 [ERROR] [ipt.internal.ScriptEngineManagerImpl] - Error during evaluation of script ‘file:/etc/openhab2/automation/jsr223/jslib/triggersAndConditions.js’: java.lang.ClassNotFoundException: org.eclipse.smarthome.automation.handler.TriggerHandler
2020-07-20 23:02:59.586 [INFO ] [me.core.service.AbstractWatchService] - Loading script ‘jslib/helper.js’
2020-07-20 23:02:59.893 [ERROR] [ipt.internal.ScriptEngineManagerImpl] - Error during evaluation of script ‘file:/etc/openhab2/automation/jsr223/jslib/helper.js’: java.lang.ClassNotFoundException: org.eclipse.smarthome.automation.core.util.RuleBuilder
2020-07-20 23:02:59.898 [INFO ] [me.core.service.AbstractWatchService] - Loading script ‘jslib/RNTs-trigger.js’
2020-07-20 23:03:00.603 [INFO ] [ort.shared.ScriptedAutomationManager] - removeAll added handlers
2020-07-20 23:03:00.609 [INFO ] [me.core.service.AbstractWatchService] - Loading script ‘jslib/triggersAndConditions.js’
2020-07-20 23:03:00.872 [ERROR] [ipt.internal.ScriptEngineManagerImpl] - Error during evaluation of script ‘file:/etc/openhab2/automation/jsr223/jslib/triggersAndConditions.js’: java.lang.ClassNotFoundException: org.eclipse.smarthome.automation.handler.TriggerHandler

Have you installed/ activated the experimental rule engine in the paper UI?

Stop. :grimacing:
With version of OH you are using?

openHAB 2.5.6 Release Build
experimental rule engine in the paper UI? -->yes!

This is the reason. The namespace was changed from 2.4 to 2.5 and so throws an error.
I’m not using 2.5.x and i’m not able to test with the new helper files.

There are three ways to solve this:

  1. Use the classic version with the old rules DSL, described in OP.
  2. Adapt the namespace. Here is a releated link. [SOLVED] JSR223 Javascript rule gives error after installation
    I do not know the result.
  3. Try the newer helper files and give feedback. https://openhab-scripters.github.io/openhab-helper-libraries/Getting%20Started/Installation.html
    (the javascript part is needed)

:crazy_face:

hi, can u help me guys please, i used

Webview label="" icon="none" url="http://192.168.0.10:8080/static/time-line-picker/index.html?ip=192.168.0.10:8080&transferItem=TransferItem4&states=16,17,18,19,20,21,22,23,24,25,26,27&yAxisLabel=15,67&lang=en&zoom=auto&event=yes&deactivation=false&colorset=1" height=20

but it is showing me only 6 values, it should be 12 values (16,17,18,19,20,21,22,23,24,25,26,27)

Hi @Mohammad_Chaaban,

six values is right. The table in the OP described all parameters and six is the maximum.

so, it does not accept more than 6 values… thanks

Hi @tose I have tried the guide here https://gitlab.com/RNTs_3/openhab-timeline-picker/-/blob/develop-migrationToJSR223_javascript/README.md
however visiting the sitemap its only showing loading, I have checked the development tools in the browser in it seems that its looking for switchPointSet.js not switchPointSet_jsr.js which I then renamed. now I can see something but as you see it’s not fully loading.

I’m using openhab 2.5 and have the new rule engine installed (and I believe running- unless there is an enable button somewhere)
the log doesn’t show any up-normality and clicking on save will actually save the string TransferItem1 irrg|690x230

thanks

Hi @M-sam,

sorry, i must extend the doku. The same question came up once befor.

Are you sure you cloned correctly or better checked out the development branch? I did the mistake before because it was late, that’s why you had a wrongly named file.

If git branch shows master you have to

  • change it using git checkout --track origin/develop-migrationToJSR223_javascript
  • or simply clone it again git clone -b develop-migrationToJSR223_javascript https://gitlab.com/RNTs_3/openhab-timeline-picker.git

After that copy all files again (clean up before to be safe)

Works perfectly fine with 2.5.8. Btw @tose I made two PRs

EDIT: Also works with habpanel, love that. Surely not optimized for that but it works.-> Template

<div>
  <iframe width="100%" height="485px" frameBorder="0" align="middle" src="/static/time-line-picker-jsr/index.html?ip=YOUR-IP-HERE:8080&transferItem=TransferItem1&yAxisLabel=1,2,3,4,5,6,7&states=0,1&lang=de&deactivation=true&dark=yes">
  </iframe>
</div>

@Sefer Yes i have seen your merge request. Thanks. I will merge the changes at the weekend.

To confirm, the timeline picker is working with OH 2.5.8 without changing the namespace in the helperfiles? Which version of the helperfiles do youe use?

I cloned exactly as I have written above and copied everything cp -R from conf_openHAB to $OPENHAB_CONF. Nothing changed.

EDIT: If you clone the repo wrong or don’t change the branch manually you will receive errors because it would be the state of master

EDIT2: Haven’t used it live yet. Still configuring the modbus system and everything. This is just using the sample files. But no errors in log / website using the demoitems / states

Okay thanks again. I’m using OH 2.4 and i have never tested timeline picker with OH 2.5.

Hello,
Thank you for the great tutorial. This is exactly what I was looking for to control my lighting and radiators.
I am now ready that the configuration via the timeline and the triggering of individual lamps works. However, I am a bit at a loss as to how I can properly regulate my radiators (11 in total).
In another post (Yet another Heating Setup) I basically found exactly the kind of regulation that I would like to have with me. To be honest, I’m just a little at a loss as to how I regulate the respective radiators at different temperatures at different times. In the articles and examples, all thermostats are set to the same temperature.
Is this even possible? Can you give me some food for thought?

Thank you in advance.

Hi @Didschu,

here you can see a solution for different temperatures in each room and a preset of 2 (3) setpoints for the temperature.


  • first of all one can see the global settings. Heating mode and the current mode is self describing .

  • the second line is to switch the various “cards” (switching with visibility in sitemap) and the ‘1x on’ switch. This switch is to override the time based heating plan for maximal one day. If the switch is active the heating mode is day. Latest at midnight the switch will be deactivated and the timbased heating plan is active again.

  • first card (day is active):
    Here, in the first column one can select the temperature for each room in the day mode. In the second column one can select the mode for the single room.
    auto - time based temperatures
    off - heating is deactivated (frost protection)
    +2° - this means, the temperature should be increased by 2 degrees in the room for a certain time (comfort temperature for e.g. 30 minutes)

  • second card (night is active):
    In the first column one can select the temperatue for each room in night mode. In the second column one can select whether the roomtemperature is reduced by the timeline or the day mode is permantently active.

  • third card (setup is active):
    One can choose the different timeintervals for day- mode and night- mode.

In this solution the timeline picker is a realy minor part but maybe you find one or two ideas.
Torsten

I find this solution even more elegant. Would it be possible that you might make the structure of your settings available to me so that I can then change it to my needs? I am an absolute beginner at writing rules.

Sorry, i wouldn’t share the complete code. This is a really big block (600 lines + sitemap entry’s + dummy items) with window open detection and state reporting. But it is not well documented and contains personal data.

If you start with your own code i will gladly help you. (better is a new topic).