I saw similar discussions in the past in this forum without able to find a solution unfortunately.
It’s about RTL433 devices and how we publish the MQTT topics.
Apparently we use this scheme : “xxxxx/GatewayName/RTL_433toMQTT/DeviceName/Channel-ID/ID”
but for some devices, the “ID” is not uniq, it changes all the time causing the creation of new mqqt topics.
In my example below, the AmbientweatherF007TH reports ID=122, then 185, 69, 126, etc.
so multiple entries are created in the MQTT database despite it’s the same device.
HomeAssistant sees this as a new device and loses the previous track.
Of course we can scripts, change things on the fly but it’s not ideal and dirty.
I’d love to see this way to report the topic name (without the #ID) : xxxxx/GatewayName/RTL_433toMQTT/DeviceName/Channel-ID/
any parameters exists already ? (can’t find it)
Another subject :
we are not publishing the timestamp, rtl_433 project does it (see in orange in the screenshot).
Timestamps are important to know if values reported are still accurate or obsolete.
would it be possible to see timestamps in a near future ?
thanks for all the jobs you are doing.
I really love this project.
why ?, I’m not the manufacturer
but in any case the device must remain identical in mqtt database even after changing the battery.
we can’t redo all the config every 6 months when battery is dead
I see discussions regarding timestamps but not with rtl433 (or I’m blind)
only with SYStoMQTT which has a kind of “uptime” value
timestamps remains an important topic to ensure data are still valid.
back with more examples
here is what was collected this afternoon
a lot of 433mhz devices living around are changing this “ID” too.
Not only it creates tons of entries in MQTT
but it’s also difficult to follow what reports what as you can see
would be very nice if we can have an option to remove this ID in the topic path
otherwise I’m afraid it’s hard to manage
thanks for your understanding
it’s exactly the issue I have too
the problem is not the lilygo but coming from zgatewayrtl_433 source. It uses the “id” of the device to create the MQTT topic as explained earlier. This ID is changing, not uniq in many cases despite it’s the same device so we see unexpected new entries in mqtt and in homeassistant. Previous record becomes obsolete… not really usable unfortunately
the rtl_sdr project does not use this ID, but apparently mqtt_hass.py uses it with a kind of filter to remove it later when reported in HA (complex)
for my personal case, the usage of this ID is the cause but NorthernMan54 and other users might have another opinion, I fully understand. The usage of this ID was implemented for a good reason probably. Always difficult to change a design without risk.
for the short term, the workaround is to use a self-made private version without this ID and check regularly how this project will evolve.
OMG is very cool; I’d love to see this issue addressed in the public release so I could use the GA version.
a little contribution and proposal to get the timestamp with RTL433 module
here are 2 “diff” for User_config.h and ZgatewayRTL-433.ino
careful, just tested during 1h, seems to work but
I don’t know if enabling UTCtimestamp can cause collateral damages elsewhere…
add these 8 lines (without the “+” of course) in ZgatewayRTL_433.ino around line #254
define the UTCtimestamp true in User_config.h (or unixtime if you prefer but it’s not human readable)
sorted it out. I was missing the #'s at the start of the if statements.
Only thing now is to find where the OMG_VERSION is set, ESPHome wanted to update it because it was reporting “version_tag”.