Page 2 of 2
Re: Connection between meterobridge and meteotemplate
Posted: Wed Feb 28, 2024 1:57 pm
by Gyvate
then the issue is with your web hosting provider ....
when I send the same string (analogous - different address, different password) to my Meteotemplate site, I get the message "Success" - and anyway the MB postings work.
I would open a support ticket with the web hosting provider.
They must have changed something recently if everything worked before.
They should suggest a solution.
Re: Connection between meterobridge and meteotemplate
Posted: Wed Feb 28, 2024 11:10 pm
by admin
A PHP SW update on the server might have rendered some code of the meteotemplate disfunctional, for example.
Re: Connection between meterobridge and meteotemplate
Posted: Wed Feb 28, 2024 11:27 pm
by Gyvate
admin wrote: ↑Wed Feb 28, 2024 11:10 pm
A PHP SW update on the server might have rendered some code of the meteotemplate disfunctional, for example.
that's a possibility - but my provider has updated to the most recent version of PHP and both Meteotemplate sites are still working properly (one upgraded from MT 18.0 to MT 19.0 and the other not).
Maybe (not verified) they have kept some earlier versions in parallel ...
However, the OP could upgrade his Meteotemplate to version 19.0 - that's offered to be in tune with recent PHP versions.
Re: Connection between meterobridge and meteotemplate
Posted: Mon Sep 16, 2024 3:01 pm
by MatteoCarnelos
Hi all,
sorry if I reply now but I was focused on other projects.
Anyway, I tried to create another new template from zero (I added "_19.0" in the server folder), to check if that solved the problem.
It worked for two days and then the connection between Meteobridge and Meteotemplate failed again.
Different from before, if I try to launch the api.php link from the browser it works, with "Success" reply.
And another strange thing is that it seams load the data sometimes, in fact
in my site, sometimes, we have the "ONLINE" indication (on the right), insted in the Meteobdrige panel there are the two red X.
Re: Connection between meterobridge and meteotemplate
Posted: Mon Sep 16, 2024 5:58 pm
by Gyvate
potentially two (or combined) issues:
1. internet access issues out of Meteobridge and your control
2. issues with the Meteobridge template for Meteotemplate
(I use my own http request for my MT post because the inbuilt template is not complete and Boris doesn't want to change anything before he gets an OK from the MT developer - which lasts already for a couple of years as there is no reply from there - therefore I made my own one and everything works fine)
You have the example of the http request (event) in an earlier post of mine in this thread
Re: Connection between meterobridge and meteotemplate
Posted: Tue Sep 17, 2024 3:29 pm
by MatteoCarnelos
Thank you for the reply.
Now seams everithing works well... I don't knpw if this will durate or not.
In negative case, I will try with an http request as you advise, maybe I will ask you some information regard it.
In the meanwhile I cross the fingers.
Re: Connection between meterobridge and meteotemplate
Posted: Thu Sep 19, 2024 2:31 pm
by admin
The initial error message points to a situation where Meteobridge is told to send a HTTP request to a HTTP URL. To do so Meteobridge makes use of the busybox wget, which is very tiny and therefore resided in flash (and loads the Meteobridge application stack on boot) but cannot handle SSL. When the HTTP request reaches the web server this decides to be smart and redirects "insecure HTTP" traffic to HTTPS on the same server. This change in protocol cannot be handled by the busybox wget of the Meteobridge, therefore, it complains and fails.
You can solve the situation by directly addressing the HTTPS address on the URL line. Doing so the Meteobridge realizes that it is about HTTPS and it makes use of the SSL enabled wget which is part of the downloaded application stack that resides in RAM disk as flash storage is too small to handle the needed OPENSSL libraries.
Long story short: Redirection from HTTP to HTTPS on the server causes the trouble. Using the HTTPS URL from the start will fix it.
Re: Connection between meterobridge and meteotemplate
Posted: Thu Sep 19, 2024 3:05 pm
by MatteoCarnelos
Thank you for the replay, but I think it is not enoght simple to understand for me. I'm not much skilled in this field...
Can you show me the correct HTTPS address that I have to write on the the URL line?
Re: Connection between meterobridge and meteotemplate
Posted: Fri Sep 20, 2024 11:33 am
by admin
just replace "http://..." by "https://..."
Re: Connection between meterobridge and meteotemplate
Posted: Mon Sep 23, 2024 3:28 pm
by MatteoCarnelos
Hello, I write you my four attempts and their results (-->)
1. posting via an event, periodical, every 15 seconds, this string:
http://simonicco.altervista.org/Meteote ... api.php?U=[epoch.1:]&T=[th0temp-lastval.1:]&TMX=[th0temp-max5:]&TMN=[th0temp-min5:]&H=[th0hum-lastval.1:]&P=[thb0seapress-lastval:1]&W=[wind0avgwind-lastval=kmh:1]&G=[wind0wind-lastval=kmh:1]&B=[wind0dir-lastval:1]&R=[rain0total-daysum:--]&RR=[rain0rate-lastval:1]&S=[sol0rad-lastval:2]&UV=[uv0index-lastval:1]&PASS=*****
--> meteotemplateLive.txt file is not updated
--> in the monitor tab I have this information:
Code: Select all
HTTP Upload: R=0.0&S=2&UV=1&PASS=******: HTTPS support not compiled in. <BR>')">
2. send the same string of attempt 1 with my browser
--> meteotemplateLive.txt file is not updated
--> empty white page in browser
3. posting via an event the same string of attempt 1 but with https:// instead of http://
--> meteotemplateLive.txt file is not updated
--> in the monitor tab I have this information:
Code: Select all
HTTP Upload: 2024-09-23 15:22:42 Sent: 2024-09-23 15:22:39
4. send the same string of attempt 2 with my browser
--> meteotemplateLive.txt file is not updated
--> empty white page in browser
What can I do now?
Re: Connection between meterobridge and meteotemplate
Posted: Tue Sep 24, 2024 3:30 pm
by MatteoCarnelos
Maybe, really maybe, I understood the situation.
I want to explain here my reasoning, so you can give me your opinion on it.
First of all I have to clarify that I degugged a bit the api.php file and I noted the issues was on this IF command
Code: Select all
if(array_key_exists("R".$timeId,$liveInput)){
and the error was that the second argument is not valid.
So, I analyzed the second argument and it was NULL. I noted that this NULL was from the meteotemplatelive.txt that was an empty file.
I tried to delete the meteotemplatelive.txt file and everything started to work well again!
Meteobridge now calls the api.php file without any problem and there aren't the two red X.
In my opinion all of this was from a situation of full space on the server that happened time ago, that could have created a meteotemplatelive.txt empty file because there was any free space to write on it.
Do you think this is possible?