Welcome to the Cumulus Support forum.

Latest Cumulus MX release 3.9.0 (build 3095) - 09 October 2020 (please see announcement regarding releases since 3.5.0)
Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014 (a patch is available for 1.9.4 build 1099 that extends the date range of the NOAA report and Snow Index drop-down menus to 2030)

Use this Wiki link to Download the Software (Cumulus MX / Cumulus 1 and other related items).

Change soil moisture units in web interface

Topics about the Beta trials up to Build 3043, the last build by Cumulus's founder Steve Loft. It was by this time way out of Beta but Steve wanted to keep it that way until he made a decision on his and Cumulus's future.

Moderator: mcrossley

Post Reply
User avatar
Werk_AG
Posts: 182
Joined: Sun 13 Jan 2013 8:04 pm
Weather Station: WeatherDuino Pro2 PLUS
Operating System: Windows 7
Location: Cercal CDV - Portugal
Contact:

Change soil moisture units in web interface

Post by Werk_AG »

I'm trying to change the soil moisture units in the web interface from "CB" to "vwc".
I thought that I just need to edit the extra.html...

Code: Select all

<td>Sensor&nbsp;1&nbsp;</td>
<td><span id="SoilMoistureSensor1">--</span></td>
<td>vwc</td>
but, it always shows "CB", no matter I clean the browser cache, or change to another.
What I'm doing wrong?

Thanks

User avatar
laulau
Posts: 640
Joined: Tue 13 Oct 2009 10:52 pm
Weather Station: WeatherDuino Pro2
Operating System: Win 7
Location: Meyenheim, Alsace, FR
Contact:

Re: Change soil moisture units in web interface

Post by laulau »

I think you have to stop Cumulus and restart it!
Laurent

Image

User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Change soil moisture units in web interface

Post by steve »

Look at extrasensors.js - you'll see that the entire table is generated from json data read from MX using jQuery DataTables. The unit is built in to that json data (look at ...:8998/api/extra/soilmoisture.json)

If you want to change the units you will need to change extrasensors.js. Either modify the json data after it's read and before it's used to create the table, or don't use a Datatable but extract the values from the json data and just update the HTML elements using them. It's not as difficult as I'm making it sound ;)
Steve

User avatar
Werk_AG
Posts: 182
Joined: Sun 13 Jan 2013 8:04 pm
Weather Station: WeatherDuino Pro2 PLUS
Operating System: Windows 7
Location: Cercal CDV - Portugal
Contact:

Re: Change soil moisture units in web interface

Post by Werk_AG »

Now that I have a hint, I will try it.
Thank you Steve.

Post Reply