Page 1 of 2

Metern whitout internet connection

Posted: Tue Jan 21, 2020 2:58 pm
by sgrabbado
Hello everyone!
I have a problem opening the metern and 123solar page when there is no internet connection.
My raspberry is connected wired on lan ad has static ip.
Unfortunately these days I am without an internet connection due to a failure of the isp.
If i open 192.168.0.55/metern the page loading is very slow and the graphs are not visible.
Same thing if I open the other pages.
The only page that opens correctly is the administration page with all the settings.
If I connect a 3G key to the modem and establish an internet connection via a cellular network (as a vdsl backup) the pagese load correctly.
Is this normal???
In the past I have had other internet line troubles but I don't remember having problems reaching metern or 123solar via LAN.
The software is installed on a raspberry pi and metern is at version 1.2.1.

Who can help me?

Re: Metern whitout internet connection

Posted: Tue Jan 21, 2020 4:42 pm
by jeanmarc
Hi,
If your logger is don't connected, it won't be able to load libraries (jquery and highcharts).
You can try to change the links into scripts/links.php and put the files locally.
This won't survive an update though.

Re: Metern whitout internet connection

Posted: Tue Jan 21, 2020 5:27 pm
by sgrabbado
Thank you Jeanmarc,
Has this "problem" been introduced recently or has it always been so?
Because in the past it seemed to me to work even without internet connection.
Is the update you're talking about from metern / 123solar or something else?

Re: Metern whitout internet connection

Posted: Tue Jan 21, 2020 5:33 pm
by jeanmarc
It's a feature ;) since 0.9.5
The package is lightweight and you'll always use the latest libs.

For the update, you should correct links.php if you need it. mN/123s have the same behavior.

Re: Metern whitout internet connection

Posted: Tue Jan 21, 2020 6:38 pm
by sgrabbado
Yes, it’s a feature, excuse me.. :D
I found out why in the past it went even without internet. When I installed solarjessie by flane, it had 0.8.6 metern on board and haven't updated it for several months ..

The strange thing is that now it works even without internet .. (I tried to disconnect the 3G internet stick) Sometimes it is slower to load the page, but at the end it loads correctly .. how is it possible?

EDIT: I cleaned up the browser cache and it still doesn't work ..

Re: Metern whitout internet connection

Posted: Tue Jan 21, 2020 6:49 pm
by jeanmarc
It's because libs, graphics, css are cached. It's faster to retrieve them than redownload each times.
You can force refreshing the cache with Shift+F5

Re: Metern whitout internet connection

Posted: Tue Jan 21, 2020 7:22 pm
by sgrabbado
yes, it was cached, I edited.

I need help though ....: D

I downloaded the 7 files using the links in the links.php file.
I copied them to /var/www/MyScripts/javascript.
I edited the links.php file by deleting the part containing the link and entering the path to the files.
Like this, for all 7 files

Code: Select all

 $ JSjquery = "/var/www/MyScripts/javascript/jquery-3.4.1.min.js' 
The browser doesn't load anyway.. :?
Where am i wrong?

PS:Thank Jeanmarc for the patience :mrgreen:

Re: Metern whitout internet connection

Posted: Tue Jan 21, 2020 7:54 pm
by jeanmarc
Can you retrieve http://192.168.0.55/MyScripts/javascrip ... 4.1.min.js from your browser ?
If not, check the permissions.

Beware, don't mess ' and " and space, that should rather be $JSjquery = '../../MyScripts/javascript/jquery-3.4.1.min.js'or simply put the files in scripts/ then $JSjquery = 'jquery-3.4.1.min.js' and so on

Re: Metern whitout internet connection

Posted: Tue Jan 21, 2020 8:30 pm
by sgrabbado
Yes, i can open it but it's not formatted correctly.

I tried to copy the files directly in /scripts folder, change owner to www-data and 0755 permission and change the path into the script, but no way...
:oops:

Re: Metern whitout internet connection

Posted: Tue Jan 21, 2020 8:44 pm
by jeanmarc
Open view-source:https://192.168.0.55/metern/ click on all links to make sure you can reach all of them

Code: Select all

..
<script src='jquery-3.4.1.min.js'></script>
<script src='jquery-ui.min.js'></script>
<link rel='stylesheet' href='jquery-ui.css' type='text/css'>
<script type='text/javascript' src='highcharts.js'></script>
<script type='text/javascript' src='highcharts-more.js'></script>
<script type='text/javascript' src='drilldown.js'></script>
<script type='text/javascript' src='exporting.js'></script>
don't worry if the code looks odd, it is "minimized"