OpenMQTTGateway icon indicating copy to clipboard operation
OpenMQTTGateway copied to clipboard

Readings from RTL_433 are always converted to metric even when unwanted

Open micander opened this issue 9 months ago • 1 comments

This is a re-posting of the issue https://github.com/1technophile/OpenMQTTGateway/issues/1346 which was improperly closed as stale.

Describe the bug Right now, the rtl_433 module's library (https://github.com/NorthernMan54/rtl_433_ESP) by @NorthernMan54 converts all readings to metric by default (because the conversion_mode configuration is set to CONVERT_SI by default in that library).

https://github.com/NorthernMan54/rtl_433_ESP/blob/276bc2cc6cef73037aaf3325b69be99ccd139742/src/signalDecoder.cpp#L68

This is okay, I guess, but my sensors report temperature in Fahrenheit by default and I'd like to read it that way too without having to de-convert it from Celsius. Actually, I'd just like all my device readings to be shown in whatever unit the device provides, CONVERT_NATIVE, or convert all to imperial units instead of metric, CONVERT_CUSTOMARY.

Unfortunately, looking through the code for a while, I couldn't figure out how or if OMG interfaces with rtl_433_ESP's configuration options to set this conversion_mode. I'd be up to do a PR to add the option to OMG if I could see a pathway.

micander avatar May 11 '24 05:05 micander