Meshtastic-Android icon indicating copy to clipboard operation
Meshtastic-Android copied to clipboard

[Feature Request]: UV environment metrics.

Open dmarman opened this issue 6 months ago • 2 comments

Contact Details

No response

What happened?

With this PR https://github.com/meshtastic/firmware/pull/6872 now nodes can send UV index information to the clients. Currently, this value is not shown on the environment metrics section of the app when sent by a node.

The UV metric is set in the firmware in measurement->variant.environment_metrics.uv_lux as a float.

UV is normally represented as an integer value from 0 to 11. I think the card shouldn't disappear when uv_lux is 0, because 0 is a relevant measurement. https://en.wikipedia.org/wiki/Ultraviolet_index

App Version

2.5.16

Phone

Xiaomi Mi 9

Device

Heltec v3 with LTR390UV sensor installed.

Firmware

Current master build.

Relevant log output


Code of Conduct

  • [x] I agree to follow this project's Code of Conduct

dmarman avatar May 29 '25 18:05 dmarman

Hi @dmarman i recommend checking out the latest alpha release: https://github.com/meshtastic/Meshtastic-Android/releases - there have been quite a few updates.

#1627 was merged in 2.5.18-alpha which solves at least your lux = 0 ux issue.

jamesarich avatar May 29 '25 19:05 jamesarich

Replacing bug label with feature request, this isn't a bug, it's a request to support new functionality.

jamesarich avatar May 29 '25 20:05 jamesarich

Please add UV display, support is already in the firmware. So far, only the illumination value in lux is displayed.

brebtatv avatar Jun 22 '25 22:06 brebtatv

@dmarman #2366 should add a card with floats if you have the hardware to test it.

I need to figure out how to map the float to a 0-11 int, as I'm assuming it'll be non-linear, but for the moment raw values will at least make sure it's working

DaneEvans avatar Jul 07 '25 06:07 DaneEvans

@DaneEvans Yes, I have the UV sensor and Android phone to test. Let me know if it's already possible to install the app with your pull.

The sensor already sends a float value from 0 to 11. I guess the number should be rounded? or is it something that cannot be done in the client and should be implemented in the firmware?

dmarman avatar Jul 10 '25 12:07 dmarman

@dmarman

Ahh, rounding a float will be easy.
It didn't make 2.6.30, but is on main now if you know how to build it, otherwise I'll get an APK for you.

DaneEvans avatar Jul 10 '25 22:07 DaneEvans

@DaneEvans I don't have the tooling setup for Android builds. If you can send me an APK it will be great. I can also wait for the next release.

dmarman avatar Jul 16 '25 14:07 dmarman

It'll be in 2.6.31, which will be soon.

DaneEvans avatar Jul 20 '25 11:07 DaneEvans