Weewx and meteoteplate data reporting

Post Reply
rjuricic
Language Admin
Language Admin
Posts: 10
Joined: Sun Aug 20, 2017 7:03 pm
Location: Zagreb
Station model: Davis Vp2 Iss
Software: WeeWx
Contact:

Weewx and meteoteplate data reporting

Post by rjuricic » Wed Aug 30, 2017 5:24 pm

Hi all,

Recently moved from Meteobridge to WeeWx, and i must say that im very happy with that decision.
Software is configured to work with meteostick which receives data from VP2 ISS.

I noticed since start that there is some kind of wind gust reporting issue. First couple hours of work same value was reported via Meteotemplate API to web site, regardless of actual wind speed.
Afterwards i got dash instead of wind gust value via API shown in "Current" block, but in DB gust data is ok.
See image below (there are dashes below wind gust icon):
Image

Is this related to meteotemplate API or maybe to weewx configuration?
I have set binding = loop in order to be able to see real-time information regardless of DB.

This problem is still present and can be seen on website.
Image

User avatar
Luc
Developer
Developer
Posts: 168
Joined: Mon Aug 21, 2017 6:40 am
Location: Paramaribo, Suriname
Station model: Davis Pro 2 (2x)
Software: WeeWX
Contact:

Re: Weewx and meteoteplate data reporting

Post by Luc » Thu Aug 31, 2017 4:22 am

Hi Robert,
The wind gust is no part of the loop data of a Vantage Pro2 weather station. Thats why you will see the dashes (= no data).
To overcome this I modified the weewx uploader to meteotemplate myself to send both loop and archive messages.
I will show you the coming weekend how to do this (I'm busy the coming days).
Cheers, Luc
Image

rjuricic
Language Admin
Language Admin
Posts: 10
Joined: Sun Aug 20, 2017 7:03 pm
Location: Zagreb
Station model: Davis Vp2 Iss
Software: WeeWx
Contact:

Re: Weewx and meteoteplate data reporting

Post by rjuricic » Sat Sep 02, 2017 5:19 pm

Thx Luc,

I will be waiting for your instructions.
Image

User avatar
Luc
Developer
Developer
Posts: 168
Joined: Mon Aug 21, 2017 6:40 am
Location: Paramaribo, Suriname
Station model: Davis Pro 2 (2x)
Software: WeeWX
Contact:

Re: Weewx and meteoteplate data reporting

Post by Luc » Sun Sep 03, 2017 12:32 pm

How to upload both loop and archive data to meteotemplate

Open file .../user/meteotemplate.py
Locate line 132

Code: Select all

        loginf("Data will be uploaded to %s" % site_dict['server_url'])
Insert the next code in front of it.

Code: Select all

        if 'both' in binding:
            self.bind(weewx.NEW_LOOP_PACKET, self.handle_new_loop)
            self.bind(weewx.NEW_ARCHIVE_RECORD, self.handle_new_archive)
The result will look like:

Code: Select all

        if 'loop' in binding:
            self.bind(weewx.NEW_LOOP_PACKET, self.handle_new_loop)
        if 'archive' in binding:
            self.bind(weewx.NEW_ARCHIVE_RECORD, self.handle_new_archive)
        if 'both' in binding:
            self.bind(weewx.NEW_LOOP_PACKET, self.handle_new_loop)
            self.bind(weewx.NEW_ARCHIVE_RECORD, self.handle_new_archive)
        loginf("Data will be uploaded to %s" % site_dict['server_url'])
Change the meteotemplate section in in weewx.conf:

Code: Select all

    [[Meteotemplate]]
        server_url = http://my_meteotemplate_server/template/api.php
        password = my_meteotemplate_upload_password
        binding = both  # archive # loop # both
        log_success = False
        log_failure = True
Restart weewx

Success
Image

rjuricic
Language Admin
Language Admin
Posts: 10
Joined: Sun Aug 20, 2017 7:03 pm
Location: Zagreb
Station model: Davis Vp2 Iss
Software: WeeWx
Contact:

Re: Weewx and meteoteplate data reporting

Post by rjuricic » Sun Sep 03, 2017 5:06 pm

Thanks Luc, all done as you instructed.
I confirm that is working now.
Image

marc@geissmann.org
Observer
Observer
Posts: 13
Joined: Sun Aug 20, 2017 8:23 pm

Re: Weewx and meteoteplate data reporting

Post by marc@geissmann.org » Sun Sep 03, 2017 7:39 pm

Hi rjuricic

Just wondering what was you rationale to switch from Meteobridge to Weewx? What is your experience with Weewx so far?
I am currently using Meteobridge.

Thx

rjuricic
Language Admin
Language Admin
Posts: 10
Joined: Sun Aug 20, 2017 7:03 pm
Location: Zagreb
Station model: Davis Vp2 Iss
Software: WeeWx
Contact:

Re: Weewx and meteoteplate data reporting

Post by rjuricic » Sun Sep 03, 2017 9:17 pm

Hi Marc,

I have one, long term, major issue with two things:
Power outages are often in my place, especially if there is thunderstorm activity. No power means no internet or no meteobridge. I dont have option to secure backup power for both adsl router and meteobridge as they are physically on different locations.
So, if no internet or power = no data being recorded. Internet is more critical when using meteobridge.
WeeWx overcomes this issue, as it continues to record data regardless of internet and i have tested it in both situations. I put it on old acer zg5 which has around 2h battery backup. So far so good, we'll see what time brings.

Since i have only meteostick to receive data from vp2 iss, im very limited with current options to secure data being recorded all time. I'm glad i found WeeWX.
Image

User avatar
hdultra103
Observer
Observer
Posts: 15
Joined: Thu Nov 16, 2017 8:01 pm
Location: Gig Harbor, Washington
Station model: Davis Vantage Pro 2 Plus
Software: Weewx
Contact:

Re: Weewx and meteoteplate data reporting

Post by hdultra103 » Tue Nov 21, 2017 6:38 pm

Hello Luc, I'm brand new to Meteotemplate so please bear with me if I ask a lot of questions. I also might add I really don't know much about writing code. I'm more of " like to play with the toys rather than build them guy." I'm to old to learn about all this coding stuff.

Ok, I saw your post from a couple of months ago about being able run both "loop" and "archive" at the same on the Weewx-Meteotemplate setup and I'd like to make that change. I'm confused about where where to actually find meteotemplate.py. I already have the extension installed in Weewx but where do I find it there to make the changes? I found meteotempate.py in the installation folder but making changes there wouldn't affect Weewx, would it? Any help you could give would be greatly appreciated.

One more thing, I saw some posts about an extension for converting Weewx database files so they can be imported into Meteotemplate. I have about 10 years of data I'd like to be able import into Meteotemplate. Thank you.

Michael

wx_jon
Advisor
Advisor
Posts: 52
Joined: Tue Aug 29, 2017 8:54 pm
Location: Seattle, WA, USA
Station model: Davis Vantage Pro 2 Plus
Software: weeWX
Contact:

Re: Weewx and meteoteplate data reporting

Post by wx_jon » Tue Nov 21, 2017 9:22 pm

hdultra103 wrote: Tue Nov 21, 2017 6:38 pm Ok, I saw your post from a couple of months ago about being able run both "loop" and "archive" at the same on the Weewx-Meteotemplate setup and I'd like to make that change. I'm confused about where where to actually find meteotemplate.py. I already have the extension installed in Weewx but where do I find it there to make the changes?
The meteotemplate.py file is at weewx/bin/user/meteotemplate.py. You can find the appropriate lines to modify there.

The setting is in the main weeWX configuration file, weewx/weewx.conf - under the [StdRESTful] header there should be a section [[Meteotemplate]] where you can set a parameter binding = both. Make sure that you made the changes to the code in meteotemplate.py before setting binding = both, and restart weeWX for changes to take effect.
hdultra103 wrote: Tue Nov 21, 2017 6:38 pm One more thing, I saw some posts about an extension for converting Weewx database files so they can be imported into Meteotemplate. I have about 10 years of data I'd like to be able import into Meteotemplate.
The thread about that is located here. Luc has a script to do that. I just exported everything manually from SQL when I did this a while back.

Post Reply