Live Steel Series Gauges

182 views
Skip to first unread message

Luc Heijst

unread,
Mar 16, 2017, 7:46:10 AM3/16/17
to weewx-user
I always wanted a live version of the Steel Series Gauges from Gerrit Grunwald and Mark Crossley. 
My Davis Vantage Pro2 is read by two weewx drivers, vantage and meteostick, and both drivers emit loop packets each 2.5 seconds.

My first attempt was to use the MesoWX package to fill on the webserver two MySql tables, one with archive data and the other with loop data.
After a loop packet is received a self-writen routine calculates the data for the Steel Series Gauges with both archive and loop data.
The data is written to a file and the Steel Series Gauges use this file for presentation.

At first I used the Weather Display data lay-out, later when it became available, I used the weewx steelseries skin and data format.
An extra complication was the introduction of weewx version 3.0 because the MesoWX uploader program 'sync.py' wasn't working anymore, so I had to fix that as well.
Finally all programs worked smoothly together, see the results at my website: http://www.lucdesign.nl/gauges-ss/gauges-ss.htm

Nowadays live became a lot simpler with the introduction of meteotemplate version 12.0 Orange and the new weewx-meteotemplate uploader.
I have configured the uploader to use loop packets and configured in meteotemplate the steelSeries plugin to accept input via the api.

The other configuration settings in meteotemplate control the lay-out of the gauges. 
I'm very pleased with the output and in the near future I probably will delete the Mesowx version from my website.

The live meteotemplate Steel Series Gauges can be seen here: http://www.lucdesign.nl/template/plugins/steelSeries/index.php 
Or on my home page lucdesign.nl with the (desktop) menu choise: Weather station | Live | Gauges

Have fun !

Luc
lucdesign-steelseries.jpg
meteotemplate_steelseries.jpg

Jachym Brzezina

unread,
Mar 16, 2017, 8:56:55 AM3/16/17
to weewx-user
Looks great Luc! 

Ruben Navarro Huedo

unread,
Mar 16, 2017, 10:00:03 AM3/16/17
to weewx-user
Great !

How did you configure the uploaded to use loop packets?

I am testing now meteotemplate 12 with mwall uploaded, but it is updating each 5 minutes.

Also... could be added to meteotemplate database all weewx old historic data?

Thanks a lot

mwall

unread,
Mar 16, 2017, 10:09:15 AM3/16/17
to weewx-user


On Thursday, March 16, 2017 at 10:00:03 AM UTC-4, Ruben Navarro Huedo wrote:
Great !

How did you configure the uploaded to use loop packets?

I am testing now meteotemplate 12 with mwall uploaded, but it is updating each 5 minutes.


in its default configuration, the uploader sends data each archive interval.

if you want it to send as fast as your hardware emits data, then configure it for loop packets:

[Meteotemplate]
    ...
    binding = loop

the readme has been updated to include this information

m

Ruben Navarro Huedo

unread,
Mar 16, 2017, 10:20:44 AM3/16/17
to weewx-user
Thanks a lot :-)

Luc Heijst

unread,
Mar 16, 2017, 10:23:30 AM3/16/17
to weewx-user
Matthew already answered your first question!
Your meteotemplate settings in weewx.conf should look like:

[StdRESTful]
...
    [[Meteotemplate]]
        password = your-meteotemplate-update-password
        binding = loop  # archive or loop

Then your question about import of weewx history in meteotemplate:

The admin section of meteotemplate has a section 'Database' with option 'Data Import'.
Choose the file option (= left icon) and read the instructions very carefully.

Then you will know the format of your database export data file.
On the weewx system make an export of your weewx database. 
Now the problem with this is that weewx doesn't have a field 'rain-since-midnight'. So in one way or another this has to be calculated from the 'rain' field.

I will look how to solve this and publish a solution when I found it.

Luc 

Ruben Navarro Huedo

unread,
Mar 16, 2017, 11:10:42 AM3/16/17
to weewx-user
My weewx is using sqlite
Is possible then import it ?

Ruben Navarro Huedo

unread,
Mar 16, 2017, 11:26:59 AM3/16/17
to weewx-user
Using loop it generates a lot of registers in my syslog.
How could i dissable these continuos meteotemplate log registers?

mwall

unread,
Mar 16, 2017, 11:41:15 AM3/16/17
to weewx-user
On Thursday, March 16, 2017 at 11:26:59 AM UTC-4, Ruben Navarro Huedo wrote:
Using loop it generates a lot of registers in my syslog.
How could i dissable these continuos meteotemplate log registers?

when you system is running the way you want it, set debug=0
 

Ruben Navarro Huedo

unread,
Mar 16, 2017, 12:52:44 PM3/16/17
to weewx-user
Debug is set to 0 but:

Mar 16 17:50:41 MeteoElche weewx[2569]: restx: Meteotemplate: Published record 2017-03-16 17:50:41 CET (1489683041)
Mar 16 17:50:43 MeteoElche weewx[2569]: restx: Meteotemplate: Published record 2017-03-16 17:50:44 CET (1489683044)
Mar 16 17:50:46 MeteoElche weewx[2569]: restx: Meteotemplate: Published record 2017-03-16 17:50:46 CET (1489683046)
Mar 16 17:50:46 MeteoElche weewx[2569]: restx: Meteotemplate: Published record 2017-03-16 17:50:46 CET (1489683046)
Mar 16 17:50:48 MeteoElche weewx[2569]: restx: Meteotemplate: Published record 2017-03-16 17:50:49 CET (1489683049)
Mar 16 17:50:51 MeteoElche weewx[2569]: restx: Meteotemplate: Published record 2017-03-16 17:50:51 CET (1489683051)
Mar 16 17:50:53 MeteoElche weewx[2569]: restx: Meteotemplate: Published record 2017-03-16 17:50:54 CET (1489683054)
Mar 16 17:50:54 MeteoElche weewx[2569]: restx: Meteotemplate: Published record 2017-03-16 17:50:55 CET (1489683055)
Mar 16 17:50:55 MeteoElche weewx[2569]: restx: Meteotemplate: Published record 2017-03-16 17:50:55 CET (1489683055)
Mar 16 17:50:55 MeteoElche weewx[2569]: restx: Meteotemplate: Published record 2017-03-16 17:50:56 CET (1489683056)
Mar 16 17:50:56 MeteoElche weewx[2569]: restx: Meteotemplate: Published record 2017-03-16 17:50:56 CET (1489683056)
Mar 16 17:50:58 MeteoElche weewx[2569]: restx: Meteotemplate: Published record 2017-03-16 17:50:59 CET (1489683059)
Mar 16 17:50:58 MeteoElche weewx[2569]: restx: Meteotemplate: Published record 2017-03-16 17:50:59 CET (1489683059)
Mar 16 17:51:01 MeteoElche weewx[2569]: restx: Meteotemplate: Published record 2017-03-16 17:51:01 CET (1489683061)
Mar 16 17:51:01 MeteoElche weewx[2569]: restx: Meteotemplate: Published record 2017-03-16 17:51:01 CET (1489683061)
Mar 16 17:51:03 MeteoElche weewx[2569]: restx: Meteotemplate: Published record 2017-03-16 17:51:04 CET (1489683064)
Mar 16 17:51:03 MeteoElche weewx[2569]: restx: Meteotemplate: Published record 2017-03-16 17:51:04 CET (1489683064)
Mar 16 17:51:06 MeteoElche weewx[2569]: restx: Meteotemplate: Published record 2017-03-16 17:51:06 CET (1489683066)
Mar 16 17:51:06 MeteoElche weewx[2569]: restx: Meteotemplate: Published record 2017-03-16 17:51:06 CET (1489683066)
Mar 16 17:51:08 MeteoElche weewx[2569]: restx: Meteotemplate: Published record 2017-03-16 17:51:09 CET (1489683069)
Mar 16 17:51:08 MeteoElche weewx[2569]: restx: Meteotemplate: Published record 2017-03-16 17:51:09 CET (1489683069)
Mar 16 17:51:11 MeteoElche weewx[2569]: restx: Meteotemplate: Published record 2017-03-16 17:51:11 CET (1489683071)
Mar 16 17:51:13 MeteoElche weewx[2569]: restx: Meteotemplate: Published record 2017-03-16 17:51:14 CET (1489683074)
Mar 16 17:51:13 MeteoElche weewx[2569]: restx: Meteotemplate: Published record 2017-03-16 17:51:14 CET (1489683074)
Mar 16 17:51:16 MeteoElche weewx[2569]: restx: Meteotemplate: Published record 2017-03-16 17:51:16 CET (1489683076)
Mar 16 17:51:17 MeteoElche weewx[2569]: restx: Meteotemplate: Published record 2017-03-16 17:51:17 CET (1489683077)
Mar 16 17:51:18 MeteoElche weewx[2569]: restx: Meteotemplate: Published record 2017-03-16 17:51:18 CET (1489683078)
Mar 16 17:51:18 MeteoElche weewx[2569]: restx: Meteotemplate: Published record 2017-03-16 17:51:19 CET (1489683079)
Mar 16 17:51:21 MeteoElche weewx[2569]: restx: Meteotemplate: Published record 2017-03-16 17:51:21 CET (1489683081)
Mar 16 17:51:23 MeteoElche weewx[2569]: restx: Meteotemplate: Published record 2017-03-16 17:51:24 CET (1489683084)
Mar 16 17:51:24 MeteoElche weewx[2569]: restx: Meteotemplate: Published record 2017-03-16 17:51:25 CET (1489683085)
Mar 16 17:51:25 MeteoElche weewx[2569]: restx: Meteotemplate: Published record 2017-03-16 17:51:26 CET (1489683086)
Mar 16 17:51:26 MeteoElche weewx[2569]: restx: Meteotemplate: Published record 2017-03-16 17:51:26 CET (1489683086)
Mar 16 17:51:28 MeteoElche weewx[2569]: restx: Meteotemplate: Published record 2017-03-16 17:51:29 CET (1489683089)
Mar 16 17:51:31 MeteoElche weewx[2569]: restx: Meteotemplate: Published record 2017-03-16 17:51:31 CET (1489683091)
Mar 16 17:51:33 MeteoElche weewx[2569]: restx: Meteotemplate: Published record 2017-03-16 17:51:34 CET (1489683094)
Mar 16 17:51:33 MeteoElche weewx[2569]: restx: Meteotemplate: Published record 2017-03-16 17:51:34 CET (1489683094)
Mar 16 17:51:36 MeteoElche weewx[2569]: restx: Meteotemplate: Published record 2017-03-16 17:51:36 CET (1489683096)
Mar 16 17:51:37 MeteoElche weewx[2569]: restx: Meteotemplate: Published record 2017-03-16 17:51:37 CET (1489683097)
Mar 16 17:51:38 MeteoElche weewx[2569]: restx: Meteotemplate: Published record 2017-03-16 17:51:38 CET (1489683098)
Mar 16 17:51:38 MeteoElche weewx[2569]: restx: Meteotemplate: Published record 2017-03-16 17:51:39 CET (1489683099)
Mar 16 17:51:38 MeteoElche weewx[2569]: restx: Meteotemplate: Published record 2017-03-16 17:51:39 CET (1489683099)
Mar 16 17:51:41 MeteoElche weewx[2569]: restx: Meteotemplate: Published record 2017-03-16 17:51:41 CET (1489683101)
Mar 16 17:51:42 MeteoElche weewx[2569]: restx: Meteotemplate: Published record 2017-03-16 17:51:43 CET (1489683103)
Mar 16 17:51:43 MeteoElche weewx[2569]: restx: Meteotemplate: Published record 2017-03-16 17:51:43 CET (1489683103)
Mar 16 17:51:43 MeteoElche weewx[2569]: restx: Meteotemplate: Published record 2017-03-16 17:51:44 CET (1489683104)
Mar 16 17:51:46 MeteoElche weewx[2569]: restx: Meteotemplate: Published record 2017-03-16 17:51:46 CET (1489683106)
Mar 16 17:51:46 MeteoElche weewx[2569]: restx: Meteotemplate: Published record 2017-03-16 17:51:46 CET (1489683106)
Mar 16 17:51:48 MeteoElche weewx[2569]: restx: Meteotemplate: Published record 2017-03-16 17:51:49 CET (1489683109)
Mar 16 17:51:48 MeteoElche weewx[2569]: restx: Meteotemplate: Published record 2017-03-16 17:51:49 CET (1489683109)
Mar 16 17:51:51 MeteoElche weewx[2569]: restx: Meteotemplate: Published record 2017-03-16 17:51:51 CET (1489683111)
Mar 16 17:51:53 MeteoElche weewx[2569]: restx: Meteotemplate: Published record 2017-03-16 17:51:54 CET (1489683114)
Mar 16 17:51:53 MeteoElche weewx[2569]: restx: Meteotemplate: Published record 2017-03-16 17:51:54 CET (1489683114)
Mar 16 17:51:54 MeteoElche weewx[2569]: restx: Meteotemplate: Published record 2017-03-16 17:51:54 CET (1489683114)

mwall

unread,
Mar 16, 2017, 1:02:01 PM3/16/17
to weewx-user
On Thursday, March 16, 2017 at 12:52:44 PM UTC-4, Ruben Navarro Huedo wrote:
Debug is set to 0 but:

Mar 16 17:50:41 MeteoElche weewx[2569]: restx: Meteotemplate: Published record 2017-03-16 17:50:41 CET (1489683041)
Mar 16 17:50:43 MeteoElche weewx[2569]: restx: Meteotemplate: Published record 2017-03-16 17:50:44 CET (1489683044)

[[Meteotemplate]]
    ...
    log_success = false
    log_failure = true

this should work for *any* restful extension

m

Luc Heijst

unread,
Mar 16, 2017, 1:03:50 PM3/16/17
to weewx-user
Mathhew and Tom,

I came across this same problem and changed in restx the INFO message to a DEBUG message as follows:

                if self.log_success:
                    if weewx.debug >= 2:
                        _time_str = timestamp_to_string(_record['dateTime'])
                        syslog.syslog(syslog.LOG_DEBUG,
                                      "restx: %s: Published record %s" % 
                                      (self.protocol_name, _time_str))

Then this message is only printed when debug is set to 2 or higher.

Luc

Lucas “Hans” Heijst

unread,
Mar 16, 2017, 5:43:06 PM3/16/17
to weewx...@googlegroups.com
Yes, it is possible. Currently I'm looking for the possibilities for an automated upload of historical weewx data to meteotemplate. It might take some days/weeks before I have sorted it out and have tested it.
Luc

Verstuurd vanaf mijn iPad

> Op 16 mrt. 2017 om 12:10 heeft Ruben Navarro Huedo <run...@gmail.com> het volgende geschreven:
>
> My weewx is using sqlite
> Is possible then import it ?
>
> --
> You received this message because you are subscribed to a topic in the Google Groups "weewx-user" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/YL75lkTpi6Y/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Jachym Brzezina

unread,
Mar 16, 2017, 5:47:07 PM3/16/17
to weewx-user
Luc can you not use the default Data import feature? It is quite flexible and you can set exactly what the format of the data input is and as long as all the variables needed are there it almost always is possible to import it or?



On Thursday, March 16, 2017 at 12:46:10 PM UTC+1, Luc Heijst wrote:

Luc Heijst

unread,
Mar 16, 2017, 11:52:01 PM3/16/17
to weewx-user
The import is not a problem, Jachym. It is the export of the data. We need a query to sum the rain values since midnight (local time). i don't know how to do that.
Luc

Andrew Milner

unread,
Mar 17, 2017, 1:46:36 AM3/17/17
to weewx-user
Rain since midnight = latest daily rain "sum" + sum of ("rain" in looprecords where looptime > time of latest archive)
or change rain field in loop raw table to be interarchive running total rather than loop value and then
Rain since midnight = latest daily rain "sum" + loop interarchive running total

Lucas “Hans” Heijst

unread,
Mar 17, 2017, 5:57:00 AM3/17/17
to weewx...@googlegroups.com
Thanks Andrew,

What I need is a dump of the total database to a .txt or other useful format. To be used once to input historical weewx data in meteotemplate via a data import.
I know how to program it, but don't know if there is a mysql statement which can do the same. The problem is the aggregation of rain data for local time zone 'since midnight'.

Luc

Verstuurd vanaf mijn iPad
--

Luc Heijst

unread,
Mar 17, 2017, 7:07:47 AM3/17/17
to weewx-user
Well, I think I found a solution. Let meteotemplate do the aggregation of 'rain_data_this_period' to 'rain_total_since_midnight'.

  1. Dump the complete mysql or sqlite database with the standard commands
  2. Import this dump file in meteotemplate and choose option 'aggregate rain' ***
*** This option currently doesn't exist; I will try to implement it and send it to Jachym for evaluation...

Luc

Jachym Brzezina

unread,
Mar 17, 2017, 7:13:20 AM3/17/17
to weewx-user
Luc we certanily can add things to the api, but only as long as it does not require any additional MySQL queries

Jachym Brzezina

unread,
Mar 17, 2017, 7:15:39 AM3/17/17
to weewx-user
There is one major problem and very good reason why I always want to use Rain as sum.

Think about what happens when your station is offline for a short while.

Temperature - not a big deal
Humidity - not a big deal
...
just small gaps

Rain - major issue because the totals are not going to add up. With the other parameters we use averages, so it doesnt matter so much, but wih rain it has to be cumulative value so that even when there is a gap, it will still calculate the overall total correctly. 

Luc Heijst

unread,
Mar 19, 2017, 10:29:56 AM3/19/17
to weewx-user
Hi Ruben,

Please send a message to my private mail ljm.heijst at gmail dot com. Then I will send you a beta-version of my ExportForMeteotemplate.py service.

Luc
Reply all
Reply to author
Forward
0 new messages