Cannot install Zigbee2MQTT because of required device path
I have a network/ethernet zigbee device, which Zigbee2MQTT will detect and let you add on the onboarding screen after installation.
I do not have or need a USB zigbee device, but because the device path field is marked as required by Runtipi, I cannot install Zigbee2MQTT.
Steps to reproduce:
1. Go to App Store
2. Attempt to install Zigbee2MQTT
3. Leave device path blank because you don't have a local device to pass through
4. Can't install because it's required
5. Attempt putting dummy information in the required device path field
6. Install fails because it can't get information for the device that doesn't exist
The device path should not be a required field. Zigbee2MQTT can be used without a directly connected Zigbee device.
Is there a way I can get around this requirement?

14 Replies
Hello @Zeagar,
Thanks for reporting
About the required field:
I'm not sure we can remove it because the docker compose has been configured to use a a device anyway, leaving this field blank would result in the same error.
To address your situation :
I'll suggest to use
/dev/null
Let me know if you can make your config work with this (I'll update the readme accordingly)Okay, I will try that a little later today and report back.
Thank you
@Skullky
The install still fails using /dev/null
The only error I see in the log when it failed:
error > Failed to install app zigbee2mqtt:migrated: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error creating device nodes: mount src=/dev/ttyACM0, dst=/var/lib/docker/overlay2/0d571cff51f40bdb7920b5dad98c1db92a67e95188628c00f7ecc43c8228c15a/merged/dev/ttyACM0, dstFd=/proc/thread-self/fd/8, flags=0x1000: no such file or directory: unknown
There might be an issue with the app config itself, hard coding the mount
This error is certainly due to the environment from where you execute Runtipi, an unprivileged LXC for example.
I didn't thought of that.
I will try to find another solution.
I've had no time for the homelab this week so haven't looked at this any further.
It is indeed an LXC. I can try as privileged and see if it works as expected, though unprivileged is preferred if there a way to make that work.
Will probably be a few more days before I have any time to test.
No problem, I was able to run some tests on my side.
I can confirm, making it privileged would fix the issue.
But as you said, it's better to keep it unprivileged and I am not comfortable to ask this just for a workaround (which shouldn't be necessary).
I tried a few things but no result for now. I'll keep trying.
Could the
override
option be extended to handle such use case ?Can we not fix directly in the config itself?
Not sure I understand the issue completely
Since most users rely on a usb adapter for Zigbee we ask on the install form and map the device by default :
"devices": ["${Z2M_DEVICE}:/dev/ttyACM0"]
But, if you rely on a network Zigbee coordinator, you don't need this.
You could bypass this with a "fake device" like /dev/null
or /dev/zero
.
But with an unprivileged LXC, you cannot map any device at all. (as far as I know)
We could just remove the device mapping and ask to use a user-config but this would affect already installed instance.
Maybe I make it more complex than it needs to be, and we should just do that ?
Average z2m user should be able to figure this out.Maybe just adding a
user-config
to remove this volume should do itIt's a device, not a volume
Remove the device
User config:
Try this @Zeagar
Oh, I didn't knew this was possible 😅
It's a docker well kept secret haha
That user config worked (mostly) great. I now have zigbee2mqtt running as desired, in Runtipi, in an unprivileged LXC.
Only oddity (the reason I said "mostly" great) is it failed to auto-detect my network coordinator on the onboarding screen after install.
Screenshot is from when I was testing z2m as a standalone lxc instead of running it in docker/runtipi. The network coordinator should be detected and shown in the list, so that when it's selected it auto-fills in the settings needed for it.
Watched a guide setting up z2m with this same coordinator in docker and it auto-detected for them, so it's not just a difference in the docker version. Going to assume another side-effect of the unprivileged lxc?
Still though, manually filled in the settings for the coordinator and it's working great.
Thanks a ton for the help, maybe add that user config to the readme for others?
