Home Assistant & Razberry

@herorich

  1. Here’s the “zwave” part of my configuration.yaml (you might not need polling_interval, but it was required for some of my sensors to update):
zwave:
  config_path: /srv/hass/src/python-openzwave/openzwave/config
  usb_path: /dev/ttyAMA0
  polling_interval: 30000
  1. This is my config.txt file, but note that I do not have bluetooth working and I do not remember what was default vs what wasn’t default. I didn’t need to change config.txt at all originally, but started messing with it to try and get bluetooth working (@samriley mentioned that earlier)
dtparam=audio=on
gpu_mem=16
dtoverlay=pi3-miniuart-bt
core_freq=250
enable_uart=1
  1. The openzwave and usb path could both be different depending on how everything was installed. It’s also possible to configure udev to give your razberry (or aeon stick) a different device name.
  2. Depending on the z-wave devices you’re using, you should see them added to home-assistant on the default page. You can check the log as well to see if there are any errors.

Also, keep in mind that you’ll need to add devices to your zwave network. I don’t think you can add one device to both your razberry and aeon stick at the same time, but someone could correct me if I’m wrong.

Thank you, now it is up an running! After a myriad of reboots and adding and removing devices :wink:

These are the steps (for me)

  1. Installed HA with the All-in-one installer. Followed all steps in this video: https://youtu.be/VGl3KTrYo6s

  2. Added this to the yaml file:

    usb_path: /dev/ttyAMA0
    config_path: /srv/hass/hass_venv/lib/python3.4/site-packages/libopenzwave-0.3.1-py3.4-linux-armv7l.egg/config

    (USB path from @justyns example)
    (Config path from this video: https://www.youtube.com/watch?v=ajklDCaOGwY)

  3. Added this to the config.txt

    core_freq=250
    dtoverlay=pi3-disable-bt

  4. Installed RaZberry

    https://razberry.z-wave.me/index.php?id=24

  5. Added devices in the RaZberry page, YourIP:8083 and they showed up in HA!

I guess you can add devices from HA with the zwave/add_node service?

I think I’m starting to understand how it all works now! Thanks again

1 Like

For some reason not all my node’s are pulling into home assistant? Anyone know why?

Also when running home assistant my razberry pages shows no devices and gives me an error saying it is unable to initialise the z-wave controller data.

17-02-13 20:09:44 ERROR (Dummy-21) [openzwave] Error in manager callback
Traceback (most recent call last):
File “/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/openzwave-0.3.2-py3.4.egg/openzwave/network.py”, line 974, in zwcallback
self._handle_essential_node_queries_complete(args)
File “/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/openzwave-0.3.2-py3.4.egg/openzwave/network.py”, line 1266, in _handle_essential_node_queries_complete
**{‘network’: self, ‘node’: self.nodes[args[‘nodeId’]]})
KeyError: 18
17-02-13 20:14:41 ERROR (Dummy-21) [openzwave] Error in manager callback
Traceback (most recent call last):
File “/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/openzwave-0.3.2-py3.4.egg/openzwave/network.py”, line 948, in zwcallback
self._handle_value_added(args)
File “/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/openzwave-0.3.2-py3.4.egg/openzwave/network.py”, line 1474, in _handle_value_added
self.nodes[args[‘nodeId’]].add_value(args[‘valueId’][‘id’])
KeyError: 11

I have the same problem, did you find any solution?

//Fredrik

I also have the same problem with not being able to run homeassistant parallel to the razberry UI. Did you find any solution?

You can not run two different zwave applications at the same time. In order to have HA handle your Zwave you need to disable the razberry service (z-way).

After you have install the razberry device. Run this:

sudo update-rc.d disable z-way-server

Edit /boot/config.txt. Add this:

dtoverlay=pi3-disable-bt

I added this to my HA configuration.yaml:

zwave:
usb_path: /dev/ttyAMA0
config_path: /srv/homeassistant/lib/python3.4/site-packages/libopenzwave-0.3.2-py3.4-linux-armv7l.egg/config
polling_interval: 30000
device_config: !include zwave_device_config.yaml

This will get you into the open zway control panel:

Make sure Home Assistant is not running! So stop that first
Login to Raspberry Pi ssh pi@your_raspberry_pi_ip
Change to the ozwcp directory cd /srv/homeassistant/src/open-zwave-control-panel/
Launch the control panel sudo ./ozwcp -p 8888
Open a web browser to http://your_pi_ip:8888
Specify your zwave controller, for example /dev/ttyACM0 (this should be /dev/ttyAMA0) and hit initialize

Your zwave config_path may be different and your usb_path may also be different. Hope this helps out.

Check out https://community.home-assistant.io/t/unable-to-configure-razberry-board-with-openzwave/4686/5 for more information

Lastly HA 0.43.0 killed my zwave so I had to roll it back for now.

1 Like

Thank you very much!
It looks like everything is working but I will have to verify when I get home.

Note, the command to disable was:

sudo update-rc.d z-way-server disable
1 Like

where can I find zwave_device_config.yaml ?

Just make an empty file with that name.

what step will fill the write config to this file?
my question is how the configuration we do on http://your_pi_ip:8888/ gets to the yams file?

thanks!

There is literally nothing in my zwave_device_config.yaml file. I only have it because HA requires it. That file you are talking about is completely different to this yaml file.

Thanks, @jordanb05 . This almost got me there…

I have installed the SD card via Hassbian, and the paths seem similar to yours. However, mine seem to be version 0.4.0 and I presume some filename changes have occurred.

None of the folders (see below) have a config subfolder, but there is ozw_config in one. I’m going to try that. In case you already know what works with 0.4.0, I’d be happy to hear.

$ ls /srv/homeassistant/lib/python3.4/site-packages/*openz*
/srv/homeassistant/lib/python3.4/site-packages/libopenzwave.cpython-34m.so

/srv/homeassistant/lib/python3.4/site-packages/libopenzwave-0.4.0.35.egg-info:
dependency_links.txt  not-zip-safe  PKG-INFO  requires.txt  SOURCES.txt  top_level.txt

/srv/homeassistant/lib/python3.4/site-packages/openzwave-0.4.0.35-py3.4.egg:
EGG-INFO  openzwave

/srv/homeassistant/lib/python3.4/site-packages/python_openzwave:
ozw_config

/srv/homeassistant/lib/python3.4/site-packages/python_openzwave-0.4.0.35-py3.4-linux-armv7l.egg:
EGG-INFO  libopenzwave.cpython-34m.so  libopenzwave.py  openzwave  __pycache__  pyozwman  python_openzwave

In case others share my situation (Hassbian + RaZberry, with 0.4.0 Openzwave), please answer here what worked for you. :slight_smile:


Adding:

config_path: /srv/homeassistant/lib/python3.4/site-packages/python_openzwave/ozw_config

…did indeed make HA start without warnings, for me. I’m still not sure if that’s the intended folder, though.

You are just trying to point it to the config folder that contains all your z-wave data. Looks like you found it. It seems to vary depending on your install.

I am getting the following in the hass logs . I am running virtual hass on rpi3 with razberry gpio moduel . Appreciate your support :

ERROR:homeassistant.setup:Error during setup of component zwave
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.5/site-packages/openzwave/option.py”, line 75, in init
raise ZWaveException(u"Can’t write to device %s : %s" % (device, traceback.format_exception(*sys.exc_info())))
openzwave.object.ZWaveException: “Zwave Generic Exception : Can’t write to device /dev/ttyAMA0 : [‘NoneType: None\n’]”

Did you install the z-way-server? If so you’ll need to stop and disable it.

If not, see the documentation.

no the Z-way-server is not installed at all. Should the module be installed on a specific GPOI pins ? I can see it defined as ACM0 then after a while becomes tt7…

It comes with instructions for connecting it - from memory pins zero onwards.

Did you follow the documentation for disabling Bluetooth?

I follow the documentation for disabling bluetooth , no idea though about the connection , but it lits once i installed it , and defined as ttyAMA0 . I get the following log , any idea :

tail -f /home/homeassistant/.homeassistant/home-assistant.log
config_path=config[DOMAIN].get(CONF_CONFIG_PATH))
File “/srv/homeassistant/lib/python3.5/site-packages/openzwave/option.py”, line 81, in init
raise ZWaveException(u"Error when retrieving device %s : %s" % (device, traceback.format_exception(*sys.exc_info())))
openzwave.object.ZWaveException: ‘Zwave Generic Exception : Error when retrieving device /dev/ttyAMA0 : [‘Traceback (most recent call last):\n’, ’ File “/srv/homeassistant/lib/python3.5/site-packages/openzwave/option.py”, line 75, in init\n raise ZWaveException(u"Can\‘t write to device %s : %s" % (device, traceback.format_exception(*sys.exc_info())))\n’, ‘openzwave.object.ZWaveException: “Zwave Generic Exception : Can\'t write to device /dev/ttyAMA0 : [\‘NoneType: None\\\\n\’]”\n’]’
2017-12-20 22:00:42 ERROR (Thread-20) [homeassistant.components.notify.ios] The notify.ios platform was loaded but no devices exist! Please check the documentation at https://home-assistant.io/ecosystem/ios/notifications/ for more information
2017-12-20 22:18:58 ERROR (MainThread) [homeassistant.core] Error doing job: Fatal read error on socket transport
Traceback (most recent call last):
File “/usr/lib/python3.5/asyncio/selector_events.py”, line 723, in _read_ready
data = self._sock.recv(self.max_size)
OSError: [Errno 113] No route to host

Can you run the following commands please:

  • ls -al /dev/ttyAMA0
  • id homeassistant

pi@raspberrypi:~$ ls -al /dev/ttyAMA0
crw–w---- 1 root tty 204, 64 Dec 23 09:55 /dev/ttyAMA0
pi@raspberrypi:~$ id homeassistant
uid=999(homeassistant) gid=996(homeassistant) groups=996(homeassistant),20(dialout)
pi@raspberrypi:~$