Display Temperature in Fahrenheit

Hello;

I am looking to display Fahrenheit on my Emoncms. Is there a simple guide out there? I did a search
and the topic has been brought up but did not see a step by step guide. Any help would be appreciated
Thank you

On the inputs page, include a process to do the conversion before you log the data.

I tried that and it is not showing up in Fahrenheit. Looking for a guide, do you know if one exists Thank you

What do you mean by

The maths is not converting the number, or it does not show the correct units?

The first is easy. The first two operations in the chain on the Inputs page should be
× 1.8
+ 32
then whatever other processing you already have.
(Note: NOT × input, etc)

For the second, you need to specifically state the units °F in the appropriate place.

Although I was brought up on °F, pounds and ounces, pints and gallons, most things now use metric units, which is probably why there isn’t a built-in conversion.

It is in the Edit Feed dialog @rpenalis.

Sorry, how do I convert my emoncms displays to Fahrenheit?
I don’t the ‘Edit feed’ pull down menu - where is that?

And if I can convert the display, does this only affect the display, or is the it alter the stored source data?

Changing the values displayed, without changing the underlying data can, as far I’m aware, only be done by customising the code inside emonCMS.

If you process the input (the most obvious and easy way), then the data stored from that point onwards will be changed. You can use the post-processor to change data that has already been recorded in a Feed.

If you have historic data that you wish to preserve in a converted form, then I’d suggest you first experiment with converting the incoming data to degrees Fahrenheit and record the values in a new Feed by way of a test. When you’re happy with this, use the post-process module to do the maths on the existing Feed (deg C) and write to a new (deg F) Feed, then switch the input process to send the incoming converted (deg F) values to the new Feed. But first, backup all your data in case of a mistake or confusion.

In Setup, choose Backup and on the Export tab, click Backup. This will make files still on your SD card which you can download when it’s finished, if you wish. You’ll get a link to click to download the files and I’d strongly advise you do.

Still in Setup, go to Inputs and click the spanner icon on the line for the Temperature you want to convert. Choose ‘Reset to original’ and Add the step. (This ensures all the process steps you have and the existing Feed is preserved.) Add another step × and enter the value 1.8 and Add the step. Add another step + and enter the value 32 and Add the step. Add another step Log to Feed and call it something sensible (‘Temp °F’ maybe) and choose ‘Emoncms fixed interval’ and choose a value ideally the same as the existing Feed but certainly longer than the time between incoming values. (This will be a temporary Feed to test with.) Save the changes.

I’ve never used the post-process module, so you must experiment using the instructions I linked above. If I have time later today, I’ll give it a try and update this.
If you do try this yourself, you’ll create another new Feed to store the converted values, but with exactly the same Feed Interval as the original. If all is satisfactory, change the Feed in the Inputs process to be this one, and the newly arriving data should continue to be recorded in this Feed.

I’ve now tried the post-process module. I couldn’t get it to accept the formula (‘Basic formula’), but I did succeed in 2 steps using a temporary feed. Here’s a screenshot of the result after both steps:

  1. Scale feed. Multiply by 1.8 and create a temporary feed, I called it ‘Garage_x18’. This won’t be needed once step 2 has completed.
  2. Offset feed. Add 32 and create the final feed. I called it ‘Garage_degF.’

This ‘final’ step has all the data to the time step 1 started. I then had to route the Input to this feed (with the maths) in order to collect the ongoing data. I didn’t need to ‘reset to original’ - it’s there for completeness in case there’s a preceding step which changed the value passed down the page.

I could now delete the temporary feed ‘Garage_x18’. It’s dormant - won’t ever be used again. And - if I didn’t want to keep the temperature in degrees Celsius, I could remove the processing for the original feed (step 1 in the screenshot) and delete the feed too.

And to clarify: Changing the units displayed against a value does exactly that - it does nothing to the numbers.

@TrystanLea

Testing for @Glen_Garfunkel, no matter which variation of f46*1.8+32 I tried, I could not get it to accept the formula, always getting Error: could not understand your formula SORRY....

Eventually, and only a while after I’d written up the procedure and published it, I got it to accept 32+1.8*f46.

So what are the (undocumented?) restrictions on what it can accept? Why can’t it accept the usual way this formula is written?

Or is it a case of the error message is simply wrong? It surely doesn’t help much.

If you are running emoncms locally, could you use a virtual feed to do the conversion?

That’s something else that’s, shall we say, not all that well documented.

@alexandrecuer any idea how it might be possible to cater for the order that @Robert.Wall mentioned?

The main point is, if the order of operations is super-critical, it MUST be documented. Clearly, by far the best solution is to have no restrictions on the form the formula takes.