poblabs / weewx-belchertown

A clean and modern weewx skin with real time streaming updates, forecast data and interactive charts. View it in action at BelchertownWeather.com
https://belchertownweather.com
GNU General Public License v3.0
211 stars 111 forks source link

Feature request: Dark Mode #89

Closed captain-coredump closed 5 years ago

captain-coredump commented 5 years ago

I am using this skin on a wall-mounted 24/7 Android tablet. Is it possible to make an option to use a dark background with light text, so that the current white background isn't blinding at night in a dark room?

This skin + Amazon Fire 10 Tablet + Fully Kiosk Browser (Android) = $99 color touchscreen console that Davis will never make.

poblabs commented 5 years ago

I use dark mode everything and I can't believe I hadn't thought of this. I'll try and stuff it into 1.0 as an option - something like dark_mode = 1 (on) or 0 (off).

captain-coredump commented 5 years ago

I guess that you don't have a 24/7 wall-mounted tablet that's bright enough to serve as a night light with the current white background. :-)

I don't know how complex it is, but can you expand the proposed feature just a bit more and make dark_mode=[on/off/auto]? In auto mode, have it switch to dark_mode at sunset, and back to white background at sunrise. Both times are already available in the skin, and this is one of my favorite options that Jachym implemented in his Meteotemplate web code. I think that he (or someone else with a similar feature) ran into logic issues at extreme latitudes where the sun never set (or rose) at certain times of the year, which I only mention as a potential gotcha that will require a few more lines of code for those living in regions with frequent aurora shows.....

poblabs commented 5 years ago

That'll require a bit of research for me to do and time has been very thin for me lately (weewx nor web design are my full time job, just a hobby).

Let me work on a dark mode (which already is showing me my flaws with the skin that I need to clean up), so the dark mode task alone is larger than I thought. Then perhaps 1.1 or something we can figure out how to make the skin's CSS timezone aware and can introduce Auto.

Are you using MQTT Websocket updates? I see the Auto as something that would only fit into that mode (since the static page requires users to refresh it to get updated data anyways)

captain-coredump commented 5 years ago

Yes, I'm using MQTT Websocket mode on a wall-mounted tablet as a dedicated 24/7 weather station console. This is probably not a use that you had originally envisioned, but your skin and the MQTT stuff have created the "killer app" that finally gives WeeWX a graphic web console that updates at LOOP packet frequency and not just archive intervals.

One of these days, I'd love to see a "console" mode that drops the headers (since the user [hopefully] knows where they are), moves the data received pinger into a thin gray status bar at the top of the page, and has left/right taps to move between the temperature-row, forecastrow, eq-stats-row, and highcharts-row as a navigation ring of dedicated pages. Certainly beyond my meek CSS/Jacascript skills, but I can always dream......

poblabs commented 5 years ago

Your tablet is a bit too big, but I've created a Pi page which fits a Raspberry Pi and a 3.5" screen. You could give this a try on your tablet. Browse to yoursite.com/pi and see how it looks. Again, it probably doesn't look great since it wasn't meant for a Fire Tablet, but it does remove the MQTT timeout, and removes the headers and radar.

This is how I've created a "console" mode for myself and have included it with the skin as a little hidden "bonus". I think there's 2 or 3 people who have told me they're using it.

Screenshot of the Pi:

image

41south commented 5 years ago

That goes along with a request that I have made as well I think :)

On Sun, 31 Mar 2019, 07:51 Arthur Emerson, notifications@github.com wrote:

Yes, I'm using MQTT Websocket mode on a wall-mounted tablet as a dedicated 24/7 weather station console. This is probably not a use that you had originally envisioned, but your skin and the MQTT stuff have created the "killer app" that finally gives WeeWX a graphic web console that updates at LOOP packet frequency and not just archive intervals.

One of these days, I'd love to see a "console" mode that drops the headers (since the user [hopefully] knows where they are), moves the data received pinger into a thin gray status bar at the top of the page, and has left/right taps to move between the temperature-row, forecastrow, eq-stats-row, and highcharts-row as a navigation ring of dedicated pages. Certainly beyond my meek CSS/Jacascript skills, but I can always dream......

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/poblabs/weewx-belchertown/issues/89#issuecomment-478288310, or mute the thread https://github.com/notifications/unsubscribe-auth/ABpSSSlElsSq66mxCxqlCHo615yDYqCDks5vb847gaJpZM4cTUsH .

captain-coredump commented 5 years ago

Great minds think alike, @41south!

I saw the Pi page "Easter Egg" a few months ago, and was hoping that it would be the application that finally made me stop regretting the $75 that I spent for an official Pi 7" 800x480 display.

The 7" Amazon Fire Tablet (1024x600) is on sale this week for $35, the 8" (1280x800) for $50, and the 10" (1920x1200) for $100. By the time that you add a case onto the Pi's display, even the 10" tablet is cheaper...just add the free Android Fully Kiosk Browser that displays web pages full screen. I'm not a huge fan of Android in my 100% Apple / Pi garden, but you can't beat the wall-mounted screen real estate for the price.

8" version: IMG_3016

10" version: IMG_3018

I've had the 7" model running for a few months in portrait mode, and it is serviceable but wouldn't be my choice if it wasn't already in the junk drawer. I picked up a 10" during the sale this week, and as you can see there's enough screen real estate to display the current observations, radar, almanac, and 8-day forecast without scrolling.

If I could just find the CSS to change the top "Data Received" line into a gray status bar like MacOS/iOS use on the top of their screens, I'd be good until dark_mode is implemented.....

poblabs commented 5 years ago

Yeah that does look pretty good!

To tinker with the colors for that bar, Try changing this section.

(UNTESTED) You'll want to add something like background-color: lightgray or something.

captain-coredump commented 5 years ago

I made a copy of all relevant files to create my own tablet.html, where I could tinker with the CSS and chop the headers off without breaking the original skin. I told the Fully browser to scale up the fonts to 110%, which was just enough to make the Records section fall off the bottom of the screen. Hanging on the wall now:

IMG_3019

Without the browser font scaling, there is enough room at the bottom of the screen to include a row of faux buttons (think tab bar on the bottom) to jump between different sections of the page to mimic the real buttons used on several vendors' dedicated consoles. I can live with the above until dark_mode is implemented, though.....

41south commented 5 years ago

Great work, I like it 👍

On Mon, 1 Apr 2019, 11:22 Arthur Emerson, notifications@github.com wrote:

I made a copy of all relevant files to create my own tablet.html, where I could tinker with the CSS and chop the headers off without breaking the original skin. I told the Fully browser to scale up the fonts to 110%, which was just enough to make the Records section fall off the bottom of the screen. Hanging on the wall now:

[image: IMG_3019] https://user-images.githubusercontent.com/17728973/55296971-c7262b00-53ee-11e9-9a4a-cfd6e9410852.jpeg

Without the browser font scaling, there is enough room at the bottom of the screen to include a row of faux buttons (think tab bar on the bottom) to jump between different sections of the page to mimic the real buttons used on several vendors' dedicated consoles. I can live with the above until dark_mode is implemented, though.....

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/poblabs/weewx-belchertown/issues/89#issuecomment-478399809, or mute the thread https://github.com/notifications/unsubscribe-auth/ABpSSZ0v_QgWrPpslmSfNeGKgKENs__uks5vcVFLgaJpZM4cTUsH .

poblabs commented 5 years ago

If you're following the 1.0 development branch, you'll see I just pushed a big update that includes dark mode. This is a combination of Bootstrap's darkly, and Highcharts Dark Unica themes. I also applied some overrides to both of those to keep the skin consistent. Thankfully those frameworks exist which made integration easier.

Still things that need to happen are:

Here's a preview. Obviously my logo is not dark mode ready 😃

image

poblabs commented 5 years ago

Full screenshot with the graphs:

image

41south commented 5 years ago

Here's a tricky question, would you need to run 2 instances to present a white version to web users and a dark one for the wall tablet?

On Tue, 2 Apr 2019, 06:12 poblabs, notifications@github.com wrote:

Full screenshot with the graphs:

[image: image] https://user-images.githubusercontent.com/3484775/55353134-85e65780-5490-11e9-9bf3-cb643082c931.png

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/poblabs/weewx-belchertown/issues/89#issuecomment-478707755, or mute the thread https://github.com/notifications/unsubscribe-auth/ABpSSeJLe4Qf40AZqBPzU6ML1aKxQuNCks5vcloNgaJpZM4cTUsH .

poblabs commented 5 years ago

Yes, 2 versions needed. I suppose you might be able to get away with 2 [Belchertown] sections in weewx.conf with different HTML_ROOT's. Haven't tested that though.

Like this for example. It'll duplicate everything though

    [[Belchertown]]
        skin = Belchertown
        HTML_ROOT = /var/www/html/belchertown
    [[Belchertown_tablet]]
        skin = Belchertown
        HTML_ROOT = /var/www/html/belchertown/tablet
poblabs commented 5 years ago

For an "adhoc" dark mode, I could also add in a ?theme=dark URL variable which would make that current page itself dark (not the whole site).

For example: mysite.com/?theme=dark, but when you click to the graphs page, you'll also need to specify mysite.com/graphs?theme=dark ...

Setting dark_mode = 1 in skin.conf or weewx.conf Extras, it'll set the full site dark.

41south commented 5 years ago

Would that follow through as you selected different pages, i.e. graphs and records?

On Tue, 2 Apr 2019, 08:07 poblabs, notifications@github.com wrote:

For an "adhoc" dark mode, I could also add in a ?theme=dark URL variable which would make that current page itself dark (not the whole site).

For example: mysite.com/?theme=dark, but when you click to the graphs page, you'll also need to specify mysite.com/graphs?theme=dark ...

Setting dark_mode = 1 in skin.conf or weewx.conf Extras, it'll set the full site dark.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/poblabs/weewx-belchertown/issues/89#issuecomment-478748324, or mute the thread https://github.com/notifications/unsubscribe-auth/ABpSSSHwVmcPbRL08JELO8VWsSUU8me0ks5vcnUWgaJpZM4cTUsH .

poblabs commented 5 years ago

Not unless you use dark_mode = 1

To make the URL variable follow through, I'll need to use cookies and I'm trying to avoid the use of cookies on this website skin

41south commented 5 years ago

Yeah thought that might be the case and no worries at all. You've done superb work with this skin Pat :)

On Tue, 2 Apr 2019, 08:12 poblabs, notifications@github.com wrote:

Not unless you use dark_mode = 1

To make the URL variable follow through, I'll need to use cookies and I'm trying to avoid the use of cookies on this website skin

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/poblabs/weewx-belchertown/issues/89#issuecomment-478750095, or mute the thread https://github.com/notifications/unsubscribe-auth/ABpSSXrdCvwjVIejWCHjzBU0WeEUxEXaks5vcnZLgaJpZM4cTUsH .

poblabs commented 5 years ago

Thanks! I guess for "tablet" mode this option would work though. You could do something like mysite.com/?theme=dark as an example. Then the rest of the site for everyone else would be light mode.

41south commented 5 years ago

Sounds great to me, hopefully that works for Arthur too, this request is probably more his than mine

On Tue, 2 Apr 2019, 08:18 poblabs, notifications@github.com wrote:

Thanks! I guess for "tablet" mode this option would work though. You could do something like mysite.com/?theme=dark as an example. Then the rest of the site for everyone else would be light mode.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/poblabs/weewx-belchertown/issues/89#issuecomment-478751829, or mute the thread https://github.com/notifications/unsubscribe-auth/ABpSSUKBbYIdxvF9KSxeIbORSwGw2SDHks5vcnedgaJpZM4cTUsH .

captain-coredump commented 5 years ago

Your dark_mode screen shots above are even more awesome than I envisioned! Kudos!

I'll grab the 1.0 development branch after work tomorrow, and will let you know how it works out on the tablet.

Thank you for making this happen so fast!!!

poblabs commented 5 years ago

FYI - 1.0 requires an uninstall of the current skin, and a fresh install of the development branch. Also the charts are 110% changed up, so it's up to you if you want to make the leap with little to no documentation... We're working on documentation now though, couple more days maybe?

poblabs commented 5 years ago

I'm also planning on pushing more changes to the charts too. There's some color inconsistencies now with the dark mode that I need to resolve.

captain-coredump commented 5 years ago

OK, I'll be patient for another week. The current setup is totally serviceable for now, so I'll try to convince my brain that there's no rush.....

poblabs commented 5 years ago

Pending any bugs that come out of testing over the next few days, this request will be closed. Dark mode is officially implemented, URL variable implemented, and auto mode for sunset/sunrise also implemented and working.

You can preview it here: https://belchertownweather.com/?theme=dark

41south commented 5 years ago

Awesome work, thanks Pat!

On Wed, Apr 3, 2019 at 12:38 PM poblabs notifications@github.com wrote:

Pending any bugs that come out of testing over the next few days, this request will be closed. Dark mode is officially implemented, URL variable implemented, and auto mode for sunset/sunrise also implemented and working.

You can preview it here: https://belchertownweather.com/?theme=dark

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/poblabs/weewx-belchertown/issues/89#issuecomment-479256204, or mute the thread https://github.com/notifications/unsubscribe-auth/ABpSSdo9JHECN5MVbsWqtWgsiK1-_b1Eks5vc-oSgaJpZM4cTUsH .

slvrscoobie commented 5 years ago

Looks GREAT! Cant wait! I tried to install it, but without the official release, Im stuck lol

41south commented 5 years ago

You should be able to download the development zip file and install it the same way as a release, just change the file name as required. Not sure on any update "gotchas", Pat will need to jump in on that

On Wed, 3 Apr 2019, 14:49 slvrscoobie, notifications@github.com wrote:

Looks GREAT! Cant wait! I tried to install it, but without the official release, Im stuck lol

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/poblabs/weewx-belchertown/issues/89#issuecomment-479293326, or mute the thread https://github.com/notifications/unsubscribe-auth/ABpSScR1MsBwL3Af07jVqZODJMr8bNJQks5vdAiWgaJpZM4cTUsH .

slvrscoobie commented 5 years ago

yep, did that, but it says install.py not found. and it broke my standard install, so I just deleted it and restarted. Ill wait till its 'officially' released.

pi@raspberrypi:~/Downloads $ sudo wee_extension --install weewx-belchertown-development.zip Request to install 'weewx-belchertown-development.zip' Extracting from zip archive weewx-belchertown-development.zip Traceback (most recent call last): File "/usr/bin/wee_extension", line 82, in main() File "/usr/bin/wee_extension", line 74, in main ext.install_extension(options.install) File "/usr/share/weewx/weecfg/extension.py", line 116, in install_extension self.install_from_dir(extension_dir) File "/usr/share/weewx/weecfg/extension.py", line 174, in install_from_dir shutil.copy(source_path, destination_path) File "/usr/lib/python2.7/shutil.py", line 119, in copy copyfile(src, dst) File "/usr/lib/python2.7/shutil.py", line 82, in copyfile with open(src, 'rb') as fsrc: IOError: [Errno 2] No such file or directory: '/var/tmp/weewx-belchertown-development/skins/Belchertown/belchertown-dark.cssskins/Belchertown/style.css'

41south commented 5 years ago

Hmm, install.py is in there. Did you use sudo when you ran the install command? I have had similar errors before when I forgot to use sudo

sudo wee_extension --install development.zip I think is what it would be (or whatever file name you gave it)

On Wed, Apr 3, 2019 at 3:10 PM slvrscoobie notifications@github.com wrote:

yep, did that, but it says install.py not found. and it broke my standard install, so I just deleted it and restarted. Ill wait till its 'officially' released.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/poblabs/weewx-belchertown/issues/89#issuecomment-479299740, or mute the thread https://github.com/notifications/unsubscribe-auth/ABpSSdRp8oiDDHTWY3OaPjz6-otGl4SHks5vdA2ZgaJpZM4cTUsH .

slvrscoobie commented 5 years ago

I ran : pi@raspberrypi:~/Downloads $ sudo wee_extension --install weewx-belchertown-development.zip

poblabs commented 5 years ago

@slvrscoobie Interesting! I think you found a typo of mine? Let me see if I can figure that error out.

poblabs commented 5 years ago

@slvrscoobie Yep, I forgot a comma in install.py. Oops. Download the development zip file again and try again

slvrscoobie commented 5 years ago

Cue Michael Bolton ‘I always do that. I always mess up some mundane detail!’ :) Or is that overplayed?

On Wed, Apr 3, 2019 at 8:00 AM poblabs notifications@github.com wrote:

@slvrscoobie https://github.com/slvrscoobie Yep, I forgot a comma in install.py. Oops. Download the development zip file again and try again

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/poblabs/weewx-belchertown/issues/89#issuecomment-479459236, or mute the thread https://github.com/notifications/unsubscribe-auth/AMqMurM0fCtnuj5Wwi2efh-G31AyuluHks5vdJfqgaJpZM4cTUsH .

poblabs commented 5 years ago

hah so true. Commas and semi-colons are the bane of my coding existence. You'd think I'd learn my lesson by now.

captain-coredump commented 5 years ago

Cue Michael Bolton ‘I always do that. I always mess up some mundane detail!’ :) Or is that overplayed?

You have a long way to go until you're in Captain Coredump's league! My birthday is February 30th or March 32nd (depending on if it is a leap year), and on a scale of 1-10 I'm a 257 at breaking code..... :-)

poblabs commented 5 years ago

I just pushed a rather large update which increases the speed and reliability of dark mode and auto dark mode through a full re-write of how it's done. There's pros and cons of both methods, but I believe this new method in https://github.com/poblabs/weewx-belchertown/commit/45a76777e0dd7dcfd8f10fdf55df7569f973f993 is more reliable.

Previous method was to replace the stylesheet all together (pro: less files to load, con: the elements on screen get jumpy when switching, and it was a lot of code to make this happen), this new method just changes the body class (pro: it's less code and it's a seamless and super smooth theme switching. con: users will load dark mode CSS file even if they don't use dark mode).

It changes a lot within the skin and even renames a file, so if you're testing 1.0 right now please uninstall, delete everything in your HTML folder, reinstall and restart weewx. Everything should populate again at the next archive interval (or run wee_reports if you're impatient)

New notable addition is the toggle switcher at the top right which can change the theme adhoc by clicking the toggle. This can be disabled with an [[[Extras]]] option (to be documented later).

image

This toggle button does not persist the theme yet, it only changes the theme on the active page right now. Much like the URL option of /?theme=dark. The toggle button persist option may come tomorrow. URL theme setting will remain on the active page only (unless there's a reason for it to persist too, but I don't see one right now since there's the toggle. ).

Also since this is development, expect other tweaks and fixes throughout the days ahead.

poblabs commented 5 years ago

Also, if the toggle slider button doesn't make sense, I could use an icon like this one: 🌓

41south commented 5 years ago

I think my vote goes from the toggle switch, but the icon is kinda cool ....... Hmmmm

On Thu, 4 Apr 2019, 14:15 poblabs, notifications@github.com wrote:

Also, if the toggle slider button doesn't make sense, I could use an icon like this one: 🌓

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/poblabs/weewx-belchertown/issues/89#issuecomment-479713079, or mute the thread https://github.com/notifications/unsubscribe-auth/ABpSSdwft9SAcXDWFnKoQIcQv4flvm-8ks5vdVIdgaJpZM4cTUsH .

poblabs commented 5 years ago

I like the slider too. I'll leave it with that for now.

poblabs commented 5 years ago

A question for the group: right now the toggle switch changes the theme for that page only. If you browse away it will go back to the site-owner's preference on theme.

If the theme is set to auto then the automatic process will override your toggle when it runs. It runs at weewx archive interval.

I can make the toggle setting persist, which means that if you're on the about page and you click to go to dark mode, then go to the records page it'll still stay dark mode.

If auto-mode is on, it will override your toggle preference back to auto mode.

This gets confusing but the end result is (for example during the day time): "hey that's not what I wanted it to do, I wanted dark mode why is it back to light mode?".

There's no easy answer here on what the "right way" is to do this. Some thoughts:

  1. I could make the toggle persist and "turn off" auto mode. The only way to turn auto mode back on would be for the user to quit the browser (not the tab).

  2. If the theme is on auto I could remove hide the toggle so there's no option to get into a mixed mode.

Thoughts?

michaelundwd commented 5 years ago

Not sure if I understood when the changes take place fully, but how about a 3-way switch? Light/Auto/Dark

All 3 positions apply to all pages, and the change occurs at the next archive interval. Does that work?

Michael

41south commented 5 years ago

I think that would be my thought too, dark-light-auto

On Fri, 5 Apr 2019, 21:25 michaelundwd, notifications@github.com wrote:

Not sure if I understood when the changes take place fully, but how about a 3-way switch? Light/Auto/Dark

All 3 positions apply to all pages, and the change occurs at the next archive interval. Does that work?

Michael

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/poblabs/weewx-belchertown/issues/89#issuecomment-480191684, or mute the thread https://github.com/notifications/unsubscribe-auth/ABpSSVCeMFmbjjvz1jkupbQshGUqERNyks5vdwh5gaJpZM4cTUsH .

poblabs commented 5 years ago

A 3-way switch, while not impossible, wouldn't be my choice. The toggler is basically a checkbox (so on/off), and a 3 way code is a bit more complicated checkbox. It's more code and goes against my "keep it simple" mentality. Plus there's not a lot of room to put text there to describe which position the switch is in. I did consider a 3 way switch, but right now am deciding against it.

41south commented 5 years ago

Fair call. I think a mixed mode would be annoying. If I switch to dark then follow through with the whole site, disable auto as you said until the browser is closed. I think in my mind that is the best alternative.

On Sat, 6 Apr 2019, 00:57 poblabs, notifications@github.com wrote:

A 3-way switch, while not impossible, wouldn't be my choice. The toggler is basically a checkbox (so on/off), and a 3 way code is a bit more complicated checkbox. It's more code and goes against my "keep it simple" mentality. Plus there's not a lot of room to put text there to describe which position the switch is in. I did consider a 3 way switch, but right now am deciding against it.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/poblabs/weewx-belchertown/issues/89#issuecomment-480249193, or mute the thread https://github.com/notifications/unsubscribe-auth/ABpSSUH4LYoi34JUH2ylDpwY2Ha9nW3Aks5vdzo0gaJpZM4cTUsH .

captain-coredump commented 5 years ago

I just grabbed the development branch and installed it. When running wee_reports to force a skin rebuild, it threw build errors until both of these were added to weewx.conf:

        highcharts_show_apptemp = 0
        highcharts_show_intemp = 0

Neither were in my weewx.conf file, and I'm not sure why I needed to add them when both are showing 0 as the default value in readme.MD.

I'm also not sure why only four of the six graphs are showing up, but that's not a huge concern since the readme.MD file is probably still not current and I didn't touch my weewx.conf file's 0.91 config except for the two lines above.

In case anyone wants a preview, here's my home server set with theme=dark. Note that I'm not forwarding MQTT outside of my house, so the readings won't update live:

http://ae3.homelinux.net:845/weewx/live/

poblabs commented 5 years ago

They shouldn't have been added to your weewx.conf. Nothing in the skin gets added to the weewx.conf except for the enablement of the skin.

Those particular variables are from 0.9.1 and prior and were removed weeks ago. Did you add them previously and don't recall?

In any event, you can remove them. They are deadwood with 1.0+.

1.0 ships with only 4 graphs now. Basically the whole purpose for 1.0 was a chart system re-write. It's 100% rebuilt from the ground up. This gives you almost 100% total control of all graphs. You'll even see the wind graphs combines 2 old graphs into 1.

@biltmorelaker wrote a great wiki to get started. Tons and ton and tons of information on the new charts can be found here. Basically you'll need to copy graphs.conf.example to graphs.conf then start editing the charts to your hearts content.

Dark mode looks good! Still more tweaks coming in the next few days. Trying to make this to-do list go away but it seems never-ending.

captain-coredump commented 5 years ago

Those two lines were NOT in my weewx.conf file, and wee_reports threw build errors until I added both tonight.

root@wxpi3plus:~# wee_reports Using configuration file /etc/weewx/weewx.conf Generating for all time Traceback (most recent call last): [[Belchertown]] File "/usr/share/weewx/weewx/reportengine.py", line 204, in run obj.start() File "/usr/share/weewx/weewx/reportengine.py", line 300, in start self.run() File "/usr/share/weewx/weewx/cheetahgenerator.py", line 160, in run ngen = self.generate(gen_dict[section_name], self.gen_ts) File "/usr/share/weewx/weewx/cheetahgenerator.py", line 234, in generate ngen += self.generate(section[subsection], gen_ts) File "/usr/share/weewx/weewx/cheetahgenerator.py", line 234, in generate ngen += self.generate(section[subsection], gen_ts) File "/usr/share/weewx/weewx/cheetahgenerator.py", line 322, in generate default_binding) File "/usr/share/weewx/weewx/cheetahgenerator.py", line 374, in _getSearchList searchList += obj.get_extension_list(timespan, db_lookup) File "/usr/share/weewx/user/belchertown_highchartsSearchX.py", line 83, in get_extension_list if belchertown_skin_dict['Extras']['highcharts_show_apptemp'] == "1": File "/usr/lib/python2.7/dist-packages/configobj.py", line 554, in getitem val = dict.getitem(self, key) KeyError: 'highcharts_show_apptemp'

root@wxpi3plus:/etc/weewx# wee_reports Using configuration file /etc/weewx/weewx.conf Generating for all time Traceback (most recent call last): File "/usr/share/weewx/weewx/reportengine.py", line 204, in run obj.start() File "/usr/share/weewx/weewx/reportengine.py", line 300, in start self.run() File "/usr/share/weewx/weewx/cheetahgenerator.py", line 160, in run ngen = self.generate(gen_dict[section_name], self.gen_ts) File "/usr/share/weewx/weewx/cheetahgenerator.py", line 234, in generate ngen += self.generate(section[subsection], gen_ts) File "/usr/share/weewx/weewx/cheetahgenerator.py", line 234, in generate ngen += self.generate(section[subsection], gen_ts) File "/usr/share/weewx/weewx/cheetahgenerator.py", line 322, in generate default_binding) File "/usr/share/weewx/weewx/cheetahgenerator.py", line 374, in _getSearchList searchList += obj.get_extension_list(timespan, db_lookup) File "/usr/share/weewx/user/belchertown_highchartsSearchX.py", line 94, in get_extension_list if belchertown_skin_dict['Extras']['highcharts_show_intemp'] == "1": File "/usr/lib/python2.7/dist-packages/configobj.py", line 554, in getitem val = dict.getitem(self, key) KeyError: 'highcharts_show_intemp'

captain-coredump commented 5 years ago

Maybe something from 0.91 was left behind when I installed the new stuff?

poblabs commented 5 years ago

Ok I see what's going on. It does not look like you uninstalled the old version with wee_extension --uninstall Belchertown.

1.0 erases A LOT OF FILES. I suggest the following:

  1. Backup your weewx.conf just in case.
  2. wee_extension --uninstall Belchertown
  3. Delete everything in your HTML folder for Belchertown
  4. wee_extension --install belchertown.zip (the development one)
  5. Make sure your weewx.conf [Belchertown] skin section has all your custom options (you can remove those highcharts_show_intemp and apptemp)
  6. Restart weewx.
  7. Wait for an archive interval, or run wee_reports to kick off a new report.

Also make sure [Highcharts_Belchertown] is removed from your weewx.conf, and make sure your skins folder only has 1 Belchertown skin within.

1.0 made the skin much more lean, so there's no upgrade path. It's a full remove and reinstall.