Possible to get BalenaSense to display temp in Fahrenheit?

I was trying to find a place to change the temp that is displayed from C to F for my balenasense installation. Any documentation at all on how to do that?

Thanks

Hello, I looked into this and it appears that it’s not (easily) possible at the moment unfortunately. Your best bet might be to open an issue requesting this on the project repository: https://github.com/balenalabs/balena-sense/issues

Hello, you can edit the query in grafana and apply a formula to convert °C to °F.
Example:

SELECT ("value" * 9 / 5) + 32 FROM "thermal_value" WHERE ("instance" = 'thermal_zone0') AND $timeFilter

Hello Zvin -

I’m trying to edit the query, but it looks wrong. Can you offer a little more guidance for this noob?

–Thanks / Chris

% Hi Chris,

I often find it easier to do my flux queries in editor mode and turn on the ‘query inspector’. Doing that, I used the following query to get the temperature in Fahrenheit:

A point to note though: I am using the default balenaSense Influx DB and bucket, and I see you are using something different. Just make sure that your temperature field is a number, and cast it if not.

Phil

1 Like

Thank you, Phil… Much appreciated. Off topic, but somewhat related, I had a power outage. It seems whenever that happens, balenaSense does not restart. Are there local commands I need to enter? I want to edit the query and the service is still down. The server log shows “supervisor starting” and nothing further, VPN goes online, but no API. Any thoughts?

Thanks!

@chrisism that seems pretty strange, it should definitely just start automatically. I have been running balena-sense for the last month or so and it always restarts after a power cut. Can you tell us a bit more about your setup, what hardware you have hooked up and what OS version you are running?

Certainly, Shaun, thanks. I’m running a Raspberry Pi (v1 / Zero / Zero W) connected to a Pimoroni BME680 sensor. The OS is balenaOS 2.48.0+rev1 with supervisor v.10.8.0.

Anecdotally, whenever I try to do a reboot or restart via the balenaCloud dashboard, I see the following response: Request error: tunneling socket could not be established, statusCode=500

–Chris

It sounds like perhaps balena-sense with all its containers might be straining the pi zero CPU and ram. My device is running on a rpi3 so playing with a long more resources. Next time you notice the services haven’t started up please can you run the “Diagnostics” tab on the left hand side of the device page and then run the Health checks, that should give us an idea of what is failing.

Thanks, Shaun. The problem mimics this to the letter: BalenaSense not recording measurements after reboot

All services are currently running. Only way to get data is to reflash the card.

–Chris

I assume you are running the version suggested in that linked thread or above that?

I’m running whatever balena pushed.

yeah in that case you are most likely running the latest version which should be above the version referenced in that thread. From the diagnostics it seems the container engine is completely failing. It might help for me to take a look at the device remotely. If you can enable support access (you can find this in the device actions drop down) and then send me the URL to your device in a private message.

TYVM - Pls ck inbox.

Hey @chrisism so I have been looking into that device and it seems like the container engine is in a pretty corrupted state and looks as though some unclean shutdown got the container store in a weird state. I think I will try reproduce this on my side on a rpi0 as this seems particularly nasty and I would like the engine guys to have a reproducible scenario to look into.

Does it always correct itself after a reboot?

Oh additionally what kind of SD card are you using with the pi zero, often times these types of issues manifest on old or cheap SD cards and are a nightmare to root cause.

Thanks @shaunmulligan, very much appreciated. It never corrects after a reboot. Only way to get it to work again is to reflash the card.

I’m using a 16Gb SanDisk Ultra Extreme.

Okay that should be very good and its the same one I am running on my balena-sense. Thanks for the additional info, I will try reproduce this and figure if we can get a fix for this.

Much appreciated, @shaunmulligan. In the interim, I’d like to reflash the card so I can collect some data