Current block says "offline"

Post Reply
User avatar
magical46
Observer
Observer
Posts: 49
Joined: Mon Aug 21, 2017 2:19 pm
Location: Farnham, Surrey, UK
Contact:

Current block says "offline"

Post by magical46 » Tue Jul 07, 2020 7:55 pm

Hi, My header block/ current block keeps saying "offline" where as the station status block says "online". this has only started happening in the last few days, I have not made any changes since the last update from Jachym and it was working fine then.
http://www.philsweather.co.uk/meteotemp ... esktop.php
Any ideas?
Phil
Image

Bigbaywx
Observer
Observer
Posts: 21
Joined: Mon Jun 22, 2020 8:47 pm
Station model: Davis Vantate Pro2
Software: weatherlink data logger

Re: Current block says "offline"

Post by Bigbaywx » Tue Jul 07, 2020 10:02 pm

I have been having the same issue but as a new user I don't know if that is normal or not. It will update and show active and then while I'm looking at it, it goes offline. Or, when I load the page it loads up as offline and then a couple of minutes later it updates. I've got my time interval set to 11 minutes which is what is recommended but it seems to make little difference no matter what time period is put in.

User avatar
magical46
Observer
Observer
Posts: 49
Joined: Mon Aug 21, 2017 2:19 pm
Location: Farnham, Surrey, UK
Contact:

Re: Current block says "offline"

Post by magical46 » Wed Jul 08, 2020 5:11 pm

Well it definitely seems to be an issue with the "Current" block, I have swapped "Current" for "Gauges" in my header block and they seem to be updating ok, also the gauges plugin and current plugin are all working fine. Don't know what has changed but I have used the Current block as my header for a long time and it has been no problem till the last week or so.
Phil
Image

User avatar
orwell341
Newbie
Newbie
Posts: 3
Joined: Tue Oct 10, 2017 7:55 pm
Location: Hadleigh Suffolk England
Station model: Davis Vantage Pro 2
Software: Cumulus
Contact:

Re: Current block says "offline"

Post by orwell341 » Fri Oct 09, 2020 5:21 pm

Just to say I am having the same problem. Update works fine when run from a browser and using wget on the command line, but not as part of cronjob. The output from each run using wget in cron shows success. The URL for my site is https://www.orwell341.com/sh/indexDesktop.php
Image

User avatar
orwell341
Newbie
Newbie
Posts: 3
Joined: Tue Oct 10, 2017 7:55 pm
Location: Hadleigh Suffolk England
Station model: Davis Vantage Pro 2
Software: Cumulus
Contact:

Re: Current block says "offline"

Post by orwell341 » Sat Oct 17, 2020 4:35 pm

I seemed to have sorted this out. I have created a cronjob on my Raspberry Pi which calls "updater.sh" every minute. The contents of the script is:

echo "run $(date) "
curl --data -v 'https://www.orwell341.com/sheldon/updat ... rd=xxxxxxx''

At the moment I have the output going to a log file so that I can confirm it is working OK, but you could leave out the -v and remove the echo statement to silence the script.
Image

User avatar
atari
Observer
Observer
Posts: 11
Joined: Tue Sep 05, 2017 11:54 pm
Location: Paraćin
Station model: ws2315
Software: weewx,cumulus
Contact:

Re: Current block says "offline"

Post by atari » Fri Dec 03, 2021 11:25 pm

i have same problem when i move server from http to https
i try curl --cacert downloaded.pem -X POST https://the-url-to-access
but no success
Image

davidefa
Expert
Expert
Posts: 862
Joined: Tue Jan 12, 2021 8:03 am
Location: Italy
Station model: WH2650
Software: WH2650 (direct upload)
Contact:

Re: Current block says "offline"

Post by davidefa » Sat Dec 04, 2021 12:19 am

Not super clear. But if I understand correctly you are uploading a text file and updating your database calling update/update.php ( did you configure it via meteotemplate control panel -> database update? ).
If this is the case I think you could call update/update.php via http ( your server should redirect to https, if autoredirect enabled ) or you could use wget ( or you could exclude the directory update from the autoredirect, via .htaccess for example ).
Another test you could do is calling 'manually' update/update.php?password=xxxx from the browser, and it should work .
Image

User avatar
atari
Observer
Observer
Posts: 11
Joined: Tue Sep 05, 2017 11:54 pm
Location: Paraćin
Station model: ws2315
Software: weewx,cumulus
Contact:

Re: Current block says "offline"

Post by atari » Sat Dec 04, 2021 1:19 pm

From browser it working I enable pluagin for autoupdate, but from server not working. From server whit http:
curl -I -v http://127.0.0.1/template/update/update ... word=12345
* Trying 127.0.0.1:80...
* TCP_NODELAY set
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Connected to 127.0.0.1 (127.0.0.1) port 80 (#0)
> HEAD /127.0.0.1/template/update/update.php?password=12345 HTTP/1.1
> Host: 127.0.0.1
> User-Agent: curl/7.67.0
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Date: Sat, 04 Dec 2021 13:15:16 GMT
< Server: Apache/2.4.48 (IUS)
< Upgrade: h2c
< Connection: Upgrade, close
< Content-Type: text/html; charset=utf-8
<
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
* Closing connection 0
HTTP/1.1 200 OK
Date: Sat, 04 Dec 2021 13:15:16 GMT
Server: Apache/2.4.48 (IUS)
Upgrade: h2c
Connection: Upgrade, close
Content-Type: text/html; charset=utf-8
Image

davidefa
Expert
Expert
Posts: 862
Joined: Tue Jan 12, 2021 8:03 am
Location: Italy
Station model: WH2650
Software: WH2650 (direct upload)
Contact:

Re: Current block says "offline"

Post by davidefa » Sat Dec 04, 2021 1:51 pm

Try curl without the '-I' option
Image

User avatar
atari
Observer
Observer
Posts: 11
Joined: Tue Sep 05, 2017 11:54 pm
Location: Paraćin
Station model: ws2315
Software: weewx,cumulus
Contact:

Re: Current block says "offline"

Post by atari » Mon Dec 06, 2021 5:01 pm

I try whitout -I option but none working jet
Image

davidefa
Expert
Expert
Posts: 862
Joined: Tue Jan 12, 2021 8:03 am
Location: Italy
Station model: WH2650
Software: WH2650 (direct upload)
Contact:

Re: Current block says "offline"

Post by davidefa » Mon Dec 06, 2021 5:33 pm

Does curl print any useful information?
Did you try another utility ( like wget for example ), if it works from the browser it means everything is ok ( but we need to find the right parameter/options )
Another thing you could try is disabling the http to https automatic redirection for directory update ( as you say the problem began when you moved from http to https )
Image

User avatar
atari
Observer
Observer
Posts: 11
Joined: Tue Sep 05, 2017 11:54 pm
Location: Paraćin
Station model: ws2315
Software: weewx,cumulus
Contact:

Re: Current block says "offline"

Post by atari » Wed Dec 08, 2021 5:52 pm

Problem is thet i get success but not working
curl -v http://127.0.0.1/template/update/update ... word=12345
* Trying 127.0.0.1:80...
* TCP_NODELAY set
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* C
onnected to 127.0.0.1 (127.0.0.1) port 80 (#0)
> GET /127.0.0.1/template/update/update.php?password=12345 HTTP/1.1
> Host: 127.0.0.1
> User-Agent: curl/7.67.0
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Date: Wed, 08 Dec 2021 17:49:51 GMT
< Server: Apache/2.4.48 (IUS)
< Upgrade: h2c
< Connection: Upgrade, close
< Transfer-Encoding: chunked
< Content-Type: text/html; charset=utf-8
<
{ [17 bytes data]
100 7 0 7 0 0 538 0 --:--:-- --:--:-- --:--:-- 538
* Closing connection 0
Success

Image
Image

Post Reply