Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 2024

Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

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

Locked
User avatar
Werk_AG
Posts: 198
Joined: Sun 13 Jan 2013 8:04 pm
Weather Station: WeatherDuino 4Pro
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: 678
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: 26701
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: 198
Joined: Sun 13 Jan 2013 8:04 pm
Weather Station: WeatherDuino 4Pro
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.
Locked