Heating widget

Please take a Scennshot of you logtail where the item change is displayed.

EDIT: better is an Export with the rest.api. so i can see the different states and maybe i can understand the issue.

I moved to openhab 3.1.0 M2 and the issue is gone. I will test it for couple hours and then I can report the result. I am currently not sure if this issue caused by the widget, opnehab or knx binding.

Hi Nico,

issue still exist - please find the item Change below:

Item 'ActualTemp_Buero' changed from 19.2 °C to 19.400000000000002 °C
Item 'ActualTemp_Flur' changed from 18.900000000000002 °C to 19.0 °C
Item 'ActualTemp_Kueche' changed from 19.8 °C to 19.900000000000002 °C

Item definition is:

Number:Temperature    ActualTemp_WZ                   "Ist Wohnzimmer [%.1f °C]"                 <temperature>      (gLivingroomThermostat, gTemperature)               ["Measurement", "Temperature"]     {alexa="CurrentTemperature", channel="knx:device:MDT_IP:MDT_HS8:ActualTemp_WZ", stateDescription=""[pattern="%.1f °C"]}
Number:Temperature    SollTemp_WZ                     "Soll Wohnzimmer [%.1f °C]"                <temperature>      (gLivingroomThermostat, gTemperature)               ["Setpoint", "Temperature"]        {channel="knx:device:MDT_IP:MDT_HS8:SollTemp_WZ", stateDescription=""[pattern="%.1f °C"]}

I wondering why the temperature change to the huge number of digits, in the Item definition it is limited to one digit - %.1f. Is this an issue which caused by the KNX binding?

Try with this at line 460

text: =Number(items[props.setPointItem].state.split(' ')[0]).toFixed(2)

Nico

1 Like

Thank you very much - I guess this works!!!

Your welcome!
Good news that we find a solution for your issue. :wink:

1 Like

Hi,

thank you very much for this great work. Did you ever considered using some kind of mapping for the heatingModeItem/exampleModeItem?

My heating e.g. only accepts numbers as input/output. I use standard widgets combined with command options and state description in order to map this to strings (0=Auto,1=Manuel). With the exampleModeItem it is the same (1=Standard,2=Vacation,3=Third option)

I am happy with my solution, but yours is definitely (very much) superior and if you find a possibility for the mapping, your solution would be universal.

BR
Peter

Hi,

your widget is too complex for me to do it directly, but here is an example how it could work:

uid: TestPK
tags: []
props:
  parameters:
    - description: The Name of the Test
      label: Name
      name: nameTest
      required: false
      type: TEXT
      groupName: heatingMode
  parameterGroups:
    - name: heatingMode
      context: action
      label: Heating Mode Action
timestamp: Mar 16, 2021, 8:34:03 PM
component: f7-card
slots:
  content:
    - component: oh-label-card
      config:
        title: ="The current State is " + items[props.heatingMode_actionItem].state
        actionPropsParameterGroup: heatingMode
        item: =(props.heatingMode_actionItem)
        footer: ="For the choice of the Icons you could use, that the first actionOption is " + props.heatingMode_actionOptions.split(',')[0].split('=')[0] + "; the second is " + props.heatingMode_actionOptions.split(',')[1].split('=')[0] + "... and so on"

The props will look like that:

and the widget for this example is:

[edit]
Please note, that the state of the item in the example is the displayState which I configured in the item itself that 1=Manuel,


As you don’t use the state of the Item, this might be a bad example
 sorry.

On the other hand
 if the Command Option is configured in the item itself, one could even skip this configuration.

Hi everyone,

I have bring the widget to the next level. :wink:
In the first post ist the new release v2.0.0 with some new features.
20210417_105935

Now is the humidity in the widget. :wink:

Have fun,

all the best,
Nico

6 Likes

Hi Nico,

thanks for awesome widget, but I have some problems with the latest version (2.0.0), former version work great:

error

I am using openhab 3.0.2, do you have any idea?

Thanks in advance

Do you have renew the editor preview?

Yes, I did. I solved the NAN and TypeError.

Temperature is received as string with unit (Bosch smart home), therefore I changed the line:

=Number(items[props.currentPointItem].state).toFixed(1)
=>
=Number(items[props.currentPointItem].state.split(’ ').[0]).toFixed(1)

And I needed to insert an unit, then the undefined disappered. Now only the outer ring problem is existing, I did a renew still not visible.

When i add a fixed size, the output is even more strange:

Which Browser?
I will test it, but iam very busy this time.

Hi Nico,

thank you very much for your fast reply, no problem ;). Appears in Firefox (89.0) and Edge as well.

I see that your widget is using an attribute called “stylesheet” but I guess this is not supported yet? I’m looking for a way to add custom css for certain classes but did not find a way yet


Hi @giejay ,

It’s possible.

See here:

@hubsif merged this Feature for a time ago. Thanks again :wink:

Ah, now I know why it didn’t work for me, I’m still on openhab 3.0.1:) I will upgrade, thanks for confirming!

Hello Nico,

I have the same problem with the display of the widget as Lyann.
It also doesn’t matter which web browser I use (Firefox, Chromium and Edge - all up to date).
I also run Openhab 3.0.2 


greeting
Dennis

Hello Nico, hello world,
you created a very beautiful widget. Unfortunately I cannot get it to work properly.
It shows NaN°C and _type error Cannot read property ‘split’ of undefined.
Running OH 3.1.0 on an RPI and trying to get Temp/Humidity values of a Homematic IP STH.

What am I missing?

edit: Just played around with my antivirus (sophos) and turned off the web protection - now it at least shows set point and temp onthe outside. the inside is still a mess
grafik

Hi, i’m trying to get the V2.0.0 working with my Mitsubishi AC system, in particular the Heating Mode Array.
Mitsubishi item for heating mode have 5 displayState:
Heat, cool, dry, fan, Auto
With 5 state:
1,2,3,7,8
Example:
{ “state”: “3”, “displayState”: “Cool” }

The state get correctly identified (I get the icon changing correctly between different modes) but if I click the icon to change the state I get automatically redirected to the dashboard UI and no popup is displayed.

I’ve tried to insert into the list the states values (1,2,3.7,8) and also the displayState values (changing the code), with the same result.

I get this behaviour also with the Example Mode Item. I’ve linked it to a switch item (on,off) and i get redirected to UI dashboard home page.

I use this widget also with a nest and it’s working correctly, loading the popup at the button press.
Any hint?