Connection between meterobridge and meteotemplate

This section covers the Meteobridge PRO, PRO2, NANO SD, Raspberry Pi and VM platforms exclusively

Moderator: Mattk

MatteoCarnelos
Fresh Boarder
Fresh Boarder
Posts: 19
Joined: Tue Feb 20, 2024 3:29 pm

Connection between meterobridge and meteotemplate

Post by MatteoCarnelos »

Hello everybody,
I write you this post because I have a problem with the connection between the meterobridge and meteotemplate, to update the data that populate this website: https://simonicco.altervista.org/Meteot ... esktop.php.
It worked until four days ago.

I don't understand why there isn't the reason of error in red: see highlighted in yellow in the picture "Empty" enclosed.
So I tried to put a wrong URL or a wrong password and the error reason appears in both the cases: see highlighted in yellow in the pictures "WrongURL" and "WrongPW" enclosed.

Can you help me to solve or give me information how can I understand the problem?

Thank you.
Matteo.
Attachments
WrongURL.png
WrongURL.png (62.72 KiB) Viewed 4635 times
WrongPW.png
WrongPW.png (57.24 KiB) Viewed 4635 times
Empty.png
Empty.png (56.06 KiB) Viewed 4635 times
User avatar
Gyvate
Platinum Boarder
Platinum Boarder
Posts: 453
Joined: Thu May 14, 2020 4:36 pm
Location: Saarbrücken, Germany

Re: Connection between meterobridge and meteotemplate

Post by Gyvate »

you may have an issue with your DNS server. That's the place where the domain portion of your URI gets translated into an IP address.
The message "unable to resolve ..." points in this direction
That server stands somewhere in the internet, with your internet provider or somewhere else.
It is not in your control.
Maybe the DNS info in Meteobridge got lost for some reason ...
Go to the Network tab and check the DNS entry - if nothing is there or only your router (gateway) IP address, change it to 208.67.220.220, restart Meteobridge and see what it gives. Also make sure that the IP address of your router is put into the Gateway field.

It's also possible the SSL certificate at your hosting server has expired.
Try http:// instead of https:// (anyhow your transferred weather data are no secret :lol: )

potrebbe esserci un problema con il server DNS. È il luogo in cui la porzione di dominio dell'URI viene tradotta in un indirizzo IP.
Il messaggio "Impossibile risolvere ..." indica questa direzione.
Questo server si trova da qualche parte in Internet, presso il vostro provider o altrove.
Non è sotto il vostro controllo.
Forse le informazioni DNS di Meteobridge sono andate perse per qualche motivo...
Andate nella scheda Rete e controllate la voce DNS - se non c'è nulla o se c'è solo l'indirizzo IP del vostro router (gateway), cambiatelo con 208.67.220.220, riavviate Meteobridge e vedete cosa vi dà. Assicurarsi inoltre che l'indirizzo IP del router sia inserito nel campo Gateway.

È anche possibile che il certificato SSL del vostro server di hosting sia scaduto.
Prova http:// invece di https:// (in ogni caso i dati meteo trasferiti non sono un segreto :lol: ).
WH4000SE 1.6.6/1 x DP1500/4 x GW1000 1.7.7/GW1100 2.3.0/HP1000SE Pro 1.9.3//2 x WH2650 1.7.7/GW2000 3.1.0
2xMeteobridge Pro [B+R] 15161, 2xRPi4B-2GB/16/32 3139,VM128 1704
Weather Landing page: https://meshka.eu
Ecowitt WiKi: https://meshka.eu/Ecowitt/dokuwiki
MatteoCarnelos
Fresh Boarder
Fresh Boarder
Posts: 19
Joined: Tue Feb 20, 2024 3:29 pm

Re: Connection between meterobridge and meteotemplate

Post by MatteoCarnelos »

Thank you fo the reply.
But just to be clear, the "unable to resolve" message appears when I tried putting a wrong API URL.
While, when all the information (URL and password) are correct, there is no message ("empty" file in the previous post).
Do you think I should try with your indications anyway?
User avatar
Gyvate
Platinum Boarder
Platinum Boarder
Posts: 453
Joined: Thu May 14, 2020 4:36 pm
Location: Saarbrücken, Germany

Re: Connection between meterobridge and meteotemplate

Post by Gyvate »

1. try with http:// only and the DNS settings
2. check at your Meteotemplate hosting site, if the API gets updated (I guess you have installed the API plugin/block in your Meteotemplate installation - if not, do so)
a) with the plugin
b) with a FTP client and check if the file meteotemplateLive.txt in the /template directory is updated and if it contains reasonable values

If nothing arrives at your website, deactivate your posting to Meteotemplate and try to post the data via an Event:
Services --> Events --> select http request, periodical, every 15 seconds and enter as destination:
(that's a test string - if it works you can add your missing sensors)

http://your-website/template/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=your-password

and check if something becomes visible in the API plugin or in the meteotemplateLive.txt file
WH4000SE 1.6.6/1 x DP1500/4 x GW1000 1.7.7/GW1100 2.3.0/HP1000SE Pro 1.9.3//2 x WH2650 1.7.7/GW2000 3.1.0
2xMeteobridge Pro [B+R] 15161, 2xRPi4B-2GB/16/32 3139,VM128 1704
Weather Landing page: https://meshka.eu
Ecowitt WiKi: https://meshka.eu/Ecowitt/dokuwiki
MatteoCarnelos
Fresh Boarder
Fresh Boarder
Posts: 19
Joined: Tue Feb 20, 2024 3:29 pm

Re: Connection between meterobridge and meteotemplate

Post by MatteoCarnelos »

1. try with http:// only and the DNS settings
I tried, it doesn't work (see picture enclosed)
2. check at your Meteotemplate hosting site, if the API gets updated (I guess you have installed the API plugin/block in your Meteotemplate installation - if not, do so)
a) with the plugin
b) with a FTP client and check if the file meteotemplateLive.txt in the /template directory is updated and if it contains reasonable values
following the b) option
- with the stadard parameters the meteotemplateLive.txt was empty (last update is the day when all the problems started)
- with "posting the data via an Event" the meteotemplateLive.txt is empty yet (I put this adress:
https://simonicco.altervista.org/Meteot ... 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=*******
I also checked in the Monitor tab if there is something strange but seams be all ok (see picture enclosed)
Attachments
Monitor.PNG
Monitor.PNG (45.25 KiB) Viewed 4568 times
HTTP.PNG
HTTP.PNG (71.93 KiB) Viewed 4568 times
User avatar
Gyvate
Platinum Boarder
Platinum Boarder
Posts: 453
Joined: Thu May 14, 2020 4:36 pm
Location: Saarbrücken, Germany

Re: Connection between meterobridge and meteotemplate

Post by Gyvate »

try the event with http:// instead of https://
your hosting provider may have changed something, the certificate may have expired ...

you can also fill in the string yourself with real values and send with your browser: (i.e. put in in the URL field [web address field] of your browser in press enter)
example:

Code: Select all

http://your-domain/template/api.php?U=1708854493&T=6.0&TMX=6&TMN=2.9&H=80&P=1003.6&W=4.0&G=12.0&B=90&R=0.3&RR=0.0&S=184.6&UV=0.5&PASS=your-password&Station=GW1000A&FW=V1.7.6
that's what Meteobridge sends - and what will arrive at your hosting website.

You need to use an actual +/- 15 min Epoch time (--> https://www.epochconverter.com/) - otherwise MT might discard the post

If it works, you'll get a "success" message - if not some other message which you will have to discuss with your hosting provider.

If it works, meteotemplateLive.txt should be updated.
Maybe there was a change in the PHP version on your website - and you didn't upgrade your Meteotemplate to the latest version (PHP support)
WH4000SE 1.6.6/1 x DP1500/4 x GW1000 1.7.7/GW1100 2.3.0/HP1000SE Pro 1.9.3//2 x WH2650 1.7.7/GW2000 3.1.0
2xMeteobridge Pro [B+R] 15161, 2xRPi4B-2GB/16/32 3139,VM128 1704
Weather Landing page: https://meshka.eu
Ecowitt WiKi: https://meshka.eu/Ecowitt/dokuwiki
User avatar
wvdkuil
Platinum Boarder
Platinum Boarder
Posts: 604
Joined: Sun Jul 24, 2011 8:00 pm
Location: Belgium
Contact:

Re: Connection between meterobridge and meteotemplate

Post by wvdkuil »

MatteoCarnelos wrote: Sun Feb 25, 2024 10:57 am
1. try with http:// only and the DNS settings
I tried, it doesn't work (see picture enclosed)
Your web-site does not allow http incoming traffic.
It automatically switches that access to https.
The data seems to be arriving as . . .nicco.altervista.org/Meteotemplate/template/api.php?PASS=12345&t=1 results in an Unauthorized answer

Your Meteobridge does not support https outgoing traffic and stops communicating as the receiving server switches to https
At least according to the "not compiled-in" error message.
So use http:// only
But you have to set the http access for the Meteotemplate/template/api.php script in
  • your .htaccess file in the root
  • or in your cPanel
Wim
MatteoCarnelos
Fresh Boarder
Fresh Boarder
Posts: 19
Joined: Tue Feb 20, 2024 3:29 pm

Re: Connection between meterobridge and meteotemplate

Post by MatteoCarnelos »

I tried four different event (see "Events" image enclosed)
- with "https" and standard parameters (see "Monitor tab - https" image enclosed)
- with "https" and real values (see "Monitor tab - https real values" image enclosed)
- with "http" and standard parameters (see "Monitor tab - http" image enclosed)
- with "http" and real values (see "Monitor tab - http real values" image enclosed)

Always same result: meteotemplateLive.txt not updated
But you have to set the http access for the Meteotemplate/template/api.php script in
    your .htaccess file in the root
    Can you explain me how to do it? I'm using Filezilla to find .htaccess file in the root
    Attachments
    Monitor tab - https.PNG
    Monitor tab - https.PNG (55.88 KiB) Viewed 4550 times
    Monitor tab - https real values.PNG
    Monitor tab - https real values.PNG (56.48 KiB) Viewed 4550 times
    Monitor tab - http.PNG
    Monitor tab - http.PNG (85.89 KiB) Viewed 4550 times
    Monitor tab - http real values.PNG
    Monitor tab - http real values.PNG (90.58 KiB) Viewed 4550 times
    Events.PNG
    Events.PNG (96.09 KiB) Viewed 4550 times
    User avatar
    Gyvate
    Platinum Boarder
    Platinum Boarder
    Posts: 453
    Joined: Thu May 14, 2020 4:36 pm
    Location: Saarbrücken, Germany

    Re: Connection between meterobridge and meteotemplate

    Post by Gyvate »

    did you try the "raw" method - just posting the https string via your browser as described earlier ?
    WH4000SE 1.6.6/1 x DP1500/4 x GW1000 1.7.7/GW1100 2.3.0/HP1000SE Pro 1.9.3//2 x WH2650 1.7.7/GW2000 3.1.0
    2xMeteobridge Pro [B+R] 15161, 2xRPi4B-2GB/16/32 3139,VM128 1704
    Weather Landing page: https://meshka.eu
    Ecowitt WiKi: https://meshka.eu/Ecowitt/dokuwiki
    User avatar
    wvdkuil
    Platinum Boarder
    Platinum Boarder
    Posts: 604
    Joined: Sun Jul 24, 2011 8:00 pm
    Location: Belgium
    Contact:

    Re: Connection between meterobridge and meteotemplate

    Post by wvdkuil »

    MatteoCarnelos wrote: Sun Feb 25, 2024 12:48 pm Can you explain me how to do it? I'm using Filezilla to find .htaccess file in the root
    This is how the contens of a .htaccess file should look.

    Code: Select all

    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteCond %{REQUEST_URI} !^/Meteotemplate/template/
    RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
    
    But i think it is easier to switch off the automatic conversion of all http traffic in your cPanel.
    Ask your hosting company for support.
    If http traffic is allowed you can better locate the problem.

    As @Gyvate asked, did you test http in the browser with a valid data string?

    Also is there a log in MeteoTemplate showing which traffic arrives?

    Wim
    User avatar
    Gyvate
    Platinum Boarder
    Platinum Boarder
    Posts: 453
    Joined: Thu May 14, 2020 4:36 pm
    Location: Saarbrücken, Germany

    Re: Connection between meterobridge and meteotemplate

    Post by Gyvate »

    wvdkuil wrote: Sun Feb 25, 2024 2:30 pm
    Also is there a log in MeteoTemplate showing which traffic arrives?
    the file meteotemplateLive.txt in the .../template directory serves as a loop collector
    When something arrives, it will show the last post;
    it will look like:
    {"U":1708889632,"T":7.9,"TMX":7.9,"TMN":7.9,"H":65,"P":997.4,"W":4.7,"G":5.8,"B":105,"R":0.3,"RR":0,"S":0,"UV":0, "Station":"GW1000A","FW":"V1.7.6","UTime":1708889632,"TTime":1708889632,"TMXTime":1708889632,"TMNTime":1708889632,"HTime":1708889632,"PTime":1708889632,"WTime":1708889632,"GTime":1708889632,"BTime":1708889632,"RTime":1708889632,"RRTime":1708889632,"STime":1708889632,"UVTime":1708889632}
    and from the timestamp (Epoch in the file or the OS timestamp of meteotemplateLive.txt) you can tell when it was updated
    WH4000SE 1.6.6/1 x DP1500/4 x GW1000 1.7.7/GW1100 2.3.0/HP1000SE Pro 1.9.3//2 x WH2650 1.7.7/GW2000 3.1.0
    2xMeteobridge Pro [B+R] 15161, 2xRPi4B-2GB/16/32 3139,VM128 1704
    Weather Landing page: https://meshka.eu
    Ecowitt WiKi: https://meshka.eu/Ecowitt/dokuwiki
    User avatar
    admin
    Platinum Boarder
    Platinum Boarder
    Posts: 7854
    Joined: Mon Oct 01, 2007 10:51 pm

    Re: Connection between meterobridge and meteotemplate

    Post by admin »

    The "not compiled in" message appears when the URL states "http" and Meteobridge makes use of the non-SSL supporting simple (busy box) version of wget to send data. Some web servers think they are the smartest guys in town and automatically redirect this http request to a more secure https request. Unfortunately, the non-SSL wget cannot handle this an throw an error. So in this case you have to use a https URL from the beginning.
    MatteoCarnelos
    Fresh Boarder
    Fresh Boarder
    Posts: 19
    Joined: Tue Feb 20, 2024 3:29 pm

    Re: Connection between meterobridge and meteotemplate

    Post by MatteoCarnelos »

    I tried posting the data via an Event, see image named "DataViaEvent" attached.

    In the URL of I wrote:

    Code: Select all

    http://simonicco.altervista.org/Meteotemplate/template/api.php?U=1708854493&T=6.0&TMX=6&TMN=2.9&H=80&P=1003.6&W=4.0&G=12.0&B=90&R=0.3&RR=0.0&S=184.6&UV=0.5&PASS=XXXXXX&Station=GW1000A&FW=V1.7.6
    but the file meteotemplateLive.txt is always empty anda the data of creation of this file is the day when the issue started.
    Attachments
    DataViaEvent.PNG
    DataViaEvent.PNG (22.99 KiB) Viewed 4514 times
    User avatar
    Gyvate
    Platinum Boarder
    Platinum Boarder
    Posts: 453
    Joined: Thu May 14, 2020 4:36 pm
    Location: Saarbrücken, Germany

    Re: Connection between meterobridge and meteotemplate

    Post by Gyvate »

    I said - for test purposes - forget about Meteobridge and post that http request in your browser - just enter/copy
    http://simonicco.altervista.org/Meteote ... &FW=V1.7.6
    with your proper Meteotemplate password (!)
    into the URL field of your browser and submit.

    How will you ever come to a result if you don't follow testing and troubleshooting instructions ??

    Because, if that call fails, something is wrong with either your hosting site or with your Meteotemplate installation.
    If it's successful, something might be fishy with Meteobridge.
    WH4000SE 1.6.6/1 x DP1500/4 x GW1000 1.7.7/GW1100 2.3.0/HP1000SE Pro 1.9.3//2 x WH2650 1.7.7/GW2000 3.1.0
    2xMeteobridge Pro [B+R] 15161, 2xRPi4B-2GB/16/32 3139,VM128 1704
    Weather Landing page: https://meshka.eu
    Ecowitt WiKi: https://meshka.eu/Ecowitt/dokuwiki
    MatteoCarnelos
    Fresh Boarder
    Fresh Boarder
    Posts: 19
    Joined: Tue Feb 20, 2024 3:29 pm

    Re: Connection between meterobridge and meteotemplate

    Post by MatteoCarnelos »

    Sorry, I didn't understand what you meant. As I said before, I'm not that experienced so I may misunderstand the directions.

    Now I posted the link below in my browser address

    Code: Select all

    https://simonicco.altervista.org/Meteotemplate/template/api.php?U=1708854493&T=6.0&TMX=6&TMN=2.9&H=80&P=1003.6&W=4.0&G=12.0&B=90&R=0.3&RR=0.0&S=184.6&UV=0.5&PASS=XXXXX&Station=GW1000A&FW=V1.7.6
    with the proper password that replace the XXXXX.

    The result is a white page. No messagges, nothing appears.
    Post Reply