Tutorial: compiling open-zwave-control-panel


#1

It took me a while to figure out how to compile ozwcp, so I wrote a quick tutorial to hopefully save other people’s time:
https://lickthesalt.com/2016/04/11/compiling-open-zwave-control-panel-on-a-raspberry-pi-3/

I’ve only tested this on Raspbian 8 (jessie) on a rpi3, so if it works on another distro or release, please let me know!


Installing python-openzwave on rpi3
Help with Z-Wave setup error
Why won't HA detect devices added from OZWCP, but it works the other way around?
Z-Wave Switches Not Updating Status (Specifically Aeotec Micro Switches/Dimmers) Fixed!
HA Server Recommendation?
How to send a "Set Configuration" command instead of "ON" command?
#2

You Rock !! Thanks I haven’t followed this yet, but have been really struggling to figure this out.

Thanks


Changing Aeon Tech from Basic Set to Sensor_Binary Set
#3

Worked like a charm! Thanks!!!


#4

It was pointed out to me that there’s a working docker image as well, which should be easier to install. I’ve updated the blog post, but here’s the command to get the docker image running (assuming you have docker installed):

docker run -p 8008:8008 –device /dev/ttyUSB0 openzwave/openzwave-control-panel &>/dev/null &


#5

when i try to run the docker command on my raspberry pi 3 it gives me a [9] System error: exec format error. has anybody else encountered this issue?


#6

As Tom mentioned in the comments on your site, I also had to update my Makefile for open-zwave-control-panel

LIBMICROHTTPD := /usr/local/lib/libmicrohttpd.a


#7

Thanks for the heads up, I’ve updated the post.


#8

Thanks for the wonderful guide. However, just to let you know I stumbled few times because I installed this using user: pi

I need to add sudo on certain lines such as…

sudo apt-get install libgnutls28-dev libgnutlsxx28

sudo make install


#9

I ran all everything as root (because I’m lazy), that’s why the commands didn’t include sudo.


#10

Just an FYI for anyone looking to follow the guide. If you go to the libmicrohttpd site and see that newer versions are available (0.9.49 in my case) DON’T improvise and download a newer package instead. I tried with the newest version and couldn’t get it to build, but 0.9.19 worked. Thanks!


#11

After struggling quite a bit (I am new to linux/zwave/open source/etc), I was able to get through the tutorial and can run the control panel (thanks @aceat64). But of of course I am still having issues and was hoping someone could help point me in the right direction. Before I get into my questions just to be clear I have been able to successfully configure zwave in home assistant, and since a recent restart, home assistant has already recognized the 2 devices which I can control already with the developers tools.

Questions

  1. Dumb question - is there a definitive resource for how the OpenZWave control panel is supposed to work, like here is a description of what the buttons do and what the functions are for (I am assuming no …because open source)?

  2. Are there any non-obvious pre-requisites to successfully run the control panel, for instance do you have to stop home assistant? Run it in certain browsers? Am I supposed to enter anything outside of device name? Should I be checking the USB checkbox?

  3. Most important question - I can’t seem to get OpenZWave to recognize my Aeotec gen 5 z-stick. I get the following terminal output when I enter /dev/zwave (which I mapped and works in HA) under device name and click initialize. One weird thing I noticed is the terminal calls out HID port with VID:1b5f and PID:0x0001 which I assume is vendor id and product id of the usb port it is trying to access, but my z-stick has different id’s… is there a config file that I could default these values, or is the HID port something else?

    [email protected]:~/open-zwave-control-panel $ sudo ./ozwcp -p 7777
    2016-05-15 07:01:57.367 Always, OpenZwave Version 1.4.244 Starting Up
    webserver starting port 7777
    post: key=dev data=/dev/zwave size=10
    post: key=fn data=open size=4
    post: key=usb data=true size=4
    2016-05-15 07:02:11.382 Info, Setting Up Provided Network Key for Secure Communications
    2016-05-15 07:02:11.383 Warning, Failed - Network Key Not Set
    2016-05-15 07:02:11.383 Info, mgr, Added driver for controller HID Controller
    2016-05-15 07:02:11.383 Info, Opening controller HID Controller
    2016-05-15 07:02:11.384 Info, Open HID port HID Controller
    2016-05-15 07:02:11.385 Error, Cannot find specified HID port with VID:1b5f and PID:0x0001.
    2016-05-15 07:02:11.385 Error, Enumerating connected HIDs:
    2016-05-15 07:02:11.385 Error, Failed to open HID port HID Controller
    2016-05-15 07:02:11.385 Error, HIDAPI ERROR STRING (if any): (null)
    2016-05-15 07:02:11.386 Warning, WARNING: Failed to init the controller (attempt 0)
    2016-05-15 07:02:16.386 Info, Opening controller HID Controller
    2016-05-15 07:02:16.399 Info, Open HID port HID Controller
    2016-05-15 07:02:16.399 Error, Cannot find specified HID port with VID:1b5f and PID:0x0001.
    2016-05-15 07:02:16.400 Error, Enumerating connected HIDs:
    2016-05-15 07:02:16.400 Error, Failed to open HID port HID Controller
    2016-05-15 07:02:16.400 Error, HIDAPI ERROR STRING (if any): (null)
    2016-05-15 07:02:16.401 Warning, WARNING: Failed to init the controller (attempt 1)
    2016-05-15 07:02:21.401 Info, Opening controller HID Controller
    2016-05-15 07:02:21.402 Info, Open HID port HID Controller
    2016-05-15 07:02:21.403 Error, Cannot find specified HID port with VID:1b5f and PID:0x0001.
    2016-05-15 07:02:21.404 Error, Enumerating connected HIDs:
    2016-05-15 07:02:21.404 Error, Failed to open HID port HID Controller
    2016-05-15 07:02:21.405 Error, HIDAPI ERROR STRING (if any): (null)
    2016-05-15 07:02:21.406 Warning, WARNING: Failed to init the controller (attempt 2)
    2016-05-15 07:02:26.406 Info, Opening controller HID Controller
    2016-05-15 07:02:26.419 Info, Open HID port HID Controller
    2016-05-15 07:02:26.419 Error, Cannot find specified HID port with VID:1b5f and PID:0x0001.
    2016-05-15 07:02:26.420 Error, Enumerating connected HIDs:
    2016-05-15 07:02:26.421 Error, Failed to open HID port HID Controller
    2016-05-15 07:02:26.421 Error, HIDAPI ERROR STRING (if any): (null)
    2016-05-15 07:02:26.422 Warning, WARNING: Failed to init the controller (attempt 3)
    2016-05-15 07:02:31.422 Info, Opening controller HID Controller
    2016-05-15 07:02:31.434 Info, Open HID port HID Controller
    2016-05-15 07:02:31.435 Error, Cannot find specified HID port with VID:1b5f and PID:0x0001.
    2016-05-15 07:02:31.436 Error, Enumerating connected HIDs:
    2016-05-15 07:02:31.436 Error, Failed to open HID port HID Controller
    2016-05-15 07:02:31.437 Error, HIDAPI ERROR STRING (if any): (null)
    2016-05-15 07:02:31.437 Warning, WARNING: Failed to init the controller (attempt 4)
    2016-05-15 07:02:31.438 Detail, contrlr, Notification: DriverFailed
    2016-05-15 07:02:31.438 Info, Notification: Driver Failed, homeId 00000000


#12

Murphy’s law: you hit your head against the wall with an issue, spend the morning writing a plea for help in a forum… and promptly solve your own problem. After visiting the following link here I noticed the following text “Ensuring that HASS isn’t running (crossing the streams would be very bad), run the control panel” ok… lets give this one more shot. I entered device name /dev/zwave and clicked the ‘Initialize’ button. And BOOM it works now. I swear I tried doing exactly what I just did before. Oh well.


#13

@JoeDSM I’m experiencing the same issues as you. I was seeing the errors that you mentioned, but not now - perhaps I had HASS running. Now I see nothing while trying to configure open zwave control panel.

When I hit initialize I get this in the console, but nothing in the interface

post: key=dev data=/dev/ttyACM0 size=12
post: key=fn data=open size=4
post: key=usb data=true size=4

The Home Id, Controller Mode, Node Count all stay empty


#14

@zakharm Wish I could help you, are the 3 post lines the only output you are seeing on the console? Are you able to see zwave entity id’s or services listed in home assistant? Did you confirm your usb controller is at ttyACMO (mine has flipped between ttyACM0 and ttyACM1)?


#15

#16

Pinned the topic. I think it would be nice if we add this as a page to our documentation. PR welcome! CC @robbiet480 as was writing something up too iirc


#17

@JoeDSM I restarted HASS a few times and now I’m able to see zwave/add_node and others on there. i was only seeing zwave/0, zwave/1, etc before. I didn’t really anything different, it just started appearing.

My zwave configuration:

zwave:
usb_path: /dev/ttyACM0
config_path: /srv/hass/lib/python3.4/site-packages/libopenzwave-0.3.0-py3.4-linux-armv7l.egg/config
polling_interval: 60000

Now I see my Aeotec Multisensor 6 and the following entities:
sensor.__luminance_2
sensor.__relative_humidity_2
sensor.__temperature_2
sensor.__ultraviolet_2

I believe I still need access to Open Zwave Controller to make a configuration change so I can use the motion detector.


#18

@zakharm You are essentially exactly where I was recently and I noticed similar behavior (zwave/0, etc). Assuming you haven’t tried the following already I would run the following commands, I am sure you don’t need these steps in detail but if you are like me and completely new to this stuff maybe it will be helpful.

  1. Stop HA - sudo service hass-daemon stop
  2. Confirm HA has stopped - sudo service hass-daemon status -1
  3. Start OZWCP
  • cd open-zwave-control-panel
  • sudo ./ozwcp -p 8888
  1. Open OZWCP your ip:8888
  2. Enter /dev/ttyACM0 into device field and click initialize button

#19

@JoeDSM Thanks for the steps. I closed out of HASS and also rebooted and I’m getting the issue you were having accessing the controller

2016-05-16 20:40:16.514 Info, Setting Up Provided Network Key for Secure Communications
2016-05-16 20:40:16.515 Warning, Failed - Network Key Not Set
2016-05-16 20:40:16.515 Info, mgr, Added driver for controller HID Controller
2016-05-16 20:40:16.516 Info, Opening controller HID Controller
2016-05-16 20:40:16.516 Info, Open HID port HID Controller
2016-05-16 20:40:16.517 Error, Cannot find specified HID port with VID:1b5f and PID:0x0001.
2016-05-16 20:40:16.518 Error, Enumerating connected HIDs:
2016-05-16 20:40:16.518 Error, Failed to open HID port HID Controller
2016-05-16 20:40:16.519 Error, HIDAPI ERROR STRING (if any): (null)
2016-05-16 20:40:16.519 Warning, WARNING: Failed to init the controller (attempt 0)


#20

@JoeDSM

I didn’t click the USB checkbox and it worked!

From the project’s Github Issues:

The Aeon Labs USB controller creates a serial device in /dev. The USB checkbox
is for HID (non-serial) devices.