Hi Chris B,
Great! I found the File and Entry!
Thanks,
AseKarlsson
Hi Chris B,
Great! I found the File and Entry!
Thanks,
AseKarlsson
Hi All,
ConBee2 now moved to /dev/ttyACM10 with all integrations intact, It worked!
Thanks All !!!
Now starts the work on Z-Waveā¦ HA did not find it by itself and could not be find manually either using /dev/ACM11 or /dev/ACM1 when adding Z-Wave JS automation, Still the Synology and Docker seems to be able to map it.
Thanks,
AseKarlsson
Glad you got the zigbee stick working.
Although zwavejs as an integration is in home assistant, the underlying Zwavejs server is not built in to Home Assistant like ZHA or the old OpenZwave are. On a supervised/HassOS install, you have to install the zwavejs addon for it to work.
With a Home Assistant container install, youāll have to install zwavejs2mqtt in its own docker container for zwave.
See this documentation:
https://zwave-js.github.io/zwavejs2mqtt/#/getting-started/quick-start
Hi Tim,
Installed Z-Wave2mqtt in an own docker with High Priviledges.
Z-Wave2mqtt server up and running and can be found by HA.
The strange thing here is that Z-Wave2MQTT cannot find the entries we made earlier (/dev/ttyACM10 and /dev/ttyACM11), it only shows the original (/dev/ttyACM0 and /dev/ttyACM1).
Any ideas?
Thanks,
AseKarlsson
Whatās your docker run
command or how do you map the device to the zwavejs2mqtt container? Also is there any other container currently running that also has the device mapped to it?
Hi,
I created this container using the GUI and let in run in Priviledged Mode.
My 2 USB devices is found at the moment as Conbee2 stick as /dev/ttyACM0 and Z-Wave stick as /dev/ttyACM1.
With the help of Tim and You I was able to associate them permanently to /dev/ttyACM10 and /dev/ttyACM11 as above conversation.
HA sees the Conbee2 stick as /dev/ttyACM10 and works fine,
The question is why Z-Wave2mqtt container doen not see ACM10 and ACM11?
The picture is when trying to map the stick using the Z-wave2mqtt GUI.
//AseKarlsson
Instead of selecting from the dropdown, try to just manually type /dev/ttyACM11 into the control panel settings page and click save.
If that still doesnāt work, youāll probably have to use the device option instead of priviledged mode to map the device into the container.
Thanks Tim,
Tried to manually change to /dev/ttyACM11 and save, no error message but on next refresh of the page it is back to /dev/ttyACM1 again.
The Device option, how can that be used with Synology GUI?
Tried with Enviromental options:
Variable: Device
Value: /dev/ttyACM11
Did not work and also tried to install the docker using:
docker run --rm -it -p 8091:8091 -p 3000:3000 --device=/dev/ttyACM11 --mount source=zwavejs2mqtt,target=/usr/src/app/store zwavejs/zwavejs2mqtt:latest
but here I got error that it could not find the gateway.
//AseKarlsson
I feel like there is some synology specific thing I am missing here. Thereās some ideas on this thread Aeotec Z-wave stick Gen5 on Synology installation . Maybe you need to install an extra driver for the zstick? Iād be interested to hear @squirtbrnr thoughts on this with a successful zstick setup on synology.
It doesnāt appear you can use the synology gui here. The device option canāt be specified as an Environment variable.
Iāve never been able to use the Docker app GUI on Synology when setting up HA with a device. The option does not exist in the GUI. If you have a device such as Zwave or Zigbee stick, you must use the command line to create and run the container. Also, Iāve never been able to get the device working without using the device flag and the privileged flag. An alternative to using the privileged flag is doing a chmod on the device at the host level with 777 so any user can access the device. But this does not survive a reboot of the host or unplug and plug in the device.
As for a specific driver, I know DSM 7 removed a lot of drivers and requires a driver to be loaded to get the Zwave stick to be recognized. I think the zigbee sticks are still automatically recognized. Iām still running the latest DSM 6 and donāt have any issues with loading the Zwave stick. Iām on mobile right now but Iāll post my docker run command later.
If you want a better gui to manage docker, Iād look into installing portainer.
I used portainer for about a week and just decided to learn to use the command line. My next step is learning docker compose because that has more configuration options such as linking containers that are dependent on other containers and then itās a simple command of ādownā and āupā.
You can put a compose file together right in portainer as a stack, and it will let you know if it has any errors as you go along. Portainer will save the contents of the compose files all in one place and make updating the containers pretty easy.
Hereās a good write up about it.
My compose for zwavejs2mqtt is higher in the thread here HA on Synology using Docker with ZHA integration and Conbee2 USB stick - #5 by mwav3 I put the compose right into portainer to manage the whole process.
Hi,
I fixed earlier the removed drivers from DSM 7.
Both sticks are shown fine by Synology as both ttyACM0 and ttyACM1.
The linking ConBee2 ā ttyACM10 and Z-Wave ā ttyACM11 is fine as well and all 4 can be shown by Synology.
HA Container installed using GUI without ādevice switch, but using privileged mode instead.
The Conbee2 stick can be reached from HA as both ttyACM0 or ttyACM1 (depending on what address it got after reboot) but always as ttyACM10 = Great!
Z-Wave2mqtt container (also installed in priviledged mode) can see both ttyACM0 and ttyACM1 and the Z-Wave stick is one of those (depending on what address it got after reboot).
Also tried to install the Z-Wave2mqtt docker using command line specifying ādevice=/dev/ttyACM11 but I get an error that it cannot be reached.
So the big question is why Z-Wave2mqtt cannot see the āaliasesā ttyACM10 and ttyACM11?
Thanks,
AseKarlsson
Here are some thoughts and various ways to test them:
Scenerio 1:
The Home Assistant container running in privileged mode is locking the ttyACM11 port to it, even though it is not using it. If that happens, the port is not available to the zwave2mqtt container and you will get the error it canāt be reached. To test this, try stopping the Home Assistant container when you start zwavejs2mqtt. If it works, youāll have to either figure a way to run Home Assistant not in priviledged mode, or make sure that the zwavejs2mqtt container starts before the Home Assistant container.
Scenario 2:
Other possibility is ttyACM11 is just too high of a port number for zwavejs2mqtt to recognize. Based on this post in github https://github.com/zwave-js/zwavejs2mqtt/issues/216 it appears that the port listings in zwavejs2mqtt might be a static list of device names from whatever linux distribution the container was based on, and you have to use one of those. In that case, you can do a mapping with the device flag like so:
--device /dev/ttyACM11:/dev/ttyACM0
This will make the host ttyACM11 device appear inside the zwavejs2mqtt container as ttyACM0, so in the containerās settings, you pick ttyACM0, which is the zstick mapped from the hostās ttyACM11. This is what I do so can confirm it works (at least on ubuntu). My UDEV rule creates a device on the host called /dev/ttyusb.zstick . That is mapped to /dev/ttyACM0 in my container, and I pick /dev/ttyACM0 from the drop down in the zwavejs2mqtt settings.
This mapping may conflict with privileged mode though, so you many not be able to use privileged mode for the zwavejs2mqtt container.
Hi Tim,
Thanks for your reply, Scenario 1 was quick to test.
The HA container does not lock the ttyACM10 and ttyACM11 for itself, they did not show up in Z-Wave2mqtt even if that was started by itself.
For Scenario 2 i need some more time to test.
Thanks,
AseKarlsson
I do not believe privileged mode is required any more if not connecting the device directly to the container. Though that said, the zwavejs2mqtt container may now need privileged mode.
EDIT: I can confirm privileged mode is no longer required if using a udev rule. I have implemented the symlink from ttyACM10 to ttyACM0 using the Vendor ID and a udev rule file and it works just fine.
I was playing around and I believe you must use one of the mappings listed from the drop down in zwavejs2mqtt to work.
I just tried this mapping /dev/ttyusb.zstick:/dev/ttyS1 and it worked when I selected /dev/ttyS1 in the zwavejs2mqtt settings. Maybe you want to try that mapping so there is no conflict with the ttyACM0 on the host.
So your mapping in this scenario would be:
--device /dev/ttyACM11:/dev/ttyS1
Hi,
I now started HA without priviledged mode and it could not find any of the ttyACM* devices.
Thanks,
AseKarlsson
Hi,
Now when using the command line:
docker run --rm -it -p 8091:8091 -p 3000:3000 --device /dev/ttyACM11:/dev/ttyS1 --mount source=zwavejs2mqtt,target=/usr/src/app/store zwavejs/zwavejs2mqtt:latest
I get the error:
docker: Error response from daemon: error gathering device information while adding custom device ā/dev/ttyACM11ā: no such file or directory.
Ideas?
Thanks,
AseKarlsson