-
-
Notifications
You must be signed in to change notification settings - Fork 288
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
Update OZW to 1.6 and use the same version in all context #675
Update OZW to 1.6 and use the same version in all context #675
Conversation
Codecov Report
@@ Coverage Diff @@
## master #675 +/- ##
=========================================
Coverage ? 92.05%
=========================================
Files ? 411
Lines ? 5145
Branches ? 0
=========================================
Hits ? 4736
Misses ? 409
Partials ? 0
Continue to review full report at Codecov.
|
With these limited changes:
All tests are green. BUT it doesn't necessary means everything is working. It simply means that all interfaces with the lib' are okay. If anything has changed inside OZW, it will not appear in the current tests. That being said, the OZW v. 1.6.974 is 3 months old. As you can see, I have to manually checkout and compile the lib'. 3 months is a lot. Many fixes have been made on the lib' since then. I would like to use a newer version by using, let's say one of the latest commit ID. And doing this in the Docker container used for tests AND in the Dockerfile used for generated images (so removing the As soon as possible, I will try to connect my ZWave key and see if things are working with a real device and real events (but I have a very limited set of devices to test "everything"). If you want to check on your side with your devices if everything is working, that would be great! Thanks, |
Hi @sescandell ! Thanks for this great PR ! :)
I'm ok with using a newer version, but we really need to lock the version used in the Dockerfile, because we don't want to have unwanted side effects when building at a random time if one OZW guy pushed some buggy code on master at the same time (it happens a lot with OZW). Do you know how they work? They don't seem to use tags frequently on their repo... I don't understand how they version/release their lib |
Totally agree with this!
Unfortunately, I don't. I'm not even sure they have any rule. They have a milestone for the 1.7 version, but nothing very clear about patches or fixes for a given version. Looking at Alpine distribution, I think they just compile "one version" at the time of updating... Let's try with the latest one. Then we would have to follow the OZW repo to update it "when we think it deserve it". Update of the PR coming. |
PR updated. Forced on a given commit. Dockerfile and CircleCI updated. I just don't have any idea how you generate the RPI image and if I should change anything for it. I didn't yet tested this on a real zWave Controller. I should be able to do it in the coming days. If you have any chance to test it, let me know. |
I've made some very simple tests: the zWave doesn't initialize as expected. I'll dive into the changes of the NPM lib in the coming days, Still not ready to merge for now. |
Hey ! I saw you pushed more things, is it ready for review? :) Thanks for your great work ! |
Hi @Pierre-Gilles , I tested yesterday to run Gladys with OZW on a MacOSX and it worked (well... actually the communication with the OZW library worked... I had other issues but I think they are not tied to the update). I'm now going to test the same thing in Docker and let you know. By the way, @Pierre-Gilles could you please precise your environment? What's your OS? How do you develop Gladys? Which tools? How do you test ZWave integration? How do you debug? What's your IDE? Thanks, |
Well, actually I have issues to test the Docker environment as you cannot mount an USB device into the Docker container. Do not hesitate if you have any question, |
I don't understand why you cannot mount an USB device into Docker, have you tried to use the volume section to mount the device directly? |
Without your Docker run command, it's hard to help.
|
I already tried the following, but none of them is working: docker run -d \
--restart=always \
--privileged=true \
--name gladys \
-e NODE_ENV=production \
-e SERVER_PORT=80 \
-e TZ=Europe/Paris \
-e SQLITE_FILE_PATH=/var/lib/gladysassistant/gladys-production.db \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /Users/Shared/Gladys:/var/lib/gladysassistant \
--device=/dev/tty.usbmodem14201 \
-p 8080:80 \
gladystest docker run -d \
--restart=always \
--privileged=true \
--name gladys \
-e NODE_ENV=production \
-e SERVER_PORT=80 \
-e TZ=Europe/Paris \
-e SQLITE_FILE_PATH=/var/lib/gladysassistant/gladys-production.db \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /Users/Shared/Gladys:/var/lib/gladysassistant \
-v /dev:/dev \
-p 8080:80 \
gladystest Are you working with OSX (10.15.4) on your side too? |
Windows and Linux most of the time Access USB stick on Mac is a bit tricky, I saw this article https://christopherjmcclellan.wordpress.com/2019/04/21/using-usb-with-docker-for-mac/ |
Actually, it seems this is not supported by Docker on Mac OSX at all... See docker/for-mac#900 Otherwise, I need to falback on the boot2docker and VM customization... Going back to Windows / Linux |
Should I understand USB share in Docker is supported on Windows host? |
Sorry I don't know, I'm not using USB share on Windows. |
I've made some additional tests on my Mac with a zWave controller playing with a binary device: and it works pretty well. Appart from this, I have a Walli Dimmer Fibaro device, and Dimmer are not working at all. But I will propose a fix into another PR, this is not the aim of that one. |
@Pierre-Gilles not sure if you followed everything here, but it is ready to merge |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this PR ! :)
This is really nice and it'll help many people. Congrats 👏
I noted some minor changes to your PR, can you have a look?
front/src/components/boxs/device-in-room/device-features/BinaryDeviceFeature.jsx
Outdated
Show resolved
Hide resolved
@Pierre-Gilles all fixed |
Many thanks for the PR!! :) Except my last question, I'm good to go! |
@VonOx How can we merge both your changes on Docker + this PR ? Is your PR compatible with that ? |
@Pierre-Gilles I think so PR #643 , the only modification on Dockerfile is base image ( node-lts from node-12 ) PR #793 use independent Dockerfile ( buildx ) , i will implement OZW part as @sescandell did before you merge. |
* Create Dockerfile.buildx * Create pr-docker-image.yml * Move yaml in the correct folder * OZW 1.6 use the same version in all context Based on #675 Co-authored-by: Pierre-Gilles Leymarie <pierregilles.leymarie@gmail.com>
* Force alpine version to force OZW version * Install OZW 1.6 in CircleCI & use 1.6.2 OZW Node * Force library update * Install latest OZW version (but fixed on a given commit) * Fix already pushed in a previous PR... Error in commit 5242a1a ? * Reorder Docker commands for local dev' * Revert change not for this PR * Fix Dockerfile * Revert forcing alpine version as now OZW is manually compiled Co-authored-by: Pierre-Gilles Leymarie <pierregilles.leymarie@gmail.com>
* Create Dockerfile.buildx * Create pr-docker-image.yml * Move yaml in the correct folder * OZW 1.6 use the same version in all context Based on GladysAssistant#675 Co-authored-by: Pierre-Gilles Leymarie <pierregilles.leymarie@gmail.com>
* Force alpine version to force OZW version * Install OZW 1.6 in CircleCI & use 1.6.2 OZW Node * Force library update * Install latest OZW version (but fixed on a given commit) * Fix already pushed in a previous PR... Error in commit 5242a1a ? * Reorder Docker commands for local dev' * Revert change not for this PR * Fix Dockerfile * Revert forcing alpine version as now OZW is manually compiled Co-authored-by: Pierre-Gilles Leymarie <pierregilles.leymarie@gmail.com>
* Create Dockerfile.buildx * Create pr-docker-image.yml * Move yaml in the correct folder * OZW 1.6 use the same version in all context Based on GladysAssistant#675 Co-authored-by: Pierre-Gilles Leymarie <pierregilles.leymarie@gmail.com>
Pull Request check-list
To ensure your Pull Request can be accepted as fast as possible, make sure to review and check all of these items:
npm test
on both front/server)npm run eslint
on both front/server)npm run prettier
on both front/server)front/src/config/demo.json
) so that the demo website is working without a backend? (if needed) See https://demo.gladysassistant.com.NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open.
Description of change
As explained in #614 (comment) image used in Docker reference OZW 1.6.
Let's try to make CircleCI in sync with the "production" environment and use node-openzwave-share version 1.6 (to stay sync regarding the OZW version).