I have a few zwave devices on my main domoticz system that i want also to be available on a slave domoticz system. They need to be controlled and status readable on both instances. Before I migrated to ZwaveJS2MQTT I used OWZ with a master-slave setup. I migrated to ZwaveJS2MQTT with MQTT Autodiscovery and I am ver happy with it, except that I cannot use the master-slave setup anymore due to a long known bug with python devices in a master/slave setup.
One of the developers told me to also use MQTT Autodiscovery also on my slave device, this seems a perfectly fine solution except that I do not want 500+ extra devices on my slave system. I only want 10 of them and do not want to 'pollute' my slave with those extra disabled devices. So my question is: "Can I selectively auto-import devices with MQTT Autodiscovery". I can imagine that this can be done with mosquitto users and access rights on certain topics. Has someone done this before or better, is there a howto to do this?
If this is not possible, can I manually create only the devices that I want?
If this is also a problem, what's the best way to create a '2-way-binding' between 2 domoticz devices on different instances of domoticz.
Selective autodiscovery
Moderator: leecollings
-
- Posts: 30
- Joined: Sunday 18 August 2019 11:38
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Netherlands
- Contact:
Re: Selective autodiscovery
Just answering myself, it could be of any help for others.
I solved the problem by using Mosquitto ACL-file. I enabled both anonymous access and the password file. For the systems that I want not to include all devices I use a username/password combination. In the ACL-file I only allow the discovery topics that I want to be available on this particular client. Example of this file is below.
I solved the problem by using Mosquitto ACL-file. I enabled both anonymous access and the password file. For the systems that I want not to include all devices I use a username/password combination. In the ACL-file I only allow the discovery topics that I want to be available on this particular client. Example of this file is below.
Code: Select all
#All users with no username
topic readwrite $SYS/#
topic readwrite #
#domoticz-vijver user
user domoticz-vijver
topic readwrite $SYS/#
topic readwrite domoticz/in/#
topic readwrite domoticz/out/#
topic readwrite zwave/#
topic readwrite domoticz/switch/Lucht_Bodemdrain_1/#
topic readwrite domoticz/switch/Lucht_Bodemdrain_2/#
topic readwrite domoticz/switch/Warmtepomp_Vijver/#
topic readwrite domoticz/switch/Vorstbeveiliging_Vijver/#
topic readwrite domoticz/switch/Pomp_Tricklefilter/#
topic readwrite domoticz/switch/Lucht_Bewegend_Bed/#
topic readwrite domoticz/switch/Vijver_Circulatiepomp_1/#
topic readwrite domoticz/switch/Vijver_Circulatiepomp_2/#
topic readwrite domoticz/switch/Vijverfilter_Totaal/#
topic readwrite domoticz/switch/UVC_Lamp/#
topic readwrite domoticz/sensor/Lucht_Bodemdrain_1/#
topic readwrite domoticz/sensor/Lucht_Bodemdrain_2/#
topic readwrite domoticz/sensor/Warmtepomp_Vijver/#
topic readwrite domoticz/sensor/Vorstbeveiliging_Vijver/#
topic readwrite domoticz/sensor/Pomp_Tricklefilter/#
topic readwrite domoticz/sensor/Lucht_Bewegend_Bed/#
topic readwrite domoticz/sensor/Vijver_Circulatiepomp_1/#
topic readwrite domoticz/sensor/Vijver_Circulatiepomp_2/#
topic readwrite domoticz/sensor/Vijverfilter_Totaal/#
topic readwrite domoticz/sensor/UVC_Lamp/#
#domoticz-home user
user domoticz-home
topic readwrite $SYS/#
topic readwrite domoticz/in/#
topic readwrite domoticz/out/#
topic readwrite zwave/#
topic readwrite domoticz/cover/Roldeur_Garage/#
topic readwrite domoticz/binary_sensor/Roldeur_Garage/#
topic readwrite domoticz/sensor/Roldeur_Garage/#
topic readwrite domoticz/switch/Roldeur_Garage/#
Who is online
Users browsing this forum: No registered users and 0 guests