Timeline picker to setup heating, light and so on

Please look into your item file and search for all gTimepicker.
Post all lines where the string can be found and post your webview line from sitemap.

And now the third approach, also in the OP:

// requirements: MapDB, JSONpath transformation

Have you really installed the JSONpath - transformation? I think, no.

hello @tose,
thanks a lot for your effort. i cleaned the old files and installed new. now i do not have any error in the log, great.
but i realized that when i set event=yes then the switch will always set to ON when entering manual mode.

for example, this is my sitemap:

Webview icon="none" url="http://openhab:8080/static/time-line-picker-jsr/index.html?ip=openhab:8080&transferItem=TlpTi_FilterTimer&states=OFF,MIN,ON&yAxisLabel=17&lang=de&event=yes&dark=no&zoom=force&colorset=7b7b7b,ff0000,ffaa00,00ff00&deactivation=false" height=12

and this is my test-setup:
grafik

so now (if i am right) the switch should stay OFF at 16:00 to be able to change manually, but the switch changed from OFF to ON at 16:00

Hm, if the switch state at 15:30 is ON, then this is happens:

befor 15:30 ON
15:30 - 16:00 OFF
after 16:00 ON (In event mode the state before the event is restored)

Can you please clear the browser cache one time again and check the upper right corner when eventmode is true. You should see a small clock not events with an overlay -string schedule.

ui, cleared the cache and now i have this displayed:

checken in firefox and edge, both the same.
(i think i forgot to clear the cache when installed the new version, sorry)

Have you cleared the cache for the last 24h or the last 7 day’s?
The last 4 weeks would be better.

If nothing changed please post the output from developer console. But it’s look’s like the css file ist old (cached version).

in firefox i only can clear completely, no time do decide. in edge i cleard all. but no difference, i downloaded the html folder again to be sure it is the latest but no change.
this is the console from firefox:

and this is the console in edge:
grafik

additional info @tose:
now i deleted the html folder and restored the OLD version and now i have the correct viewing!

@bastler
For is everything working. Can you check in folder openhab-conf/html/time-line-picker-jsr/css the file switchPointSet.css

It should have the following content, starting with line 272!:

.xAxis {
  display: flex;
  flex-direction: row;
  padding-left: 13%;
  justify-content:space-between;
  font-size: 12px;
  font-weight: bold;
}

@tose
the snippet you postet is from the new css-file, correct. but this is the code that causes the wrong view.
as soon as i only restore the old switchPointSet.css with the contend:

.xAxis {
  display: flex;
  flex-direction: row;
  padding-left: 0.5rem;
  padding-right: 25px;
  justify-content:space-between;
  font-size: 12px;
  font-weight: bold;
}

then it works.

what i again want to add is that i did not get the timeline picker work with your files in jslib folder. may be i installed jsr223 later but i find newer versions of this files in \automation\lib\javascript\core - my files are dated 2019, yours are 2018. perhaps this could be the reason?

@bastler
Yes my snipped is from the new css-file. But it’s strange with old file, because all further changes are based on the newer file and this file works perfect for me. I myself only use the jsr version, so i can’t see the reasons it doesn’t work in your use case.

And yes i have included the old helper files. I don’t know if the newer files working with OH 2.4.
Unfortunaly it’s a really big effort to mainten a version for the old DSL and the new JSR. Perhaps you or someone else is willing to test the newer version of helperfiles with OH 2.4 and report the result. If it works, I will gladly include the new files.
In the past i’m wrote read the timelinepicker is working with OH 2.5. Is this possible with the old helper files? Who tested this and is it nessesary to change something (paths, …)?

P.S. In the last version (jsr) i have removed all online dependency’s

A last thought: The new css- file is only working with the new index.html-file???

hi @tose

thanks for the ideas.
i use openhabian with oh2.5.10-1 and will be glad to do tests and try to get it work.

so again id restarted, i removed all files and tried to install your code with the old helper files, but i cannot get it work, i recieve errors like this when i try to use your helper-files:

2020-12-04 07:26:27.714 [ERROR] [ipt.internal.ScriptEngineManagerImpl] - Error during evaluation of script 'file:/etc/openhab2/automation/jsr223/javascript/personal/RNTs-timelinepicker.js': java.lang.ClassNotFoundException: org.eclipse.smarthome.automation.core.util.RuleBuilder

and

2020-12-04 07:27:13.292 [ERROR] [ipt.internal.ScriptEngineManagerImpl] - Error during evaluation of script 'file:/etc/openhab2/automation/jsr223/javascript/personal/RNTs-system_startUp_helper.js': java.lang.ClassNotFoundException: org.eclipse.smarthome.automation.core.util.RuleBuilder

then i removed the old helper files and changed the folders in your code:
/automation/jsr223/jslib/JSRule.js to /automation/lib/javascript/core/rules.js
/automation/jsr223/jslib/RNTs-trigger.js to /automation/jsr223/javascript/personal/RNTs-trigger.js
/automation/jsr223/conf/00_RNTs-timelinepicker_conf.js to /automation/jsr223/javascript/personal/00_RNTs-timelinepicker_conf.js

in the file /automation/lib/javascript/core/triggers.js i had to edit the last lines:

	// return trn == undefined || trn == null || trn == "" ? uuid.randomUUID() + "-" + me.replace(/[^\w]/g, "-") : trn;
	return trn == undefined || trn == null || trn == "" ? uuid.randomUUID() : trn;

/automation/lib/javascript/core/PersistenceExtensions.js i did not rename because is still the same file)

then i did a reboot and now i have the correct viewing:

what i still not understand, and i think this worked different in dsl-version:
you see in the upper picture the switch is off, correct because it is 08:52.
i think when i now remove this setpoint then the switch should stay off because the state bevore (at 7:45) is also off. but it switches to min:

now i change a setpoint on another place (12:30) but now the switch changes to off:


… the actual time is 8:58 o clock

this is my items-file:

Group gTimepicker

String TlpTi_FilterTimer     "[%s]"          (gTimepicker)
String iViPool_FilterTimer <pump>

String  TransferItem1                "[%s]"          (gTimepicker)
String  TransferItem2                "[%s]"          (gTimepicker)
Switch  demoItem1
Switch  demoItem2
Dimmer  demoItem3


// - helper items ------------------------------------------------------------------------------------------
Switch Helper_JSR223_SystemIsStarted   "jsr223 helper for system startup"    {expire="1s, command=OFF"}

this is the sitemap

		Default item=iViPool_FilterTimer label="Filter Zeitschaltuhr[%s]"
		Webview icon="none" url="http://openhab:8080/static/time-line-picker-jsr/index.html?ip=openhab:8080&transferItem=TlpTi_FilterTimer&states=OFF,MIN,ON&yAxisLabel=17&lang=de&event=yes&dark=no&zoom=force&colorset=7b7b7b,ff0000,ffaa00,00ff00&deactivation=false" height=12

and this is the 00_RNTs-timelinepicker_conf.js:

timePicker = {
  "TlpTi_FilterTimer": "iViPool_FilterTimer",
  "TransferItem1": "demoItem1,demoItem2",
  "TransferItem2": "demoItem3"
}

my idea: could the reason for that be that i do not use mapdb but influxdb? i already have influxdb installed and working and so i added the to the gTimepicker* : strategy = everyChange, restoreOnStartup to influxdb.persist

Hello,

it is possible to copy a setting from one TransferItem to another. I have 5 rooms and all rooms have similary setting, so I want to “design” one master setting and copy to all others.

Thanks

this i don´t understand because i think the index.html has not changed - the file on gitlab is last updated two months ago?

i still have to use the old version of switchPointSet.css to have a correct viewing

Yes, this was the problem. I don’t understand this, but the newer file wasn’t uploaded. Thanks.
Now you should no longer see schedule in the upper right corner , but an icon. Now the file is updated to gitlab.

I think your first way is right. You use OH 2.5.x and it’s the best to use the newer helper files. I hoped someone else is using OH 2.4 and also the newer helper files and would report if all is working. If this is the case, then I would migrate the newer help files as well. But I do not have the time to test it myself.

I will look at your example with the switching behaviour again later and get back to you.

No this is not possible. You must setup each timeline.

btw. If this was the answer:

And now the third approach, also in the OP:

// requirements: MapDB, JSONpath transformation

Have you really installed the JSONpath - transformation? I think, no.

to your question:

[ERROR] [se.smarthome.model.script.timepicker] - error in transfer string

it would good then you point this. The next person who looks for this error and reads here can then solve it himself.

thanks @tose,

now i use the new index.html and the new switchPointSet.css. sorry but still see the “schedule”, the only thing that changed ist now i see the german “speichern” instead of “save” bevore, although it was always set to german.

that was before:

and now with the new files:

> // requirements: MapDB, JSONpath transformation

Sorry, yes this has fixed my error!
Thank you!
Michael

In the past the button ‘save’ and other fields was not translated. This is now improved (only for jsr- version. For the old DSL the same is prepared but only @Lionello_Marrelli has helped and trranslated. Thanks again. Portuguese and Dutch are still missing.)

Now the missing icon and the schedule:
Please check in conf-openHAB/html/time-line-picker-jsr/fonts the file MaterialIcons-Regular.ttf and the old thing clear browser cache.

This is right: