hassio-zigbee2mqtt icon indicating copy to clipboard operation
hassio-zigbee2mqtt copied to clipboard

Use bashio::services for the connection even when base_topic is specified in the config

Open gdgib opened this issue 1 year ago • 1 comments

NB: MARKED AS DRAFT BECAUSE THIS IS NOT TESTED. I'm opening the PR to see what people think of the idea in the meantime.

When overriding the base_topic you end up having to configure the server too, which is a bit annoying. This comes up when running multiple instances of z2m in hassio. The change here makes it so that you can specify mqtt config keys and still use the bashio services to get server access. Unless you specify mqtt.server, mqtt.user or mqtt.password.

gdgib avatar Jun 15 '24 15:06 gdgib

Looks good!

Koenkk avatar Jun 15 '24 17:06 Koenkk

This pull request is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

github-actions[bot] avatar Jul 16 '24 00:07 github-actions[bot]

I'll finish testing in the next 7 days. I got a bit sidetracked getting my actual zigbee network stabilized.

gdgib avatar Jul 16 '24 16:07 gdgib

Almost done....

gdgib avatar Jul 23 '24 18:07 gdgib

Okay, after an unusually silly round of trying to make 100% this works, I can say it does. Enjoy, and thank you for the patience.

For anyone wondering I made this so that https://github.com/gdgib/hassio-zigbee2mqtt-multi will work cleanly without configuration hacks. I didn't want to use the edge distro for my second coordinator.

gdgib avatar Aug 01 '24 02:08 gdgib

Thanks!

Koenkk avatar Aug 01 '24 19:08 Koenkk