Add support for HOMEWEATHERSTATION template

All about the standard Meteobridge devices based on mobile routers from TP-Link, D-Link, ASUS

Moderator: Mattk

weatherist34
Junior Boarder
Junior Boarder
Posts: 33
Joined: Tue Mar 28, 2017 6:57 am

Re: MYSQL Added for HOMEWEATHERSTATION template

Post by weatherist34 » Fri Oct 06, 2017 10:27 am

weatherist34 wrote:
Fri Oct 06, 2017 10:16 am
admin wrote:
Sun May 28, 2017 11:19 pm
Support will be added to the next update coming soon.

New feature will be in the Meteobridge weather network section, as we did for the Meteotemplate. Upload template will expect to find a mb.php script at the user-defined server URL and it will report data via a HTTP GET request. mb.php takes filled template given via URL parameter "d" and stores this into a realtime.txt file on the server.

Template used to generate this file can be adapted independent from future Meteobridge releases and is located at:
http://content.meteobridge.com/template ... n.template
added database support this is exclusive for meteobridge users and my commitment to developing further solely for meteobridge .thanks to Boris
sorry it took so long to setup the meteobridge you sent many months ago but now I can focus properly and begin to really understand how it works
and a week in use Im seeing lots of benefits and possible ideas for the near future..

good morning you can now download the MYSQL version which is kind of exclusive to the meteobridge API users . i have included a set up guide in the download .

basically the meteobridge is doing everything from inserting in to database , creating chart files for year, month and daily maintenance which prevents the database becoming excessive in size i.e millions of rows which in time will drag your server to a slow performance , MYSQL is efficient but also realise there is a cpu PERFORMANCE HIT especially noticeable on low cost shared hosting environments. doing daily maintenance or weekly maintenance keeps everything running efficiently. remember I hate slow performing websites
so I always try to find a way to avoid adding something new and then only to find its a performance hit..

so example.. 10 visitors to your site all simultaneously calling millions of rows from your database result equals big slow down !!

in the download if you read the set up guide mbx5mysqlsetup.pdf you will see how i set it all up without any use of cron jobs and added a small maintenace script to run at end of each day at 00:00 . in the setup guide there are images to help . snippet below. as always available at https://weather34.com/homeweatherstation and is running at https://weather34.com

*note only this version MB-X5MYSQL and a WF-X5 weatherflow version of the template will receive any further development. the other versions what is available today is has far Im going with them i.e. weather display,cumulus,ws1001 and the standard NON api meteobridge version.

so only MB-X5MYSQL & WF-X5(not released yet) will be developed on. the other downloads as they are are fully working and there is a good amount of forum support for those if needed from many weather enthusiasts which use the those versions.

1.enter your phpmyadmin screen via cPanel
or whichever method you use to access.
2.create a database called weatherstation
3.select / highlight database called weatherstation
4.now import the weatherstation.sql file
provided in the download .



if all was done correctly you should see some sample values *note it contains sample
data this has to be removed before you connect
your meteobridge to the database.

now empty the database using the operations tab
and TRUNCATE .


Part 2.
meteobridge setup , meteobridge is going to
do all the work for us . *note we do not need any
cron job services or setup of cron job we are going to
simulate and let meteobridge do everything.

these files are in the folder /mdbfiles
stationcron.php
1.select services tab shown above
2.GOTO new select service and choose
HTTP REQUEST
3.GOTO select event type and choose
PERIODICALLY
4.set the stationcron.php url to run
every 15 minutes.

addtoyear.php
1.GOTO new select service and choose
HTTP REQUEST
3.GOTO select event type and choose
Specific Time
4.set the addtoyear.php url to run
every 23:45.

empty.php
1.GOTO new select service and choose
HTTP REQUEST
3.GOTO select event type and choose
Specific Time
4.set the empty.php url to run
every 00:00.

you can manually test these but please empty
the tables via (TRUNCATE) method afterwards.

easyweathersetup.php

open easyweathersetup.php add in the following

1.add database username
2.add database password
3.database name weatherstation

then check other settings.

and save.

weatherist34
Junior Boarder
Junior Boarder
Posts: 33
Joined: Tue Mar 28, 2017 6:57 am

Re: Add support for HOMEWEATHERSTATION template

Post by weatherist34 » Sat Oct 07, 2017 10:48 am

(Updated 7th October 2017)
(Update fixes for conversions of metric to non metric in the charts,also windgust correction .missed apikey for forecast fixed tnx Josep)
34-X5 MB-X5SQL (4.1MB)


https://weather34.com/homeweatherstation/

brian

User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 5306
Joined: Mon Oct 01, 2007 10:51 pm

Re: Add support for HOMEWEATHERSTATION template

Post by admin » Sat Oct 07, 2017 11:57 am

Thanks for making those improvements available to the the Meteobridge community. :D

weatherist34
Junior Boarder
Junior Boarder
Posts: 33
Joined: Tue Mar 28, 2017 6:57 am

Re: Add support for HOMEWEATHERSTATION template

Post by weatherist34 » Wed Jan 10, 2018 8:28 am

Good Morning

due to the ongoing issues at weather underground for many months on and off the use of weather underground forecast data has now been replaced by a new API in the template , it now uses a service from APIXU https://www.apixu.com . simply only requires a API Key which can sign up for free.

If weather underground ever returns to a stable position the option of reverting back is relatively easy to add back on.

updated 14-January 2018 now reverted back to wunderground as new APIXU was not reliable in many locations in some cases using data some 150km or more from PWS station location.





Brian
Last edited by weatherist34 on Sun Jan 14, 2018 3:33 pm, edited 1 time in total.

rune
Expert Boarder
Expert Boarder
Posts: 104
Joined: Wed Jun 24, 2009 10:51 pm

Re: Add support for HOMEWEATHERSTATION template

Post by rune » Sun Jan 14, 2018 12:38 pm

@weatherist34 your effort's are highly appreciated and you've really created a very nice solution for displaying PWS data :D. I'm just wondering, now that Meteobridge is supported, how can it be used with Meteohub?

weatherist34
Junior Boarder
Junior Boarder
Posts: 33
Joined: Tue Mar 28, 2017 6:57 am

Re: Add support for HOMEWEATHERSTATION template

Post by weatherist34 » Sun Jan 14, 2018 3:31 pm

rune wrote:
Sun Jan 14, 2018 12:38 pm
@weatherist34 your effort's are highly appreciated and you've really created a very nice solution for displaying PWS data :D. I'm just wondering, now that Meteobridge is supported, how can it be used with Meteohub?
hello

thanks for the compliment however it is not all me its a combination of Boris and users that got it where it is today , only in recent months I have been using meteobridge I have been able to polish it off and introduce ideas and make it the most efficient reliable method of using the weather34 template .

so having looked at http://www.meteohub.de/files/HTTP-Data- ... l-v1.5.pdf if Im right there are two types of files outputted plaintext and XML ? if all plaintext or XML files are outputted from users in an identical layout then its pretty easy to add on and make a version or option to used Meteohub . Now the downside I don't use Meteohub my only experience literally is having just read that document, my concern would be a multiple of variations generated type file layouts . as the method of getting data is about position of the value in a file.

so it is possible but I would need a sample output generated to plaintext(preferred) or xml to get it of the ground.

Brian..

rune
Expert Boarder
Expert Boarder
Posts: 104
Joined: Wed Jun 24, 2009 10:51 pm

Re: Add support for HOMEWEATHERSTATION template

Post by rune » Sun Jan 14, 2018 4:53 pm

The layout is completely standard, so it should work with all installations. It would be fantastic if you were to support Meteohub as well :D.
I'll send you a PM with live-links to both files, if you are keen on giving it a try.

weatherist34
Junior Boarder
Junior Boarder
Posts: 33
Joined: Tue Mar 28, 2017 6:57 am

Re: Add support for HOMEWEATHERSTATION template

Post by weatherist34 » Tue Jan 16, 2018 10:39 am

rune wrote:
Sun Jan 14, 2018 4:53 pm
The layout is completely standard, so it should work with all installations. It would be fantastic if you were to support Meteohub as well :D.
I'll send you a PM with live-links to both files, if you are keen on giving it a try.
hello thanks I will look at it sometime next week . ideally I would prefer to see an API option as this allows a lot other functions and would mean every user is able to use the template based on the same API standard output values. I looked at the files there is a lot of data in there and would need quite some time to break it all down and establish the common data values used by everyone can't go down the road of users all using different values .the template merely focuses on realtime data and uses mysql for historical data.

hang in there might take some time..

Brian

rune
Expert Boarder
Expert Boarder
Posts: 104
Joined: Wed Jun 24, 2009 10:51 pm

Re: Add support for HOMEWEATHERSTATION template

Post by rune » Wed Jan 17, 2018 7:52 pm

I agree. Using files is a bit old fashioned :). There are also the API ports (Secion 4 in the User Manual):
Port 5555: Sensor Status (e.g. '0 4 675079 0 1233391707 1 11.2°')
Port 5500: Copy of Sensor Data directly from the Weather Station (Not so usable, I think)
Port 5558: List of Sensor Data (e.g. 'actual_wind0_dir_deg 239'), you can get all sensors or query specific sensors.
Port 5559: XMS version of the Sensor Data (e.g. '<item sensor="wind0" cat="dir" unit="deg">257</item>')

Maybe the sensor data API is better than files. If you wish to test, I can open up a firewall port for you to test against :D

weatherist34
Junior Boarder
Junior Boarder
Posts: 33
Joined: Tue Mar 28, 2017 6:57 am

Re: Add support for HOMEWEATHERSTATION template

Post by weatherist34 » Thu Jan 18, 2018 12:03 am

rune wrote:
Wed Jan 17, 2018 7:52 pm
I agree. Using files is a bit old fashioned :). There are also the API ports (Secion 4 in the User Manual):
Port 5555: Sensor Status (e.g. '0 4 675079 0 1233391707 1 11.2&#176;')
Port 5500: Copy of Sensor Data directly from the Weather Station (Not so usable, I think)
Port 5558: List of Sensor Data (e.g. 'actual_wind0_dir_deg 239'), you can get all sensors or query specific sensors.
Port 5559: XMS version of the Sensor Data (e.g. '<item sensor="wind0" cat="dir" unit="deg">257</item>')

Maybe the sensor data API is better than files. If you wish to test, I can open up a firewall port for you to test against :D
hi well its not old fashion as the api script creates a file to read off every 10 seconds . I can't go do the road of assigning ports not everyone who uses template is going to want start learning about pulling data of PORTS . sorry I don't own a meteohub so I would have no understanding of what is available


I will look at it soon and see if I can get something started to work on.


Brian

User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 5306
Joined: Mon Oct 01, 2007 10:51 pm

Re: Add support for HOMEWEATHERSTATION template

Post by admin » Sat Jan 20, 2018 10:26 am

If there is a larger amount of Meteohub users who need it, I can include HOMEWEATHERSTATION support to Meteohub. It is quite some effort on my side, so it will need some backing of users being interested in this. I will raise a thread on this in the Meteohub section.

weatherist34
Junior Boarder
Junior Boarder
Posts: 33
Joined: Tue Mar 28, 2017 6:57 am

Re: Add support for HOMEWEATHERSTATION template

Post by weatherist34 » Sat Jan 20, 2018 11:31 am

admin wrote:
Sat Jan 20, 2018 10:26 am
If there is a larger amount of Meteohub users who need it, I can include HOMEWEATHERSTATION support to Meteohub. It is quite some effort on my side, so it will need some backing of users being interested in this. I will raise a thread on this in the Meteohub section.
Hello Boris

I have a few emails for inclusion of meteohub , your input is valuable as I have no understanding or experience of meteohub but like you did with meteobridge all I need to see is the output and I can adapt the template accordingly.

If we ping a file like we do in meteobridge mb.php we can then replicate identical functionality and features to support meteohub. You have my email so feel free to drop any ideas and solutions. Think what your find is the popularity will increase if the meteohub is capable . Meteobridge useage of the template literally exploded when you included the option to support template. Every day or week a new user appears in inbox . For me it’s the most versatile solution without using software because it is all self sufficient requires little interaction from the user once set up. Apart from firmware reboots mine sits there happily running day in day out on UPS..

Brian

andlil
Fresh Boarder
Fresh Boarder
Posts: 2
Joined: Sat Jan 20, 2018 1:13 pm

Re: Add support for HOMEWEATHERSTATION template

Post by andlil » Sat Jan 20, 2018 1:24 pm

Hi guys!

Just wanted to raise my voice in supporting the meteohub as well. I run an older version of Homeweatherstation off clientraw.txt but native support would be great.

Have a nice weekend!
//Anders

weatherist34
Junior Boarder
Junior Boarder
Posts: 33
Joined: Tue Mar 28, 2017 6:57 am

Re: Add support for HOMEWEATHERSTATION template

Post by weatherist34 » Tue Jan 23, 2018 5:26 pm

Hello Boris can you gives us a bit more information in reference to the latest firmware where you mention max wind gust..

Thanks brian

User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 5306
Joined: Mon Oct 01, 2007 10:51 pm

Re: Add support for HOMEWEATHERSTATION template

Post by admin » Wed Jan 24, 2018 8:18 pm

Brian, that was a mix-up on my side. I have not changed homeweatherstation code.

Post Reply