Migrate RFXCOM to openMQTTGateway

Moderator: leecollings

Post Reply
MichelFrance
Posts: 17
Joined: Tuesday 19 November 2019 16:28
Target OS: Linux
Domoticz version: 2023.1
Location: France
Contact:

Migrate RFXCOM to openMQTTGateway

Post by MichelFrance »

Hello,
I am running Domoticz for a few years and I am very happy. Thanks to the developers and the forum members.

For now, I am using an RFXtrx433 usb to receive information from a few cheap thermometers or door sensors and to control my SOMFY blinds (RTS). I works but my house is quite large and my domoticz server is not in a central position: sometimes the RFXtrx433 miss some messages from the 433 devices and/or is jammed when sending a command to the Somfy blinds.

I decided to migrate from RFStrx433 to several ESP32 emitters/receivers in various locations.

For the Somfy blinds I use ESPSomfy-RTS (https://github.com/rstrouse/ESPSomfy-RTS) on an esp32 using MQTT (wifi + Mosquitto) to communicate with the domoticz server. It works fine!

For the various 433 thermometers and other devices, I use openMQTTGateway (https://docs.openmqttgateway.com/) on an ESP32 (I will use several of them in various locations of the house). It receive 433 devices signals and also send the values to domoticz using MQTT. I sends messages such as:

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}


My problem is that for each real 433 device it creates 4 devices in domoticz:

Code: Select all

1) Type=Light/Switch Subtype=Switch  Data=On or Off depending on the battery_ok value in the MQTT message above
2) Type=Humidity Subtype=LaCrosse WS2300 Data=humidity  in the MQTT message above
3) Type=General Subtype=Sound Level  Data=rssi in the MQTT message above
4) Type=Temp Subtype=THR128/138 THC138l  Data=temperature_C in the MQTT message above
for the same 2 433 devices received throught rfxtrx Domoticz had only 1 device for each:

Code: Select all

Type=Temp+Humidity SubType=Rubicson/IW008T/TX95 (or Viking 02035, 02038, TSS320 for the second real device) Data=<the temp>+<the humidity> and reception bar=rssi value.
Any advice to group these 4 domoticz devices from the new (openMQTTGateway + MQTT) scheme in a single one as before with rfxtrx?
User avatar
waltervl
Posts: 5853
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Migrate RFXCOM to openMQTTGateway

Post by waltervl »

There should be a config topic, or multiple config topics in the MQTT homeassistant folder for this device. These config topic decides what devices are created.
Can you post those config topics?
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
MichelFrance
Posts: 17
Joined: Tuesday 19 November 2019 16:28
Target OS: Linux
Domoticz version: 2023.1
Location: France
Contact:

Re: Migrate RFXCOM to openMQTTGateway

Post by MichelFrance »

waltervl wrote: Monday 23 June 2025 17:32 There should be a config topic, or multiple config topics in the MQTT homeassistant folder for this device. These config topic decides what devices are created.
Can you post those config topics?
Thank you for your help. Where do I find these config topics ?
User avatar
waltervl
Posts: 5853
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Migrate RFXCOM to openMQTTGateway

Post by waltervl »

See for example the wiki page https://wiki.domoticz.com/MQTT_AD_Report_Problems how to find and copy MQTT Autodiscover config topics.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
MichelFrance
Posts: 17
Joined: Tuesday 19 November 2019 16:28
Target OS: Linux
Domoticz version: 2023.1
Location: France
Contact:

Re: Migrate RFXCOM to openMQTTGateway

Post by MichelFrance »

waltervl wrote: Tuesday 24 June 2025 11:01 See for example the wiki page https://wiki.domoticz.com/MQTT_AD_Report_Problems how to find and copy MQTT Autodiscover config topics.
Here they are:

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"}}
User avatar
waltervl
Posts: 5853
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Migrate RFXCOM to openMQTTGateway

Post by waltervl »

On what Domoticz version are you running? As it should create combined temp/Hum devices on 2025 stable Domoticz.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
MichelFrance
Posts: 17
Joined: Tuesday 19 November 2019 16:28
Target OS: Linux
Domoticz version: 2023.1
Location: France
Contact:

Re: Migrate RFXCOM to openMQTTGateway

Post by MichelFrance »

waltervl wrote: Tuesday 24 June 2025 18:03 On what Domoticz version are you running? As it should create combined temp/Hum devices on 2025 stable Domoticz.

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]
User avatar
waltervl
Posts: 5853
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Migrate RFXCOM to openMQTTGateway

Post by waltervl »

From this discussion it could be the Openhab auto Discovery setting as there is a "| is defined" in the value template definition. It could be Domoticz is failing on this.

viewtopic.php?p=297743

If this also is not helping please create a GitHub issue with all the requested info (partially you already gave it in this topic) so a developer can check what is going on. The +/+ issue as mentioned in the old discussion was already solved in 2023.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest