MQTT Auto Discovery on Synology NAS
Posted: Friday 05 August 2022 18:30
Hi,
I'm a bit lost. I think.
I have Domoticz running in Docker on a Synology NAS and MQTT installed as a package. I got it working with this combination, not with MQTT in Docker. But if it works, then it's OK.
There is only 1 thing I wonder. When removing one of the attached peripherals of the NAS (USB) and reattaching them, the Sonoff switches stop working and there are new Sonoff switches discovered with new ID's, all with the same name but double. I can keep doing this and every time new devices are discovered with new ID's.
Ofcourse I would like to stop this, but how?
Not sure if I have the setup correct, but I installed both MQTT hardware 'devices' I found (nothing else for MQTT) and this is the setup:
MQTT Client Gateway with LAN interface:
Remote Address: IP NAS
Port: 1883
Username: empty
Password: empty
Prevent Loop: True
Publish Topic: Flat
Topic in Prefix: domoticz/in
Topic Out Prefix: domoticz/out
CA Filename: empty
TLS Version: tlsv1.2
MQTT Auto Discovery Client Gateway with LAN interface
Remote Address: IP NAS
Port: 1883
Username: empty
Password: empty
Auto Discovery Prefix: homeassistant
CA Filename: empty
TLS Version: tlsv1.2
The Sonoff's have the following settings for MQTT:
Host: IP NAS
Port: 1883
Client: DVES_%06X
User: empty
Password: empty
Topic: sonofxx (I use different numbers for each Sonoff)
Full Topic: %topic%/%prefix%/
When I enter SetOption19 1 in the Sonoff console (one by one), the new devices are discovered when deleting all switches from Domoticz first.
I'm a bit lost. I think.
I have Domoticz running in Docker on a Synology NAS and MQTT installed as a package. I got it working with this combination, not with MQTT in Docker. But if it works, then it's OK.
There is only 1 thing I wonder. When removing one of the attached peripherals of the NAS (USB) and reattaching them, the Sonoff switches stop working and there are new Sonoff switches discovered with new ID's, all with the same name but double. I can keep doing this and every time new devices are discovered with new ID's.
Ofcourse I would like to stop this, but how?
Not sure if I have the setup correct, but I installed both MQTT hardware 'devices' I found (nothing else for MQTT) and this is the setup:
MQTT Client Gateway with LAN interface:
Remote Address: IP NAS
Port: 1883
Username: empty
Password: empty
Prevent Loop: True
Publish Topic: Flat
Topic in Prefix: domoticz/in
Topic Out Prefix: domoticz/out
CA Filename: empty
TLS Version: tlsv1.2
MQTT Auto Discovery Client Gateway with LAN interface
Remote Address: IP NAS
Port: 1883
Username: empty
Password: empty
Auto Discovery Prefix: homeassistant
CA Filename: empty
TLS Version: tlsv1.2
The Sonoff's have the following settings for MQTT:
Host: IP NAS
Port: 1883
Client: DVES_%06X
User: empty
Password: empty
Topic: sonofxx (I use different numbers for each Sonoff)
Full Topic: %topic%/%prefix%/
When I enter SetOption19 1 in the Sonoff console (one by one), the new devices are discovered when deleting all switches from Domoticz first.