Timeline picker to setup heating, light and so on

The new version v3.2 is published on GitLab.

The importent thing, it is no longer necessary to modify files to grand access with the personal API key. The key is passed as parameter.

Croation language is added. Thanks to @Vanja_Vrsic for your translation.
@Lionello_Marrelli Thanks for your patience, now it’s done.

It would really great to get feedback:

  • improvements for install instructions
  • What is tricky to install or to use?
2 Likes

Hello, I’m trying to deploy tlp 3.0 on OH 3.2.0.
I am able to open a timeline in the sitemap and seems the connection to OH is working since I can see the setup of the timeline is shared across different browsers of different PC and in the Android App.

Nevertheless it seems that the rule is not working at all and in the openhab.log I got the following each time the rule is invoked:

[ERROR] [org.openhab.automation.script       ] - tlp - E001: error as calling tlp data {}

A new thing “TimelinePicker” with id “tlpicker:tlp:home” of type “tlpicker” was automatically created without any property and it is marked as “UNINITIALIZED”.
What can be wrong?
Regards
Luca

I assume you are using v3.0.2 of the timelinepicker.
please post the calling webview url with all parameters.

Hi Torsten,

yippie ya yeah! You are great!!! I reinstalled the NEW v3.2 and most of them worked right away the first time!!!

I am happy that I hopefully can now expand the most flexible time control for my radiator valves again…
Years ago I discovered your timeline picker and made it work, the tool has taken over the complete time control in our house… but since the switch to OH3, I have no longer brought it to run…

I’m going to play with it a bit now. I am trying to solve a problem with my token and I noticed that the folder
/etc/openhab/automation/js/node-modules was missing, but I created it by hand. (Was only a warning, but then did not go further. JS scripting I had just freshly installed / OH3.4.1)

Torsten, thank you for putting so much work into it. It was really(!!!) worth it.
Cheers, Nick

1 Like

Hello, I confirm it’s 3.0.2, this is the calling url ( with masked token ) :

		Frame label="Termostato Primo Piano" {
			Webview
				icon="none"
				url="/static/tlp-jsr/index.html?id=x1&mode=15,6,7&linkedItems=termostato1&states=OFF,ON&lang=it&token=oh.tlp.xxxxxxxx"  // place your own token
				height=8
		}
		Frame label="Termostato Secondo Piano" {
			Webview
				icon="none"
				url="/static/tlp-jsr/index.html?id=x2&mode=15,6,7&linkedItems=termostato2&states=OFF,ON&lang=it&token=oh.tlp.xxxxxxxx"  // place your own token
				height=8
		}

This is 00_RNTs-tlp3_conf.js


const tlp_ids = {
  'x1': 'termostato1',
}

module.exports = {
  tlp_ids
}

Thanks

Luca

@C.Griswold Thanks for your feedback. :grinning:
If the nodes_modules folder was missing, I assume you did not have the JS Scripting add-on installed?
Is now everything working well?

@gian_luca_Rasponi
For me, your timeline that you created with the webview element is fine and works flawlessly.
The same question as above: Has you installed the JS scriting add on? I don’t knew if changes between OH 3.2.x and OH 3.4.x in relation to JS scripting?

Check as first is JS scripting installed, copy the file RNTs-tlp3.js in the folder $OPENHAB_CONF/automation/js again. When this fails we can look a bit deeper in the script.

Hi Torsten,
it was only small things:

  1. JS Scripting Module I had previously new installed, as it was in the prereqs. And my OH3.4.1 has been a mostly fresh installation with all updates stood 03.02.2023. Nevertheless, the folder was missing.

  2. The problem with the token was that I thought that it must be base64 encoded, because that is emphasized here in the thread again and again. Maybe just add in the text that this is no longer necessary in TLP3.2 either.

  3. An new item “tlpTrigger” I still had to create by hand, I found out about the log.

By the way: In your readme on Gitlab the description of parameter: id and parameter: token is mixed up.

But now everything works for now and I will test further. I am really glad that the great Timelinpicker runs with OH3.

Thanks a lot for your great work!
Cheers, Nick

When I try to include the TimelinePicker in an oh-webframe-card I get the following error.

[ERROR] [.automation.script.file.RNTs-tlp3.js] - tlp - E001: error as calling tlp data TypeError: Cannot read property "getConfiguration" from null

Does anyone have an idea what I could have done wrong?

  - component: oh-grid-row
          config: {}
          slots:
            default:
              - component: oh-grid-col
                config: {}
                slots:
                  default:
                    - component: oh-webframe-card
                      config:
                        src: /static/tlp-jsr/index.html?id=123&token=oh.timeline.GdbS2fqknpe5...

This is an error message from the server side script. As first you must a display a timeline and initialze this in the ui dialog.

Hi Nick,

This is strange, but not related to the timeline picker and I do not know what happens with the JS scripting add on.

You are right. My thought was to improve the usability. So it is no longer necessary to encode the token. In the OP i will add the remark copy and past.

This item should be autocreated through the ui widget and automatically removed when the last timelinepicker id is deleted. I will check it again.

is fixed

Thanks for your hints,
Torsten

Thanks for the quick feedback. What exactly is meant by initialise in the ui dialogue?

When a newly created timeline is called up for the first time, you are asked whether it should be created. The timeline is initialized when you confirm this dialog.

Unfortunately, I see only the following content without buttons.
image

Solved it, had not copied all files cleanly over.

Hello, I can confirm JSscripting is installed.
Now I’ve tested TLP on another system with OH 3.3.0 and when first trying to access the timeline in the sitemap I noticed this in the logs:

2023-02-06 10:01:09.529 [WARN ] [ore.thing.internal.ThingRegistryImpl] - Cannot create thing. No binding found that supports creating a thing of type 'tlpicker:tlp'.

A new thing “tlpicker:tlp:home” was created as in the previous system showing “UNINITIALIZED”

Then I went back to the first system and found the same log entry at the beginning of tests.

Thanks
Luca

You describe in your first post that the timeline is displayed in various browsers and shows an error message from the server side script.
Now this is a warning from the clientside script.

Let’s go from the first:
Can you display the widget in the browser, set one or more setpoints and save this ones.
Now you should refresh the page and the setpoints should be displayed again.

Please check this.

Sorry, I need to recap:

System with OH3.2.0: still getting the error each 2m or after timeline is updated:

[ERROR] [org.openhab.automation.script       ] - tlp - E001: error as calling tlp data {}

If I change the setpoint in the timeline, connected items are not updated
If I change the setpoint in the timeline and refresh browser with F5 ( or check from other PC ) setpoints are still there as modified.

System with OH3.3.0: the timeline is now working perfectly and items are updated as expected after timeline was initialized in the browser. These are relevant log before and during initialization:

2023-02-06 09:53:19.650 [INFO ] [rulesupport.loader.ScriptFileWatcher] - Loading script '/etc/openhab/automation/js/RNTs-tlp3.js'
2023-02-06 09:53:28.520 [INFO ] [rulesupport.loader.ScriptFileWatcher] - Loading script '/etc/openhab/automation/js/RNTs-tlp3.js'
2023-02-06 09:54:00.786 [ERROR] [.automation.script.file.RNTs-tlp3.js] - tlp - E001: error as calling tlp data {}
2023-02-06 09:56:00.687 [ERROR] [.automation.script.file.RNTs-tlp3.js] - tlp - E001: error as calling tlp data {}
2023-02-06 09:58:00.680 [ERROR] [.automation.script.file.RNTs-tlp3.js] - tlp - E001: error as calling tlp data {}
2023-02-06 10:00:00.680 [ERROR] [.automation.script.file.RNTs-tlp3.js] - tlp - E001: error as calling tlp data {}
2023-02-06 10:01:09.529 [WARN ] [ore.thing.internal.ThingRegistryImpl] - Cannot create thing. No binding found that supports creating a thing of type 'tlpicker:tlp'.

I was mislead by the logs and thought it was not working with OH3.3, but it works!!!

Maybe OH3.2 -->> OH3.3 is the issue?

Sorry for messing results.

Thanks
Luca

It’s works, thats fine.
Now you shoud not get any error messages releated to the timeline picker.

I have never tested with OH 3.2. I think the problem is located to the JS scripting library or missing node_modules. But now I’m not going to investigate it, or is there a reason to spend more time on OH 3.2?

Not worth I think. I’ll update the OH to 3.4 asap and post results.

Awesome job btw.

Thanks again
Luca

I can confirm it working after update from OH3.2.0 to OH3.4.1.

Luca

1 Like