Timeline picker to setup heating, light and so on

Yes, removing the rule file is it. , But for the case the tlp thing doesn’t exist, i will look if it is a way to prevent this error.

This is really nicely made. Thanks for your efforts!

Just wondering if dark mode is broken or if I’m doing something wrong? I tried:
&dark (as per instructions)
&dark=yes (mentioned in earlier posts)
but I don’t see any change.

@mjptec Unfortunately the dark mode is not finished. At the moment i must do some other stuff but i will rework it.

A thought: The translations for French and Portuguese are not complete. Is someone willing to translate? It’s easy to help. Call the file behind the link Language File. Copy the releated language section and fill the blank entrys and post the part here. :grinning:

Thanks @tose. I don’t have experience with web programming, but if you point me in the right direction I might be able to contribute to the dark mode if you like.
In the mean time, I’m about to post an updated main UI wrapper widget for TLP v3. Hence the previous question. One further question is, can you point me to what condition you use to toggle the display of the zoom bar in auto mode?

@mjptec Yes, you can help without experience in web programming. The main task is the color schema. Perhaps you or someone else can post a screenshot in light mode and overlay html hexcodes for colors in darkmode.

Is this a technical question?
I use the navigator.useragent function of the WEB API.

Is it a UI Question?
You can control the mode with parameter ‘zoom’ (auto, no, force)

Hi torsten, have you ever considered to implement a binding, similar to the one in the marketplace at this link? I am not an expert at all, so I do not know how difficult it could be.

Every timeline could be a new thing, and the linked item could be a channel, which is sort of what you already do. Configuration could be provided by a string item linked to a configuration channel of the thing.

Hi Lionello,

yes, i have considered how is it easyer to install the timeline picker. My thought is, a binding is not the best approach. It would be possible to install the logic with the binding. But the userinterface is not installable. For this we would need a new widget and at the moment i thing it’s a really big challenge to create a complex widget in main UI. (perhaps from me it’s missing experience).

An other thought from me is a installation with npm.
But also at this point there is missing experiences to create a package that is published to install.
For this case i think this nessesary:

  1. Install in OH a npm package - This is only in a terminal window possible?
  2. Copy the folders and files in path …/html manually - How can we do this easyer?
  3. Install the server side rule from the marketplace.
  4. Config each timeline in Main UI or in the calling url as parameter.

It would be a lot of work. But is this approach really easyer? :roll_eyes:

A long, long time ago i’m reading that’s possible to create a sitemap inside a rule. Perhaps this could it be much more easyer. I’m looking for a while for it. But i’m never find this again.
Can someone point me?

I would say that sitemaps, though still supported in OH 3.X (and probably in OH4), are rather obsolete and it is probably not worth investing in generating them automatically.

It is probably better to offer to OH3 user a way to use the timelinepicker with the OH3 User Interface. There is already a custom widget that displays a timelinepicker into a webframe-card, as it has been described in this thread. The problem is that this webframe card widget needs to be inserted in an overview page and not all users are familiar with widget programming.

I have written a custom list-widget and a custom standalone-card widget that call the webframe card as a popup. In this way, both widgets can be associated to an item inserted in the semantic model and displayed in the UI with minimal knowledge of widget programming. It is not an elegant solution, as parameters need to be entered for each widget (both list and standalone card), but they can be copy/pasted through the XML code. Moreover, I hardcoded my api-key into the custom widget. The first time the widget is clicked, the creation interface appears while the subsequent ones the saved timeline appears. There is no need in this case to initialize the timelinepicker with the custom file. I have not implemented the administration widget but it should be straightforward (at present I use a very simple sitemap)

I do not know if this is similar to what @mjptec is already doing.
If you think that it can be useful I can share my widgets so that someone more knowledgeable may suggest improvements.

When wrapping your widget in a main UI widget, I don’t think it is possible to set the wrapper height based directly on what it contains (I may be wrong and unnecessarily wasting some of my effort), so I’ve set the height automatically based on widget settings. However, this relies on knowing if the auto zoom mode has activated zoom or not.

I used

device.pixelRatio !== 1

in the end, which seems to work but I’ll try to change it to match your useragent check.

This probably counts as getting carried away with minor details! And anyway, I also can’t tell if sunrise mode is activated or a headline exists, which also affect the height.

I’ve rewritten the widget from the first post of the thread you link to so that it works for TLP v3. Will post soon, got a bit distracted with work.

I hope that sitemaps would be supported also in OH4. Basic UI looks like a little bit old school but it’s coverd my wishes much more then Main UI. The designed widgets i have seen are nice but the afford to develop this ones is really high and perhaps i’m wrong but the development is in principal try and error. I’m not able to use VSCode and a development runtime.

Please yes. How i’m sayd, Main UI is not preferred from me but to stay up to date i’m looking for a way to use the new UI.

This looks fine. I’m glad if I can help. The headline will switched with css property display.
The sun releated mode is not switched. In this case there are some additional switches.

updated the widget from Timeline picker to setup heating, light and so on - #727 by Sefer

uid: widget_timelinepicker
tags: []
props:
  parameters:
    - description: Titel of your widget
      label: Title
      name: title
      required: false
      type: TEXT
    - description: Unique identifier for your timeline
      label: ID
      name: timeline_id
      required: true
      type: TEXT
    - description: OH Rest Token
      label: TOKEN
      name: rest_token
      required: true
      type: TEXT
    - description: Configuration Mode (Default is params, ui)
      label: Configuration
      name: conf
      required: false
      type: TEXT
    - description: Days to be managed in your timeline (1,2,3,4,5,6,7 = Each day, 15 = Mon-Fri, 17 = Full Week, 67 = Sat-Sun)
      label: Day Configuration
      name: mode
      required: true
      type: TEXT
    - description: States available for your item (Comma-separated list of maximum six states, i.e. 0,15,INCREASE,DECREASE,OFF,ON, ...)
      label: Switch States
      name: states
      required: true
      type: TEXT
    - context: item
      description: Item(s) which you want to control with the timeline
      label: Linked Item(s)
      name: linked_Items
      required: true
      type: TEXT
      multiple: true
    - description: Language for your widget (Default english)
      label: Language selection
      name: language
      required: false
      type: TEXT
      limitToOptions: true
      options:
        - label: English
          value: en
        - label: French
          value: fr
        - label: German
          value: de
        - label: Italian
          value: it
        - label: Dutch
          value: nl
        - label: Portuguese
          value: pt
    - description: Allows deactivation of timeline in the UI
      label: Deactivation button
      name: deactivation
      required: false
      type: TEXT
      limitToOptions: true
      options:
        - label: Button active
          value: "true"
        - label: Button inactive
          value: "false"
    - description: Zoom mode to enable control slider for mobiles and tablets
      label: Zoom mode
      name: zoom
      required: false
      type: TEXT
      limitToOptions: true
      options:
        - label: Automatic zoom
          value: auto
        - label: Force zoom control
          value: force
        - label: Disable zoom control
          value: no
    - description: Colorset for the timeline (Default 1, 2, 3, hex values without hash (i.e. 555E7B,B7D968,B576AD))
      label: Colorset
      name: colorset
      required: false
      type: TEXT
    - description: Darkmode for the timeline
      label: Dark mode
      name: dark
      required: false
      type: TEXT
      limitToOptions: true
      options:
        - label: Enable dark mode
          value: "true"
        - label: Disable dark mode
          value: "false"
  parameterGroups: []
timestamp: Mar 26, 2023, 2:03:32 PM
component: oh-webframe-card
config:
  height: 600px
  src: ="/static/tlp-jsr/index.html?id=" + props.timeline_id + "&token=" + props.rest_token + "&linkedItems=" + props.linked_Items + "&mode=" + props.mode + "&states=" + props.states + "&lang=" + ((props.language)?props.language:"en") + "&colorset=" + ((props.colorset)?props.colorset:"1") + ((props.deactivation === "true")?"&deactivation":"") + "&zoom=" + ((props.zoom)?props.zoom:"auto") + "&conf=" + ((props.conf)?props.conf:"params") + ((props.dark === "true")?"&dark":"")
  title: = props.title

Hello inOH4 I get this error

2023-07-30 12:15:04.827 [WARN ] [ore.thing.internal.ThingRegistryImpl] - Cannot create thing. No binding found that supports creating a thing of type 'tlpicker:tlp'.
2023-07-30 12:15:04.884 [WARN ] [core.thing.internal.ThingManagerImpl] - Could not normalize configuration for 'tlpicker:tlp:home' because the thing type was not found in registry.
2023-07-30 12:15:04.887 [WARN ] [core.thing.internal.ThingManagerImpl] - Could not normalize configuration for 'tlpicker:tlp:home' because the thing type was not found in registry.

Hi I got the same in OH4. However timelinepicker is running.

1 Like

Hello,

I installed an additional addon into the addon folder of OH4 and now I get this warning:

2023-08-14 09:20:11.602 [WARN ] [eatherFlowSmartWeatherHandlerFactory] - ? SupportsThingType: tlpicker:tlp? false

I guess it will some how match the thing with and addon but can’t…is there a way to avoid this?

Hello everyone,
@tose thank you very much for your awesome work! This really helps me alot!

But i have see two problems after the installation on OH 4.0.3 first i get a warning as the others already mentioned above:
`

> 13:17:32.209 [WARN ] [.core.thing.internal.ThingManagerImpl] - Could not normalize configuration for 'tlpicker:tlp:home' because the thing type was not found in registry.

`

The other problem when a take a look at my things i see this:

Did i do anything wrong during the installation or missed a step or are these both real “problems”?

My other question is:
Where are the timeshedules/timelines stored and in which format? Do i need any additional step for the persistence?

Steps i did: Install JS Scripting, Install Astro Binding, Copy files to directories.

Best regards

Dirtrunner

1 Like

Hi Dirtrunner,

Everything is good. :grinning:

It’s not so nice but you can ignore the warning and also the ERROR:HANDLER in things.
All data from timelinepicker is stored in thing so you must not install persistance or so what. In previous versions it was nessesary to install Map- persistence, not yet.

Hello everyone, does it work for anyone with version 3.2.x?

Yes, no problem.
Write a little bit more wich version have you tried?

Hi Tose.
I have openHAB version 3.2.0.M3.
Things remains UNINITIALIZED.
and NULL Items