Lost/random ID after battery replace #2990
Replies: 8 comments 17 replies
-
Hi, that is simply almost impossible. One way that might work is to enable statistics and then look at signal strength. If you are lucky there is a clear difference that can map to different sensors. If that does not work switch to lithium based batteries. Then you dont need to change id that often. |
Beta Was this translation helpful? Give feedback.
-
The only solution that works in the long run is to replace the sensors. We have tried our best to make all sensors unique but these devices were not designed with this in mind. |
Beta Was this translation helpful? Give feedback.
-
Some time ago there was an idea floating around: Write a bridge script (see https://github.com/merbanan/rtl_433/tree/master/examples) that tracks known sensors. When one drops out and a new one comes online (maybe with roughly the same readings) then assume that the battery changed. The sensors then can be forwarded to MQTT with some fixed pseudo-ID. Lot's of small details to consider and fine-tune though, e.g. a way to reconfigure manually and such. In the end, I guess, not much gained but potential for additional problems. |
Beta Was this translation helpful? Give feedback.
-
Another idea: some sensors let you choose a "channel", which is essentially like the id, but fixed. However, even when you can, often you only have ~3, and you have you have 6 sensors. I also have that many sensors. They way I deal with this is: all sensors do use the same channel, except when I needed to change the battery: then I temporarily switch to a different channel for the new sensor. This way I can easily figure out which is "new" is (there can only be one), change it in the scripts, and then change the channel back to normal. |
Beta Was this translation helpful? Give feedback.
-
Another idea what might work (or not): some sensors send their data after x seconds, over and over again. Only, it is not x seconds exactly for each sensor, but a little after for one and a little slower for another sensor - and that timing is measurable. I can see the "send times" shift with regard to each other on a timescale of hours/days. It would not be a nice solution: depends on sensors - for sure model but possibly also individual sensors, and possibly more difficult: it might depend on battery voltage (not sure - all "my" plots do look straight, but I only need to change batteries every ... 2 years or so). But it would be another, possible "angle" to identify individual sensors. |
Beta Was this translation helpful? Give feedback.
-
Something else I do use especially in noisy environments: my sensors do have a "test" button (inside, next to the battery). It does two things: it sends a signal immediately (which is nice for testing: mine otherwise only send every 50s), but it also sets a bit in the signal that is otherwise unset: which means a bit that should distinguish it from most other signals even in a noisy environment. |
Beta Was this translation helpful? Give feedback.
-
Frighteningly complicated proposals to solve the problem(!) The only reasonably suggestion is to replace the batteries with lithium batteries, but this is an expensive option and also does not completely solve the problem. In my opinion, there should be a function/parameter in RTL to force/replace any IDx to any other IDy, then all it would take is a command or an entry in the ini file what IDx to be replaced with another IDy, then I would correct only 1 entry instead of making changes in many parameter configurations in the application receiving data from MQTT. |
Beta Was this translation helpful? Give feedback.
-
@radek-turecki Keep in mind that what you call simple is "somebody else implements and maintains complexity in one big program so it does what I want". I see the bridge script concept as separating concerns into two programs so that each is easier to understand. In a future world where rtl_433_mqtt_relay.py graduates formally from example to installed program (it has already logically graduate as many use it in production), it could be started by a single rtl_433 argument that sort of runs it as a subprocess. Then it being separate is just an implementation detail. @zuckschwerdt's suggestion to map in the bridge is a great one. The script could take a mapping table and convert the device's generated topic to a logical name. So instead of |
Beta Was this translation helpful? Give feedback.
-
Hello,
I'm using RTL_433 on the Windows 11 platform. Everything works almost fine and all information from the sensors are reported to MQTT by command:
rtl_433-rtlsdr.exe -M time:iso -C si -F mqtt://127.0.0.1:1883,retain=0,devices=sensors/rtl_433/ID[id]_[channel]/
But the problem is after replacing battery in the sensor. Very often, after replacing the battery, the temperature and humidity sensor is read with a different ID.
I use ID as the identifier of a given sensor as in the photo below:
So the question is - how to keep the ID for given sensor or how to identify the sensor regardless of ID (but I have several sensors from the same manufacturer)?
Thank you in advance for your help. Radek
Beta Was this translation helpful? Give feedback.
All reactions