Z wave thermostat (heatit/mutireg) status feedback / energy

Hi @kjetilsn!

This looks interesting! I started testing with my single multireg thermostat in my bathroom - but can’t get it working…

This should actually trigger something, right?

    - alias: Floorheat Bathroom ON
      trigger:
        platform: event
        event_type: zwave.node_event
        event_data:
          entity_id: zwave.bad_termostat
          basic_level: 255
      action:
      - service: homeassistant.turn_on
        entity_id: automation.floorheat_bathroom

I’m getting this in my z-wave log:
2018-01-21 16:34:55.298 Info, Node008, Received Basic report from node 8: level=255

Debugging the HA log, it doesn’t look like the automation triggers, when the level=255 is received.

Any idea? :slight_smile:

Hi dico,

When I tried to get this working, I assumed adding a single automation entry would do the trick, however after many failed attempts, I ended up using two for trigger, and one dummy which does not trigger on anything, but set by the two first. Any input on how to do this better would be appreciated!.

First I made the dummy entry, and restarted “automation” in order get the correct ID from <>
Then I added the two entries that triggers the dummy entry based on 255 an 0.
If you follow the above example in that order, and enable group 2 association with the controller, it should work.

Hi,

When you say the new version, do you mean there’s a new firmware coming or a whole new device?

There will be a new device:
http://www.heatit.com/heating-control/floor-heating-thermostats/heatit-z-therm2/

Nice job! How do I fint the wattage of the load?

Olloe,

It depends on the load. In my case it is floor heating, if you dont know your floor heating cable rating, you can measure the resistance with a multi meter when disconnected and calculate the rating:
U=R*I turn around and use I=U/R and then P=UI.

1 Like

Why don’t you want to use an input boolean instead of an automation to hold the status for on/off, and then make a template sensor based on the input boolean?

Simply due to my lack of skills / understanding of how to approach this. At the time I did not know about the “input boolean” I now use that for other functions. Thank you for the tip, I will give it try.

did you make a better solution for this? I would love the config if so

Hi,

I did change the logic to use input bolean instead of the dummy automation, which is in principle more correct. No changes to functionality though.

configuration:

input_boolean:
    name: Heating Stue
    icon: mdi:power-cycle

automation:

  - alias: Ovens on stue
    trigger:
       platform: event
       event_type: zwave.node_event
       event_data:
         entity_id: zwave.termostat__stue
         basic_level: 255
    action:
      service: homeassistant.turn_on
      entity_id: input_boolean.heating_stue


  - alias: Ovens off stue
    trigger:
       platform: event
       event_type: zwave.node_event
       event_data:
         entity_id: zwave.termostat__stue
         basic_level: 0
    action:
      service: homeassistant.turn_off
      entity_id: input_boolean.heating_stue

sensor for count “today”

  - platform: history_stats
    name: Heat ON Stue Today
    entity_id: input_boolean.heating_stue
    state: 'on'
    type: time
    start: '{{ now().replace(hour=0).replace(minute=0).replace(second=0) }}'
    end: '{{ now() }}'

sensors for kw and cost “today”
Planing to improve the power calculation using voltage read from the AMS (house power meter) which will improve the accuracy as the voltage seems to be varying from ~220 to 240 VAC) In addition it would be nice to get the current KW cost from somewhere, especially when the power companies start to charge us different KW cost at different times during the day.

  kwh_stue_today:
    friendly_name: 'Kwh Stue Today'
    value_template: '{{ ((((states.sensor.heat_on_stue_today.state | round (2) ) * ( 2121 | round(2) )) / (1000))) | round(2) }}'
    unit_of_measurement: "kWh"

  nok_stue_today:
    friendly_name: 'NOK Stue Today'
    value_template: '{{ ((states.sensor.kwh_stue_today.state | round (2) ) * (0.925 | round(2) )) | round(2) }}'
    unit_of_measurement: "NOK"

Thanks!

Have you seen this?
https://www.hjemmeautomasjon.no/forums/topic/2940-nordpool-spot-integrasjon-i-home-assistant/?do=findComment&comment=33538

I haven’t made the ams-reader yet. I have the Aidon from Hafslund. Got the mbus and rpi ready though.

Thanks olloe,

Will install this and try it out. I’ve been speaking with BKK and Fjordkraft, they do not yet charge depending on when during the day I consume power, but I reckon they will start this next year. Good to be ready when it’s needed.

I cant find the basic_level? for the heatit thermostat. So the automation to show if on or off is not working based on if 0 or 255.

Using hass 0.68.1 and Aeotec Z-stick gen5

Working now. Had to set the associations for group 2 on/off control :slight_smile:

Hi kjetilsn
Thanks for Your post , it was useful for me, investing in Heatit for my floor heating. I use Tibber sensor , and can simply multiply with the power price from Tibber to get the price for every hour!
I now control the heating with automation at hours with low prices.
Me neither got a useful answer for hourly spot charging from my previous provider (as BKK and Fjordkraft) - tibber.no offers spot price for every hour :slight_smile: - check it out.

Hi don66,

Good to hear that the information came to use. I can recommend installing heaty for the appdaemon, now that you have your thermostats up and running. Heaty will let you make schedules for temperature based on conditions. It also support window/door sensors to turn off thermostats when doors and windows are open. I use my verisure door/window sensors for this, very useful.

I will look into tibber for spot price, currently I have installed the sensor from nordpool, but have not yet started using it for the price calc. As far as I’ve understood fjordkraft/BKK will not start charging for hour based cost until next year. Also NVE is talking about hourly cost for “nettleie” in 2019 then we need to get a sensor for this as well.

Have you considered using voltage from the AMS meter to calculate the power, instead of using the fixed Wattage of the load? I see that in my house the voltage range from ~220 up til 240. However I guess id does not add much accuracy in the big picture, but fun to try.

Yesterday I decided to try firmware 1.92 on one of my thermostats. to avoid using the above automation to know if the thermostat is heating or not. Also I’m hoping to get this information in to the thermostat “card” (green sections showing the thermostat is heating) simila to a general thermistat, like this:
Capture
I already knew there are some challenges when it comes to compability with opezwave and some have reported strange temperature readings. Upgrade went fine, however it seems the xml file needs updating as entities added dont make any sense. I understand that that means remove the node from zwave network, stop home assistant, modify xml file, start home assistant and re include the node.
My question is, which xml file to use, perhaps this? And how to implement it?

Thanks!

Mostly solved it:
Downloaded the openzwave config and configured path in zwave config.
https://community.home-assistant.io/t/z-wave-xml-config-files/109118/5
Then added file /config/thermofloor/heatit021-v1.92.xml, and included in /config/manufacturer_specific.xml
Excluded and included the node, and now it works, much the same as with FW1.8 but with the added switch entity to determine if its on or off. However the thermosat card does not get feedback on the state, and does not indicate if heating or idle as I hoped. Anyone that know how do achive this?

1 Like

Good job! I have not updated my thermostats yet. Any other issues? Seen some people having trouble with the upgrade process, bad cable etc…

Not to hijack your topic but I have the new heatit z-dim and want to this for that too. Did you go directly to edit the openzwave files or can I change the zwcfg*.xml to check if it’s working? Or has that file nothing to do with this?

Edit: Sorry, thought you made the xml yourself…

No no,
Did not make the xml. used the custom file from stiansoevik.
I forgot to tell you that you need to associate the different groups manually to the controller under zwave setup. Then the temperature measurement works. Now the external temp seems ok, which is the one that I’m using, but the internal temp does not update.

The upgrade process went fine, used the 1$ CP2102 as described here https://www.hjemmeautomasjon.no/forums/topic/3585-heatit-oppdater-til-v192-med-uoriginal-kabel/?tab=comments#comment-41451

Not sure that I will bother updating my other thermostats as the only gain is getting several temp readings, perhaps nice having floor and air temp. Reporting state heating/idle is achieved with older firmware anyways, reporting of decimals are nice though, but not really that big of deal.

If the z-dim is already supported by openzwave you can simply git clone the updated files and change the config directory in hass. If you want to make your own, I would go with the same process instead of changing the zwcfg*.xml, cant help you with how to make the file though…