-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
support for z-wave usb sticks #20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
It would be indeed really great to have. The library you linked would be a way to go. It just has one big blocker: it does not support Python 3. Since it is partly implemented as a C extension adding support for Python 3 wouldn't be straight forward. If there was Python 3 support I would get myself a stick and add it to Home Assistant :-) |
Are you sure it doesn't support Python 3? The C interfacing appears to be done via Cython, which as far as I know supports python 3.2+. I'll give it a try at some point (if you don't get to it before me! ;), and let you know. |
Any progress on the z-wave python lib? |
Not from my side. |
Haven't done anything with it yet -- I guess it shouldn't be too much work if you want to try to see if it works with Python 3. Might be a couple of weeks before I get to it, so if you are able to confirm that the python-zwave code runs with Python 3, that would probably be the first step to getting it integrated into home-assistant. |
Ok, I found some time (needed an excuse to procrastinate) -- I've created a clone of python-openzwave that seems to be working with Python 3 and a Z-Stick Series 2 device. Details on how to compile / install are in the PYTHON3.txt file. Please feel free to submit patches/pull-requests (or I'd be happy to give those interested push access to the repo). The repo is here: https://bitbucket.org/edgimar/python3-openzwave |
Awesome ! I just ordered a Z-Wave Series 2 stick and a Multi-Sensor so I can start playing with it. The next step is going to be incorporating your instructions in the Dockerfile so people will be able to easily setup a dev environment. And then let's see how we can connect it to Home Assistant 😎 |
I've updated the Dockerfile and you can test it out in the branch feature-openzwave. To test it:
It currently fails because in |
When I try running the docker script, I get the following: Executing 3 build triggersStep onbuild-0 : COPY requirements.txt /usr/src/app/ On Sat, Feb 21, 2015 at 9:17 PM, Paulus Schoutsen notifications@github.com
|
Looks like building the local image fails: Do you have access to any more logs ? |
Do you mean logs from the container? If so, the only contents of the On Sat, Feb 21, 2015 at 10:17 PM, Paulus Schoutsen <notifications@github.com
|
Hmm, weird. I am using OS X 10.10 with boot2docker v1.4.1. I just tried removing all images and follow my instructions and it works. |
I'm using 32-bit Ubuntu 14.04, with the docker.io package from the standard
|
Can confirm, get same error running Ubuntu 14.04 32-bit in a VM 😞 |
I have made some changes to get it working on Python 3. Keeping my changes on Google Code in a cloned repo: find it here |
Please note, these changes will allow Python 3 to interface with python-openzwave cython code. I have not been able to interface with my USB stick yet. |
apparently docker only officially supports 64-bit images, so that's where the "exec format error" was coming from. There are unsupported 32-bit images available, so if you wanted home-assistant to support 32-bit architectures, you'd need to make a Dockerfile that depends on these 32-bit images -- see https://bugs.launchpad.net/ubuntu/+source/docker.io/+bug/1366509 . |
I have just pushed changes to the feature-openzwave branch that will take your Z-Wave sensors and show them in Home Assistant. One card per sensor. Since you can't use Docker, you can use the new script Outstanding issues:
|
Just pushed changes that will have the controller register for updates from the sensor and pushes them to Home Assistant. Issue for not having the correct data on launch is still there. I might want to add in a refresh. I am also having an issue with the temperature sensor:
|
So I found some resources online that stated that there is a firmware bug with my Aeon Labs multi sensor that will report the wrong values for temperature when it is polled. And indeed, when run in a mode where I do not poll but get updates whenever the sensor sees fit it works. It works but since there are a lot of moving parts I don't feel confident yet to push it out to the dev branch just yet. @edgimar , would you be able to test it? It currently only supports sensors. |
Can you provide a working config example that works with zwave devices? The current example config doesn't contain any zwave specific content, from what I can tell. |
|
When I've done nothing but add the zwave section to the config file, the following are some of the debug messages that get printed when running home-assistant (and it doesn't find any devices): INFO:homeassistant:Bus:Handling <Event service_registered[L]: service=turn_off, domain=homeassistant>
INFO:homeassistant:Bus:Handling <Event service_registered[L]: service=turn_on, domain=homeassistant>
INFO:homeassistant.bootstrap:Home Assistant core initialized
INFO:homeassistant.loader:Loaded group from homeassistant.components.group
INFO:homeassistant.loader:Loaded recorder from homeassistant.components.recorder
INFO:homeassistant.loader:Loaded zwave from homeassistant.components.zwave
INFO:homeassistant.loader:Loaded frontend from homeassistant.components.frontend
INFO:homeassistant.loader:Loaded api from homeassistant.components.api
INFO:homeassistant.loader:Loaded http from homeassistant.components.http
INFO:homeassistant.loader:Loaded history from homeassistant.components.history
ERROR:homeassistant.loader:Error loading homeassistant.components.discovery. Make sure all dependencies are installed
Traceback (most recent call last):
File "/home/useruser/git_repositories/home-assistant/homeassistant/loader.py", line 116, in get_component
module = importlib.import_module(path)
File "/usr/lib/python3.4/importlib/__init__.py", line 109, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 2231, in _gcd_import
File "<frozen importlib._bootstrap>", line 2214, in _find_and_load
File "<frozen importlib._bootstrap>", line 2203, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 1200, in _load_unlocked
File "<frozen importlib._bootstrap>", line 1129, in _exec
File "<frozen importlib._bootstrap>", line 1448, in exec_module
File "<frozen importlib._bootstrap>", line 321, in _call_with_frames_removed
File "/home/user/git_repositories/home-assistant/homeassistant/components/discovery.py", line 14, in <module>
from homeassistant.external.netdisco.netdisco import DiscoveryService
File "/home/user/git_repositories/home-assistant/homeassistant/external/netdisco/netdisco/__init__.py", line 5, in <module>
from .mdns import MDNS
File "/home/user/git_repositories/home-assistant/homeassistant/external/netdisco/netdisco/mdns.py", line 2, in <module>
import zeroconf
ImportError: No module named 'zeroconf'
ERROR:homeassistant.loader:Unable to find component discovery
INFO:homeassistant:Bus:Handling <Event component_loaded[L]: component=recorder>
ERROR:homeassistant.bootstrap:component zwave failed to initialize
INFO:homeassistant:Bus:Handling <Event component_loaded[L]: component=http>
INFO:homeassistant:Bus:Handling <Event component_loaded[L]: component=api>
INFO:homeassistant:Bus:Handling <Event component_loaded[L]: component=frontend>
INFO:homeassistant:Bus:Handling <Event component_loaded[L]: component=history>
INFO:homeassistant:Starting Home Assistant (7 threads)
INFO:homeassistant:Bus:Handling <Event homeassistant_start[L]>
INFO:homeassistant:Bus:Handling <Event service_registered[L]: service=stop, domain=homeassistant>
INFO:homeassistant:Timer:starting
INFO:homeassistant.components.http:Starting web interface at http://0.0.0.0:8123
INFO:homeassistant.components.recorder:Running query UPDATE recorder_runs SET end=?, closed_incorrect=1
WHERE end IS NULL
INFO:homeassistant.components.recorder:Running query INSERT INTO recorder_runs (start, created) VALUES (?, ?)
INFO:root:Driver ready using library b'Static Controller' version b'Z-Wave 2.78'
INFO:root:home_id 0x01850955, controller node id is 1
Exception ignored in: 'libopenzwave.notif_callback'
Traceback (most recent call last):
File "/usr/local/lib/python3.4/dist-packages/python_openzwave_api-0.2.6-py3.4.egg/openzwave/network.py", line 777, in zwcallback
File "/usr/local/lib/python3.4/dist-packages/python_openzwave_api-0.2.6-py3.4.egg/openzwave/network.py", line 1299, in _handle_value_added
File "/usr/local/lib/python3.4/dist-packages/Louie-1.2a1dev-py3.4.egg/louie/dispatcher.py", line 351, in send
**named
File "/usr/local/lib/python3.4/dist-packages/Louie-1.2a1dev-py3.4.egg/louie/robustapply.py", line 36, in robust_apply
signature, code_object, startIndex = function(signature)
File "/usr/local/lib/python3.4/dist-packages/Louie-1.2a1dev-py3.4.egg/louie/robustapply.py", line 27, in function
'unknown reciever type %s %s' % (receiver, type(receiver)))
ValueError: unknown reciever type <function setup.<locals>.value_added at 0xb633a26c> <class 'function'> The last traceback is repeated 30 more times. To reproduce:
Of course the usb stick is inserted, and there is at least one device added to its zwave network. The stick is being communicated with (e.g. flashes sometimes when home-assistant is run to indicate this). |
Ah yes, the problem with the build scripts is that they expect that I'll fix the scripts later today. |
I was already running setup with python3 -- the error is the same. One other thing to improve with the script is to clone the external repositories to somewhere beneath the home-assistant tree -- currently they get cloned as siblings of the home-assistant directory, which can possibly conflict with other existing directories. |
I have just pushed an update to the scripts so it will create and use a build directory inside the home assistant directory. I am fairly sure that the error you are getting is related to not running my patched version of louie. As that is the exact error why I had to fork louie. I was under the impression that |
Here's a full (stdout) log, after using the --force flag for installing louie and running home-assistant. Are discovered zwave devices supposed to be logged?
|
This looks like a new error: you don't have the dependency zeroconf installed. You can probably get it working now by running Thanks for helping me test this btw ! |
I have rebased the zwave branch on the dev branch. Added the fix that the discovery component does not need zeroconf anymore unless it is being setup. |
I have just merged it into the dev branch to allow more people to have a look at it. |
Controlling and reading z-wave devices via a z-wave USB stick (e.g. the Aeotec Z-Stick Series 2 -- but there are several others which appear to use the same serial-based protocol) would be great -- maybe it would be possible to integrate something like https://code.google.com/p/python-openzwave/ ?
The text was updated successfully, but these errors were encountered: