Skip to content
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

Native JS implementation #19

Open
mishoboss opened this issue Apr 4, 2018 · 6 comments
Open

Native JS implementation #19

mishoboss opened this issue Apr 4, 2018 · 6 comments

Comments

@mishoboss
Copy link

Have you ever considered to use IOPA-ZWAVE instead of OpenZWave? I know OpenZWave is a mature thing, but installing it on different platforms is a huge pain. A JS only solution would be the perfect scenario. The Z-Wave spec is now open and IOPA-ZWAVE seems to implement it. But I've never tested it. Do you?

@mishoboss
Copy link
Author

P.S. This project deserves watching too: https://github.com/AlCalzone/node-zwave-js

@dhylands
Copy link
Contributor

dhylands commented Apr 4, 2018

I haven't played with either of the JS ones. I had used OpenZWave on a previous project so had some familiarity with it.

I think that its definitely worth looking at.

@mishoboss
Copy link
Author

Great. Crossing fingers those nasty binaries can go away. :)

@Swaagie
Copy link

Swaagie commented Jul 26, 2018

This is from the current arm docker image. Going to investigate, but the default experience on rb3 seems to be a dead adapter.

2018-07-26 11:49:37.502 zwave: Loading add-on for zwave-adapter from /home/node/.mozilla-iot/addons/zwave-adapter
2018-07-26 11:49:38.274 zwave: Failed to load zwave-adapter - Failed to load openzwave-shared: Error: libopenzwave.so.1.4: cannot open shared object file: No such file or directory
2018-07-26 11:49:38.300 Plugin: zwave-adapter died, code = 100 NOT restarting...

edit: just found WebThingsIO/gateway-docker#8 which explains above ^.

@Swaagie
Copy link

Swaagie commented Jul 26, 2018

After fixing above issue with a temporary symlink in the arm docker container, it now dies with

2018-07-26 12:26:11.209 Loading add-on: zwave-adapter
2018-07-26 12:26:12.647 zwave: Opening database: /home/node/.mozilla-iot/config/db.sqlite3
2018-07-26 12:26:12.710 Killing zwave-adapter plugin.
2018-07-26 12:26:12.725 Plugin: zwave-adapter died, code = null restarting...
2018-07-26 12:26:13.881 zwave: Opening database: /home/node/.mozilla-iot/config/db.sqlite3
2018-07-26 12:26:13.966 zwave: Loading add-on for zwave-adapter from /home/node/.mozilla-iot/addons/zwave-adapter
2018-07-26 12:26:14.865 zwave: Failed to load zwave-adapter - Unable to find ZWave adapter
2018-07-26 12:26:14.887 Plugin: zwave-adapter died, code = 100 NOT restarting...

@dhylands
Copy link
Contributor

That means that the zwave adapter is unable to find the dongle. It looks for the dongle by enumerating the serial ports using the .list function from the serialport module. Internally, the serialport module uses udev to determine which USB serial ports exist. Presumably you'd need a way to get docker to know what serial ports it can access from inside the container. I'm not familiar enough with docker to know how or if this is possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants