Belchertown About Page WeeWx Variables

92 views
Skip to first unread message

G Hammer

unread,
Feb 22, 2019, 9:54:28 PM2/22/19
to weewx-user
I'd like to include some WeeWX variables in the About page, but when I use the HTML sample I get the variable names as output.

This:
<ul>
    <li>Station hardware: $station.hardware</li>
    <li>Server uptime: $station.os_uptime</li>
    <li>WeeWX uptime: $station.uptime</li>
    <li>WeeWX version: $station.version</li>
    <li>Belchertown Skin Version: $belchertown_version</li>
</ul>
         

Results in this:

  • Station hardware: $station.hardware
  • Server uptime: $station.os_uptime
  • WeeWX uptime: $station.uptime
  • WeeWX version: $station.version
  • Belchertown Skin Version: $belchertown_version
As long as I'm on the topic, is there a list of inbuilt variables?

Andrew Milner

unread,
Feb 22, 2019, 11:04:35 PM2/22/19
to weewx-user
which file did you edit??  looks as though you perhaps changed the .html file instead of the .html.tmpl file

Colin Larsen

unread,
Feb 22, 2019, 11:13:24 PM2/22/19
to weewx-user
You should just edit the Inc file, about.inc

--
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.

Colin Larsen

unread,
Feb 22, 2019, 11:15:13 PM2/22/19
to weewx-user

Creating About Page and Records Page

The About Page and Records Page offer some areas for custom HTML to be run. To create or edit these pages, go to the skins/Belchertown folder. These files should not be overwritten during skin upgrdades, but it's always best to have a backup just in case!

  • Create (or edit) the skins/Belchertown/about.inc and skins/Belchertown/records.inc files with your text editor, such as Notepad or Nano.
    • These files take full HTML, so you can get fancy if you want.
    • You can view, and use the sample file about.inc.example and records.inc.example. Just rename to remove the .example, edit and you should be good to go.
  • Wait for an archive interval for the pages to be generated.

tor...@torrin.org

unread,
Feb 22, 2019, 11:33:22 PM2/22/19
to weewx-user
All answers are correct, yet if you put those variables into about.inc, the do not work.  I am wondering if you need to have the page PHP like.  Maybe Pat can post the source for his?

Colin Larsen

unread,
Feb 23, 2019, 12:18:54 AM2/23/19
to weewx-user
Hmm, not quite sure what you are doing different to me, but if you edit the file as per instructions it certainly works. Can you confirm that your file is just called about.inc and it resides in the skins/Belchertown directory?

tor...@torrin.org

unread,
Feb 23, 2019, 1:07:04 AM2/23/19
to weewx-user
Yup, and I drop those variables in there and they do not render either.  (I just tried it).   I do not think the about.inc.example supports dropping variables into it as it seems to be straight html.

Colin Larsen

unread,
Feb 23, 2019, 1:09:22 AM2/23/19
to weewx-user
You need to remove the .example off the end so it is just about.inc

tor...@torrin.org

unread,
Feb 23, 2019, 1:29:27 AM2/23/19
to weewx-user
Yes, clearly, and the variables would not show up on the about page as G Hammer show unless there was actually an about.inc.  Mine works fine, but I am not passing any variables into it.  I suspect there is a PHP wrapper that is needed  - are you using your about.inc to display variables?  If so, could you please post it up?

gjr80

unread,
Feb 23, 2019, 2:48:38 AM2/23/19
to weewx-user
It's nothing to do with PHP - there is no PHP in the Belchertown extension nor does WeeWX/Cheetah use it, simply put a #include will cause Cheetah to appropriately display any search list entries it encounters. If it is not and it is displaying the tags as literal text it is because the tags concerned don't exist in the search list being used. Colin's success would indicate the issue is not with the Belchertown skin but rather a missing file or config setting. You may get some clues by running with debug=1 and looking at the log during report generation. It would certainly pay to look at the contents of the relevant Belchertown skin directories to verify everything is where it should be.

Gary

Colin Larsen

unread,
Feb 23, 2019, 2:55:18 AM2/23/19
to weewx-user
I'm pretty sure my (very basic) about.inc file is about the same as yours. I've added consBatteryVoltage which works fine too. If you follow what Gary has mentioned I'm sure a clue will turn up to help us help you :)

Welcome to the 41South weather site. This site uses a WeatherDuino Arduino weather station


<ul>

    <li>Station hardware: WeatherDuino emulating a $station.hardware</li>

    <li>Transmitter battery voltage: $current.consBatteryVoltage</Li>

    <li>Server uptime: $station.os_uptime</li>

    <li>WeeWX uptime: $station.uptime</li>

    <li>WeeWX version: $station.version</li>

    <li>Belchertown Skin Version: $belchertown_version</li>

</ul>


G Hammer

unread,
Feb 23, 2019, 9:58:39 AM2/23/19
to weewx-user
I have followed the outlined steps, about.inc, etc.
I enabled debug logging and started weewx, ran wee_reports, stopped weewx.
I've attached the resulting logs.

There are errors, but they seem to relate to the sdr driver.

WeeWXLogs

G Hammer

unread,
Feb 23, 2019, 10:44:09 AM2/23/19
to weewx-user
I have 'solved' the issue.
I deleted the skin directories for Belchertown, installed the skin again, cycled WeeWX, run wee_reports.
All is well with variables and about.inc.

Something indeed was missing in the skin directories.

Thanks all.

Pat

unread,
Feb 23, 2019, 9:27:17 PM2/23/19
to weewx-user
Hi all, in Belchertown skin version 0.8.2 and older, the about.inc inclusion did not allow for weewx variables (at least I don't think so). I was over-thinking it which made it complicated. Oops :) 

In 0.9 (which is in beta now) I changed a lot, and the about.inc was one of the changes to simplify it - which also allows for built in weewx variables to work. Sorta like how I should have done it months ago!

I've been testing 0.9 and think it's ready for release. I'll probably do that next week sometime. 

Colin Larsen

unread,
Feb 23, 2019, 10:04:16 PM2/23/19
to weewx-user
Ah yes, hadn't thought of that.

--

G Hammer

unread,
Feb 23, 2019, 11:35:48 PM2/23/19
to weewx...@googlegroups.com
I am running 0.9r6. Working fine after removing the 2 skin directories and installing Belchertown fresh. 

--
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/e_rC4K6Zeyk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages