Make Aeotec Home Energy Meter send automatic updates

Intro

I will show how to setup and use Z-Way software to configure options of the Aeotec Home Energy Meter (HEM) ZW095 that are not available from openHAB UI.

Background

This is my first Z-Wave device and this is the first time I am using openHAB. Setting up openHAB (3.0.0 - Release Build) on a Raspberry Pi with a RaZberry2 as Z-Wave controller went pretty smooth, and I could add the Aeotec Home Energy Meter with out a problem. But it did not send updates automatically no matter the combination of settings I tried. Workarounds sending REFRESH command or setting Polling Period worked for a while and then also stopped.

Aeotec support responded with this information:

There is an issue when using Multichannel Association which causes the HEM Gen5 to not report correctly. One way to resolve this issue is to remove the Multichannel Association of Node ID 01 endpoint 1 from Group 1.

Then re-associate Node ID 01 to Group 1 using “Group Association”

Alternatively you could use “Multichannel Association” and assign Node ID 01 endpoint 0 to Group 1 which will work as well.

Nowhere in the openHAB UI could I find any mentions of Multichannel Association but I could see it in the logs when setting log level to DEBUG for zwave logger.

Solution

Z-Way is a Smart Home Controller made by the creators of the RaZberry. It allows devices to be added in a similar way to openHAB. In it’s default interface you do not have a lot of control but there is an advanced interface that is really powerful when dealing with Z-Wave devices. From there I could implement the recommendations from Aeotecs support and the HEM started working like expected. This information could possibly apply to other Z-Wave devices and controllers as well.

Steps

  1. Write down the Label / Name of the HEM Thing in openHAB. This way when you add it again with the same name, your data points will be kept and your setup will still work.
    capture-001

  2. Exclude the HEM from openHAB. This should reset it to factory defaults and the led on it should start blinking. If it does not work, reset the device by holding its button for 10 seconds.
    capture-003

  3. Remove the HEM Thing from openHAB.
    capture-008

  4. Disable the Z-Wave Controller in openHAB.


     

  5. Install Z-Way software.
    wget -q -O - https://storage.z-wave.me/RaspbianInstall | sudo bash

  6. Access the Z-Way web UI:
    http://openhabian:8083
    You will need to create a password the first time.

  7. Include the HEM:
     
    From the top right menu, go to Devices.
    capture-010
     
    Choose to update the vendor and device database.


     
    Add new device identifying it automatically.
    capture-012
     
    Press Start to begin adding the device. Wait until the device is fully added.
    capture-016

  8. Go back to Devices and open Manage with ExpertUI.

  9. Go to Configuration, select the device and open Expert commands.
    capture-018
     
    capture-019
     
    capture-020

  10. Find instance 0 Multi Channel Association and click Remove.
    The only feedback that a change was made is that the button style is altered for a short while.
    capture-021
     
    capture-022

  11. Find instance 0 Association.
    Choose Group 1 and Node Z-Way (the controller, node 1) and click Set.
    capture-023
     
    capture-024

  12. Shutdown Z-Way server.

sudo service z-way-server stop
sudo service zbw_connect stop
sudo service mongoose stop
  1. Disable Z-Way services.
sudo /lib/systemd/systemd-sysv-install disable z-way-server
sudo /lib/systemd/systemd-sysv-install disable zbw_connect
sudo /lib/systemd/systemd-sysv-install disable mongoose

Notice! I do recommend you reboot the Raspbery Pi when you are done to make sure these services are disabled, openHAB starts and Z-Wave binding gets access to the controller.

  1. Enable Z-Wave Controller in openHAB.
    capture-028
     
    capture-029

  2. Add HEM from Inbox. Make sure to set the same Label / Name as before.
    capture-030
     
    capture-031
     
    capture-032

  3. Add Items from Thing. This will make them start updating.
    capture-033
     
    capture-034

  4. The Report Group settings now actually have an effect!
    capture-038

My setup looks like this:

  • Selective reporting turned off.
  • Group 1 to update instant wattage (2 + 256 + 512 + 768 = 1794) every 30 seconds.
  • Group 2 to update total kWh, voltage and amperage (1 + 4 + 8 = 13) every 60 seconds.
     
Full Code for Thing
UID: zwave:device:f2743ed307:node5
label: Home Energy Meter
thingTypeUID: zwave:aeon_zw095_00_000
configuration:
  config_11_1: 10
  config_10_1: 10
  config_252_1: 0
  config_255_4_wo: 0
  group_1:
    - controller
    - controller
  config_2_1: 1
  config_6_2: 50
  config_101_4: 1794
  config_112_4: 60
  config_7_2: 50
  config_8_1: 10
  config_102_4: 13
  config_113_4: 120
  config_9_1: 10
  config_111_4: 30
  config_3_1: 0
  config_13_1: 0
  config_4_2: 50
  config_103_4: 0
  node_id: 5
  config_5_2: 50
bridgeUID: zwave:serial_zstick:f2743ed307

In the code view I noticed multiple controller in group_1 after implementing the steps here.

Conclusion

This was hard to figure out and I spent more then a week dealing with this problem. It seems parts of the Z-Wave standard are quite complex and can be interpreted in different ways. Z-Way server has tools specific for Z-Wave devices so it is good to have installed, but I prefer not to have it running with the Z-Way binding from openHAB, to preserve the limited resources of a Raspberry Pi.

References

Turn on debug logging: Logging | openHAB
Z-Way Software: Download Z-Way – Z-Wave.Me
Z-Way Manual: https://z-wave.me/essentials
Quote about Z-Wave implementation of multi channel: Qubino Flush 1D - av/pĂĄ-brytare registreras ej - forum.m.nu

Related

4 Likes

Actually what I find is the manufacturers many times make it difficult to know what their configuration parameters definitions are.

For my Z-Wave devices, the priority when writing instructions seems to have been “fit it all into the smallest possible piece of paper that can be folded into a wad that fits in the box.”

2 Likes

Some manufacturers hide the Z-Wave settings needed for the bindings. Sometimes it seems like a treasure hunt.

1 Like

Thank you a thousand times! I had my Energymeter working on OH2.5 (sometimes it gets it right by chance) but after my upgrade to OH3 I lost it again and I am relying on the REFRESH rule for now.
I though you need a separate Z-Wave stick, but I see it’s possible with the razberry, amazing!

I will try your tutorial this weekend!

1 Like

Please let me know how it goes and if anything should be changed or clarified.

Thanks for the tip @gotling
This can be also done using Z-Wave PC Controller or any other software that is able to send arbitrary z-wave commands.

1 Like

Hi Marcus,

Thank you again for your amazing tutorial! I tried it out and finally got my EnergyMeter working.
A few caveats I encountered:

  1. Clicking the remove association button will not give a feedback if that was successful, same with the set command (it works, but no confirmation)
  2. Stopping and disabling the services was not enough for me, my z-wave bridge could not access the razberry. I found that the z-way-server process was still running. After I killed the process my openhab z-wave bridge could access the razberry interface again.
  3. Setting the parameters of the zwave device config in openhab is a pure gamble. Some config parameters are not transferred, some stay pending, some get through. I had to Chang parameters forth and back a fee times until they got registered, I think the binding sends only config that has changed.

That said, I don’t know if I’d buy zwave devices again. Most of my stuff is zigbee and it just works. Surely, a lot of the issues here are device specific, but the handling feels a little outdated in general.

1 Like

Hi Bob,

Thank you for your feedback, and I am very glad I could be of help! I spent so much time on this and it is clear others struggle as well.

I expected Z-Wave to be easier to use given its required certification of devices and the higher price that results in. We will most likely still be depending on Z-Wave devices for some specific needs for some time to come but then I would think Project Connected Home over IP will take over.

I made some updates to the post, getting to know how to do formatting in this forum. I added that feedback when doing changes in Z-Way is unclear and a recommendation to reboot the Pi after the services have been disabled.

I also think it is a bit unclear if updates go through or not in openHAB. Sometimes I see that Pending tab but it usually goes away after I refresh the page. If you have console log open with zwave debug turned on you will see that commands are sent when switching between Thing and Code tab.

1 Like

Hi gotling,

thanks a lot for your workaround and nice description!!! That saves me a lot of time!

But maybe as feedback, sep 1-3 are not necessary. You can start the z-way server without excluding the device and change the association like you mention.

Thanks a lot
maniez

Thank you for the tip! I will set up openHAB on a new machine so I might need to to repeat these steps. I will then try like you said without excluding the device.

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.