The missing icon is releadted to the UI. A quick workaround is
Webview icon="none" 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
The missing icon is releadted to the UI. A quick workaround is
Webview icon="none" 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
Iām getting errors in vsCode for lines
Cannot refer to the non-final variable currDay inside a lambda expression
And
Type mismatch: cannot convert from Number to int
for this line:
var String newStateString = switchPlanOfDay.get(currTimeInterval)
Duplicate local variable newState
for this:
var String newState = ''
You can ignor this warning. The best way: copy the file into your rules folder, adapt the config part and when you defines all items (in your item file) everything is working
I have writen a version in javascript. Here is the link:
https://gitlab.com/RNTs_3/openhab-timeline-picker/-/tree/develop-migrationToJSR223_javascript
This version is much more clearer. Perhaps when you start with this widget you can try this version.
In this case itās a good idea you have a delay befor the rule is loading when OH is starting. In my own case i use only for this behaviour a phyton script (iām running OH 2.4) all over rules are javascript.
Hello! aus MĆ¼nchen
My challenge is to program a ventilation device, it has to have an operating schedule so this widget (if it works for me) would be great!
Thing (Losnary 250 m3 / h - ventilation mit Enthalpie WƤrmerĆ¼ckgewinnung)
Chanell (mqtt):
ON / OFF -> switch
fanspeed -> 1,2,3,4
bypass (sommer /winter) -> switch
Ozone treatment -> switch
during the day:
turn on at 8 and turn off at 8 pm.
from 8 ~ 9 hs -> fanspeed 2 /
from 9 ~ 11 am -> fanspeed 1 /
from 11 ~ 16 hs -> fanspeed 2 /
from 16 ~ 18 hs -> fanspeed 1 /
from 18 ~ 20 hs ->fanspeed 2
overwrite all these rules if the temperature rises in the room -->fanspeed 4
in disinfection:
Ozone -> on
from 3 ~ 3: 30 pm -> fanspeed 3
ozone deactivation:
from 3: 30 ~ 4: 30 -> fanspeed 4
(ozone sensor ok then -> off)
Thank you very much to whoever can help!
Hello Pablo,
yes your challenge is easy. But you have written your edge condition not your own approach.
Webview url="http://ip-addr-openHAB:8080/static/time-line-picker/index.html?ip=xx.xx.xx.xx:8080&transferItem=TransferItem1&yAxisLabel=1,2,3,4,5,6,7&lang=de&states=1,2,3,4
Now you can set each ventilation state for every day.
Perhaps it is not nessesary to define the states for each day, so you can substitute the parameter
&yAxisLabel=17
The description for the item definition is in the OP.
Hallo Torsten,
Thank you very much for your great contribution to the community, I am going to try right away to see how ventilation behaves;)
Sincerely!
SG :),
Pablo
Hallo zusammen!:
Hi @tose,
I am trying to make the picker work but I am not able to change the states of the sample items.
I have noticed that in your last contribution the .rules file is missing. Is this okay like this? have you replaced them with RNTs-timelinepicker.js?
2020-07-18 20:06:41.358 [ome.event.ItemCommandEvent] - Item 'TransferItem1' received command {"17":[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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"config":{"mode":["17"],"states":["OFF","ON"],"event":false,"lastItemState":-1,"active":true}}
From event bus!
I have also noticed the following in file 00_RNTs-timelinepicker_conf.js
// timePicker {
// "TransferItem1": {"item1,item2,..."}, // enum all items to control
// "TransferItem2": {"item3"}
// ... // enum all TransferItems
// // one can control as many widgets as needed
// }
//
//
timePicker = {
"TransferItem1": "item1,item2", -->**Get auch ohne { }?**
"TransferItem2": "demoItem3"
}
You have the link for the Javascript version of the timelinePicker.
This version is completely working and the data structure is clearer.
The installation notes are placed here: https://gitlab.com/RNTs_3/openhab-timeline-picker/-/tree/develop-migrationToJSR223_javascript
I think you haveānt clicked the link from the OP. This is the āclassicā version for the rule DSL.
@tose
I canāt find this file:
load(OPENHAB_CONF + '/automation/jsr223/jslib/JSRule.js')
and for dummyās als i:
==> /var/log/openhab2/openhab.log <==
2020-07-18 22:44:03.988 [WARN ] [sitemap.internal.SitemapProviderImpl] - Filename example.sitemap
does not match the name demo
of the sitemap - please fix this as you might see unexpected behavior otherwise.
demos items do not change state!
How long is the delay until the status update?
I promise I have copied and pasted! and modified the ip of course.
Here the link again: Files Ā· develop-migrationToJSR223_javascript Ā· Torsten / openhab timeline picker Ā· GitLab
Please read the part files and location.
Download all files with the link in this chapter and unzip.
Now you can check the folders and files in the download and copy in your OH instance.
Now, you must follow the instructions in the next chapter: declare item,ā¦
Before you use a JSR223 rule please check if the experimental rule engine activated in your OH.
Hi @tose
everything checked and it doesnāt work!
!!!
2020-07-19 19:06:02.824 [ERROR] [ipt.internal.ScriptEngineManagerImpl] - Error during evaluation of script āfile:/etc/openhab2/automation/jsr223/RNTs-system_startUp_helper.jsā: TypeError: Cannot load script from /etc/openhab2/automation/jsr223/jslib/JSRule.js in at line number 3
Dokument JSRule.js lackā>pls. check it!
I will check and add the missing helper files today in the evening.
Hi @pablopescador,
as promised i have added in the repository the missing files.
There are newer helper files but i have never cheked the newer files and at the moment i can ot see a reason. Everything works really fine.
Many Thankāsā¦
Iāll try to see how it goes
Goodnight
Hi @tose
==> /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.
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: