Here is my 2 setup of HA and integration with MySensor, Setup 1 works fine but Setup 2 does not. I believe it is do with how the HA Supervised is loading up the Serial Gateway. Any idea how to load the symlinks properly in HA Supervised?
Setup 1:
- Hardware: RPI 4, NRF 24
- HA Core installed via docker, MySensor Serial Gateway installation on RPI 4
The serial gateway /dev/ttyUSB1 created by MySensor is successfully. Note that this serial gateway is a created as a symlink
All the Mysensor clients (Pro mini with temp, IR , etc) work fine and are successfully created as entity in HA
docker-compose: I had to provide volume for dev so that both the /dev/ and the /dev/pts are loaded on the containerlrwxrwxrwx 1 root root 10 Jan 1 12:17 /dev/ttyUSB1 -> /dev/pts/0
HA configvolumes: - /home/pi/homeassistant/config:/config - /dev:/dev devices: - /dev/ttyUSB1:/dev/ttyUSB1
mysensors: gateways: - device: '/dev/ttyUSB1' version: 2.3
Setup 2:
- Hardware: RPI 4, NRF 24
-
HA Supervised, MySensor Serial Gateway installation on RPI 4
The serial gateway /dev/ttyUSB1 created by MySensor is not loaded in HA container. Note that this serial gateway is a created as a symlink. But this serial gateway is not loaded in the HA container.
HA logs indicates expected error - No Gateway devices found
Troubleshooting steps done:
- Created a Mysensor service mysgw.service and ensured that it is started before the docker service. Since the synlinks are created when the service starts, I believe this was required so that when the HA supervised docker starts and maps the volume, it would pick this serial gateway symlink
- In the HA container I can see that there are /dev and /dev/pts are loaded, but just the /dev/ttyUSB1 is not loaded
- The MySensor itself works fine, since I can see in the logs that it is responding to all the sensor clients (Sensors are pro mini with temp, IR, etc). But no entities are created as the serial gateway is not recognized
So I guess it comes down to the fact that HA Supervised is not able to load the Symlink in /dev/tty. Any idea how to tinker around in the HA container managed by HA Supervised?*