Page 1 of 1

Remote server and zigbee2mqtt

Posted: Tuesday 05 January 2021 19:00
by Alain
Besides my Master Domoticz instance (which I run in a Ubuntu virtual machine on a Windows 10 PC), I also have two remote servers. On one server I have an RFXCOM and all the devices are synchronized to the master without any issues. On the other server I run zigbee2mqtt to connect a few Xiaomi temperature sensors. On this remote server the devices are listed and the values update periodically. The Zigbee devices, however, don't synchronize to the Master Domoticz.

I thought I had something wrong with the Master-Slave settings, but if I add motherboard sensors or a Thermosmart thermostat I have running to the server, it synchronizes them immediately with the Master. What could be wrong?

Re: Remote server and zigbee2mqtt

Posted: Tuesday 05 January 2021 21:26
by FireWizard
Hi @Alain,

Unfortunately this is a known issue.

See also the last post: viewtopic.php?f=65&t=18154&p=264339&hil ... ve#p264339
It's a known issue. Domoticz feature for synchronization (Domoticz remote server) doesn't work for devices created and updated by a plugin. As you, I've installed this plugin on my backup server.
As you probably use the Domoticz plugin for Zigbee2MQTT on your slave, it will not be published to the Master.

I suggest that, as all data is published to MQTT, that you subscribe to that data in Node Red, convert it and publish it again with MQTT to Domoticz.

I´m happy to give support, if you need it.

Regards

Re: Remote server and zigbee2mqtt

Posted: Tuesday 05 January 2021 21:42
by Alain
Thanks for your reply. On reading into the topic further, I also came to the conclusion that via Node-Red would be the best option. I am trying to get that working now. I have had a few flows running on my Master for a number of months now and have just installed Node-Red on the slave. I'm trying to figure out how to combine the two.

Can I use zigbee2mqtt as the topic?

Re: Remote server and zigbee2mqtt

Posted: Tuesday 05 January 2021 21:58
by FireWizard
Hi, @Alain,

Actually it is not important, whether you have Node Red installed on the Master or on the Slave.
You subscribe to the topic(s) on your MQTT server, which you have already running, as you use Zigbee2MQTT.
Which topic to subscribe? I would say: Install MQTT Explorer on a laptop/desktop (http://mqtt-explorer.com/) and have a look what the topics are.

Regards

Re: Remote server and zigbee2mqtt

Posted: Tuesday 05 January 2021 22:05
by Alain
Will do FireWizard. Thanks.

Re: Remote server and zigbee2mqtt

Posted: Tuesday 05 January 2021 22:20
by Alain
I have an MQTT broker on the master and a different one on the slave. They are not connected. I installed mqtt explorer on both computers and can only see the local host on each. If I fill in the IP-Address of the other computer I get a disconnected error.

Re: Remote server and zigbee2mqtt

Posted: Tuesday 05 January 2021 23:19
by FireWizard
Hi @Alain,

Have a look at: viewtopic.php?f=56&t=35062&p=265210&hilit=MQTT#p265210

You have to solve this issue first, so that you can contact both MQTT servers from both Master and Slave,

Regards

Re: Remote server and zigbee2mqtt

Posted: Thursday 07 January 2021 4:40
by Alain
Thanks FireWizard. I tried adding the lines to the config file but that didn't work. I found an article by some guy called Steve. He added different code to the config file, but I still can't get it to work. I'll keep messing with it and post up if I get it going.

Re: Remote server and zigbee2mqtt

Posted: Thursday 07 January 2021 6:01
by Alain
I'm running the master in a VM so I had to open port 1883 for them to connect. I also added this to mosquitto.conf on the master and the slave:

Code: Select all

# include_dir /etc/mosquitto/conf.d

allow_anonymous true
listener 1883