Autodiscovery with TheengsGateway
Moderator: leecollings
Re: Autodiscovery with TheengsGateway
Thanks waltervl!
I have resubmitted the PR on the development branch so hope it is better this time!
@Doler
If you would were able to test, that would be superb!
It is now on the dev branch so much easier. Just need to do a normal build but using https://github.com/StephenR1/domoticz.git as the source.
All else should be the same.
In case it does not work...
If you run with debug turned on for hardware, you should see messages for every topic coming in and saying whether or not the wildcarded subscription matches the message topic which was received.
You should (probably) see only one match for each message.
I have resubmitted the PR on the development branch so hope it is better this time!
@Doler
If you would were able to test, that would be superb!
It is now on the dev branch so much easier. Just need to do a normal build but using https://github.com/StephenR1/domoticz.git as the source.
All else should be the same.
In case it does not work...
If you run with debug turned on for hardware, you should see messages for every topic coming in and saying whether or not the wildcarded subscription matches the message topic which was received.
You should (probably) see only one match for each message.
- gizmocuz
- Posts: 2548
- Joined: Thursday 11 July 2013 18:59
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Top of the world
- Contact:
Re: Autodiscovery with TheengsGateway
There should be no issue with ' | is_defined' , it is stipped, so there is no need to use OpenHABDiscovery for this
Quality outlives Quantity!
-
- Posts: 147
- Joined: Friday 31 July 2015 21:02
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Sint-Oedenrode, Netherlands
- Contact:
Re: Autodiscovery with TheengsGateway
Thank you for this update. The good news is that it's working: I now get 3 devices (temp/humi, battery% and voltage) for each of my 2 LYWSD03MMC thermometers. So great work!StephenR wrote: ↑Monday 16 January 2023 13:37 Thanks waltervl!
I have resubmitted the PR on the development branch so hope it is better this time!
@Doler
If you would were able to test, that would be superb!
It is now on the dev branch so much easier. Just need to do a normal build but using https://github.com/StephenR1/domoticz.git as the source.
All else should be the same.
In case it does not work...
If you run with debug turned on for hardware, you should see messages for every topic coming in and saying whether or not the wildcarded subscription matches the message topic which was received.
You should (probably) see only one match for each message.
One question left: is there a possibility to skip the creation of the other 19 devices (most of them settings for OpenMQTTGateway)? I guess they could be used in HASS but here it's of no use nor does it hold useful information.
Mark: Domoticz Beta on Raspberry Pi 4 running Debian Bookworm - Z-Stick 7 - RFXCom - P1 - MySensors - SolarEdge - Dahua - Philips Hue - Docker - Zigbee2mqtt (plugin) - Zwave-js-ui - dzVents - Nodered
Re: Autodiscovery with TheengsGateway
Thanks Doler. That is good news!
I think OpenMQTTGateway is basically identical to Theengs Gateway (other than target platform) and Theengs has an option to filter out messages:
-Df DISCOVERY_FILTER [DISCOVERY_FILTER ...], --discovery_filter DISCOVERY_FILTER [DISCOVERY_FILTER ...]
Device discovery filter list for Home Assistant
Maybe does OpenMQTTGateway support that?
I think OpenMQTTGateway is basically identical to Theengs Gateway (other than target platform) and Theengs has an option to filter out messages:
-Df DISCOVERY_FILTER [DISCOVERY_FILTER ...], --discovery_filter DISCOVERY_FILTER [DISCOVERY_FILTER ...]
Device discovery filter list for Home Assistant
Maybe does OpenMQTTGateway support that?
-
- Posts: 17
- Joined: Tuesday 19 November 2019 16:28
- Target OS: Linux
- Domoticz version: 2023.1
- Location: France
- Contact:
Re: Autodiscovery with TheengsGateway
Hello,
I read these posts with much interest.
I am using the openMQTTGateway on an ESP32 to monitor a few 433 devices in Domoticz through Mosquitto. It works, but I noticed a small problem: previously I was using and rfxTRX433 usb device and each sensor was combined [ie. a temp + humidity sensor ends to a single temp + humidity (+signal strength) in Domoticz], now, in Domoticz, I have 4 devices created for each 433 sensor: One for the temperature, one for the humidity one for the signal strength (but with the "sound level" type!) and one for the battery.
When reading your posts, it seems that in the same (nearly) situation, you have a combined temp+humidity device in Domoticz.
I don't find any way to get a combined device. Could you help me?
He is some detailed information:
About Domoticz
Version: 2025.1
Build Hash: 89d5c900d
Compile Date: 2025-05-05 09:02:49
dzVents Version: 3.1.8
Python Version: 3.12.3 (main, Jun 18 2025, 17:59:45) [GCC 13.3.0]
trace from the openMQTTGateway:
MQTT autodiscovery config topics
And the result in Domoticz:
I read these posts with much interest.
I am using the openMQTTGateway on an ESP32 to monitor a few 433 devices in Domoticz through Mosquitto. It works, but I noticed a small problem: previously I was using and rfxTRX433 usb device and each sensor was combined [ie. a temp + humidity sensor ends to a single temp + humidity (+signal strength) in Domoticz], now, in Domoticz, I have 4 devices created for each 433 sensor: One for the temperature, one for the humidity one for the signal strength (but with the "sound level" type!) and one for the battery.
When reading your posts, it seems that in the same (nearly) situation, you have a combined temp+humidity device in Domoticz.
I don't find any way to get a combined device. Could you help me?
He is some detailed information:
About Domoticz
Version: 2025.1
Build Hash: 89d5c900d
Compile Date: 2025-05-05 09:02:49
dzVents Version: 3.1.8
Python Version: 3.12.3 (main, Jun 18 2025, 17:59:45) [GCC 13.3.0]
trace from the openMQTTGateway:
Code: Select all
N: [ OMG->MQTT ] topic: home/OMG_multi_receiver/RTL_433toMQTT/Ambientweather-F007TH/2/154 msg: {"model":"Ambientweather-F007TH","id":154,"channel":2,"battery_ok":0,"temperature_C":25.05556,"humidity":63,"mic":"CRC","protocol":"Ambient Weather F007TH, TFA 30.3208.02, SwitchDocLabs F016TH temperature sensor","rssi":-51,"duration":215996}
or
N: [ OMG->MQTT ] topic: home/OMG_multi_receiver/RTL_433toMQTT/Nexus-TH/1/117 msg: {"model":"Nexus-TH","id":117,"channel":1,"battery_ok":1,"temperature_C":26.1,"humidity":56,"protocol":"Nexus, FreeTec NC-7345, NX-3980, Solight TE82S, TFA 30.3209 temperature/humidity sensor","rssi":-17,"duration":986996}
Code: Select all
homeassistant/sensor/Ambientweather-F007TH-2-154-humidity/config
{"stat_t":"+/+/RTL_433toMQTT/Ambientweather-F007TH/2/154","dev_cla":"humidity","unit_of_meas":"%","name":"Humidity","uniq_id":"Ambientweather-F007TH-2-154-humidity","val_tpl":"{{ value_json.humidity | is_defined }}","stat_cla":"measurement","device":{"ids":["Ambientweather-F007TH-2-154"],"cns":[["mac","Ambientweather-F007TH-2-154"]],"mdl":"Ambientweather-F007TH","name":"Ambientweather-F007TH-2-154","via_device":"OMG_multi_receiver"}}
homeassistant/sensor/Ambientweather-F007TH-2-154-rssi/config
{"stat_t":"+/+/RTL_433toMQTT/Ambientweather-F007TH/2/154","dev_cla":"signal_strength","unit_of_meas":"dB","name":"RSSI","uniq_id":"Ambientweather-F007TH-2-154-rssi","val_tpl":"{{ value_json.rssi | is_defined }}","stat_cla":"measurement","device":{"ids":["Ambientweather-F007TH-2-154"],"cns":[["mac","Ambientweather-F007TH-2-154"]],"mdl":"Ambientweather-F007TH","name":"Ambientweather-F007TH-2-154","via_device":"OMG_multi_receiver"}}
homeassistant/sensor/Ambientweather-F007TH-2-154-temperature_C/config
{"stat_t":"+/+/RTL_433toMQTT/Ambientweather-F007TH/2/154","dev_cla":"temperature","unit_of_meas":"°C","name":"Temperature","uniq_id":"Ambientweather-F007TH-2-154-temperature_C","val_tpl":"{{ value_json.temperature_C | is_defined }}","stat_cla":"measurement","device":{"ids":["Ambientweather-F007TH-2-154"],"cns":[["mac","Ambientweather-F007TH-2-154"]],"mdl":"Ambientweather-F007TH","name":"Ambientweather-F007TH-2-154","via_device":"OMG_multi_receiver"}}
homeassistant/binary_sensor/Ambientweather-F007TH-2-154-battery_ok/config
{"stat_t":"+/+/RTL_433toMQTT/Ambientweather-F007TH/2/154","dev_cla":"battery","name":"Battery","uniq_id":"Ambientweather-F007TH-2-154-battery_ok","val_tpl":"{{ value_json.battery_ok | is_defined }}","pl_on":"0","pl_off":"1","device":{"ids":["Ambientweather-F007TH-2-154"],"cns":[["mac","Ambientweather-F007TH-2-154"]],"mdl":"Ambientweather-F007TH","name":"Ambientweather-F007TH-2-154","via_device":"OMG_multi_receiver"}}
homeassistant/sensor/Nexus-TH-1-117-humidity/config
{"stat_t":"+/+/RTL_433toMQTT/Nexus-TH/1/117","dev_cla":"humidity","unit_of_meas":"%","name":"Humidity","uniq_id":"Nexus-TH-1-117-humidity","val_tpl":"{{ value_json.humidity | is_defined }}","stat_cla":"measurement","device":{"ids":["Nexus-TH-1-117"],"cns":[["mac","Nexus-TH-1-117"]],"mdl":"Nexus-TH","name":"Nexus-TH-1-117","via_device":"OMG_multi_receiver"}}
homeassistant/sensor/Nexus-TH-1-117-rssi/config
{"stat_t":"+/+/RTL_433toMQTT/Nexus-TH/1/117","dev_cla":"signal_strength","unit_of_meas":"dB","name":"RSSI","uniq_id":"Nexus-TH-1-117-rssi","val_tpl":"{{ value_json.rssi | is_defined }}","stat_cla":"measurement","device":{"ids":["Nexus-TH-1-117"],"cns":[["mac","Nexus-TH-1-117"]],"mdl":"Nexus-TH","name":"Nexus-TH-1-117","via_device":"OMG_multi_receiver"}}
homeassistant/sensor/Nexus-TH-1-117-temperature_C/config
{"stat_t":"+/+/RTL_433toMQTT/Nexus-TH/1/117","dev_cla":"temperature","unit_of_meas":"°C","name":"Temperature","uniq_id":"Nexus-TH-1-117-temperature_C","val_tpl":"{{ value_json.temperature_C | is_defined }}","stat_cla":"measurement","device":{"ids":["Nexus-TH-1-117"],"cns":[["mac","Nexus-TH-1-117"]],"mdl":"Nexus-TH","name":"Nexus-TH-1-117","via_device":"OMG_multi_receiver"}}
homeassistant/binary_sensor/Nexus-TH-1-117-battery_ok/config
{"stat_t":"+/+/RTL_433toMQTT/Nexus-TH/1/117","dev_cla":"battery","name":"Battery","uniq_id":"Nexus-TH-1-117-battery_ok","val_tpl":"{{ value_json.battery_ok | is_defined }}","pl_on":"0","pl_off":"1","device":{"ids":["Nexus-TH-1-117"],"cns":[["mac","Nexus-TH-1-117"]],"mdl":"Nexus-TH","name":"Nexus-TH-1-117","via_device":"OMG_multi_receiver"}}
-
- Posts: 147
- Joined: Friday 31 July 2015 21:02
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Sint-Oedenrode, Netherlands
- Contact:
Re: Autodiscovery with TheengsGateway
I probably had a combined temperature/humidity device but in the mean time I hacked these meters to use the Zigbee protocol as that is an interface I already used.
I do have some DIY temperature meters based on ESP32 that I programmed for auto discovery in Domoticz. From that I learned that Domoticz tries to combine device attributes when the device name is the same. I guess that in your case Domoticz gets confused since all device attributes have the same device name (eg "mdl":"Nexus-TH","name":"Nexus-TH-1-117"). When battery and signal strength would have different names Domoticz would combine temperature + humidity.
I do have some DIY temperature meters based on ESP32 that I programmed for auto discovery in Domoticz. From that I learned that Domoticz tries to combine device attributes when the device name is the same. I guess that in your case Domoticz gets confused since all device attributes have the same device name (eg "mdl":"Nexus-TH","name":"Nexus-TH-1-117"). When battery and signal strength would have different names Domoticz would combine temperature + humidity.
Mark: Domoticz Beta on Raspberry Pi 4 running Debian Bookworm - Z-Stick 7 - RFXCom - P1 - MySensors - SolarEdge - Dahua - Philips Hue - Docker - Zigbee2mqtt (plugin) - Zwave-js-ui - dzVents - Nodered
- gizmocuz
- Posts: 2548
- Joined: Thursday 11 July 2013 18:59
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Top of the world
- Contact:
Re: Autodiscovery with TheengsGateway
It is the way the config objects are created.
For example, my zigbee temp+hum+baro is combined into one
For example when using the below config payloads, it creates one combined sensor.
Maybe you could ask openMQTTGateway to do the same
(have a look at the unique_id)
For example, my zigbee temp+hum+baro is combined into one
For example when using the below config payloads, it creates one combined sensor.
Maybe you could ask openMQTTGateway to do the same
(have a look at the unique_id)
Code: Select all
homeassistant/sensor/0x00158d0004a98668/temperature/config
{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"device":{"hw_version":30,"identifiers":["zigbee2mqtt_0x00158d0004a98668"],"manufacturer":"Aqara","model":"Temperature and humidity sensor","model_id":"WSDCGQ11LM","name":"Temp_BuitenSensor","sw_version":"3000-0001","via_device":"zigbee2mqtt_bridge_0x00124b0021cc4112"},"device_class":"temperature","enabled_by_default":true,"object_id":"temp_buitensensor_temperature","origin":{"name":"Zigbee2MQTT","sw":"2.3.0-dev","url":"https://www.zigbee2mqtt.io"},"state_class":"measurement","state_topic":"zigbee2mqtt/Temp_BuitenSensor","unique_id":"0x00158d0004a98668_temperature_zigbee2mqtt","unit_of_measurement":"°C","value_template":"{{ value_json.temperature }}"}
homeassistant/sensor/0x00158d0004a98668/humidity/config
{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"device":{"hw_version":30,"identifiers":["zigbee2mqtt_0x00158d0004a98668"],"manufacturer":"Aqara","model":"Temperature and humidity sensor","model_id":"WSDCGQ11LM","name":"Temp_BuitenSensor","sw_version":"3000-0001","via_device":"zigbee2mqtt_bridge_0x00124b0021cc4112"},"device_class":"humidity","enabled_by_default":true,"object_id":"temp_buitensensor_humidity","origin":{"name":"Zigbee2MQTT","sw":"2.3.0-dev","url":"https://www.zigbee2mqtt.io"},"state_class":"measurement","state_topic":"zigbee2mqtt/Temp_BuitenSensor","unique_id":"0x00158d0004a98668_humidity_zigbee2mqtt","unit_of_measurement":"%","value_template":"{{ value_json.humidity }}"}
homeassistant/sensor/0x00158d0004a98668/pressure/config
{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"device":{"hw_version":30,"identifiers":["zigbee2mqtt_0x00158d0004a98668"],"manufacturer":"Aqara","model":"Temperature and humidity sensor","model_id":"WSDCGQ11LM","name":"Temp_BuitenSensor","sw_version":"3000-0001","via_device":"zigbee2mqtt_bridge_0x00124b0021cc4112"},"device_class":"atmospheric_pressure","enabled_by_default":true,"object_id":"temp_buitensensor_pressure","origin":{"name":"Zigbee2MQTT","sw":"2.3.0-dev","url":"https://www.zigbee2mqtt.io"},"state_class":"measurement","state_topic":"zigbee2mqtt/Temp_BuitenSensor","unique_id":"0x00158d0004a98668_pressure_zigbee2mqtt","unit_of_measurement":"hPa","value_template":"{{ value_json.pressure }}"}
Quality outlives Quantity!
-
- Posts: 17
- Joined: Tuesday 19 November 2019 16:28
- Target OS: Linux
- Domoticz version: 2023.1
- Location: France
- Contact:
Re: Autodiscovery with TheengsGateway
Thanks for your answer. Do you mean that Domoticz would combine if there was only temp and humidity, but as there is also battery and signal strength Domoticz has no combined device and decides not to combine temp + humidity on one side and let battery and signal strength single?Doler wrote: ↑Wednesday 25 June 2025 15:30 From that I learned that Domoticz tries to combine device attributes when the device name is the same. I guess that in your case Domoticz gets confused since all device attributes have the same device name (eg "mdl":"Nexus-TH","name":"Nexus-TH-1-117"). When battery and signal strength would have different names Domoticz would combine temperature + humidity.
By the way when receiving the same device with my rfxTRX433, the single created device has temp + humidity + Signal strength seen in the setup/devices tab and maybe battery state but not directly visible.
-
- Posts: 17
- Joined: Tuesday 19 November 2019 16:28
- Target OS: Linux
- Domoticz version: 2023.1
- Location: France
- Contact:
Re: Autodiscovery with TheengsGateway
Thanks for your answer. Do you mean that the config topics should be:
homeassistant/sensor/Nexus-TH-1-117/humidity/config
homeassistant/sensor/Nexus-TH-1-117/rssi/config
homeassistant/sensor/Nexus-TH-1-117/temperature_C/config (or even .../temperature/...)
homeassistant/binary_sensor/Nexus-TH-1-117/battery_ok/config
instead of
homeassistant/sensor/Nexus-TH-1-117-humidity/config
homeassistant/sensor/Nexus-TH-1-117-rssi/config
homeassistant/sensor/Nexus-TH-1-117-temperature_C/config
homeassistant/binary_sensor/Nexus-TH-1-117-battery_ok/config
-
- Posts: 147
- Joined: Friday 31 July 2015 21:02
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Sint-Oedenrode, Netherlands
- Contact:
Re: Autodiscovery with TheengsGateway
[/quote]
Thanks for your answer. Do you mean that Domoticz would combine if there was only temp and humidity, but as there is also battery and signal strength Domoticz has no combined device and decides not to combine temp + humidity on one side and let battery and signal strength single?
By the way when receiving the same device with my rfxTRX433, the single created device has temp + humidity + Signal strength seen in the setup/devices tab and maybe battery state but not directly visible.
[/quote]
Correct, see the example above from gizmocuz that combines temp, humi and pressure in one device name "Temp_BuitenSensor". Battery and Signal strength cannot be combined in this 'weather class' so Domoticz gets confused (I guess). rfxTRX433 is handled differently from MQTT. And like gizmocuz said: this should be solved by openMQTTGateway.
Thanks for your answer. Do you mean that Domoticz would combine if there was only temp and humidity, but as there is also battery and signal strength Domoticz has no combined device and decides not to combine temp + humidity on one side and let battery and signal strength single?
By the way when receiving the same device with my rfxTRX433, the single created device has temp + humidity + Signal strength seen in the setup/devices tab and maybe battery state but not directly visible.
[/quote]
Correct, see the example above from gizmocuz that combines temp, humi and pressure in one device name "Temp_BuitenSensor". Battery and Signal strength cannot be combined in this 'weather class' so Domoticz gets confused (I guess). rfxTRX433 is handled differently from MQTT. And like gizmocuz said: this should be solved by openMQTTGateway.
Mark: Domoticz Beta on Raspberry Pi 4 running Debian Bookworm - Z-Stick 7 - RFXCom - P1 - MySensors - SolarEdge - Dahua - Philips Hue - Docker - Zigbee2mqtt (plugin) - Zwave-js-ui - dzVents - Nodered
- waltervl
- Posts: 5853
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Autodiscovery with TheengsGateway
I see a unique_id in the config topic payload that is made up like
ID_type_gateway eg "unique_id":"0x00158d0004a98668_humidity_zigbee2mqtt"
and
"unique_id":"0x00158d0004a98668_temperature_zigbee2mqtt"
Yours is ID-type (so no underscore)
"uniq_id":"Ambientweather-F007TH-2-154-temperature_C" and "uniq_id":"Ambientweather-F007TH-2-154-humidity"
I am not sure what exactly the logic is here to have Domoticz combine the topics.
ID_type_gateway eg "unique_id":"0x00158d0004a98668_humidity_zigbee2mqtt"
and
"unique_id":"0x00158d0004a98668_temperature_zigbee2mqtt"
Yours is ID-type (so no underscore)
"uniq_id":"Ambientweather-F007TH-2-154-temperature_C" and "uniq_id":"Ambientweather-F007TH-2-154-humidity"
I am not sure what exactly the logic is here to have Domoticz combine the topics.
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
- gizmocuz
- Posts: 2548
- Joined: Thursday 11 July 2013 18:59
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Top of the world
- Contact:
Re: Autodiscovery with TheengsGateway
Yes it is the Unique ID you have to look at
Quality outlives Quantity!
- waltervl
- Posts: 5853
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Autodiscovery with TheengsGateway
But what is the logic behind it? How should that unique ID look like to get Domoticz combine the Temp+HUM sensor?
When I look at these 2 unique ID's, what is wrong with it?
"uniq_id":"Ambientweather-F007TH-2-154-temperature_C"
"uniq_id":"Ambientweather-F007TH-2-154-humidity"
Is it the missing underscore? Is it the _C on the end for the temperature? is it the gateway "RTL_433toMQTT" missing on the end?
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
- gizmocuz
- Posts: 2548
- Joined: Thursday 11 July 2013 18:59
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Top of the world
- Contact:
Re: Autodiscovery with TheengsGateway
These are mine unique-id's
0x00158d0004a98668_temperature_zigbee2mqtt
0x00158d0004a98668_humidity_zigbee2mqtt
0x00158d0004a98668_pressure_zigbee2mqtt
There are no unique id's in the above config. That's a first issue... there is no way telling if they belong to each other
0x00158d0004a98668_temperature_zigbee2mqtt
0x00158d0004a98668_humidity_zigbee2mqtt
0x00158d0004a98668_pressure_zigbee2mqtt
There are no unique id's in the above config. That's a first issue... there is no way telling if they belong to each other
Quality outlives Quantity!
-
- Posts: 17
- Joined: Tuesday 19 November 2019 16:28
- Target OS: Linux
- Domoticz version: 2023.1
- Location: France
- Contact:
Re: Autodiscovery with TheengsGateway
By "above" you mean your 3 lines or the 2 ""uniq_id":"Ambientweather-F007TH-2-154-...." lines ? In both case, I do not see the difference except yours begin with a number....gizmocuz wrote: ↑Thursday 26 June 2025 13:13 These are mine unique-id's
0x00158d0004a98668_temperature_zigbee2mqtt
0x00158d0004a98668_humidity_zigbee2mqtt
0x00158d0004a98668_pressure_zigbee2mqtt
There are no unique id's in the above config. That's a first issue... there is no way telling if they belong to each other
- gizmocuz
- Posts: 2548
- Joined: Thursday 11 July 2013 18:59
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Top of the world
- Contact:
Re: Autodiscovery with TheengsGateway
No, inside the config object payload
Also strange that the stat payload start with +/+/ ... but that's not related
Also strange that the stat payload start with +/+/ ... but that's not related
Quality outlives Quantity!
- waltervl
- Posts: 5853
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Autodiscovery with TheengsGateway
Ambientweather-F007TH-2-154 seems to be the unique ID string like 0x00158d0004a98668 for zigbee2mqtt.
The +/+ issue was already fixed in 2023 with PR https://github.com/domoticz/domoticz/pull/5548
The +/+ issue was already fixed in 2023 with PR https://github.com/domoticz/domoticz/pull/5548
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
- gizmocuz
- Posts: 2548
- Joined: Thursday 11 July 2013 18:59
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Top of the world
- Contact:
Re: Autodiscovery with TheengsGateway
Hmmm I see, it is using the short format of all variables....
there is a "uniq_id"
Ambientweather-F007TH-2-154-temperature_C
Ambientweather-F007TH-2-154-humidity
Ahh pfff now I see
The configs are a bit of a mess... If you use short-format, stick to short format!
"device" should be "dev"
Or use "device", but use "identifiers" instead of "ids"
But in this case, all is using the short format, so stick with short and don't mix
there is a "uniq_id"
Ambientweather-F007TH-2-154-temperature_C
Ambientweather-F007TH-2-154-humidity
Ahh pfff now I see
The configs are a bit of a mess... If you use short-format, stick to short format!

"device" should be "dev"
Or use "device", but use "identifiers" instead of "ids"
But in this case, all is using the short format, so stick with short and don't mix
Quality outlives Quantity!
-
- Posts: 17
- Joined: Tuesday 19 November 2019 16:28
- Target OS: Linux
- Domoticz version: 2023.1
- Location: France
- Contact:
Re: Autodiscovery with TheengsGateway
OK, I think I understand.
Would it be hard to allow mixed format to allow ["dev" + "identifier"] and ["device" + "ids"] mixed combinations? maybe (MQTTAutoDiscover.cpp at line 669):
instead of:
Would it be hard to allow mixed format to allow ["dev" + "identifier"] and ["device" + "ids"] mixed combinations? maybe (MQTTAutoDiscover.cpp at line 669):
Code: Select all
rootdev = root["device"];
if (root["device"].empty()) rootdev = root["dev"];
if (!rootdev.empty())
{
rootids = rootdev.["identifiers"];
if (rootids.empty()) rootids= rootdev.["ids"];
if (!rootids.empty())
{
if (rootids.isArray())
device_identifiers = rootids[0].asString();
else
device_identifiers = rootids.asString();
}
}
else
{
//It's optional, but good to supply one
}
Code: Select all
if (!root["device"].empty())
{
if (!root["device"]["identifiers"].empty())
{
if (root["device"]["identifiers"].isArray())
device_identifiers = root["device"]["identifiers"][0].asString();
else
device_identifiers = root["device"]["identifiers"].asString();
}
}
else if (!root["dev"].empty())
{
if (!root["dev"]["ids"].empty())
{
if (root["dev"]["ids"].isArray())
device_identifiers = root["dev"]["ids"][0].asString();
else
device_identifiers = root["dev"]["ids"].asString();
}
}
else
{
//It's optional, but good to supply one
}
- gizmocuz
- Posts: 2548
- Joined: Thursday 11 July 2013 18:59
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Top of the world
- Contact:
Re: Autodiscovery with TheengsGateway
No this is not an issue with Domoticz and has to be fixed by the one creating these config objects.
You, on the other hand, can edit/replace your own config object, and consider this a 'fix'
But it has to be fixed upstream.
You, on the other hand, can edit/replace your own config object, and consider this a 'fix'
But it has to be fixed upstream.
Quality outlives Quantity!
Who is online
Users browsing this forum: No registered users and 0 guests