OpenMQTTGateway icon indicating copy to clipboard operation
OpenMQTTGateway copied to clipboard

Readings from RTL_433 are always converted to metric even when unwanted

Open melyux opened this issue 2 years ago • 7 comments
trafficstars

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/master/src/decoder.cpp#L50

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. Some help @NorthernMan54, @1technophile?

melyux avatar Dec 07 '22 10:12 melyux

The conversion setting in rtl_433_ESP is here

https://github.com/NorthernMan54/rtl_433_ESP/blob/77b4c8ac86fefca514c41a34fb6e25de6c409190/src/decoder.cpp#L50

NorthernMan54 avatar Dec 07 '22 10:12 NorthernMan54

Am thinking a compiler directive for RTL_433_ESP is likely the easiest approach to achieve what you’re looking for. The rtl_433 cfg object is not something I have tried changing settings post initialization yet. But if you wanted to, it would need a method exposed from rtl_433_ESP, then a change to openmqttgateway/ZgatewayRTL_433.ino to control the method.

NorthernMan54 avatar Dec 07 '22 10:12 NorthernMan54

Thanks @NorthernMan54, that's what I thought

melyux avatar Dec 07 '22 11:12 melyux

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

github-actions[bot] avatar Sep 22 '23 00:09 github-actions[bot]

?

melyux avatar Sep 22 '23 07:09 melyux

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

github-actions[bot] avatar Dec 22 '23 00:12 github-actions[bot]

Haven't checked recent versions yet

melyux avatar Dec 22 '23 06:12 melyux

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

github-actions[bot] avatar Mar 23 '24 00:03 github-actions[bot]

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

github-actions[bot] avatar Apr 07 '24 00:04 github-actions[bot]

Ugh, stale issue bots are incredibly toxic. This still needs to be fixed. The problem code has been relocated here: https://github.com/NorthernMan54/rtl_433_ESP/blob/276bc2cc6cef73037aaf3325b69be99ccd139742/src/signalDecoder.cpp#L68

micander avatar May 11 '24 05:05 micander

Since the bot isn't reopening it, I'm making a new issue. Please consider removing auto-closing of stale issues.

See: https://www.youtube.com/watch?v=1lYgB_NHFYk

micander avatar May 11 '24 05:05 micander