Page 1 of 1

Meteobridge Problem

Posted: Mon Jan 29, 2018 11:53 pm
by MJW
I just started up a new Meteobridge using a TP-Link MR2030 and everything went well until I tried to link it to meteotemplate. I put the address to the update.php in the field, trying both with ?password=xxx and without the password part, with the proper password in the password field. It doesn't want to work, see the screenshot below with the error message. I tried changing the database update page to say api instead of WU, and that does not seem to help. Anyone have any ideas?
meteobridge.JPG
meteobridge.JPG (59.76 KiB) Viewed 8498 times

Re: Meteobridge Problem

Posted: Tue Jan 30, 2018 12:25 am
by MJW
Additionally, I would like to push data to the MySQL database that powers meteotemplate. Does anyone have a good SQL query that does that?

Re: Meteobridge Problem

Posted: Tue Jan 30, 2018 2:58 am
by dmgould
In API URL place the exact path to your template file api.php (including the file name api.php at the end). In the Password field enter your update password.

Re: Meteobridge Problem

Posted: Tue Jan 30, 2018 1:29 pm
by MJW
Thanks, but from the screenshot you can see that I did that.

Re: Meteobridge Problem

Posted: Tue Jan 30, 2018 2:14 pm
by iatros
Hi MJW

as dmgould told you, the entry there looks like:

../[your template root]/api.php

for me it is: https://meteo.dubler.com/api.php

cheers, iatros

Re: Meteobridge Problem

Posted: Tue Jan 30, 2018 5:39 pm
by dmgould
MJW wrote: Tue Jan 30, 2018 1:29 pm Thanks, but from the screenshot you can see that I did that.
Actually, you haven't done that in the screenshot. Your URL is to the update directory. Your URL should be to the file api.php which is in the root directory of your template. It looks to me like yours would be http://weather.westfamilynj.net./meteo/api.php. Your update password goes in the password field and not at the end of the URL. Also enter just the update password not another URL in the password field.

Re: Meteobridge Problem

Posted: Wed Jan 31, 2018 2:31 am
by MJW
You are both right, I didn't have the right file & location. It is working now. Looking at what api.php does, it pushes the data straight to the MySQL installation, no need to have it set up separately in the meteobridge services, correct?

Re: Meteobridge Problem

Posted: Wed Jan 31, 2018 4:20 am
by dmgould
It looks like you have it working now. If everything is setup correctly the api should be feeding the data to your database at whatever interval you setup. You can check it out - log into your template, go to your control panel, and click on Edit Data in the Database square. It will show the data in your table for the current date and when it was written into the database (each line).

Re: Meteobridge Problem

Posted: Wed Jan 31, 2018 11:37 pm
by MJW
Thanks it is set up and working. In meteobridge, I have it set to call the api.php every 10 seconds with 5 retries, but in the meteotemplate database it is showing posts every 5 minutes. I don't see any settings on the meteotemplate side where to specify a shorter time. In the current conditions block, I have it setup to pull data every 30 seconds and in the station status block, I have it to show offline if more than 7 minutes since the last update. Am I missing a setting somewhere?

Re: Meteobridge Problem

Posted: Thu Feb 01, 2018 12:12 am
by Dehatter
The API logs your 10 secs updates, but only writes to the dB every five minutes. Most of the data is averaged, but some settings are listed as the max value during the 5 minutes (Wind gust for one). This way the php does not spend a lot of time (resources/space) writing to the dB. The values on your site will update based on your selection in the current block (30 secs for me), subject to the same averaging. You do not use gauges, but they update on their own schedule (user adjustable) as well.

Tom

Re: Meteobridge Problem

Posted: Thu Feb 01, 2018 12:14 am
by Dehatter
You also have a mismatch on units as shown in your current block. Probably the weather station page on meteobridge. Or could also be your settings in the current block setup. I can't tell from here.

Tom

Re: Meteobridge Problem

Posted: Thu Feb 01, 2018 1:51 am
by MJW
If you are talking about the pressure being in hPa and everything else in Imperial, I have it set that way on purpose, long story but it makes my wife happy. If it is something else, I will dig further.

Re: Meteobridge Problem

Posted: Thu Feb 01, 2018 2:27 am
by Dehatter
haha. Yes. Congratulations on having a wife that cares about pressure units!!

Mine just looks at me and says "Don't stay up all night!"

I just thought you missed it.

As to the API, this is similar to the way WU does it if you have used them. The current data is current, but the tables are (at least they used to be) on about 5 minute increments. Lately WU has been really crappy.

Tom