Custom widget for Homematic-IP Thermostats

Moved to the HABPanel category + added the widgetgallery tag so it can be installed from the gallery :wink:

Hi @Axel_Koeneke,

when your items are named

Number ThermostatLina_TempAct ....
Number ThermostatLina_TempSet ....
...
Switch ThermostatLina_BatteryStatus ....

then you only need to enter ThermostatLina.

Thanks Michael, the values are now there, but the icons don’t.
I’ve copied them to : openhab2-conf\icons\classic\hmip-etrv
Any idea?
Regards Axel

Hi,

so we are going in the right direction :-).

I hope I references all icons correctly. Most icons are taken from the eclipse-smarthome-classic collection. So no special icon set should be required.
Actually only the indicators for cold/warm/hot should be taken from the hmip-etrv folder.

Some questions to get some more ideas:

  1. Your path looks like Windows - on what OS is OH running for you?
  2. can you add a screen copy of your widget?

Hi again,

I just tried and found a bug, that subfolders in …/icons/classic/hmip-etrv do not seem to work - or I do not know how to use them :frowning: .
Unfortunately I also had the icons still as a copy in my own …/icons/classic folder.

I updated the widget with only using icons in …/icons/classic - and updated the icon names. So please

  1. update the widget - in the gallery
  2. remove the folder …/icons/classic/hmip-etrv again
  3. copy the new icons to your folder …/icons/classic.

Thanks.

1 Like

Thanks Michael,
I’ll try it as this evening.

image
It’s working !!!

Great - but your window icon is still wrong - or actually the fallback icon.
If you like it - keep it. But if you want to have the one as shown above you probably have to reload the widget from the repository.

Hello Michael, yes I also noticed the window. But it’s not bad. I will try to expand the widget a bit.
Since I use other controllers for my underfloor heating (HmIP-STHD & HmIP-WTH-2), I would also like to display the measured humidity. Also possibly the position of the valves on the distributor (HmIP-FALMOT-C12). This gives the position in%.
Best wishes

Hey Axel,
very cool widget ! :slight_smile:
There is not much for those thermostats from homematic and I was close enought to create my own one… but now I see you already has created a very good one ! :slight_smile:

Unfortunately I cannot use it directly, because my items has already names and they dont follow your generic names… If I want to change that, I need to make changes to some rules and scripts first…

is there a reason why you use this genericnames? Maybe its better to let the user enter the names, with that you would not only support the IP product, the old one are supported on this way too…

Cheers
Turael

Hi Turael,

the simple reason is, I’m lazy.

I didn’t like the idea of having
to add 10 items per widget manually to my roughly 25 thermostats.

Especially when developing the widget I did sometimes do changes
where all widgets had to be touched again. So I though having to
change only one item per widget is a cool idea :-).

But you could add additional items - OH2 will automatically sync
them.

So if you just leave your itmes as they are and create new once
according to the naming convention it will work.

1 Like

Hi Turael,
I haven’t done this Widget. It is made by Michael Schrott.

The Widget is really great but I miss the possibility to activate the Boost

Hi Julian,

Thanks for your nice reply.

I know. I didn’t want to overload the widget and decided not to have boost, vacation or party mode as input.
If I get a good idea where to put it, I might still put it in though.

2020-04-03 12_23_50-HABPanel

In my opinion it would fit best into the drop-down menu for the operating modes.
With choosing the Boostmode it get switched on, without changing other operation modes.
The remaining time of the boost mode is then displayed in the widget, so pressing the remaining time could end the boost mode.

Hi,

but the drop down actually selects the profiles - so the switch time sets you can set per device - which is actually different to the “operational modes”.

But the idea is good - I can add one more drop down to select these modes.

Let me think about it.

I am also designing a custom widget to show the set temperature. This works fine.

HABPanel_ThermostatWidget

Now i want to be able to change the set temperature manually using the + and - buttons.

The relevant part of the code is as follows:

<div class="row">
  <div class="col-sm-6 text-center"></div>
	<div class="col-sm-6 text-center">
		<div class="mybtn" ng-click="sendCmd('Thermostat_Buero_SetPointTemperature', +itemValue('Thermostat_Buero_SetPointTemperature')-0.5)">
    	<img class="img-responsive" src="/static/buttons/volumeDown.png"></img><img class="img-responsive img-top" src="/static/buttons/volumeDown_Hover.png"></img>
    </div>
    <div class="mybtn" ng-click="sendCmd('Thermostat_Buero_SetPointTemperature', +itemValue('Thermostat_Buero_SetPointTemperature')+0.5)">
    	<img class="img-responsive" src="/static/buttons/volumeUp.png"></img><img class="img-responsive img-top" src="/static/buttons/volumeUp_Hover.png"></img>
    </div>
	</div>
</div>

However when i click one of the buttons, I get the following in the log:

2020-10-05 17:16:46.811 [WARN ] [rest.core.internal.item.ItemResource] - Received HTTP POST request at 'items/Thermostat_Buero_SetPointTemperature' with an invalid status value 'NaN'.

I’m missing something simple, but what?

Thanks for any help

Rob

Hi @Robert_Bevington,

this is exactly how it should work - see also Template widget - tutorial & examples - make your own widget!

The question is, what type does getValue of your item Thermostat_Buero_SetPointTemperature return? Is it a DecimalType?

Very cool graphics by the way :+1:

Also, here (Template widget - tutorial & examples - make your own widget!) is another possible solution:

ng-click=“sendCmd(‘EGWZHZThermostat_4_SetTemperature’, 1.0*itemValue(‘EGWZHZThermostat_4_ActualTemperature’) + 0.5)”

Hi Micha, thanks for answering. I tried “1.0*itemValue…” but still getting NaN in the log. So it probably has something to do with data types. The item is configured in PaperUI as follows:

Type = Number
Dimension = Temperature

Could it be returning the value as 19.0 °C, i.e. including the unit? That is not then not a number (NaN).

How can I find which type is being returned?

Just found the solution. You helped me think in the right direction. Thnaks. If I remove Temperature
under Dimension from the item configration, it works correctly. So I obvioulsy have to convert the value somehow. Will look in to that soon and post my solution.

Thanks for the compliment on my graphics. I’m trying to make my dashboard as realistic as possible. My light switches look like real light switches too and when I click them, I change the shading so it looks as if the actually tilt. Cool effect.

Thanks

Rob

Solved the problem. I resorted to just using Number and not Number:Temperature in the Item configuration. I also learnt how to create a setpoint max and min for my custom widget. The buttons are now limited between 16°C and 23°C:

<div class="mybtn" ng-click="sendCmd('Thermostat_Buero_SetPointTemperature', +itemValue('Thermostat_Buero_SetPointTemperature') - 0.5 < 16 ? 16 : +itemValue('Thermostat_Buero_SetPointTemperature') - 0.5)">
    	<img class="img-responsive" src="/static/buttons/volumeDown.png"></img><img class="img-responsive img-top" src="/static/buttons/volumeDown_Hover.png"></img>
    </div>
    <div class="mybtn" ng-click="sendCmd('Thermostat_Buero_SetPointTemperature', +itemValue('Thermostat_Buero_SetPointTemperature') + 0.5 > 23 ? 23 : +itemValue('Thermostat_Buero_SetPointTemperature') + 0.5)">
    	<img class="img-responsive" src="/static/buttons/volumeUp.png"></img><img class="img-responsive img-top" src="/static/buttons/volumeUp_Hover.png"></img>
    </div>

Openhab is just great fun to work on.

Rob