Aeon Labs - Multi Sensor 6 Gen 5 - HASS AIO

Dear all,

I need your help with my Aeon Labs Multi Sensor used in my RPi with HASS AiO installer. Currently it is all running fine but the polling of the information is only done on hourly basis. I stumbled upon this blog post by ntouran here and he has a script that will poll the information more frequently. Since I installed my hass using AiO, I cant seem to get the script to run.

Please help.

Configuring the Aeon Labs Multisensor 6

This multisensor is pretty cool but by default it only sends updates once an hour. When on battery, this makes sense because this will drain the battery in like a year, and more frequent updates would drain it faster. But if you plug it in to power, you’ll probably want quicker updates. I figured out how to adjust the configuration using the python-openzwave library that was installed above. Here is an example script that does some config of stuff. Run it with ipython3 or python3.

> from openzwave.option import ZWaveOption
> options = ZWaveOption('/dev/zwave', config_path='/home/pi/python-openzwave/openzwave/config', user_path='.', cmd_line='')
> # or /usr/local/share/python-openzwave/config if installed
> # /home/pi/python-openzwave/openzwave/config if testing
> options.set_append_log_file(False)
> options.set_console_output(True)
> options.set_save_log_level('Debug')
> options.set_logging(False)
> options.lock()
> from openzwave.network import ZWaveNetwork
> network = ZWaveNetwork(options, log=None)
> node2 = network.nodes[2] 
> print(node2.product_name) # this is the multisensor on my network. Yours may be a different node.
> # get current config values
> node2.get_sensors()
> node2.request_all_config_params()
> # set timing and stuff on multisensor
> node2.request_config_param(111)  # this shows the current interval (3600 seconds)
> node2.set_config_param(111, 120)  # set the temperature sensor interval to 120 seconds
> node2.set_config_param(3, 125) # set motion sensor On duration to just over 2 minutes. (shorter and it never registers as on!)
> # set reporting of power level on Aeon smart energy switches
> node5.set_config_param(101,2)  # send multisensor info about power
> node5.set_config_param(111,20) # send it every 20 seconds. 
> network.stop()

Further steps I have taken

I created poll.py containing the script above and modified the config_path default to AiO installer. No luck.

from openzwave.option import ZWaveOption
options = ZWaveOption('/dev/zwave', config_path='/srv/hass/src/python-openzwave/openzwave/config', user_path='.', cmd_line='')
# or /usr/local/share/python-openzwave/config if installed
# /home/pi/python-openzwave/openzwave/config if testing
options.set_append_log_file(False)
options.set_console_output(True)
options.set_save_log_level('Debug')
options.set_logging(False)
options.lock()
from openzwave.network import ZWaveNetwork
network = ZWaveNetwork(options, log=None)
node2 = network.nodes[2] 
print(node2.product_name) # this is the multisensor on my network. Yours may be a different node.

# get current config values
node2.get_sensors()
node2.request_all_config_params()

# set timing and stuff on multisensor
node2.request_config_param(111)  # this shows the current interval (3600 seconds)
node2.set_config_param(111, 120)  # set the temperature sensor interval to 120 seconds
node2.set_config_param(3, 125) # set motion sensor On duration to just over 2 minutes. (shorter and it never registers as on!)

# set reporting of power level on Aeon smart energy switches
node5.set_config_param(101,2)  # send multisensor info about power
node5.set_config_param(111,20) # send it every 20 seconds. 

network.stop()

However, when I run this from the HASS virtual environment

I tried this steps to run the poll.py from the virtual environment
*Login to Raspberry Pi ssh pi@your_raspberry_pi_ip
*Change to hass user sudo su -s /bin/bash hass
*Change to virtual enviroment source srv/hass/hass_venv/bin/activate

and ran poll.py, it ran but it has different error this time.

(hass_venv) hass@raspberrypi:/srv/hass/src/python-openzwave$ python3 poll.py
2016-06-01 15:27:25.760 Always, OpenZwave Version 1.4.256 Starting Up
2016-06-01 15:27:25.764 Info, Setting Up Provided Network Key for Secure Communi cations
2016-06-01 15:27:25.765 Warning, Failed – Network Key Not Set
2016-06-01 15:27:25.765 Info, mgr, Added driver for controller /dev/zwave
2016-06-01 15:27:25.765 Info, Opening controller /dev/zwave
Traceback (most recent call last):
2016-06-01 15:27:25.765 Info, Trying to open serial port /dev/zwave (attempt 1)
File “poll.py”, line 12, in
2016-06-01 15:27:25.766 Error, ERROR: Cannot get exclusive lock for serial port /dev/zwave. Error code 11
node2 = network.nodes[2]
KeyError: 2

Hi.
Just a small tip.
Make sure that you have stopped the HA service so that no service is using the Zwave interface.
I got the same error when trying to use the ozwcp when HA service was running. :slight_smile:

so you are saying that HA should not be using the zwave controller?

ozwcp is the one that should be running the zwave controller?

So, every reboot, stop HASS, start ozwcp and then start HASS again?

i tried your method, but as soon as I restart the HASS service, it took over again.
im confused, im completely new with this zwave things. appreciate the help.
cheers

What I ment was when you want to run the ozwcp you should stop the HA service.
And after you are done configuring your Zwave network, you can stop the ozwcp webservice and restart HA.
I do not think that you can have HA and ozwcp running at the same time.

I had the same error message when I added zwave to my system and this is what solved it for me.

:slight_smile:

ah ok, yes i figured that out already. the issue im having is not adding the zwave sensor to the controller (this part is already set up and working)

it’s the polling frequency of Aeon Labs Multisensor 6. By default, this multisensor only send out reading to the controller once every 60minutes. I have checked the settings via ozwcp for this multisensor, it doesnt have the option to change it.

As mentioned on my first post, the blog that I stumbled into has a solution that seems to work only with HASS not in virtual environment.

Ok.
But the exclusive lock situation is the same.
Looks like that the poll.py script also needs exclusive lock on the device for the zwave interface.
So it may not work at the same time as HA is running?

The script poll.py seems like a script that only sets the parameters for the device and you should only need to run this once.

Hi RoarL
Thanks for your help, I found another solution without needing this script.
Here’s the link to another post - Aeotec/Aeon Labs 4-in-1 Multisensor

No prob.
Glad you found a solution to your problem. :slight_smile: