Metern whitout internet connection

Talks about metering
sgrabbado
Posts: 7
Joined: Tue Jan 21, 2020 2:48 pm

Metern whitout internet connection

Post by sgrabbado » Tue Jan 21, 2020 2:58 pm

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?

jeanmarc
Posts: 2028
Joined: Thu Aug 29, 2013 7:16 am

Re: Metern whitout internet connection

Post by jeanmarc » Tue Jan 21, 2020 4:42 pm

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.

sgrabbado
Posts: 7
Joined: Tue Jan 21, 2020 2:48 pm

Re: Metern whitout internet connection

Post by sgrabbado » Tue Jan 21, 2020 5:27 pm

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?

jeanmarc
Posts: 2028
Joined: Thu Aug 29, 2013 7:16 am

Re: Metern whitout internet connection

Post by jeanmarc » Tue Jan 21, 2020 5:33 pm

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.

sgrabbado
Posts: 7
Joined: Tue Jan 21, 2020 2:48 pm

Re: Metern whitout internet connection

Post by sgrabbado » Tue Jan 21, 2020 6:38 pm

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 ..

jeanmarc
Posts: 2028
Joined: Thu Aug 29, 2013 7:16 am

Re: Metern whitout internet connection

Post by jeanmarc » Tue Jan 21, 2020 6:49 pm

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

sgrabbado
Posts: 7
Joined: Tue Jan 21, 2020 2:48 pm

Re: Metern whitout internet connection

Post by sgrabbado » Tue Jan 21, 2020 7:22 pm

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:

jeanmarc
Posts: 2028
Joined: Thu Aug 29, 2013 7:16 am

Re: Metern whitout internet connection

Post by jeanmarc » Tue Jan 21, 2020 7:54 pm

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

sgrabbado
Posts: 7
Joined: Tue Jan 21, 2020 2:48 pm

Re: Metern whitout internet connection

Post by sgrabbado » Tue Jan 21, 2020 8:30 pm

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:

jeanmarc
Posts: 2028
Joined: Thu Aug 29, 2013 7:16 am

Re: Metern whitout internet connection

Post by jeanmarc » Tue Jan 21, 2020 8:44 pm

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"

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests