Comments (12)
@mrstegeman who is most familiar with the docker stuff just went on leave for a few weeks. Where did you install the docker container from?
There is a wiki page which describes how to install the openzwave libraries:
https://github.com/mozilla-iot/wiki/wiki/Installing-OpenZWave
from gateway-docker.
The image should have libopenzwave
installed, but it may be incompatible with the Z-Wave adapter.
See: https://github.com/mozilla-iot/gateway-docker/blob/master/Dockerfile#L17
That may need to be replaced with the the steps @dhylands posted above.
from gateway-docker.
It's interesting that its complaining specifically about libopenzwave.so-1.4 which ,means that it found a symlink for libopenzwave.so and that symlink is supposed to point to a libopenzwave.so.X.Y. The Dockerfile references 1.5 so maybe there's just a stale symlink someplace?
from gateway-docker.
I am using an Aeon Labs Z-Stick (model id 0200, older generation?). I can see its model and vendor ID match up to the first entry in the adapters list, and I can connect it just fine using a home grown home automation experiment.
The docker image came down from the docker hub: mozillaiot/gateway:arm
. Note particularly this is the arm build, running on a raspberry pi.
Can you point me to the Dockerfile for this? I am generally unfamiliar with how to target other platforms with docker, but I assume there's another Dockerfile with a basis on the arm version of the node container.
I was able to fix this particular issue by following the 'Installing OpenZWave' steps inside a shell in the container. Once the installation completed, disabling / enabling the adapter plugin showed that it successfully loaded the openzwave lib and the OZW_ log appeared.
Despite that success, I immediately hit two others: udev not installed (no udevadm for serial discoverability), and post-install udev not picking up my device attached with the docker run --device
option. The first is probably a real issue; I didn't get around to tracking down the second. I will make other issues for those once this one gets resolved, so I am working from a consistent / supported base.
from gateway-docker.
@RoboPhred Yeah, I knew there were going to be additional steps to take if adapters with hardware devices were used, but I never had the time to actually work through those.
I would welcome patches if you manage to get it working, but I won't be able to look at it myself for several weeks. Alternatively, you could run natively on the RPi. You don't have to use our prebuilt image, you can build and run the gateway yourself.
from gateway-docker.
Thanks for the support, I should be able to keep working on this and submit a patch.
from gateway-docker.
On openzwave not found
I cant seem to find any references to the 1.4 version of openzwave anywhere, so I am not sure where its getting the info from.
find / -name libopenzwave*
results in:
/usr/lib/arm-linux-gnueabihf/libopenzwave.so.1.5
/usr/lib/arm-linux-gnueabihf/libopenzwave.so
The libopenzwave.so symlinks correctly:
ls -la /usr/lib/arm-linux-gnueabihf/libopenzwave.so
lrwxrwxrwx 1 root root 19 Dec 23 2016 /usr/lib/arm-linux-gnueabihf/libopenzwave.so -> libopenzwave.so.1.5
This should be being used, as that path is known to ldconfig:
ldconfig -v 2>/dev/null | grep -v ^$'\t'
/lib/arm-linux-gnueabihf:
/usr/lib/arm-linux-gnueabihf:
/usr/local/lib:
/lib:
/usr/lib:
At this point, I am up against the edge of my knowledge. I have no idea why it cannot find the installed version. I could produce a patch that instructs the dockerfile to download and install openzwave from the git repo, but that would just be working around the problem.
Can you suggest any further action I could take to investigate this?
On device not found after manual install
It looks like zwave-adapter throws out its error messages. After hacking in a console.log and updating the SHA256SUMS file appropriately, I can see that it indeed chokes over the lack of udev:
Error scanning port: spawn udevadm ENOENT
Even after installing udev, it sees but fails to identify the device as a usb device. I exposed the device to the container with the --device flag, but what got connected seems to be a device without the right usb properties associated with it. This could be a configuration error with udev?
P: /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.5/1-1.5:1.0/tty/ttyACM0
N: ttyACM0
E: DEVNAME=/dev/ttyACM0
E: DEVPATH=/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.5/1-1.5:1.0/tty/ttyACM0
E: MAJOR=166
E: MINOR=0
E: SUBSYSTEM=tty
** On device permissions **
After finally hard coding in the path, it still failed with error 13, which appears to be permission denied. The host machine groups the symlink as dialout (gid 20). I tried adding that id to the node user in the container but without effect.
I finally got it to connect by the nuclear option: chown uga+rwx /dev/ttyACM0
from gateway-docker.
The reference is probably coming from openzwave_shared.node.
That file should be located in ~/.mozilla-iot/addons/zwave-adapter/node_modules/openzwave-shared/build/Release
On my linux build machine if I run ldd I see the following:
511 >ldd openzwave_shared.node
linux-vdso.so.1 (0x00007ffef6146000)
libopenzwave.so.1.4 => /usr/local/lib/libopenzwave.so.1.4 (0x00007f5e82136000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f5e81da8000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f5e81a0a000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f5e817eb000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f5e813fa000)
libudev.so.1 => /lib/x86_64-linux-gnu/libudev.so.1 (0x00007f5e811dc000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f5e80fc4000)
/lib64/ld-linux-x86-64.so.2 (0x00007f5e8267f000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f5e80dbc000)
That tells me that openzwave_shared.node is referencing libopenzwave.so.1.4.
You might be able to create a symlink for libopenzwave.so.1.4 that points to libopenzwave.so.1.5 as a temporary workaround.
from gateway-docker.
@RoboPhred Everything you need should now be in the container. I'm able to at least start up the Z-Wave, Zigbee, and Serial add-ons, all of which require udev. You'll probably have to share in the device node from /dev
and potentially run your container as --privileged
. If you get things working, let me know and we can update the README.
from gateway-docker.
Hello
Any update? I still have the issue.
2018-10-17 21:02:51.115 zwave: Loading add-on for zwave-adapter from /home/node/.mozilla-iot/addons/zwave-adapter
2018-10-17 21:02:51.656 zwave: Failed to load zwave-adapter - Unable to find ZWave adapter
2018-10-17 21:02:52.079 Plugin: zwave-adapter died, code = 100 NOT restarting...
My docker compose is
mozilla-iot:
image: mozillaiot/gateway:arm
network_mode: "host"
privileged: true
devices:
- "/dev/ttyACM0:/dev/ttyACM0"
- "/dev/ttyAMA0:/dev/ttyAMA0"
volumes:
- ./data/mozilla-data:/home/node/.mozilla-iot
# find / -name libopenzwave*
/usr/local/lib/arm-linux-gnueabihf/pkgconfig/libopenzwave.pc
/usr/local/lib/libopenzwave.so.1.4
/usr/local/lib/libopenzwave.so
# ldd openzwave_shared.node
linux-vdso.so.1 (0x7ee26000)
libopenzwave.so.1.4 => /usr/local/lib/libopenzwave.so.1.4 (0x76dee000)
libstdc++.so.6 => /usr/lib/arm-linux-gnueabihf/libstdc++.so.6 (0x76ce2000)
libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0x76c6a000)
libgcc_s.so.1 => /lib/arm-linux-gnueabihf/libgcc_s.so.1 (0x76c41000)
libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0x76c1d000)
libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0x76b2f000)
libudev.so.1 => /lib/arm-linux-gnueabihf/libudev.so.1 (0x76b18000)
/lib/ld-linux-armhf.so.3 (0x76ee7000)
librt.so.1 => /lib/arm-linux-gnueabihf/librt.so.1 (0x76b02000)
from gateway-docker.
Failed to load zwave-adapter - Unable to find ZWave adapter
That indicates to me that the adapter is not seeing the tty device. @dhylands would be of more use than me on this. I would guess that either those are not the correct device nodes, or that the permissions are off.
from gateway-docker.
That particular error means that the serial port enumeration failed (as opposed to the error "No ZWave port found" which means that the enumeration worked, but it just didn't find any zwave devices.
In the gateway/tools directory is a file called list_ports.js.
If you cd into the zwave-adapter directory (~/.mozilla-iot/addons/zwave-adapter) and copy the gateway/tools/list_ports.js file into the zwave-adapter directory and then run it. That uses the same code as the zwave-adapter and may give a better error message,
from gateway-docker.
Related Issues (20)
- ZigBee USB Device HOT 10
- Raspberry Pi reboots when trying to pull the image HOT 5
- CODE_OF_CONDUCT.md file missing
- Permission errors with volumes created by `docker volume` HOT 1
- LICENSE file is missing
- [Feature Request] Automated build and push for dockerfiles to dockerhub HOT 2
- Auto-discovery webthing-arduino project fail. HOT 15
- WebPack produces 100% CPU utilization on RPi2 on container start HOT 1
- Failed to generate certificate HOT 1
- Great! I'm rebuilding the Docker images and will push to Docker Hub shortly. HOT 1
- Avahi - daemon already running HOT 8
- Use docker-compose and a well-known Avahi image HOT 1
- Synology Gui walkthrough HOT 1
- Clarification of Readme
- GPIO Pins HOT 2
- Consider adding support to ARMv6 boards HOT 4
- Changing the Moz://a dashboard interface. HOT 2
- Cannot run arduino CLI in container on Pi 4b HOT 3
- How to configure proxy for adding ZigBee add-on ? HOT 1
- Developing addon requires container restart on every code change HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gateway-docker.