Super simple skin

302 views
Skip to first unread message

Rob Cranfill

unread,
Nov 3, 2020, 1:20:49 PM11/3/20
to weewx-user
Hey, y'all!

(Running WeeWX 4.1.1 on a Raspberry Pi 3-something and a Vantage Vue, if that matters. See my station at http://robcranfill.net/weather, if you'd like.)

(I searched to see if this sort of question has been asked before; didn't find quite this question anytime recently; apologies if I missed something, just send me the right link and I'll go away. ;-) )


I want to create a super-simple display for an Android tablet I'll set up running in my living room as a non-interactive display. I've looked at the docs, it looks like I need to create a new skin? So I do this entirely from scratch? (I can of course look at other skins to see how they do it.)

Let's say I just want a skin that shows the current temperature in a nice big bold font. That seems like a good place to start. So I'd just read the WeeWX Customization Guide and hack it on out? Or is there a better place to start?

Thanks for any suggestions!
 rob

(I am reasonably proficient in hacking on WeeWX, and in Python, and in other Linux-foo. Just not sure where to start with this :-) )

Rob Cranfill

unread,
Nov 3, 2020, 1:27:04 PM11/3/20
to weewx-user
OK, I do find this https://groups.google.com/g/weewx-user/c/UvM_lOYT1y4/m/5zMCy3IKBwAJ but I'm still interested in "rolling my own". :-)

vince

unread,
Nov 3, 2020, 1:40:26 PM11/3/20
to weewx-user
On Tuesday, November 3, 2020 at 10:20:49 AM UTC-8, Rob Cranfill wrote:
Let's say I just want a skin that shows the current temperature in a nice big bold font. That seems like a good place to start. So I'd just read the WeeWX Customization Guide and hack it on out? Or is there a better place to start?



Make a simple index.html.tmpl file like the examples in weewx. Include just the one temperature element. Set a CSS look'n'feel to whatever you like.

Take the example at https://www.w3schools.com/css/css_howto.asp for how to do simple style sheets. 

Should be super easy.

Rob Cranfill

unread,
Nov 3, 2020, 6:15:24 PM11/3/20
to weewx-user
Don't I have to tell WeeWX, via a skin, to process that file? As per http://www.weewx.com/docs/customizing.htm#Which_files_get_processed_

Rob Cranfill

unread,
Nov 3, 2020, 6:25:15 PM11/3/20
to weewx-user
The top-level docs at http://weewx.com/docs.html say 

        Describes how to ... create and customize skins.  ...

Does it, though? Can someone point to the appropriate section? Sorry if I'm just being dense.

vince

unread,
Nov 3, 2020, 7:04:40 PM11/3/20
to weewx-user
It does indeed. 

Your specific gravity 'is' perhaps a 'little' high today, but not really :-)

It is definitely a bit of a slog for the initial learning curve until you get your feet wet and realize you're probably over-thinking just like everybody else does initially.
  • Look at the CheetahGenerator section for how it works for defining what is processed when and how.
  • Then re-re-re-re-read Tags therein for how to specify things in a template file.
  • If you look in the Tags section there is even an example index.html.tmpl file that's very close to what you're looking to do.

A totally minimalist index.html.tmpl file would look like:

<html>
<body>
<h1><center>$current.outTemp</center></h1>
</body>
</html>

It's really that simple.  One tag in a minimalist HTML file.

Once you have that working hard-coded, up the ante and style it with CSS to set colors and font sizes to salt to taste for you, along the lines of the CSS example link I posted for you earlier.

One 'that' works, I'd *strongly* recommend packaging your custom skin as something the wee_extension installer can install.  That way you will be able to easily rebuild your system and reinstall your custom skin in one command.   It's a little more time investment, but generally worth it.


vince

unread,
Nov 3, 2020, 7:58:48 PM11/3/20
to weewx-user
ok Rob - I cooked up a minimalist demo skin that is installable via the wee_extension installer that should do the right thing for you.

Grab it from https://github.com/vinceskahan/weewx-demo-skin and use wee_extension to install it.   Instructions for that are at http://www.weewx.com/docs/utilities.htm#wee_extension_utility

Go appropriately wild :-)

Rob Cranfill

unread,
Nov 3, 2020, 8:49:54 PM11/3/20
to weewx-user
Thanks! I will check that out. I've got something started already, but I'm sure what you've pointed to will be helpful.

(Here's my initial take, to be tweaked upon mercilessly:



Er, that came out rather large. My apologies! (Must be my 4K screen ;-] )

Rob Cranfill

unread,
Nov 3, 2020, 8:51:17 PM11/3/20
to weewx-user
(The image I pasted didn't work. Sorry. You're not missing much. I'll post something when I have a more-nearly finished product.)

Rob Cranfill

unread,
Nov 4, 2020, 12:45:11 AM11/4/20
to weewx-user
I'm on my way; thanks again, Vince!


(Based on "Standard", hence the name. :-) )

Sven Täveby

unread,
Nov 7, 2020, 4:33:44 PM11/7/20
to weewx-user
Can You share that skin?
Exactly what I want (except maybe units).

/Sven 

Rob Cranfill

unread,
Nov 7, 2020, 6:30:05 PM11/7/20
to weewx-user
Sven, if you're addressing me, I've got it posted at


Does that work for you?
 /rob

PS - I've gotten a little sidetracked from updating the code, because 1) I can see that I will indeed be able to do what I want with WeeWX, but 2) the hardware I was going to use to display it is proving to be a problem, so I'm re-thinking that. :-]

Sven Täveby

unread,
Nov 8, 2020, 3:14:41 PM11/8/20
to weewx-user
Thx. Will check it out.
/Sven

Sven Täveby

unread,
Dec 27, 2020, 10:17:27 AM12/27/20
to weewx-user
A big Thank You!
Made some changes and transladed to Swedish. Maybe I'll change the name to STandard? :-) 
Outdoor/indoor/max ut/min out/rain today/rain totalt last 7 days/last updated.

Looks great on my wall, using a Raspberry Pi touchscreen (and a BME280 sensor to report indoor temp to weewx on the master Pi.
Cheers
/Sven
Screenshot_2020-12-27_161629.jpg

Sven Täveby

unread,
Dec 27, 2020, 10:23:32 AM12/27/20
to weewx-user

Also added autorefresh to web page...
/ST

Den söndag 27 december 2020 kl. 16:17:27 UTC+1 skrev Sven Täveby:
A big Thank You!
Made some changes and transladed to Swedish. Maybe I'll change the name to STandard? :-) 
Outdoor/indoor/max ut/min out/rain today/rain totalt last 7 days/last updated.

Looks great on my wall, using a Raspberry Pi touchscreen (and a BME280 sensor to report indoor temp to weewx on the master Pi).

Rob Cranfill

unread,
Dec 27, 2020, 5:54:52 PM12/27/20
to weewx...@googlegroups.com
I’m glad you found it useful! Thanks for letting me know. Yes, STandard would be quite appropriate. :-)


--
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/AKIAQ1knwvc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/ef4c91fc-ffc2-49ca-9893-3cce73e25d97o%40googlegroups.com.
--
</rob>

Rob Cranfill

unread,
Dec 27, 2020, 6:06:27 PM12/27/20
to weewx...@googlegroups.com
I have pared it down it even more - perhaps too much. ;-) The wind alternates between current speed and recent (30 minute) max. (The stylesheet background/border needs to be fixed a bit.)



--
</rob>

Rob Cranfill

unread,
Dec 27, 2020, 8:27:14 PM12/27/20
to weewx-user
Altho, once again, my station is offline due to the dread WeeWX time sync issue....:-/
Reply all
Reply to author
Forward
0 new messages