brewster76 / fuzzy-archer

Graphical gauges and history table generators for Weewx
GNU General Public License v2.0
39 stars 31 forks source link

Missing headers and font sizes #94

Closed davidwkerr closed 1 year ago

davidwkerr commented 1 year ago

Thank you very much for all the work you have done on this project!

After happily using Fuzzy Archer 2.2 for about 7 years, I decided to upgrade to 4.0 and have indeed upgraded to the code as is at this moment.

Two issues- which may well be myself, but I cannot resolve:

  1. I added graphs for radiation and all is fine except the month and year ones have tiny font. Day and week ones are perfectly good. I installed the freefonts as suggested in another issue and also upgraded to this latest code and regenerated public_html from nothing but no improvement.

  2. Second issue. The History page is missing table headings, as shown in the screenshot. e.g "min_temp_tableheader_text". How do I set these?

Best Regards, David Australia fuzzy2 fuzzy1

mKainzbauer commented 1 year ago

Did you make a clean, fresh install? Maybe parts of the older version interfere... Make sure you remove [Images] and [BigImages] from the [StdReport] section in weewx.conf. You can remove Images/, language/, BigImages/ from /etc/weewx/skins.

You can delete gaugeengine.py, gauges.py, translategenerator.py from /usr/share/weewx/user

Make sure, you don't have any references to thes files in the configs any more.

For the first issue: with the newest v4 you don't need to install free fonts any more. It is shipped with the skin. I assume a misconfiguration, but we have to take a deeper look. Can you post your skin.conf please? Make sure you remove any confidential data before posting!

For the seconds issue: These texts are in the skins/Bootstrap/lang/xx.conf file. Have you specified a language for the skin? See https://weewx.com/docs/customizing.htm#localization

davidwkerr commented 1 year ago

It was a new build except for the weewx.conf file which has lang= en and only the Bootstrap-en configured.

But I will follow through and check the other things you mentioned and tomorrow I'll send the skin.conf.

Re: "These texts are in the long/xx.conf file."......what is this file and where can I find it? I do not know of <> nor what <> is!

davidwkerr commented 1 year ago

Argh! long=lang and xx.conf=en.conf. Yes, I have found the equivalent text but for some reason they are not being picked up. I'll look further into lang= en

mKainzbauer commented 1 year ago

Sorry for the misspellings :) What version of weewx are you using?

davidwkerr commented 1 year ago

No problem.

4.10.2

davidwkerr commented 1 year ago

I've done the things you suggested (deleting engines) and also deleted public_html so it gets new copies and the font problem is FIXED! Thank you.

Problem 2 is still there. It is not picking up the string mappings from en.conf for some strange reason.

mKainzbauer commented 1 year ago

Can you please check, if any other translation work? For instance, change in en.conf

[Texts]
    "Current Conditions" = "Current Conditions"

to

[Texts]
    "Current Conditions" = "The Weather"

and check if the text above the gauges changes.

If not, please post the log portion that part that's like this:

Mar  6 20:00:35 rpi weewx[65147] INFO weewx.manager: Added record 2023-03-06 20:00:00 CET (1678129200) to database 'weewx.sdb'
Mar  6 20:00:35 rpi weewx[65147] INFO weewx.manager: Added record 2023-03-06 20:00:00 CET (1678129200) to daily summary in 'weewx.sdb'
Mar  6 20:00:36 rpi weewx[65147] INFO weewx.cheetahgenerator: Generated 13 files for report StandardReport in 0.89 seconds
Mar  6 20:00:38 rpi weewx[65147] INFO weewx.imagegenerator: Generated 24 images for report StandardReport in 1.61 seconds
Mar  6 20:00:38 rpi weewx[65147] INFO weewx.reportengine: Copied 0 files to /var/www/html/weewx
Mar  6 20:00:38 rpi weewx[65147] INFO user.jsonengine: JSONGenerator: Generated 10 data items for Bootstrap in 0.40 seconds
Mar  6 20:00:46 rpi weewx[65147] INFO weewx.imagegenerator: Generated 32 images for report Bootstrap in 7.89 seconds
Mar  6 20:00:46 rpi weewx[65147] INFO weewx.reportengine: Copied 0 files to /var/www/html/weewx/Bootstrap
Mar  6 20:00:47 rpi weewx[65147] INFO user.historygenerator: historygenerator.py: Generated 14 tables in 0.56 seconds
Mar  6 20:00:48 rpi weewx[65147] INFO weewx.cheetahgenerator: Generated 11 files for report Bootstrap in 1.38 seconds
Mar  6 20:00:55 rpi weewx[65147] INFO weewx.reportengine: ftpgenerator: Ftp'd 44 files in 6.87 seconds
davidwkerr commented 1 year ago

Interesting. The text did NOT change when I changed the string. So en.conf is not being used. Here is the log:

Mar 7 07:51:28 beaglebone wee_reports[6520] INFO weewx.engine: StdConvert target unit is 0x10 Mar 7 07:51:28 beaglebone wee_reports[6520] INFO weewx.wxservices: StdWXCalculate will use data binding wx_binding Mar 7 07:51:28 beaglebone wee_reports[6520] INFO weewx.engine: Archive will use data binding wx_binding Mar 7 07:51:28 beaglebone wee_reports[6520] INFO weewx.engine: Record generation will be attempted in 'software' Mar 7 07:51:28 beaglebone wee_reports[6520] INFO weewx.engine: Using archive interval of 120 seconds (software record generation) Mar 7 07:51:28 beaglebone wee_reports[6520] INFO weewx.restx: StationRegistry: Registration not requested. Mar 7 07:51:28 beaglebone wee_reports[6520] INFO weewx.restx: Wunderground: Posting not enabled. Mar 7 07:51:28 beaglebone wee_reports[6520] INFO weewx.restx: PWSweather: Posting not enabled. Mar 7 07:51:28 beaglebone wee_reports[6520] INFO weewx.restx: CWOP: Posting not enabled. Mar 7 07:51:28 beaglebone wee_reports[6520] INFO weewx.restx: WOW: Posting not enabled. Mar 7 07:51:28 beaglebone wee_reports[6520] INFO weewx.restx: AWEKAS: Posting not enabled. Mar 7 07:51:28 beaglebone wee_reports[6520] INFO user.mqtt: service version is 0.24 Mar 7 07:51:28 beaglebone wee_reports[6520] INFO user.mqtt: binding to loop Mar 7 07:51:28 beaglebone wee_reports[6520] INFO user.mqtt: data_binding is wx_binding Mar 7 07:51:28 beaglebone wee_reports[6520] INFO user.mqtt: topic is weather Mar 7 07:51:28 beaglebone wee_reports[6520] INFO user.mqtt: desired unit system is METRIC Mar 7 07:51:28 beaglebone wee_reports[6520] INFO user.mqtt: data will be uploaded to mqtt://admin:xxx@192.168.3.10:1883 Mar 7 07:51:28 beaglebone wee_reports[6520] INFO weewx.engine: 'pyephem' detected, extended almanac data is available Mar 7 07:51:30 beaglebone wee_reports[6520] INFO user.jsonengine: JSONGenerator: Generated 8 data items for Bootstrap-en in 1.59 seconds Mar 7 07:51:42 beaglebone wee_reports[6520] INFO weewx.imagegenerator: Generated 14 images for report Bootstrap-en in 11.51 seconds Mar 7 07:51:42 beaglebone wee_reports[6520] INFO weewx.reportengine: Copied 13 files to /weewx/public_html Mar 7 07:51:44 beaglebone wee_reports[6520] INFO user.historygenerator: historygenerator.py: Generated 7 tables in 1.65 seconds Mar 7 07:51:50 beaglebone wee_reports[6520] INFO weewx.cheetahgenerator: Generated 11 files for report Bootstrap-en in 7.90 seconds Mar 7 07:51:52 beaglebone wee_reports[6520] INFO user.jsonengine: JSONGenerator: Generated 8 data items for HTMLPages in 1.58 seconds Mar 7 07:52:03 beaglebone wee_reports[6520] INFO weewx.imagegenerator: Generated 14 images for report HTMLPages in 11.27 seconds Mar 7 07:52:03 beaglebone wee_reports[6520] INFO weewx.reportengine: Copied 13 files to /weewx/public_html Mar 7 07:52:05 beaglebone wee_reports[6520] INFO user.historygenerator: historygenerator.py: Generated 7 tables in 1.66 seconds Mar 7 07:52:09 beaglebone wee_reports[6520] INFO weewx.cheetahgenerator: Generated 11 files for report HTMLPages in 5.64 seconds Mar 7 07:52:10 beaglebone wee_reports[6520] INFO weeutil.rsyncupload: rsync'd 40 files (2,550,065 bytes) in 0.73 seconds

davidwkerr commented 1 year ago

There is something else that might be involved in this. When I first installed, I was getting messages that $locale was not found. I tried setting environment variables for locale and in the end changed the line from head.html.inc from:

let locale = "$locale";

to

let locale = "en_US";

So, maybe this is my problem? The errors went away but perhaps this is why I am not picking up en.conf?

If it is relevant, my system has /etc/default/locale as LANG=en_AU.UTF-8

davidwkerr commented 1 year ago

Re the locale thing, here is the weewx startup: Mar 7 11:56:56 beaglebone weewx[979] INFO main: Using Python 3.7.3 (default, Oct 31 2022, 14:04:00) #012[GCC 8.3.0] Mar 7 11:56:56 beaglebone weewx[979] INFO main: Located at /usr/bin/python3 Mar 7 11:56:56 beaglebone weewx[979] INFO main: Platform Linux-4.19.94-ti-r42-armv7l-with-debian-10.13 Mar 7 11:56:56 beaglebone weewx[979] INFO main: Locale is 'en_AU.UTF-8' Mar 7 11:56:56 beaglebone weewx[979] INFO main: Using configuration file /home/weewx/weewx.conf Mar 7 11:56:56 beaglebone weewx[979] INFO main: Debug is 0

davidwkerr commented 1 year ago

The other thing that is probably tied in with these problems is that the gauges have US units (barometer inches, Temperature F...) so that even though the readings are all metric they are displaying on non-metric gauges. gauges

mKainzbauer commented 1 year ago

You probably haven't removed the old skin completely.:

Mar 7 07:51:52 beaglebone wee_reports[6520] INFO user.jsonengine: JSONGenerator: Generated 8 data items for HTMLPages in 1.58 seconds
Mar 7 07:52:03 beaglebone wee_reports[6520] INFO weewx.imagegenerator: Generated 14 images for report HTMLPages in 11.27 seconds

HTMLPages was the "core" skin of the old version (which consisted of three skins).

So, go to weewx.conf and make sure to remove the Section

[StdReport]
...
   [[HTMLPages]]

and it's contents. You have more or less defined the Bootstrap skin to be there two times writing the files to the same location. and you didn't specify a "lang" for HTMLPages, so it is overwriting the things for [Bootstrap-en].

Makes sure you set the locale back to $locale in the template, and set the right locale "en_AU" in lang/en.conf. This is the locale used in the front end, so your date strings and values will be formatted the Australian way.

I'll have to point out in the instructions to remove the old skin thoroughly.

davidwkerr commented 1 year ago

Thank you. I would NEVER have found those things. Things are now almost fully working.

The gauges still have the wrong scales. Maybe they were created only one time? In fact the creation dates are before fixing the problems. Is there a way to force recreation? Temperature is still 0-100 and barometer is for inches. All the graphs are okay.

Thank you. I agree there needs to be a section on how to update from early fuzzy-archer.

davidwkerr commented 1 year ago

Gauges- these seem to have been hard coded to 0-100 (temp) and 28-32 in skin.conf! I have changed them to "-20 -> 60" and "800->1100". I'll see if they update properly.

Maybe they were auto-generated at installation and that is why they are wrong. Anyway, I've fixed mine now so I am happy!

mKainzbauer commented 1 year ago

For the value readings itself, they are configured using the "unit_system"

The gauges are wrong because they are configured wrong in the en.lang file. The gauges don't adapt to the values, as most charts do. But consider NOT to change the predefined values in skin.conf, but in lang/en.conf

Consider the gauge dial value range as something that needs to be translated. Configure these values in the corresponding sections in the lang/en.conf, way down below. If there aren't preconfigured values, make sure you get the latest version from github, I just recently added these.

Since you are using metric values with the english language file, the preconfiguration doesn't fit. Refer to any other language where metric units are used, for a preconfiguration. (e.g.: lang/de.conf)

Also, adapt the range to your location: at my place we don't ever have more than 40°C so the gauge upper end is configured to end at 40°C.

According to the pictures above, for your temperature gauge, the section in the language file could look like this:

[LiveGauges]
    [[outTemp]]
        minvalue = -10
        maxvalue = 50
        splitnumber = 6
        lineColorUntil = 0, maxvalue

Since you don't have temperature below 0°C, you could configure ist also this way:

[LiveGauges]
    [[outTemp]]
        minvalue = 0
        maxvalue = 50
        splitnumber = 5
        lineColor = '#b44242'
        lineColorUntil = maxvalue

Then you temp gauge will be unicolor red.

And: can you do me a favor: Can you sum up everything you had to struggle with in the update process, we make a wiki entry for all the others that may have similar problems. I am also thinking about some changes, to make the update process easier.

davidwkerr commented 1 year ago

Thank you. Yes, I had already changed the en.conf . I do appreciate that ranges will differ in different places and I made mine fit my specific location. I still have one more thing not working, but I shall put that in another issue as it is not a bug, more a "how do I do this..".

Here is a little summary of my experiences:

a. I originally installed fuzzy-archer 2.22 with an earlier weewx and it has been running something like 8 years on a Beaglebone Black without problems. Very happy! However BBB was running Ubuntu 14.4 so security a small issue plus I wanted to add MQTT and a few other things. This meant Python3 and BBB O/S cannot be easily updated and you have to effectively re-flash it. I needed to change to Debian 10 as better supported on the BBB.

b. So I flashed Debian and did a fresh install of weewx 4.10.2. I looked at various skins and decided I still very much liked fuzzy. I tried installing various versions (2.22, 2.23....2.27..) and all of them had various problems. So I decided to go with the latest fuzzy-archer 4. I actually reflashed the BBB and re-installed weewx (from github) so as to get rid of old "stuff". I did re-use the original weewx.conf file and I thought the install of fuzzy archer would fix any issues. But it did not. Also it was years ago that I installed fuzzy 2.2 so I was also a bit "Fuzzy"! I did not understand that I had to remove old things that were causing overwriting of images to the public_html. I also did not know that I had to change the lang/en.conf file.

But now thosethings are done, it is working as expected.

c. The instructions on live gauges were not very clear. As I upload to a shared host, I was not going to use mqtt there and wanted to still have gauges, just not live. I was pleasantly surprised to find this actually happened, even though I was not really expecting it. I'm happy with the gauges the way they always used to be.

Regards & thanks, David

mKainzbauer commented 1 year ago

Thank you for the summary. I am closing this issue with https://github.com/brewster76/fuzzy-archer/wiki/Upgrading-to-v4

I also need to write a customization guide and a MQTT guide.

The "live" gauges are live. If you have configured the MQTT setup and your data source emits readings more frequently than the archive_interval, they are even "lively". Anyway, even without having MQTT installed, the live Gauges and Live Charts are refreshing themselves as soon as there is data from a new archive_interval available, without reloading the page. So, if your archive interval is set to 5 minutes, and your beaglebone is finished (as in the log above) with the interval run, including syncing, at xx:x2:52, I'd expect the live page contents to be refreshed by xx:x3:52 latest.

davidwkerr commented 1 year ago

Thank you! I love it.....

mKainzbauer commented 1 year ago

Would you mind to share a link to your station?

davidwkerr commented 1 year ago

Happy to share:

My live site is at:

https://weather.kerr.net.au

--- Original message --- Subject: Re: [brewster76/fuzzy-archer] Missing headers and font sizes (Issue#94) From: mKainzbauer @.> To: brewster76/fuzzy-archer @.> Cc: davidwkerr @.>, Author @.> Date: Wednesday, 08/03/2023 5:18 AM

Would you mind to share a link to your station? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>