Custom widget for Homematic-IP Thermostats

Tags: #<Tag:0x00007fe741611d60> #<Tag:0x00007fe741611bf8> #<Tag:0x00007fe741611950>

habpanel-widget-HMIP-eTRV-x

HAB-Panel widget for all HMIP-eTRV devices.
It has been tested with

  • HmIP-eTRV-2
  • HmIP-eTRV-C

but should also work with

  • HmIP-eTRV
  • HmIP-eTRV-B

usage

install

“generic item element”

This config parameter is used to access further items with a defined naming pattern.
This should make it easier to set up a whole bunch of widgets

The common part of the name of expected items is defined in the config pannel and the real items are derived in an item file.

name channel number#NAME example
_BatteryStatus 0#LOW_BAT Switch ThermostatBad_BatteryStatus
_UpdatePending 0#UPDATE_PENDING Switch ThermostatBad_UpdatePending
_TempSet 1#SET_POINT_MODE Number ThermostatBad_TempSet
_TempAct 1#ACTUAL_TEMPERATURE Number ThermostatBad_TempAct
_WindowState 1#WINDOW_STATE String ThermostatBad_WindowState
_PartyMode 1#PARTY_MODE Switch ThermostatBad_PartyMode
_BoostTime 1#BOOST_TIME Number ThermostatBad_BoostTime
_Profile 1#ACTIVE_PROFILE Number ThermostatBad_Profile

e.g.

Switch  ThermostatBad_BatteryStatus       "Thermostat Bad Batterie [%s]"              {channel="homematic:HmIP-eTRV-2:3014F711A061A7D70992B1AC:000A1709A651A7:0#LOW_BAT" }
Switch  ThermostatBad_UpdatePending       "Thermostat Bad Update [%s]"                {channel="homematic:HmIP-eTRV-2:3014F711A061A7D70992B1AC:000A1709A651A7:0#UPDATE_PENDING" }
Number  ThermostatBad_TempSet             "Thermostat Bad Temperatur Set [%.1f]°C"    {channel="homematic:HmIP-eTRV-2:3014F711A061A7D70992B1AC:000A1709A651A7:1#SET_POINT_TEMPERATURE" }
Number  ThermostatBad_TempAct             "Thermostat Bad Temperatur Act [%.1f]°C"    {channel="homematic:HmIP-eTRV-2:3014F711A061A7D70992B1AC:000A1709A651A7:1#ACTUAL_TEMPERATURE" }
String  ThermostatBad_WindowState         "Thermostat Bad Window [%s]"                {channel="homematic:HmIP-eTRV-2:3014F711A061A7D70992B1AC:000A1709A651A7:1#WINDOW_STATE" }
Switch  ThermostatBad_PartyMode           "Thermostat Bad Party Active [%s]"          {channel="homematic:HmIP-eTRV-2:3014F711A061A7D70992B1AC:000A1709A651A7:1#PARTY_MODE" }
Number  ThermostatBad_BoostTime           "Thermostat Bad Remaining Boost time [%d]"  {channel="homematic:HmIP-eTRV-2:3014F711A061A7D70992B1AC:000A1709A651A7:1#BOOST_TIME" }
Number  ThermostatBad_Profile             "Thermostat Bad WeekProgramm [%s]"          {channel="homematic:HmIP-eTRV-2:3014F711A061A7D70992B1AC:000A1709A651A7:1#ACTIVE_PROFILE" }

minimum and maximum temperature

here you set the minimum and maximum temperature that can be set for this device. It is used to limit the SetTemp boundaries.
These are just pure numbers - they depend on how your device is set up.
So if you use °C or °F your numbers will be °C or °F respectively.

profile names

you can choose 3 profiles (at least with the eTRV-2 and eTRV-C devices). If you want to assign names to the profiles for better understanding - this is the place to do it. I have define 3 profiles

  • normal
  • vacation (we are there all day)
  • absense (we are gone all day)

examples and usage

small

eTRV-2_2
shows the miniumum version of the widget.

normal

eTRV-2_1

shows the warnings that pop up on these occasions

  • battery is low
  • new firmware is available
  • party mode is active
  • boost time > 0sec

setting temperature

any press on the TempSet items opens a slider to set the temperature.

setting profile

press on the lower left selection box.

3 Likes

Hello Michael, can you please explain again exactly what has to be entered in the field “GenericName”? I created the items as described, but I don’t get any values.


Best wishes
Axel

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)”