Belchertown Skin 0.8.1 released

621 views
Skip to first unread message

Pat

unread,
Dec 7, 2018, 5:12:23 PM12/7/18
to weewx-user
The last thread was getting a bit long. So I've started a new one. 

Belchertown Skin 0.8.1 has been released which fixes a couple of bugs. See the release notes, and install instructions here:



Colin Larsen

unread,
Dec 7, 2018, 5:19:58 PM12/7/18
to weewx...@googlegroups.com
Thanks Pat

Any changes to the config files from rc3 to this release?

--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Message has been deleted

Pat

unread,
Dec 7, 2018, 5:23:54 PM12/7/18
to weewx-user
Yes I did make a change on this line. I don't think the other config options have changed, but it might be best to double check the current skin.conf against your own to be safe against changes you may have made.

Colin Larsen

unread,
Dec 7, 2018, 5:26:03 PM12/7/18
to weewx...@googlegroups.com
Thanks. I sent you more coffee too :) Thirsty work this update business

Hector Valenzuela

unread,
Dec 7, 2018, 6:05:32 PM12/7/18
to weewx-user
I installed version 0.1.  I'll have to try another version

Colin Larsen

unread,
Dec 7, 2018, 9:46:05 PM12/7/18
to weewx...@googlegroups.com
Upgraded 41south.net.nz and working great. In my footer I've added the version and updated date just for reference.

Colin

Philip Kutzenco

unread,
Dec 8, 2018, 7:59:08 AM12/8/18
to weewx-user
Also upgraded and working great (wx.kutzenco.com).
phil

Chris Plant

unread,
Dec 8, 2018, 8:36:15 AM12/8/18
to weewx-user
Just upgraded to 0.8.1!  So easy, except having to put all my customizations back in since I didn't do that on the last upgrade!  I would definitely recommend putting the skin customizations in the weewx.conf file!  lol  KWIMOSIN10 Weather

Alan Bryant

unread,
Dec 8, 2018, 4:58:00 PM12/8/18
to weewx-user
Pat,

Just wanted to say thanks! I have mine up and running, minus the logo and about page. https://weather.bryantgeeks.com/.

Great skin and I am loving having such an easy and beautiful view of my weather data.

Alan Bryant


On Friday, December 7, 2018 at 4:12:23 PM UTC-6, Pat wrote:

Pat

unread,
Dec 8, 2018, 9:04:55 PM12/8/18
to weewx-user
Glad to hear all the positive feedback! All your sites look great - but I could be biased :) 

John Clark

unread,
Dec 9, 2018, 4:34:43 AM12/9/18
to weewx...@googlegroups.com

Just a query asking if it is a setting I missed, but I see no wind chill display. Secondly, and this is just a thought from a cosmetic standpoint, but the possible inclusion of a background "watermark" for aesthetics. (snow for the winter, etc) Thought I had it accomplished on my reports but every ftp update wrote over my changes (sigh). Still and all,  I am quite satisfied with how weather.w0avq.org looks.

--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
John Clark, WØAVQ
w0a...@gmail.com

Colin Larsen

unread,
Dec 9, 2018, 4:47:47 AM12/9/18
to weewx...@googlegroups.com
Hi John

I see wind chill on your charts/graphs, were you looking to have it someplace else?

73
Colin, ZL2ARL

John Clark

unread,
Dec 9, 2018, 9:20:06 AM12/9/18
to weewx...@googlegroups.com

Would be convenient to have it on the "front page" with the "normal" temp.

John Clark

unread,
Dec 9, 2018, 10:13:21 AM12/9/18
to weewx...@googlegroups.com

BTW, if you look on my weather page ( weather.w0avq.org ) and click on "about" you can see what I mean about a "watermark" for the site. Was just thinking out loud that it would be nice to do if it weren't too much of a hassle.



-------- Forwarded Message --------
Subject: Re: [weewx-user] Re: Belchertown Skin 0.8.1 released
Date: Sun, 9 Dec 2018 08:19:58 -0600
From: John Clark <w0a...@gmail.com>
To: weewx...@googlegroups.com


Would be convenient to have it on the "front page" with the "normal" temp.

On 12/9/2018 3:47 AM, Colin Larsen wrote:
Hi John

I see wind chill on your charts/graphs, were you looking to have it someplace else?

73
Colin, ZL2ARL

On Sun, 9 Dec 2018, 22:34 John Clark <w0a...@gmail.com wrote:

Just a query asking if it is a setting I missed, but I see no wind chill display. Secondly, and this is just a thought from a cosmetic standpoint, but the possible inclusion of a background "watermark" for aesthetics. (snow for the winter, etc) Thought I had it accomplished on my reports but every ftp update wrote over my changes (sigh). Still and all,  I am quite satisfied with how weather.w0avq.org looks.

On 12/8/2018 8:04 PM, Pat wrote:

--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
John Clark, WØAVQ
w0a...@gmail.com

Pat

unread,
Dec 9, 2018, 10:43:03 AM12/9/18
to weewx-user
Hi John, I don't have plans right now to include that level of customization with the base theme because I'll never be able to keep everyone happy :) 

You can make your own watermarks, or background changes if you want on your own install though! Edit the skins/Belchertown/style.css and on line 12 is for HTML, you can add your background there just like you did for your about page. 

Restart weewx, and wait for the archive generation to copy the updated CSS to your site. 

The problem is - as you'll see in the attached image example - is that the main container's background is all white because you want to be able to read text and see images on the site. Having a busy background can distract from the info. The container of the website is 1200px wide and gets smaller as your screen gets smaller (mobile screen, etc). So for example you could get fancy with a background that has a 1200px center section "missing" then your sidebar areas could have the background you're looking for. 

Hope this helps. 
background.jpg

rich T

unread,
Dec 9, 2018, 12:11:52 PM12/9/18
to weewx-user
Just installed skin 0.8.1 without any issues.  Is there a tag to display the version number in the footer?

Rich

Pat

unread,
Dec 9, 2018, 2:07:20 PM12/9/18
to weewx-user
No tag, but the version number is in the view source at the bottom.

John Clark

unread,
Dec 9, 2018, 2:15:47 PM12/9/18
to weewx...@googlegroups.com

Fair enough. I use Gimp to make them 60% transparent so it doesn't distract from the info. Wanted to try, and if I don't like it, I won't use it.

rich T

unread,
Dec 9, 2018, 2:28:50 PM12/9/18
to weewx-user
Got it to show...thanks Pat

Dj Merrill

unread,
Dec 9, 2018, 3:27:35 PM12/9/18
to weewx-user
Pat, what a beautiful piece of work!  Thank you for sharing this with us!

I notice on your site there is a "Feels like" temperature shown under the outside temperature and above the high/low temps on the top of the main page.  I don't see that on my site, and am wondering how to enable that?

Thanks!

-Dj

rich T

unread,
Dec 9, 2018, 3:44:00 PM12/9/18
to weewx-user
Dj

In the skin.conf file located in the Belchertown folder, set "show_apptemp = 1". Restart weewx.

Rich 

Pat

unread,
Dec 9, 2018, 3:49:43 PM12/9/18
to weewx-user
Thanks Dj! As mentioned in the general options guide, your database will need to be extended for the appTemp observations. 

Philip Kutzenco

unread,
Dec 9, 2018, 3:57:52 PM12/9/18
to weewx-user
Dj,

In addition to extending the schema for your database to include appTemp, as Pat notes (this is a requirement), I recommend you add the line mentioned by Rich

show apptemp = 1

in the [[[Extras]]] stanza of the [[Belchertown]] stanza in weewx.conf (instead of adding it to skin.conf). This will ensure that the change "sticks" after installs of new Belchertown skin versions.
phil

Dj Merrill

unread,
Dec 9, 2018, 4:27:23 PM12/9/18
to weewx-user
Please forgive my ignorance.  It is not clear after reading the instructions on extending the database precisely what I should do in this case.  Obviously we don't have an "user/electricity.py" file, but we do have a "user/belchertown.py" file.

Should I modify the "belchertown.py" file with something like:

import schemas.wview
schema_with_apptemp = schemas.wview.schema + [('appTemp', 'REAL')]


Then modify weewx.conf to have:

[DataBindings] [[wx_binding]] database = archive_sqlite table_name = archive manager = weewx.wxmanager.WXDaySummaryManager schema = user.belchertown.schema_with_apptemp


I am using SQLlite so I believe I can skip step 3.

Then, "wee_database weewx.conf --reconfigure" and rename the databases?

Thanks,

-Dj

Message has been deleted

Philip Kutzenco

unread,
Dec 9, 2018, 4:51:15 PM12/9/18
to weewx-user
Dj,

(I deleted the first version of this post as I left out a trailing "]" in step 1).

This is from instructions Pat gave me in the past to extend the schema:

1) Extend the database

nano /usr/share/weewx/user/extensions.py

then add the following:

import schemas.wview
schema_apptemp = schemas.wview.schema + [('appTemp',   'REAL')]




2) Stop weewx and edit weewx.conf to tell it to use this new schema extension by adding the schema = line below to the [DataBindings] stanza:

[DataBindings]
    [[wx_binding]]
        ...
schema = user.extensions.schema_apptemp




3) Create a new copy of the database with the extended schema

wee_database weewx.conf --reconfigure
and then rename the databases



4) Rebuild the database with new daily values

Sudo wee_database --rebuild-daily



5) restart weewx

phil

Philip Kutzenco

unread,
Dec 9, 2018, 5:01:11 PM12/9/18
to weewx-user
One more thing:

extensions.py could be in /home/weewx/bin/user if you installed weewx with setup.py rather than with apt-get.
phil

Dj Merrill

unread,
Dec 9, 2018, 5:04:01 PM12/9/18
to weewx-user
That worked beautifully, thank you Philip!

I don't believe the data it is showing is correct, though.  Outside temp is 23.5 F currently, with no wind.  It is showing a "feels like" temperature of 18.1 F.  Other sources  are showing the feels like temp in my area being the same as the outside temp.

How is it calculating the data?

Thanks,

-Dj

Philip Kutzenco

unread,
Dec 9, 2018, 5:22:33 PM12/9/18
to weewx-user
Dj,


I must say that I have been a bit confused about the appTemp value weewx calculates. My understanding is that the Apparent Temperature is equal to the Wind Chill number when the temp is 50 degrees F or below. It is equal to the Heat Index with the temp is 81 degrees F or above. My Vantage Vue transmits Wind Chill and Heat Index values. But the weewx calculated appTemp value doesn't match my understanding of what it should equal (or at least closely equal).

I wonder if it has to do with Loop Values for wind speed (which drives Wind Chill) and humidity (which drives Heat Index) vs. archive values for for those measures (which are aggregates). I don't know. Maybe someone else  knows?
phil

gjr80

unread,
Dec 9, 2018, 6:05:08 PM12/9/18
to weewx-user
As you point out weeWX windchill and heatindex values track outTemp below certain minimums and above certain maximums respectively. The weeWX calculated appTemp uses the formulas mentioned in the post you linked and is quite different to a composite heatindex and windchill (by composite I mean windchill below 50F and heatindex above 81F). The key difference (other than the formula) is that appTemp is valid across all temperatures. appTemp is certainly affected by wind speed (just look at the formula), I often notice appTemp moving in time (and quite markedly) with wind speed changes on my realtime gauges.

I like to think of 'feels like' as being a term that means different things to different people and without an agreed understanding can be a source of confusion. It really is just a general term that tries to better approximate the effect of current weather conditions on the body, it could be based on a measure of heatindex, windchill, humidex, wet bulb globe temperature or apparent temperature. For me in Australia I think of apparent temperature, I expect in Canada humidex may be a more accepted measurement.

The use of the term 'apparent temperature' can also be confusing at times; does it refer to the accepted formula for Apparent Temperature (as you linked or as used by weeWX) or is it the more literal meaining. For this reason I prefer to refer to something like the 'weeWX appTemp field' or 'Apparent Temperature' to make it clear I am referring to the calculated value.

Gary

Philip Kutzenco

unread,
Dec 9, 2018, 8:07:28 PM12/9/18
to weewx-user
First, let me apologize for hijacking this Belchertown thread to get educated on Apparent Temperature.

Second, thanks Gary, your explanation clarifies it for me. It seems I was fixed on a simplistic definition of Apparent Temperature sometimes used in the US which yields the same value as either Wind Chill, Temperature, or Heat Index depending upon the value of "actual temperature". In contrast, the weewx calculation relies on the more sophisticated model developed by Steadman.

I actually like that the weewx calculated value is different than what I thought it should be. The simplistic definition doesn't add any new information as you could just look at Wind Chill, Heat Index and Temperature to get the same information the simple definition provides. In addition, I don't actually know what formula Vantage uses to calculate Wind Chill and Heat Index (I'll look it up), which my station hardware calculates and provides.

The Steadman model gives a more nuanced value probably closer to what is intended - that is, what the human body perceives the temperature to be.

I'll move any further questions I have on this to a separate topic.
phil

Dj Merrill

unread,
Dec 9, 2018, 9:20:32 PM12/9/18
to weewx-user
Thanks for all of the help, and the explanation of how appTemp is calculated.  I am much less confused about it now, and think I will put a blurb on the "about" page as an explanation to others.

-Dj

rich T

unread,
Dec 9, 2018, 9:26:29 PM12/9/18
to weewx-user

G Hammer

unread,
Dec 10, 2018, 10:07:01 AM12/10/18
to weewx-user
Pat,

When I have show_apptemp=1 I do see the Feels like temp as I expect.
If I set highcharts_show_apptemp = 1 I do not get an apptemp plot, the report generator errors out:
Dec 10 09:55:50 ftp weewx[13683]: reportengine: Caught unrecoverable exception in generator weewx.cheetahgenerator.CheetahGenerator
Dec 10 09:55:50 ftp weewx[13683]:         ****  no such column: appTemp
Dec 10 09:55:50 ftp weewx[13683]:         ****  Traceback (most recent call last):
Dec 10 09:55:50 ftp weewx[13683]:         ****    File "/home/weewx/bin/weewx/reportengine.py", line 239, in run
Dec 10 09:55:50 ftp weewx[13683]:         ****      obj.start()
Dec 10 09:55:50 ftp weewx[13683]:         ****    File "/home/weewx/bin/weewx/reportengine.py", line 273, in start
Dec 10 09:55:50 ftp weewx[13683]:         ****      self.run()
Dec 10 09:55:50 ftp weewx[13683]:         ****    File "/home/weewx/bin/weewx/cheetahgenerator.py", line 158, in run
Dec 10 09:55:50 ftp weewx[13683]:         ****      ngen = self.generate(gen_dict[section_name], self.gen_ts)
Dec 10 09:55:50 ftp weewx[13683]:         ****    File "/home/weewx/bin/weewx/cheetahgenerator.py", line 232, in generate
Dec 10 09:55:50 ftp weewx[13683]:         ****      ngen += self.generate(section[subsection], gen_ts)
Dec 10 09:55:50 ftp weewx[13683]:         ****    File "/home/weewx/bin/weewx/cheetahgenerator.py", line 232, in generate
Dec 10 09:55:50 ftp weewx[13683]:         ****      ngen += self.generate(section[subsection], gen_ts)
Dec 10 09:55:50 ftp weewx[13683]:         ****    File "/home/weewx/bin/weewx/cheetahgenerator.py", line 320, in generate
Dec 10 09:55:50 ftp weewx[13683]:         ****      default_binding)
Dec 10 09:55:50 ftp weewx[13683]:         ****    File "/home/weewx/bin/weewx/cheetahgenerator.py", line 372, in _getSearchList
Dec 10 09:55:50 ftp weewx[13683]:         ****      searchList += obj.get_extension_list(timespan, db_lookup)
Dec 10 09:55:50 ftp weewx[13683]:         ****    File "/home/weewx/bin/user/belchertown_highchartsSearchX.py", line 85, in get_extension_list
Dec 10 09:55:50 ftp weewx[13683]:         ****      (time_start_vt, time_stop_vt, appTemp_vt) = db_lookup().getSqlVectors(TimeSpan(_start_ts, _end_ts), 'appTemp')
Dec 10 09:55:50 ftp weewx[13683]:         ****    File "/home/weewx/bin/weewx/manager.py", line 512, in getSqlVectors
Dec 10 09:55:50 ftp weewx[13683]:         ****      aggregate_type, aggregate_interval)
Dec 10 09:55:50 ftp weewx[13683]:         ****    File "/home/weewx/bin/weewx/manager.py", line 775, in _getSqlVectors
Dec 10 09:55:50 ftp weewx[13683]:         ****      for _rec in _cursor.execute(sql_str, (startstamp, stopstamp)):
Dec 10 09:55:50 ftp weewx[13683]:         ****    File "/home/weewx/bin/weedb/sqlite.py", line 41, in guarded_fn
Dec 10 09:55:50 ftp weewx[13683]:         ****      raise weedb.NoColumnError(e)
Dec 10 09:55:50 ftp weewx[13683]:         ****  NoColumnError: no such column: appTemp
Dec 10 09:55:50 ftp weewx[13683]:         ****  Generator terminated
Dec 10 09:55:50 ftp weewx[13683]: copygenerator: copied 0 files to /home/weewx/public_html/weather


G Hammer

unread,
Dec 10, 2018, 10:09:52 AM12/10/18
to weewx-user
Here's the rest of the pertinent log entries that Groups cut off:

Dec 10 09:55:50 ftp weewx[13683]:         ****      raise weedb.NoColumnError(e)
Dec 10 09:55:50 ftp weewx[13683]:         ****  NoColumnError: no such column: appTemp
Dec 10 09:55:50 ftp weewx[13683]:         ****  Generator terminated
Dec 10 09:55:50 ftp weewx[13683]: copygenerator: copied 0 files to /home/weewx/public_html/weather



Dec 10 09:55<span style="color: #660;" class="styled-by-prettif

Philip Kutzenco

unread,
Dec 10, 2018, 10:54:39 AM12/10/18
to weewx-user
This is likely a naive question on my part. But did you extend the schema on the archive table for your database to include appTemp? Assuming so, did you rebuild the daily value tables? Are the values in the archive table and the archive_day_appTemp table being populated? When I look at your website, your daily.json data shows appTemp with a value of "N/A".phil

Wes Witt

unread,
Dec 10, 2018, 11:22:58 AM12/10/18
to weewx-user
following. i'm interested in using apptemp to but would like to know what is necessary to get the archive table configured properly.

Philip Kutzenco

unread,
Dec 10, 2018, 12:38:59 PM12/10/18
to weewx-user

Colin Larsen

unread,
Dec 10, 2018, 1:04:35 PM12/10/18
to weewx...@googlegroups.com
You don't have the database extended for appTemp, it's an easy operation. You will also have errors on the records page?

--

G Hammer

unread,
Dec 10, 2018, 1:05:36 PM12/10/18
to weewx-user
Yes, in fact followed your guide above.
The Feels like shows in the temp display, but when enabled in charts you get the error.

Colin Larsen

unread,
Dec 10, 2018, 1:30:05 PM12/10/18
to weewx...@googlegroups.com
If you haven't extended the database as per the Weewx wiki you will get those errors. I haven't written a guide but it is reasonably straightforward

On Tue, 11 Dec 2018, 07:05 G Hammer <gary....@gmail.com wrote:
Yes, in fact followed your guide above.
The Feels like shows in the temp display, but when enabled in charts you get the error.

G Hammer

unread,
Dec 10, 2018, 5:41:02 PM12/10/18
to weewx-user
Hmmm, well then I'm at a loss.
I though the database had been extended.

Here's what I did:

Edit extensions.py to be:
import schemas.wview
schema_apptemp
= schemas.wview.schema + [('appTemp',   'REAL')]
Stop weewx
Edit weewx.conf to have:
[DataBindings]
   
   
[[wx_binding]]
       
# The database must match one of the sections in [Databases].
       
# This is likely to be the only option you would want to change.
        database
= archive_sqlite
       
# The name of the table within the database
        table_name
= archive
       
# The manager handles aggregation of data for historical summaries
        manager
= weewx.wxmanager.WXDaySummaryManager
       
# The schema defines the structure of the database.
       
# It is *only* used when the database is created.
       
#schema = schemas.wview.schema
        schema
= user.extensions.schema_apptemp
Ran wee_database weewx.conf --reconfigure
Renamed weewx.sdb to weewx.sdb.org
Renamed the new file to weewx.sdb
Ran wee_database --rebuild-daily

Start weewx

kutz...@gmail.com

unread,
Dec 10, 2018, 6:03:02 PM12/10/18
to weewx-user
That should do it.

If you have sqlite3 installed, you can open the database with the command sqlite3 weewx.sdb and then issue the command:

     .schema archive

You should see `appTemp` REAL at the end of the list.

The command:

     .tables

should show archive_day_appTemp somewhere in the list.

     .exit

will exit the program

It's best to have weewx stopped prior to opening the database with sqlite3.
phil

Colin Larsen

unread,
Dec 10, 2018, 7:05:31 PM12/10/18
to weewx...@googlegroups.com
Do you also see errors on your Records page where Highest App Temp and Lowest App temp are? 

G Hammer

unread,
Dec 11, 2018, 9:47:16 AM12/11/18
to weewx-user
I did. The sqlite3 commands from Phil allowed me to see that whatever config I did was not actually active.
I blame user error as I had edited files on one machine and ftp'd the files to the server.
Performing the entire process on the server gave the expected result.

Thanks for the education to all!

Colin Larsen

unread,
Dec 11, 2018, 1:54:34 PM12/11/18
to weewx...@googlegroups.com
Great news, glad to hear you sorted it.

Cheers
Colin

WILWetter25

unread,
Dec 11, 2018, 3:38:34 PM12/11/18
to weewx-user
Thank you for your hard work. I am looking around for a alternative to Highcharts and I found this:
It would be cool if this could be integrated in the skin :) Just a suggestion

rich T

unread,
Dec 11, 2018, 8:26:37 PM12/11/18
to weewx-user
Is there a way to include alerts from Darksky?


On Friday, December 7, 2018 at 5:12:23 PM UTC-5, Pat wrote:

Colin Larsen

unread,
Dec 11, 2018, 8:33:57 PM12/11/18
to weewx...@googlegroups.com
I came across the Darksky widgets today and they do include alerts


I've just replaced the whole Darksky forecast section with a 'hook' page to place the week widget there instead. Apparently it does include alerts. I have found the downloaded forecast data to be way off in temp - as much as 3 deg celsius low, even compared to their own widget which is both confusing and surprising. It appears that for me the widget forecast is much better than the api download data

Andrew Milner

unread,
Dec 11, 2018, 10:32:42 PM12/11/18
to weewx-user
Which part of the highcharts demo page do you think should be incorporated into the Belchertown skin, and instead of what??

WILWetter25

unread,
Dec 11, 2018, 11:38:07 PM12/11/18
to weewx-user
The Akin use Highcharts currently.
In the link I posted you will See a example for HighStock. The difference between Highcharts and HighStock: In HighStock you can choose a Date, time.

Pat

unread,
Dec 12, 2018, 7:45:25 PM12/12/18
to weewx-user
The skin actually uses HighStock but has the timeline disabled. Feel free to enable it in your setup :)

Pat

unread,
Dec 12, 2018, 7:54:51 PM12/12/18
to weewx-user
The skin actually uses HighStock but has the timeline disabled. Feel free to enable it in your setup :)

To do so, edit the skins/Belchertown/js/highcharts-dayplots.js and weekplot, monthplot and yearplot.js files. 

Then search for 


navigator: {
enabled: true
},

and set to true for the plots you want it enabled for. You may have to do this for multiple plots depending on how you want to customize it.

Save and restart weewx. Wait for an archive interval and refresh the page. 

See attached image for an example. 


On Tuesday, December 11, 2018 at 11:38:07 PM UTC-5, WILWetter25 wrote:
navigator.jpg

Pat

unread,
Dec 12, 2018, 7:56:30 PM12/12/18
to weewx-user
Wow, I'm having a hard time replying clearly tonight. 

Find this. It should say "false". 

navigator: {
 enabled
: false
 
},


and set it to true :)

Colin Larsen

unread,
Dec 12, 2018, 8:00:05 PM12/12/18
to weewx...@googlegroups.com
Quick, more coffee!  :D

--

Pat

unread,
Dec 12, 2018, 8:11:48 PM12/12/18
to weewx-user
haha, nope, maybe an early bed time

G Hammer

unread,
Dec 13, 2018, 11:25:19 AM12/13/18
to weewx-user
Did that change affect the current condition graphic next to the current temp?

Colin Larsen

unread,
Dec 13, 2018, 12:22:43 PM12/13/18
to weewx...@googlegroups.com
Yes, unfortunately that is taken from the Darksky current conditions so it breaks. I was considering raising a request with Pat to use that independent of using the forecast display

da...@friscoweather.com

unread,
Dec 21, 2018, 6:53:47 PM12/21/18
to weewx-user
Hi Pat,

I've installed the latest version and have followed all of your instructions, however, I keep getting the following errors when weeex tries to generate the actual index.html files:

Dec 21 16:40:22 debian weewx[6732]: reportengine: Running report Belchertown
Dec 21 16:40:22 debian weewx[6732]: reportengine: Found configuration file /etc/weewx/skins/Belchertown/skin.conf for report Belchertown
Dec 21 16:40:22 debian weewx[6732]: cheetahgenerator: using search list ['weewx.cheetahgenerator.Almanac', 'weewx.cheetahgenerator.Station', 'weewx.cheetahgenerator.Current', 'weewx.cheetahgenerator.Stats', 'weewx.cheetahgenerator.UnitInfo', 'weewx.cheetahgenerator.Extras', 'user.belchertown.getData']
Dec 21 16:40:22 debian weewx[6732]: manager: Daily summary version is 2.0
Dec 21 16:40:22 debian weewx[6732]: Belchertown Extension: version 0.8
Dec 21 16:40:26 debian weewx[6732]: cheetahgenerator: Generate failed with exception '<type 'exceptions.UnicodeDecodeError'>'
Dec 21 16:40:26 debian weewx[6732]: cheetahgenerator: **** Ignoring template /etc/weewx/skins/Belchertown/about/index.html.tmpl
Dec 21 16:40:26 debian weewx[6732]: cheetahgenerator: **** Reason: 'ascii' codec can't decode byte 0xef in position 0: ordinal not in range(128)
Dec 21 16:40:26 debian weewx[6732]: ****  Traceback (most recent call last):
Dec 21 16:40:26 debian weewx[6732]: ****    File "/usr/share/weewx/weewx/cheetahgenerator.py", line 328, in generate
Dec 21 16:40:26 debian weewx[6732]: ****      filtersLib=weewx.cheetahgenerator)
Dec 21 16:40:26 debian weewx[6732]: ****    File "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1259, in __init__
Dec 21 16:40:26 debian weewx[6732]: ****      self._compile(source, file, compilerSettings=compilerSettings)
Dec 21 16:40:26 debian weewx[6732]: ****    File "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1553, in _compile
Dec 21 16:40:26 debian weewx[6732]: ****      keepRefToGeneratedCode=True)
Dec 21 16:40:26 debian weewx[6732]: ****    File "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 740, in compile
Dec 21 16:40:26 debian weewx[6732]: ****      settings=(compilerSettings or {}))
Dec 21 16:40:26 debian weewx[6732]: ****    File "/usr/lib/python2.7/dist-packages/Cheetah/Compiler.py", line 1579, in __init__
Dec 21 16:40:26 debian weewx[6732]: ****      source = unicode(source)
Dec 21 16:40:26 debian weewx[6732]: ****  UnicodeDecodeError: 'ascii' codec can't decode byte 0xef in position 0: ordinal not in range(128)
Dec 21 16:40:27 debian weewx[6732]: cheetahgenerator: Generate failed with exception '<type 'exceptions.UnicodeDecodeError'>'
Dec 21 16:40:27 debian weewx[6732]: cheetahgenerator: **** Ignoring template /etc/weewx/skins/Belchertown/index.html.tmpl
Dec 21 16:40:27 debian weewx[6732]: cheetahgenerator: **** Reason: 'ascii' codec can't decode byte 0xef in position 0: ordinal not in range(128)
Dec 21 16:40:27 debian weewx[6732]: ****  Traceback (most recent call last):
Dec 21 16:40:27 debian weewx[6732]: ****    File "/usr/share/weewx/weewx/cheetahgenerator.py", line 328, in generate
Dec 21 16:40:27 debian weewx[6732]: ****      filtersLib=weewx.cheetahgenerator)
Dec 21 16:40:27 debian weewx[6732]: ****    File "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1259, in __init__
Dec 21 16:40:27 debian weewx[6732]: ****      self._compile(source, file, compilerSettings=compilerSettings)
Dec 21 16:40:27 debian weewx[6732]: ****    File "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1553, in _compile
Dec 21 16:40:27 debian weewx[6732]: ****      keepRefToGeneratedCode=True)
Dec 21 16:40:27 debian weewx[6732]: ****    File "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 740, in compile
Dec 21 16:40:27 debian weewx[6732]: ****      settings=(compilerSettings or {}))
Dec 21 16:40:27 debian weewx[6732]: ****    File "/usr/lib/python2.7/dist-packages/Cheetah/Compiler.py", line 1579, in __init__
Dec 21 16:40:27 debian weewx[6732]: ****      source = unicode(source)
Dec 21 16:40:27 debian weewx[6732]: ****  UnicodeDecodeError: 'ascii' codec can't decode byte 0xef in position 0: ordinal not in range(128)
Dec 21 16:40:27 debian weewx[6732]: cheetahgenerator: Generate failed with exception '<type 'exceptions.UnicodeDecodeError'>'
Dec 21 16:40:27 debian weewx[6732]: cheetahgenerator: **** Ignoring template /etc/weewx/skins/Belchertown/pi/index.html.tmpl
Dec 21 16:40:27 debian weewx[6732]: cheetahgenerator: **** Reason: 'ascii' codec can't decode byte 0xef in position 0: ordinal not in range(128)
Dec 21 16:40:27 debian weewx[6732]: ****  Traceback (most recent call last):
Dec 21 16:40:27 debian weewx[6732]: ****    File "/usr/share/weewx/weewx/cheetahgenerator.py", line 328, in generate
Dec 21 16:40:27 debian weewx[6732]: ****      filtersLib=weewx.cheetahgenerator)
Dec 21 16:40:27 debian weewx[6732]: ****    File "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1259, in __init__
Dec 21 16:40:27 debian weewx[6732]: ****      self._compile(source, file, compilerSettings=compilerSettings)
Dec 21 16:40:27 debian weewx[6732]: ****    File "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1553, in _compile
Dec 21 16:40:27 debian weewx[6732]: ****      keepRefToGeneratedCode=True)
Dec 21 16:40:27 debian weewx[6732]: ****    File "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 740, in compile
Dec 21 16:40:27 debian weewx[6732]: ****      settings=(compilerSettings or {}))
Dec 21 16:40:27 debian weewx[6732]: ****    File "/usr/lib/python2.7/dist-packages/Cheetah/Compiler.py", line 1579, in __init__
Dec 21 16:40:27 debian weewx[6732]: ****      source = unicode(source)
Dec 21 16:40:27 debian weewx[6732]: ****  UnicodeDecodeError: 'ascii' codec can't decode byte 0xef in position 0: ordinal not in range(128)
Dec 21 16:40:28 debian weewx[6732]: cheetahgenerator: Generated 12 files for report Belchertown

Please help!

Thanks,
Dave

Pat

unread,
Dec 22, 2018, 8:46:01 PM12/22/18
to weewx-user
Haven't seen this before, my initial guess is that this is something to do with Cheetah I think, and not my skin necessarily. 

Does your configuration or database have some sort of ascii character in it like the degrees symbol or something like that?

Seems to be something with your setup. Check your configs and database?

Scott Grayban

unread,
Dec 26, 2018, 2:39:32 AM12/26/18
to weewx-user
I love the skin... tweaked it a bit for my taste, added location, server and weeWX stats to the about page... http://www.nettletondistrict.com/Nettleton/ It's being served from my local IP via a reverse proxy.

Next task is to get MQTT working !!

Thanks for all your work !!

Scott Grayban

unread,
Dec 26, 2018, 6:41:50 AM12/26/18
to weewx-user
When I run

wee_database weewx.conf --reconfigure

I am getting python errors

Traceback (most recent call last):

 
File "/usr/bin/wee_database", line 793, in <module>
    main
()
 
File "/usr/bin/wee_database", line 133, in main
    config_path
, config_dict = weecfg.read_config(options.config_path, args)
 
File "/usr/share/weewx/weecfg/__init__.py", line 223, in read_config
    config_dict
= configobj.ConfigObj(config_path, file_error=True)
 
File "/usr/lib/python2.7/dist-packages/configobj.py", line 1229, in __init__
   
self._load(infile, configspec)
 
File "/usr/lib/python2.7/dist-packages/configobj.py", line 1318, in _load
   
raise error
configobj
.DuplicateError: Duplicate keyword name at line 401.



On Sunday, December 9, 2018 at 1:51:15 PM UTC-8, Philip Kutzenco wrote:
Dj,

(I deleted the first version of this post as I left out a trailing "]" in step 1).

This is from instructions Pat gave me in the past to extend the schema:

1) Extend the database

nano /usr/share/weewx/user/extensions.py

then add the following:

import schemas.wview
schema_apptemp = schemas.wview.schema + [('appTemp',   'REAL')]




2) Stop weewx and edit weewx.conf to tell it to use this new schema extension by adding the schema = line below to the [DataBindings] stanza:

[DataBindings]
    [[wx_binding]]
        ...
schema = user.extensions.schema_apptemp




3) Create a new copy of the database with the extended schema

wee_database weewx.conf --reconfigure
and then rename the databases



4) Rebuild the database with new daily values

Sudo wee_database --rebuild-daily



5) restart weewx

phil

On Sunday, December 9, 2018 at 4:27:23 PM UTC-5, Dj Merrill wrote:
Please forgive my ignorance.  It is not clear after reading the instructions on extending the database precisely what I should do in this case.  Obviously we don't have an "user/electricity.py" file, but we do have a "user/belchertown.py" file.

Should I modify the "belchertown.py" file with something like:

import schemas.wview
schema_with_apptemp = schemas.wview.schema + [('appTemp', 'REAL')]


Then modify weewx.conf to have:

[DataBindings] [[wx_binding]] database = archive_sqlite table_name = archive manager = weewx.wxmanager.WXDaySummaryManager schema = user.belchertown.schema_with_apptemp


I am using SQLlite so I believe I can skip step 3.

Then, "wee_database weewx.conf --reconfigure" and rename the databases?

Thanks,

-Dj

Scott Grayban

unread,
Dec 26, 2018, 7:19:27 AM12/26/18
to weewx-user
Step 2 is not working at all for me...

If I have
        schema = user.extensions.schema_apptemp
        schema = user.extensions.schema_windrun

added in the 

[DataBindings]
    [[wx_binding]]

wee_database weewx.conf --reconfigure

Gives this error

configobj.DuplicateError: Duplicate keyword name at line 402.

Andrew Milner

unread,
Dec 26, 2018, 9:54:40 AM12/26/18
to weewx-user
I think You should probably only have one new schema specified - not two - when you do the reconfigure

Scott Grayban

unread,
Dec 26, 2018, 6:19:11 PM12/26/18
to weewx-user
I tried adding 1 at a time but it deletes the previous one. Certainly you should be able to add more then just 1 right ?

Colin Larsen

unread,
Dec 26, 2018, 6:27:53 PM12/26/18
to weewx...@googlegroups.com
Maybe I did it wrong - but all I did was add the 2 new fields in the original wview schema, which for me was hiding in /var/lib/weewx/schemas from memory and then did the --rebuild which ran perfectly. 

There may be a good reason for not doing that :) so I may not be giving you the best advice but it did work fine.

Colin

Pat

unread,
Dec 26, 2018, 8:15:50 PM12/26/18
to weewx-user
You need to make them an array. Something like: 

schema = schemas.wview.schema + [('appTemp',   'REAL'), ('windrun',   'REAL')]

gjr80

unread,
Dec 26, 2018, 8:19:35 PM12/26/18
to weewx-user
Hi Scott,

On Thursday, 27 December 2018 09:19:11 UTC+10, Scott Grayban wrote:
I tried adding 1 at a time but it deletes the previous one. Certainly you should be able to add more then just 1 right ?

Do you mean adding more than one field to your schema or more than one schema = entry under [[wx_binding]]. I presume you mean the former, as the latter is not allowed, configobj (which handles parsing of the weeWX .conf files) only allows unique config option entries in a given stanza. So you can't have two schema = entries under [[wx_binding]]. You can certainly add more than one field at a time with a custom schema defined in a file.

So we can work what is going wrong I suggest you give us the complete picture by posting:

1. the contents of weewx.conf with any sensitive info (eg passwords, user names etc) removed
2. the contents of the file (it should be /home/weewx/bin/user/extensions.py or /usr/share/weewx/user/extensions.py depending on your weeWX install type) containing the custom schema you are specifying at the schema = entry under [[wx_binding]] in weewx.conf
3. a screen capture showing the exact commands you issue and the exact responses received

Please don't remove anything other than sensitive info, often a user may post what they think is the critical piece of info from a command or config file only to find that there is some other piece of critical info in the command output or config file that we need to work out exactly what is happening. Saves a lot of to'ing and fro'ing

Gary

Scott Grayban

unread,
Dec 26, 2018, 9:29:00 PM12/26/18
to weewx-user
I tried that but I still get the error.

Scott Grayban

unread,
Dec 26, 2018, 9:32:23 PM12/26/18
to weewx-user
The error is in the weewx.conf


[DataBindings]

    [[wx_binding]]
        # The database must match one of the sections in [Databases].
        # This is likely to be the only option you would want to change.
        database = archive_sqlite
        # The name of the table within the database
        table_name = archive
        # The manager handles aggregation of data for historical summaries
        manager = weewx.wxmanager.WXDaySummaryManager
        # The schema defines the structure of the database.
        # It is *only* used when the database is created.
        #schema = schemas.wview.schema

        schema = user.extensions.schema_apptemp
        schema = user.extensions.schema_windrun

This is where it's saying Duplicate keyword name at line 403

And I can't figure out how to combine that into 1 line.

I have this in /usr/share/weewx/user/extensions.py

schema = schemas.wview.schema + [('appTemp',   'REAL'), ('windRun',   'REAL')]

Scott Grayban

unread,
Dec 26, 2018, 9:37:41 PM12/26/18
to weewx-user


On Wednesday, December 26, 2018 at 5:19:35 PM UTC-8, gjr80 wrote:
snapshot2.png

gjr80

unread,
Dec 26, 2018, 9:40:41 PM12/26/18
to weewx-user
Simple, delete the line:

schema = user.extensions.schema_windrun

We now put everything in schema_apptemp. Please post user/extensions.py

Gary

Scott Grayban

unread,
Dec 26, 2018, 9:46:21 PM12/26/18
to weewx-user
AHHH I got it.... It didn't dawn on me that this

schema = schemas.wview.schema + [('appTemp',   'REAL'), ('windRun',   'REAL')]

should be this

schema_apptemp = schemas.wview.schema + [('appTemp',   'REAL'), ('windRun',   'REAL')]

Soooo stupid me.......

Scott Grayban

unread,
Dec 26, 2018, 9:49:07 PM12/26/18
to weewx-user
# sqlite3 weewx.sdb_new
SQLite version 3.16.2 2017-01-06 16:32:41
Enter ".help" for usage hints.
sqlite
> .schema archive
CREATE TABLE archive
(`dateTime` INTEGER NOT NULL UNIQUE PRIMARY KEY, `usUnits` INTEGER NOT NULL, `interval` INTEGER NOT NULL, `barometer` REAL, `pressure` REAL, `altimeter` REAL, `inTemp` REAL, `outTemp` REAL, `inHumidity` REAL, `outHumidity` REAL, `windSpeed` REAL, `windDir` REAL, `windGust` REAL, `windGustDir` REAL, `rainRate` REAL, `rain` REAL, `dewpoint` REAL, `windchill` REAL, `heatindex` REAL, `ET` REAL, `radiation` REAL, `UV` REAL, `extraTemp1` REAL, `extraTemp2` REAL, `extraTemp3` REAL, `soilTemp1` REAL, `soilTemp2` REAL, `soilTemp3` REAL, `soilTemp4` REAL, `leafTemp1` REAL, `leafTemp2` REAL, `extraHumid1` REAL, `extraHumid2` REAL, `soilMoist1` REAL, `soilMoist2` REAL, `soilMoist3` REAL, `soilMoist4` REAL, `leafWet1` REAL, `leafWet2` REAL, `rxCheckPercent` REAL, `txBatteryStatus` REAL, `consBatteryVoltage` REAL, `hail` REAL, `hailRate` REAL, `heatingTemp` REAL, `heatingVoltage` REAL, `supplyVoltage` REAL, `referenceVoltage` REAL, `windBatteryStatus` REAL, `rainBatteryStatus` REAL, `outTempBatteryStatus` REAL, `inTempBatteryStatus` REAL, `appTemp` REAL, `windRun` REAL);
sqlite
> .exit



Last line shows both in the db now...

Scott Grayban

unread,
Dec 27, 2018, 2:38:06 AM12/27/18
to weewx-user
Pat

I seem to have missed something in setting up MQTT for the skin... I followed https://obrienlabs.net/how-to-setup-your-own-mqtt-broker/ except the SLL stuff since I wouldn't need it.

weewx.conf


   
[[MQTT]]
        server_url
= mqtt://weewx:xxx...@127.0.0.1:1883/
        topic
= weather/#
        unit_system
= US
        binding
= archive, loop
        aggregation
= aggregate

and

# cat /etc/mosquitto/conf.d/myconfig.conf
persistence false
 
allow_anonymous
true
password_file
/etc/mosquitto/passwd
 
acl_file
/etc/mosquitto/acl


listener
1883 localhost
listener
8883
protocol mqtt
 
# websockets
listener
9001
protocol websockets

# cat /etc/mosquitto/acl
# Allow anonymous access to the sys
topic read $SYS
/#
 
# Allow anonymous to read weather
topic read weather
/#
 
# weewx readwrite to the loop
user weewx
topic weather
/#

This test line works

mosquitto_pub -h localhost -t "weather/test" -m "hello world. this is to the weather topic with authentication" -u weewx -P xxxxxx

But index page is showing Connecting to weather station real time data.

MQTT is posting.....

Dec 26 23:19:39 raspberrypi weewx[6544]: restx: MQTT: Published record 2018-12-26 23:19:39 PST (1545895179)
Dec 26 23:19:45 raspberrypi weewx[6544]: restx: MQTT: Published record 2018-12-26 23:19:45 PST (1545895185)

So I don't know what I did worng. I restraced all steps and I did it correctly.

Pat

unread,
Dec 27, 2018, 8:31:22 AM12/27/18
to weewx-user
This is because your MQTT is isolated to localhost only. Local host in this case would be your weewx server, which you must have installed MQTT on as well. Which works for weewx ==> MQTT since they are on the same system, but nothing else

First, change your MQTT to listen on 1883 for external connections. Since you're not using SSL, you can remove the 8883, update your myconfig.conf with this. 

listener 1883
protocol mqtt


With this change it'll open port 1883 to external connections like your laptop. 

You can leave your weewx.conf [[MQTT]] config alone since they are on the same machine, localhost will work here like it already is. 

I don't see your skin options so I think you haven't done that. You're posting to MQTT with [[MQTT]], but now you need to retrieve - that's what the skin does. 

In weewx.conf you need to specify the Belchertown skin options for MQTT such as enabling it, hostname, topic, etc. You cannot use localhost here for mqtt_host, you need to specify the IP of the server hosting your MQTT. By saying 127.0.0.1 or localhost that means Chrome is going to try to connect to YOUR PC for MQTT data which probably doesn't exist. You need to specify the IP of the MQTT broker, like 192.168.1.100 or whatever. This is where having a static IP or a DHCP reservation is important so the IP of your internal broker doesn't change.

Scott Grayban

unread,
Dec 27, 2018, 7:00:21 PM12/27/18
to weewx-user
Ok so my weewx.conf looks like this now....
    [[MQTT]]
        server_url
= mqtt://weewx:passwo...@192.168.0.4:1883/

        topic
= weather/#
        unit_system
= US
        binding
= archive, loop
        aggregation
= aggregate



My /etc/mosquitto/conf.d/myconfig.conf looks like this
persistence false
allow_anonymous
true
password_file
/etc/mosquitto/passwd
acl_file
/etc/mosquitto/acl

listener
1883

protocol mqtt

# websockets
listener
9001
protocol websockets

Still not connecting..... I wonder if thats do to the reverse proxy with apache ?

rich T

unread,
Dec 27, 2018, 7:09:24 PM12/27/18
to weewx-user


On Thursday, December 27, 2018 at 7:00:21 PM UTC-5, Scott Grayban wrote:
Ok so my weewx.conf looks like this now....
    [[MQTT]]
        server_url
= mqtt://weewx:passwordXXXXX@192.168.0.4:1883/

Pat

unread,
Dec 27, 2018, 7:15:22 PM12/27/18
to weewx-user
Please post your Belchertown skin settings.


On Thursday, December 27, 2018 at 7:00:21 PM UTC-5, Scott Grayban wrote:
Ok so my weewx.conf looks like this now....
    [[MQTT]]
        server_url
= mqtt://weewx:passwordXXXXX@192.168.0.4:1883/

Scott Grayban

unread,
Dec 27, 2018, 7:21:33 PM12/27/18
to weewx-user
    [[Belchertown]]
        HTML_ROOT
= /home/weewx/public_html/Nettleton
        skin
= Nettleton
       
[[[Extras]]]
            belchertown_root_url
= http://www.nettletondistrict.com/Nettleton
            logo_image
= http://www.nettletondistrict.com/Nettleton/images/map_of_spokane_wa.jpg
            site_title
= Nettleton District Weather Station
            footer_copyright_text
= "Nettleton District Weather Station, Spokane, Washington"
            radar_html
= "<img src='http://radar.weather.gov/lite/N0R/OTX_loop.gif'>"
            mqtt_enabled
= 1
            show_apptemp
= 1
            show_windrun
= 1
            highcharts_show_apptemp
= 1
            forecast_enabled
= 1
            darksky_secret_key
= XXXXXX
            earthquake_enabled
= 1
            facebook_enabled
= 1
            twitter_enabled
= 1
            graphs_page_header
= "Weather Observation Graphs"
            records_page_header
= "Weather Observation Records"
            reports_page_header
= "Weather Observation Reports"
            about_page_header
= "About This Weather Station"

Pat

unread,
Dec 27, 2018, 7:24:08 PM12/27/18
to weewx-user
Under [[[Extras]]] you don't have any of the skin specific MQTT settings. At a minimum you need mqtt_enabled, which you have, but also mqtt_host and mqtt_topic.

As mentioned previously, weewx is posting to your MQTT broker using [[MQTT]], the skin also needs to know where the broker is so it can get that data too and that's done in [[Belchertown]] [[[Extras]]]. 

Scott Grayban

unread,
Dec 27, 2018, 7:36:18 PM12/27/18
to weewx-user
Ok getting close.....

in EXTRAS I have

            mqtt_enabled = 1
            mqtt_host
= 192.168.0.4
            mqtt_topic
= weather/#
            mqtt_port
= 1883
            mqtt_ssl
= 0
            disconnect_live_website_visitor
= 1800000


which now is giving Failed connecting to the weather station. Please try again later!

I am pretty sure I have MQTT right

Scott Grayban

unread,
Dec 27, 2018, 7:40:21 PM12/27/18
to weewx-user
# netstat -tulpn | grep mosquitto
tcp        0      0 0.0.0.0:9001            0.0.0.0:*               LISTEN      15091/mosquitto     
tcp        0      0 0.0.0.0:1883            0.0.0.0:*               LISTEN      15091/mosquitto     
tcp6       0      0 :::1883                 :::*                    LISTEN      15091/mosquitto     

Pat

unread,
Dec 27, 2018, 7:43:02 PM12/27/18
to weewx-user
Ok, there's a few more things not quite right. 

1. MQTT is very picky about it's config file. Change your myconfig.conf so that there is no space between listener 1883 and protocol mqtt. See my post from last night above a few. 

listener 1883
protocol mqtt

Restart your mosquitto - or to be safe, restart your MQTT server. 

2. Once it's back up and weewx says it's posting, can you verify from your computer that MQTT is wokring? You can use a program like MQTT Spy on Windows if you have Java installed. 

3. In MQTT, the # is only used for debugging. You really don't want to publish or subscribe to this special topic. 

Under [[MQTT]] change

topic = weather/weewx

Under Belchertown [[[Extras]]] change

mqtt_topic = weather/weewx/loop

Restart weewx

Scott Grayban

unread,
Dec 27, 2018, 7:50:49 PM12/27/18
to weewx-user
Is my /etc/mosquitto/acl correct ? Or do I need to change those values ?

# Allow anonymous access to the sys
topic read $SYS/#
# Allow anonymous to read weather
topic read weather/#
# weewx readwrite to the loop
user weewx
topic weather/#


Pat

unread,
Dec 27, 2018, 7:52:22 PM12/27/18
to weewx-user
Looks good

Scott Grayban

unread,
Dec 27, 2018, 7:56:44 PM12/27/18
to weewx-user
Shit.....mosquitto.log is showing Socket error on client <unknown>, disconnecting.

1545958518: New connection from 192.168.0.4 on port 1883.
1545958518: New client connected from 192.168.0.4 as d413f626-b78b-4bca-8e99-43861d26dc6a (c1, k60, u'weewx').
1545958518: Client d413f626-b78b-4bca-8e99-43861d26dc6a disconnected.
1545958520: New connection from 63.230.134.161 on port 1883.
1545958520: Socket error on client <unknown>, disconnecting.
1545958533: New connection from 192.168.0.4 on port 1883.

Pat

unread,
Dec 27, 2018, 8:03:34 PM12/27/18
to weewx-user
I'm not sure what is causing that. Might be best to start from the basics again. Check out my article to compare your settings, read the descriptions again, and also check out the skin options to make sure you're not missing something. 

Is your broker or weewx available to the public?

Scott Grayban

unread,
Dec 27, 2018, 8:11:12 PM12/27/18
to weewx-user
192.168.0.4 is a local IP that has the weewx installed and data pulled from the station but the website itself is served to the public with a outside IP 63.230.134.161 via a reverse proxy

see http://www.nettletondistrict.com/Nettleton/ it works fine doing a reverse proxy for everything but the MQTT so far.

Pat

unread,
Dec 27, 2018, 8:13:12 PM12/27/18
to weewx-user
Ok, so thinking about this. I'm an outside person, and I cannot reach your 192.168.0.4 from the outside world. This is a problem because I need to reach that in order to get MQTT data on your website. 

You need to port forward 9001 to 192.168.0.4 so I can reach it from the outside 

Pat

unread,
Dec 27, 2018, 8:14:02 PM12/27/18
to weewx-user
Also, Belchertown uses websockets, so you should change your [[[Extras]]] mqtt_port to 9001 since that's what you have defined in myconfig.conf. I didn't catch that earlier. 

Scott Grayban

unread,
Dec 27, 2018, 8:25:04 PM12/27/18
to weewx-user
Got it !!!

See if it works on your end http://www.nettletondistrict.com/Nettleton/

G Hammer

unread,
Dec 27, 2018, 8:29:47 PM12/27/18
to weewx...@googlegroups.com
I get connecting for about a minute then failed try again later. 

    [[MQTT]]
        server_url
= mqtt://weewx:passwo...@192.168.0.4:1883/

--
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/ARBHWDXiDpQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.

Colin Larsen

unread,
Dec 27, 2018, 8:30:12 PM12/27/18
to weewx...@googlegroups.com
My browser won't connect to your data, which is due to the fact that you need to port forward the 9001 in your router - otherwise other users outside your network can't access the MQTT data. You'll also need to provide your public ip address or use your FQDN in that setting

    [[MQTT]]
        server_url
= mqtt://weewx:passwo...@192.168.0.4:1883/

--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.

Colin Larsen

unread,
Dec 27, 2018, 8:31:56 PM12/27/18
to weewx...@googlegroups.com
Screen Shot 2018-12-28 at 2.30.59 PM.png

Colin Larsen

unread,
Dec 27, 2018, 8:33:59 PM12/27/18
to weewx...@googlegroups.com
My MQTT settings in skin.conf look like this - with my public web site name in there

# MQTT Defaults

    mqtt_enabled = 1

    mqtt_host = "41south.net.nz"

    mqtt_port = 9001

    mqtt_ssl = 0

    mqtt_topic = "weather/41south/loop"

    disconnect_live_website_visitor = 1800000

Scott Grayban

unread,
Dec 27, 2018, 8:40:04 PM12/27/18
to weewx-user
Ahh so use my router IP instead and port forward 
    [[MQTT]]
        server_url
= mqtt://weewx:passwordXXXXX@192.168.0.4:1883/

Colin Larsen

unread,
Dec 27, 2018, 8:46:14 PM12/27/18
to weewx...@googlegroups.com
Yes indeed, that should do it. You can just put your domain name in the same as I have. And port forward external port 9001 to 192.168.0.4 port 9001

    [[MQTT]]
        server_url
= mqtt://weewx:passwo...@192.168.0.4:1883/

Scott Grayban

unread,
Dec 27, 2018, 8:50:25 PM12/27/18
to weewx-user
ok I did a test from the outside.... seems to work but of course it doesn't work in-house but I can live with that.

Can everyone else check again please ?
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href='https://groups.google.com/d/optout';return true;" onclick="this.href='https://groups.google.com/d/opto
It is loading more messages.
0 new messages