Page 1 of 3

b4039 Moisture recent charts-a-select without unit

Posted: Wed 02 Oct 2024 8:05 pm
by Dador
Hi,

after updating to the latest version, I set up the soil moisture data from Davis and Ecowitt on one graph. The Recent chart displays the Davis (cb) and Ecowitt (%) units fine, but the Recent select-a-chart returns the unit as undefined.

I have the same problem even at the Ecowitt station, where I only use the Ecowitt moisture sensor - WH51.

Re: b4039 Moisture recent charts-a-select without unit

Posted: Wed 02 Oct 2024 9:06 pm
by The Dalek Hunter
IMG_0234.jpeg
Same for me on my Ecowitt Station

Re: b4039 Moisture recent charts-a-select without unit

Posted: Fri 04 Oct 2024 9:32 am
by mcrossley
I've double checked and it is working on my test install use Ecowitt.

Can you confirm that line 1425 of your /interface/js/chartscompare.js is like this...

Code: Select all

                    valueSuffix: ' ' + config.soilmoisture.units[unitIdx]
If so, have you tried clearing the browser cache - or Ctrl-F5 the page?

Re: b4039 Moisture recent charts-a-select without unit

Posted: Fri 04 Oct 2024 9:49 am
by The Dalek Hunter
Yes cache cleared.

Tried it on different browsers and it says undefined on them all


And yes that line is present exactly as you posted

Re: b4039 Moisture recent charts-a-select without unit

Posted: Fri 04 Oct 2024 9:55 am
by Dador
I have the same line of code. Memory cleared. Unit missing on all browsers.

This, of course, applies to Recent select-a-chart and Select-a-period charts.

Re: b4039 Moisture recent charts-a-select without unit

Posted: Fri 04 Oct 2024 10:12 am
by mcrossley
Ok. I'll take another look later ...

Re: b4039 Moisture recent charts-a-select without unit

Posted: Fri 04 Oct 2024 11:44 am
by mcrossley
Ah, wait, is this in Neils AI2 rather than the standard dashboard?

Re: b4039 Moisture recent charts-a-select without unit

Posted: Fri 04 Oct 2024 12:24 pm
by The Dalek Hunter

Re: b4039 Moisture recent charts-a-select without unit

Posted: Fri 04 Oct 2024 12:26 pm
by mcrossley
Ok that helps, thanks. I'll make a fix available later today...

Re: b4039 Moisture recent charts-a-select without unit

Posted: Fri 04 Oct 2024 3:44 pm
by mcrossley
OK, please try replacing the js scripts on your web site with these...

[deleted]

Re: b4039 Moisture recent charts-a-select without unit

Posted: Fri 04 Oct 2024 4:29 pm
by Dador
I noticed this change in the code selectachart.js, .

Code: Select all

max: config.soilmoisture.units.includes('cb') ? 200 : 100, // Davis 0-200 cb, Ecowitt 0-100%
but it didn't help. It's still as it was.

Re: b4039 Moisture recent charts-a-select without unit

Posted: Fri 04 Oct 2024 6:38 pm
by mcrossley
OK, I debugged your web site, and I see what the problem is. It is more complex than I first thought. I'll have a solution soon...

Re: b4039 Moisture recent charts-a-select without unit

Posted: Fri 04 Oct 2024 6:53 pm
by mcrossley
Try this version...

[deleted]

Re: b4039 Moisture recent charts-a-select without unit

Posted: Fri 04 Oct 2024 7:08 pm
by Dador
Nope..

When using a new file, it does not load soil moisture charts at all. The rest works fine.
Browser memory cleared on an ongoing basis.

Re: b4039 Moisture recent charts-a-select without unit

Posted: Fri 04 Oct 2024 7:28 pm
by mcrossley
Sorry, the names are inconsistent in the JSON (bad me!)

I corrected the script to account for that....