New Setup Feature for MQTT Autodiscover in 2023.1 Beta
Moderator: leecollings
- waltervl
- Posts: 5148
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
New Setup Feature for MQTT Autodiscover in 2023.1 Beta
Just an heads up for the Beta users using MQTT Autodiscover: With the Setup button on the MQTT AD Hardware page you can see the configuration devices available for your environment.
For screenshots and more information see wiki:
https://www.domoticz.com/wiki/MQTT#MQTT ... very_Setup
For screenshots and more information see wiki:
https://www.domoticz.com/wiki/MQTT#MQTT ... very_Setup
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
- Posts: 208
- Joined: Friday 04 November 2016 12:33
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: France
- Contact:
Re: New Setup Feature for MQTT Autodiscover in 2023.1 Beta
Not working for me: No device shown when I click setup
- waltervl
- Posts: 5148
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: New Setup Feature for MQTT Autodiscover in 2023.1 Beta
Then your devices do not have these options.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
- Posts: 72
- Joined: Wednesday 10 June 2015 21:36
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4
- Location: Hamburg (Germany)/Middelburg (NL)
- Contact:
Re: New Setup Feature for MQTT Autodiscover in 2023.1 Beta
No devices listed although added to Domoticz.
Raspberry Pi 4B, Domoticz 2023.1 Build 15234 BETA.
Please advice what is missing in the MQTT configuration.
Ran mqtt_ad_record.sh with output mqtt_ad_record_all.log:
Here another Domoticz log entry.
Raspberry Pi 4B, Domoticz 2023.1 Build 15234 BETA.
Please advice what is missing in the MQTT configuration.
Ran mqtt_ad_record.sh with output mqtt_ad_record_all.log:
Code: Select all
2023-05-17T14:23:55+0200 1 domoticz/sensor/sensorGardenT/config {"name": "Garden Temp", "device_class": "temperature", "state_topic": "domoticz/sensor/sensorGarden/state", "value_template": "{{value_json.temperature}}", "unit_of_measurement": "°C", "unique_id": "SGT001"}
2023-05-17T14:23:55+0200 1 domoticz/sensor/sensorGardenH/config {"name": "Garden Hum", "device_class": "humidity", "state_topic": "domoticz/sensor/sensorGarden/state", "value_template": "{{value_json.humidity}}", "unit_of_measurement": "%", "unique_id": "SGH001"}
2023-05-17T14:24:13+0200 0 domoticz/sensor/sensorGarden/state {"temperature":20, "humidity":50}
2023-05-17T14:25:13+0200 0 domoticz/sensor/sensorGarden/state {"temperature":20, "humidity":61}
...
Here another Domoticz log entry.
Code: Select all
2023-05-17 14:33:38.153 Debug: MQTTADGateway: topic: domoticz/sensor/sensorGarden/state, message: {"temperature":21, "humidity":56}
2023-05-17 14:33:38.282 Debug: MQTTADGateway: topic: domoticz/out, message: {
2023-05-17 14:33:38.282 "Battery" : 255,
2023-05-17 14:33:38.282 "LastUpdate" : "2023-05-17 14:33:38",
2023-05-17 14:33:38.282 "RSSI" : 12,
2023-05-17 14:33:38.282 "description" : "",
2023-05-17 14:33:38.282 "dtype" : "Humidity",
2023-05-17 14:33:38.282 "hwid" : "6",
2023-05-17 14:33:38.282 "id" : "SGH001",
2023-05-17 14:33:38.282 "idx" : 37,
2023-05-17 14:33:38.282 "name" : "Garden Hum",
2023-05-17 14:33:38.282 "nvalue" : 56,
2023-05-17 14:33:38.282 "stype" : "LaCrosse WS2300",
2023-05-17 14:33:38.282 "svalue1" : "1",
2023-05-17 14:33:38.282 "unit" : 1
2023-05-17 14:33:38.282 }
2023-05-17 14:33:38.282
2023-05-17 14:33:38.382 Debug: MQTTADGateway: topic: domoticz/out, message: {
2023-05-17 14:33:38.382 "Battery" : 255,
2023-05-17 14:33:38.382 "LastUpdate" : "2023-05-17 14:33:38",
2023-05-17 14:33:38.382 "RSSI" : 12,
2023-05-17 14:33:38.382 "description" : "",
2023-05-17 14:33:38.382 "dtype" : "Temp",
2023-05-17 14:33:38.382 "hwid" : "6",
2023-05-17 14:33:38.382 "id" : "SGT001",
2023-05-17 14:33:38.382 "idx" : 38,
2023-05-17 14:33:38.382 "name" : "Garden Temp",
2023-05-17 14:33:38.382 "nvalue" : 0,
2023-05-17 14:33:38.382 "stype" : "THR128/138, THC138",
2023-05-17 14:33:38.382 "svalue1" : "21.00",
2023-05-17 14:33:38.382 "unit" : 1
- waltervl
- Posts: 5148
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: New Setup Feature for MQTT Autodiscover in 2023.1 Beta
This option configuration option is only for devices with supported MQTT messages (i read somewhere about mqtt AD number devices).
So only if your sensor or switch is supporting this. Check the change in the source code: https://github.com/domoticz/domoticz/co ... 739e0c06af
So only if your sensor or switch is supporting this. Check the change in the source code: https://github.com/domoticz/domoticz/co ... 739e0c06af
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
- Posts: 72
- Joined: Wednesday 10 June 2015 21:36
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4
- Location: Hamburg (Germany)/Middelburg (NL)
- Contact:
Re: New Setup Feature for MQTT Autodiscover in 2023.1 Beta
Thanks for clarity on the component type number.
Performed a test with component type number:
MQTT-AD Configuration & State Message
mqtt_ad_record.sh
Ran mqtt_ad_record.sh with output mqtt_ad_record_all.log:
Status
The device SGH002 is listed in the MQTT-AD hardware controller devices list:
Device=SGH002, Name=Garden Hum 2, Value=91, Unit=%.
Observations
* The new device SGH002 is not listed in the Domoticz Devices List (so no Idx).
* If the device value changes, via mosquitto_pub, there is no MQTT message send via domoticz/out (checked the Domoticz log).
* If the device value is updated in the MQTT-AD hardware controller devices list by selecting the entry, enter new value, press Update = the value is not updated when pressing Refresh nor a Domoticz log entry.
Performed a test with component type number:
MQTT-AD Configuration & State Message
Code: Select all
mosquitto_pub -r -h localhost -p 1883 -t "domoticz/number/sensorGardenH/config" -m '{"name": "Garden Hum 2", "device_class": "humidity", "state_topic": "domoticz/number/sensorGarden/state", "value_template": "{{value_json.humidity}}", "unit_of_measurement": "%", "unique_id": "SGH002"}'
mosquitto_pub -h 127.0.0.1 -p 1883 -t "domoticz/number/sensorGarden/state" -m '{"humidity":99}'
mosquitto_pub -h 127.0.0.1 -p 1883 -t "domoticz/number/sensorGarden/state" -m '{"humidity":91}'
Ran mqtt_ad_record.sh with output mqtt_ad_record_all.log:
Code: Select all
2023-05-17T15:47:51+0200 1 domoticz/number/sensorGardenH/config {"name": "Garden Hum 2", "device_class": "humidity", "state_topic": "domoticz/number/sensorGarden/state", "value_template": "{{value_json.humidity}}", "unit_of_measurement": "%", "unique_id": "SGH002"}
2023-05-17T15:49:17+0200 0 domoticz/number/sensorGarden/state {"humidity":99}
2023-05-17T15:50:54+0200 0 domoticz/number/sensorGarden/state {"humidity":91}
The device SGH002 is listed in the MQTT-AD hardware controller devices list:
Device=SGH002, Name=Garden Hum 2, Value=91, Unit=%.
Observations
* The new device SGH002 is not listed in the Domoticz Devices List (so no Idx).
* If the device value changes, via mosquitto_pub, there is no MQTT message send via domoticz/out (checked the Domoticz log).
* If the device value is updated in the MQTT-AD hardware controller devices list by selecting the entry, enter new value, press Update = the value is not updated when pressing Refresh nor a Domoticz log entry.
- waltervl
- Posts: 5148
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: New Setup Feature for MQTT Autodiscover in 2023.1 Beta
It supposed to send an MQTT message back after clicking on UPDATE. But it could be because your configuration is not correct.
Check ZWave-JS or Zigbee2MQTT how they use and configure those number device to configure the sensor (time-outs, limits, levels etc)
Check ZWave-JS or Zigbee2MQTT how they use and configure those number device to configure the sensor (time-outs, limits, levels etc)
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
- Posts: 48
- Joined: Sunday 01 September 2019 18:59
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2021.1
- Location: DE
- Contact:
Re: New Setup Feature for MQTT Autodiscover in 2023.1 Beta
I have a small additional question regarding this topic.
Is there a possibility to change the values inside this setup section with dzvents or something?
Is there a possibility to change the values inside this setup section with dzvents or something?
- waltervl
- Posts: 5148
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: New Setup Feature for MQTT Autodiscover in 2023.1 Beta
You can send MQTT payloads when you install mosquitto clients and use mosquitto_pub to the MQTT AD host (eg ZWAVE-JS-UI or Zigbee2MQTT)
To install mosquitto_pub use
Docker:To install mosquitto_pub in the Domoticz Docker container use the customstart.sh script, see
https://www.domoticz.com/wiki/Docker#cu ... _container
The example includes mosquitto-clients install
To install mosquitto_pub use
Code: Select all
apt-get -y install mosquitto-clients
https://www.domoticz.com/wiki/Docker#cu ... _container
The example includes mosquitto-clients install
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Who is online
Users browsing this forum: No registered users and 1 guest