Expand Smartphone Template

107 views
Skip to first unread message

Geni

unread,
Jun 6, 2019, 12:59:55 PM6/6/19
to weewx-user
I would like to display the Almanac information as another point.
Why does skins have two folders named smartphones?
Which should contain the template?

In the skin.conf, I made an entry:

[CheetahGenerator]
     encoding = html_entities
        
     [[ToDate]]
         [[[Mobile phone]]]
             template = index.html.tmpl

         [[[Mobile Barometer]]]
             template = barometer.html.tmpl
            
         [[[MobileTemp]]]
             template = temp.html.tmpl
            
         [[[MobileHumidity]]]
             template = humidity.html.tmpl

         [[[Mobile Rain]]]
             template = rain.html.tmpl

         [[[Mobile Wind]]]
             template = wind.html.tmpl

         [[[Mobile Sun Moon]]]
             template = sun_mond.html.tmpl
            
but nothing is generated.
Where do I have to do something else?

Geni

gjr80

unread,
Jun 6, 2019, 9:43:00 PM6/6/19
to weewx-user
Hi,

The /home/weewx/skins (or /etc/weewx/skins - depending on your WeeWX install type) directory should only have one Smartphone directory (if you are using WeeWX v3.9.0 or later) or no Smartphone directory (if you are using WeeWX v3.8.2 or earlier). The reason being that under versions 3.8.2 and earlier the Smartphone page was included as a directory under the Standard skin. WeeWX 3.9.0 introduced the Seasons skin which replaced the Standard skin as the default skin and the Smartphone page was broken out as its own skin. A little confusing, perhaps you could clarify what you are seeing by posting a directory listing using ls -ail of your skins directory.

Considering you appear to have more than one Smartphone directory are you sure you modified the correct skin.conf? If you are then set debug=1 in weewx.conf, restart WeeWX and wait for a couple of report cyles to complete. Then take a log extract from when you restarted WeeWX through until the report cycles completed and post the extract here.

Gary

Geni

unread,
Jun 7, 2019, 4:11:41 AM6/7/19
to weewx-user
Hi,
one folder is called Smartphone and the other smartphone.
and still the debug log

Geni
skins.jpg
debug-skins.log

Geni

unread,
Jun 7, 2019, 9:39:37 AM6/7/19
to weewx-user
I'm using weewx 3.9.1 on a raspberry
Geni

Andrew Milner

unread,
Jun 7, 2019, 11:53:32 AM6/7/19
to weewx-user
Smartphone (with the upper case S) goes with the Seasons skin

smartphone (with lower case s) goes with the older Standard skin

I have not used Seasons so do not have any idea how it works - but I believe everything can be set in weewx.conf with no need for seperate skin.conf files whilst the older Standard does make use of skin.conf

So perhaps, if you are using Seasons, you should be changing weewx.conf rather than /smartphone/skin.conf

Geni

unread,
Jun 7, 2019, 1:00:34 PM6/7/19
to weewx-user
now everything is even more difficult! I just wanted to extend the previous standard.
I just wanted to add an additional template in the smartphone (with lower case s) standard skin.
What do I have to do to process this?
Geni

Am Donnerstag, 6. Juni 2019 18:59:55 UTC+2 schrieb Geni:

gjr80

unread,
Jun 8, 2019, 3:03:28 AM6/8/19
to weewx-user
On Saturday, 8 June 2019 03:00:34 UTC+10, Geni wrote:

    now everything is even more difficult! I just wanted to extend the previous standard.

Don't worry, we will get there.

I just wanted to add an additional template in the smartphone (with lower case s) standard skin.
What do I have to do to process this?

Now your setup is clearer and I know what you are talking about. First up a little clarification. Based on the directory tree you provided you have six skins: Ftp, Mobile, Rsync, Seasons, Smartphone and Standard. These correspond to the six directories directly under the directory named skins. The directory smartphone that sits under the Standard skin is just a directory with some templates in it - it is not another skin. The skin config file, skin.conf, sitting in each of the skin directories is used to control that skin and that skin only (ie skins/Standard/skin.conf can control everything in the Standard skin - including the templates in skins/Standard/smartphone). Andrew is correct in that you can control what happens in any of your skins from weewx.conf, but let's just keep it simple and work only in skin.conf for now. When you have things as you want you can look at working from weewx.conf later.

You indicate that you want to add you additional template to 'the smartphone (with lower case s) standard skin'. When I look at the log extract you provided the Standard skin is being run:

Jun 7 09:40:21 raspberrypi weewx[16403]: reportengine: Running report 'StandardReport'
Jun 7 09:40:22 raspberrypi weewx[16403]: reportengine: Found configuration file /etc/weewx/skins/Standard/skin.conf for report 'StandardReport'
Jun 7 09:40:23 raspberrypi weewx[16403]: cheetahgenerator: using search list ['weewx.cheetahgenerator.Almanac', 'weewx.cheetahgenerator.Station', 'weewx.cheetahgenerator.Current', 'weewx.cheetahgenerator.Stats', 'weewx.cheetahgenerator.UnitInfo', 'weewx.cheetahgenerator.Extras']

The Seasons skin is not being run. But the skin.conf extract your original post is from the Seasons skin.conf - it looks like you have modified the wrong skin.conf. Try making your skin.conf changes to skins/Standard/skin.conf. Note that because the Standard skin smartphone templates are in the smartphone sub-directory you will need to change the path to your templates, something like:

        [[[Mobile Sun Moon]]]

           
template = smartphone/sun_mond.html.tmpl

You will also need to make sure that that the template sun_mond.html.tmpl is in the skins/Standard/smartphone directory (if it is not already).
     
Make those changes and see how that goes. There should need no need to restart WeeWX.

One other thing I noticed in your log extract. Your station does not appear to be storing any archive records in your database. The log is also missing entries as to what archive period is being used as well as a few other things. Does your system work correctly and does the data on your WeeWX generated pages agree with that on your station? If not then something else is amiss and needs to be looked at. Judging by your log extract this won't affect your new template, but it may well affect the quality/currency of your displayed data.

Gary

Geni

unread,
Jun 8, 2019, 5:44:10 AM6/8/19
to weewx-user
To make the translation in German I had to edit the /etc/weewx/skins/Standard/smartphone/index.html.tmpl
So I thought this directory should be responsible.
The menu item is also made only the html file is not.
Live site: https://affolter.familyds.net/wetter/smartphone/index.html


Geni
skins1.jpg

gjr80

unread,
Jun 8, 2019, 6:06:27 AM6/8/19
to weewx-user
The skin config file for the Standard skin is /skins/Standard/skin.conf, this will apply to all templates/directories under the Standard skin. You have a skin.conf in /skins/Standard/smartphone, this skin.conf will do nothing and should be deleted. As per my previous post you need to be making your changes to /skins/Standard/skin.conf

Gary

Geni

unread,
Jun 8, 2019, 11:56:09 AM6/8/19
to weewx-user
Hi Gary,
I use an external SQL database (MariaDB), and mine that all data arrives there. Which are missing then in your opinion?

gjr80:
One other thing I noticed in your log extract. Your station does not appear to be storing any archive records in your database. The log is also missing entries as to what archive period is being used as well as a few other things. Does your system work correctly and does the data on your WeeWX generated pages agree with that on your station? If not then something else is amiss and needs to be looked at. Judging by your log extract this won't affect your new template, but it may well affect the quality/currency of your displayed data.

Registered in the correct skins.conf it works right away!
Many Thanks.

Am Samstag, 8. Juni 2019 12:06:27 UTC+2 schrieb gjr80:
The skin config file for the Standard skin is /skins/Standard/skin.conf, this will apply to all templates/directories under the Standard skin. You have a skin.conf in /skins/Standard/smartphone, this skin.conf will do nothing and should be deleted. As per my previous post you need to be making your changes to /skins/Standard/skin.conf

Gary


Geni


Reply all
Reply to author
Forward
0 new messages