1technophile / OpenMQTTGateway

MQTT gateway for ESP8266 or ESP32 with bidirectional 433mhz/315mhz/868mhz, Infrared communications, BLE, Bluetooth, beacons detection, mi flora, mi jia, LYWSD02, LYWSD03MMC, Mi Scale, TPMS, BBQ thermometer compatibility & LoRa.
https://docs.openmqttgateway.com
GNU General Public License v3.0
3.62k stars 797 forks source link

Readings from RTL_433 are always converted to metric even when unwanted #1944

Closed micander closed 3 months ago

micander commented 6 months ago

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.

NorthernMan54 commented 6 months ago

As you have found that setting is hard coded within rtl_433_ESP. To make it a changeable setting, changes would be required to both rtl_433_ESP and OMG.

github-actions[bot] commented 3 months ago

This issue is stale because it has been open for 90 days with no activity.

github-actions[bot] commented 3 months ago

This issue was closed because it has been inactive for 14 days since being marked as stale.