[weewx-user] Re: How to format calculated values in Cheetah

2022-06-28 Thread gjr80
The other alternative is to use a SLE, same methodology (ie do the 
calculations and return a ValueHelper) applies but the code will be longer 
though arguably easier to read/maintain. For one-off jobs the in-line 
template will probably be the easiest solution. For large templates or 
repeated use the SLE starts to come into it's own.

I'm not aware of anywhere this is documented as such.

Gary

On Monday, 27 June 2022 at 00:51:28 UTC+10 kk44...@gmail.com wrote:

> You can calculate values using the #set directive in Cheetah. I wondered 
> how to format those values for output, and after some testing I found the 
> following solution. As an example the daylight duration is calculated from 
> sunrise and sunset times:
>
> #from weewx.units import ValueTuple,ValueHelper 
> #set $rising=$almanac.sun.rise.raw 
> #set $setting=$almanac.sun.set.raw 
> #set $daylight=$setting-$rising
> #set 
> $daylight_vh=ValueHelper(ValueTuple($daylight,'second','group_deltatime'),formatter=$station.formatter)
>  
>
> $daylight_vh.format("%(hour)d%(hour_label) %(minute)d%(minute_label)s 
> %(second)d%(second_label)s","").
>
> Is there a better solution?
>
> In skins I see this calculated "by hand" in a series of #set statements.
>
> Is it explained somewhere in the manuals?
>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/40be4e05-d389-441e-8cc4-39ffc1c93d2dn%40googlegroups.com.


[weewx-user] Re: Hi, I had a running installation of WEEWX on a Ubuntu 21.10 Work station (weewx 4.3.0), installed from a deb package

2022-06-28 Thread gjr80
I don't see anything obviously wrong in that log extract, WeeWX appears to 
be receiving records and generating reports. Is the Seasons main page being 
generated? Does the data/data-time on the page change?

The line you are suspicious of:

Jun 29 00:01:02 wolfgang-desktop weewx[1774] INFO weewx.reportengine: 
Copied 0 files to /var/www/html/weewx

is quite normal. That is the WeeWX CopyGenerator saying it had no files to 
copy. The CopyGenerator is typically used to copy static files (such as .js 
or .css) to the web server, it is often set to copy files once only on 
WeeWX startup and then no more. For the Seasons skin it is set to copy five 
files (seasons.css, seasons.js, favicon.ico, font/*.woff, font/*.woff2) 
once upon startup, if you look at your log you can see five files were 
copied at 23:32:13:

Jun 28 23:32:13 wolfgang-desktop weewx[1774] INFO weewx.reportengine: 
Copied 5 files to /var/www/html/weewx

Since WeeWX appears to be running as it should you could try running WeeWX 
directly  to see 
what (if any) data the loop packets and archive records contain.  When 
running WeeWX directly you should see loop packets (LOOP:) and archive 
records (REC:) appear on screen.

If the loop packets are essentially empty you may need someone who is 
familiar with the fousb driver to take a closer look at the log or 
otherwise troubleshoot the driver.

Gary
On Wednesday, 29 June 2022 at 08:11:06 UTC+10 wolfgang...@uni-bamberg.de 
wrote:

> Thanks a lot for your advice.
> I did a clean reboot, enabled debug and selected all weewx related syslog 
> lines (attached). In the second report @00:01, one line looks suspicious:
>
> Jun 29 00:01:02 wolfgang-desktop weewx[1774] INFO weewx.reportengine: 
> Copied 0 files to /var/www/html/weewx
> Best,
> Wolfgang
>
> gjr80 schrieb am Dienstag, 28. Juni 2022 um 22:44:11 UTC+2:
>
>> You have a long archive period (30 minutes) so WeeWX will only generate 
>> reports at most every 30 minutes. You log extract appears to only cover two 
>> seconds, was there anything in the subsequent one hour? I don't believe an 
>> unrecognised magic number is a serious error with the fousb driver. I 
>> suggest you provide a longer log extract covering the full WeeWX start up 
>> and at least two archive periods (one hour) of WeeWX operation. Make sure 
>> you edit weewx.conf and set debug = 1 before restarting WeeWX.
>>
>> Gary
>>
>> On Wednesday, 29 June 2022 at 02:44:32 UTC+10 wolfgang...@uni-bamberg.de 
>> wrote:
>>
>>> weewx runs as service on the work station. A bit puzzling is that there 
>>> is an error message in the syslog that the magic number is wrong:
>>> Jun 27 00:58:32 wolfgang-desktop weewx[1753] ERROR weewx.drivers.fousb: 
>>> unrecognised magic number 2714
>>> Jun 27 00:58:32 wolfgang-desktop weewx[1753] INFO weewx.engine: Using 
>>> archive interval of 1800 seconds (specified by hardware)
>>> Jun 27 00:58:32 wolfgang-desktop goa-daemon[2908]: goa-daemon version 
>>> 3.44.0 starting
>>> Jun 27 00:58:32 wolfgang-desktop weewx[1753] INFO weewx.restx: 
>>> StationRegistry: Registration not requested.
>>> Jun 27 00:58:32 wolfgang-desktop weewx[1753] INFO weewx.restx: 
>>> Wunderground: Posting not enabled.
>>> Jun 27 00:58:32 wolfgang-desktop weewx[1753] INFO weewx.restx: 
>>> PWSweather: Posting not enabled.
>>> Jun 27 00:58:32 wolfgang-desktop weewx[1753] INFO weewx.restx: CWOP: 
>>> Posting not enabled.
>>> Jun 27 00:58:32 wolfgang-desktop weewx[1753] INFO weewx.restx: WOW: 
>>> Posting not enabled.
>>> Jun 27 00:58:32 wolfgang-desktop weewx[1753] INFO weewx.restx: AWEKAS: 
>>> Posting not enabled.
>>> Jun 27 00:58:32 wolfgang-desktop weewx[1753] INFO weewx.engine: 
>>> 'pyephem' not detected, extended almanac data is not available
>>> Jun 27 00:58:32 wolfgang-desktop weewx[1753] INFO __main__: Starting up 
>>> weewx version 4.8.0
>>> Jun 27 00:58:32 wolfgang-desktop weewx[1753] INFO weewx.engine: Using 
>>> binding 'wx_binding' to database 'weewx.sdb'
>>> Jun 27 00:58:32 wolfgang-desktop weewx[1753] INFO weewx.manager: 
>>> Starting backfill of daily summaries
>>> Jun 27 00:58:32 wolfgang-desktop weewx[1753] INFO weewx.manager: Daily 
>>> summaries up to date
>>>
>>>
>>> Wolfgang Bosswick schrieb am Dienstag, 28. Juni 2022 um 16:07:32 UTC+2:
>>>
 [FineOffsetUSB]
 # This section is for the Fine Offset series of weather stations.
 
 # The station model, e.g., WH1080, WS1090, WS2080, WH3081
 model = WH1080
 
 # How often to poll the station for data, in seconds
 polling_interval = 60
 
 # The driver to use:
 driver = weewx.drivers.fousb

 ...

 [StdReport]

 # Where the skins reside, relative to WEEWX_ROOT
 SKIN_ROOT = /etc/weewx/skins

 # Where the generated reports should go, relative to WEEWX_ROOT
 HTML_ROOT = /var/www/html/weewx

 # Uncomment and change to override

Re: [weewx-user] weewx sql database repair tools

2022-06-28 Thread VE4PER Andy
Thanks Doug I will check into this further; I had always used APC UPS's 
but of late units don't come with acceess to detailed logging details 
wrt short surge type failures any more. I used to be able to get timing 
messages from that log that helped in troubleshooting.


I have slowly changed to higher capacity CyberPower units with a bit 
better monitoring and logging but still not a lot of of tech dails in 
that even to satisfy my Retire Eng Etech background.


 On 2022-06-27 16:55, Doug Jenkins wrote:

Andy:

I use dbeaver (dbeaver.io ) to manage all my 
databases. It is a client tool, but it connects to MariaDB, MySQL, and 
SQLite databases. You can manage the database here.


For your power problem, I would suggest NUT (Network UPS Tool). This 
can run as a service on your linux server (Including RPi) and you can 
configure it to talk directly to your UPS (they have many drivers). 
Here is a good video walkthrough in setting up the tool and creating a 
quick interface for it.


image.png



On Mon, Jun 27, 2022 at 5:32 PM VE4PER Andy 
 wrote:


I had a major commercial power failure about 10 days ago. In the
process
it ran the UPS down almost completely such that when the last few
power
surge/bumps/fails occured something in the date time pointer
system , I
believe in the SQL databse became disconnected and immediate
restart of
the program on power restoral Had the local /var/www/html page was a
wrong date and the FTP'd  page sent to my web site also had a corrupt
date/Time string and neither agreed nor were either  at all real
cuurent
time accurate.

I shut down the PC with the intent of looking for a mySQL dB
troubleshooting/repair software application and attempting to correct
the corrupted data when I had time.  About a week later I found
time to
take a look at the problem and when I restated the PC , with the
intent
of halting weewx to troubleshooting the dB. It all came back working
normally but with no back archived data available but it appears the
delay from it being down so long allowed it to restart and regenerate
the consistent web pages and messages.

So although it is back working now, I would like to know if their
is a
recommended dB software /data repair/maintenance package available
that
is open source freeware either standalone program or possibly
something
like a plug option/package to use with a browser similar to
phpmyadmin.

My 2nd takeaway is when urgent commercial power fails get to the
weewx
PC and shut it down immediately in an orderly fashion before the 8-10
min UPS backup support runs out.

Any pointers are welcome, considering so many outside agancies use
the
data (eg AWEKAS, CWOP/NOAA/aprs/ WeatherUnderground in addition to
my on
local and www page.

Thanks 73

Andy


-- 
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+unsubscr...@googlegroups.com
.
To view this discussion on the web visit

https://groups.google.com/d/msgid/weewx-user/31c1e793-4db7-672c-ffc0-01361e7aec82%40gmail.com.

--
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/CACC0i0yma27VUTjTdoW-KedaMBZrrUYWhfBKj6tk4-krtyLtSA%40mail.gmail.com 
.


--
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/84dd1e8c-b971-db8a-f7a1-5a416860530f%40gmail.com.


Re: [weewx-user] weewx sql database repair tools

2022-06-28 Thread VE4PER Andy
I am not exactly sure what occurred which is why I was looking for a 
tool to inspect it deeper. Only thing I know for sure was that UPS 
backup was so run down and deteriorated that the commercial power 
slamming off and on in rapid succession was passed through to the PC and 
if it occurred right during a data update cycle from the sensors somehow 
the whole transaction became so confused that the local page in the 
/var/www/html folder did not have a correct date time string on it; and 
a simmilar problem happened to the report generated for transfer via ftp 
to my personal web page. and neither of these agreed with each other. 
and neither was the actual time of the data update. Successive updates 
or page reloads/refreshes displayed these same frozen data pages. Once 
the system shut down for a week and restarted it began with no existing 
archive data showing on any graphs but current display data from sensors 
properly processed and updated properly every 5 mins approx.



On 2022-06-27 18:01, Tom Keffer wrote:
Not clear what you're asking, but I'd like to know more about the 
corruption of the database. I spent a lot of time making sure that 
commits were atomic. Did I miss something? Could you be more specific 
about what's wrong with the database?


On Mon, Jun 27, 2022 at 2:32 PM VE4PER Andy 
 wrote:


I had a major commercial power failure about 10 days ago. In the
process
it ran the UPS down almost completely such that when the last few
power
surge/bumps/fails occured something in the date time pointer
system , I
believe in the SQL databse became disconnected and immediate
restart of
the program on power restoral Had the local /var/www/html page was a
wrong date and the FTP'd  page sent to my web site also had a corrupt
date/Time string and neither agreed nor were either  at all real
cuurent
time accurate.

I shut down the PC with the intent of looking for a mySQL dB
troubleshooting/repair software application and attempting to correct
the corrupted data when I had time.  About a week later I found
time to
take a look at the problem and when I restated the PC , with the
intent
of halting weewx to troubleshooting the dB. It all came back working
normally but with no back archived data available but it appears the
delay from it being down so long allowed it to restart and regenerate
the consistent web pages and messages.

So although it is back working now, I would like to know if their
is a
recommended dB software /data repair/maintenance package available
that
is open source freeware either standalone program or possibly
something
like a plug option/package to use with a browser similar to
phpmyadmin.

My 2nd takeaway is when urgent commercial power fails get to the
weewx
PC and shut it down immediately in an orderly fashion before the 8-10
min UPS backup support runs out.

Any pointers are welcome, considering so many outside agancies use
the
data (eg AWEKAS, CWOP/NOAA/aprs/ WeatherUnderground in addition to
my on
local and www page.

Thanks 73

Andy


-- 
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+unsubscr...@googlegroups.com
.
To view this discussion on the web visit

https://groups.google.com/d/msgid/weewx-user/31c1e793-4db7-672c-ffc0-01361e7aec82%40gmail.com.

--
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/CAPq0zEDqJCB-hn39gPTFqVUg%3DRmerrsqAFWqDLx6%2Bxxztq%3DYQg%40mail.gmail.com 
.


--
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/d41ca5ad-25b7-86f2-6e77-c049bb0c34e6%40gmail.com.


[weewx-user] Re: Hi, I had a running installation of WEEWX on a Ubuntu 21.10 Work station (weewx 4.3.0), installed from a deb package

2022-06-28 Thread Wolfgang Bosswick
Thanks a lot for your advice.
I did a clean reboot, enabled debug and selected all weewx related syslog 
lines (attached). In the second report @00:01, one line looks suspicious:

Jun 29 00:01:02 wolfgang-desktop weewx[1774] INFO weewx.reportengine: 
Copied 0 files to /var/www/html/weewx
Best,
Wolfgang

gjr80 schrieb am Dienstag, 28. Juni 2022 um 22:44:11 UTC+2:

> You have a long archive period (30 minutes) so WeeWX will only generate 
> reports at most every 30 minutes. You log extract appears to only cover two 
> seconds, was there anything in the subsequent one hour? I don't believe an 
> unrecognised magic number is a serious error with the fousb driver. I 
> suggest you provide a longer log extract covering the full WeeWX start up 
> and at least two archive periods (one hour) of WeeWX operation. Make sure 
> you edit weewx.conf and set debug = 1 before restarting WeeWX.
>
> Gary
>
> On Wednesday, 29 June 2022 at 02:44:32 UTC+10 wolfgang...@uni-bamberg.de 
> wrote:
>
>> weewx runs as service on the work station. A bit puzzling is that there 
>> is an error message in the syslog that the magic number is wrong:
>> Jun 27 00:58:32 wolfgang-desktop weewx[1753] ERROR weewx.drivers.fousb: 
>> unrecognised magic number 2714
>> Jun 27 00:58:32 wolfgang-desktop weewx[1753] INFO weewx.engine: Using 
>> archive interval of 1800 seconds (specified by hardware)
>> Jun 27 00:58:32 wolfgang-desktop goa-daemon[2908]: goa-daemon version 
>> 3.44.0 starting
>> Jun 27 00:58:32 wolfgang-desktop weewx[1753] INFO weewx.restx: 
>> StationRegistry: Registration not requested.
>> Jun 27 00:58:32 wolfgang-desktop weewx[1753] INFO weewx.restx: 
>> Wunderground: Posting not enabled.
>> Jun 27 00:58:32 wolfgang-desktop weewx[1753] INFO weewx.restx: 
>> PWSweather: Posting not enabled.
>> Jun 27 00:58:32 wolfgang-desktop weewx[1753] INFO weewx.restx: CWOP: 
>> Posting not enabled.
>> Jun 27 00:58:32 wolfgang-desktop weewx[1753] INFO weewx.restx: WOW: 
>> Posting not enabled.
>> Jun 27 00:58:32 wolfgang-desktop weewx[1753] INFO weewx.restx: AWEKAS: 
>> Posting not enabled.
>> Jun 27 00:58:32 wolfgang-desktop weewx[1753] INFO weewx.engine: 'pyephem' 
>> not detected, extended almanac data is not available
>> Jun 27 00:58:32 wolfgang-desktop weewx[1753] INFO __main__: Starting up 
>> weewx version 4.8.0
>> Jun 27 00:58:32 wolfgang-desktop weewx[1753] INFO weewx.engine: Using 
>> binding 'wx_binding' to database 'weewx.sdb'
>> Jun 27 00:58:32 wolfgang-desktop weewx[1753] INFO weewx.manager: Starting 
>> backfill of daily summaries
>> Jun 27 00:58:32 wolfgang-desktop weewx[1753] INFO weewx.manager: Daily 
>> summaries up to date
>>
>>
>> Wolfgang Bosswick schrieb am Dienstag, 28. Juni 2022 um 16:07:32 UTC+2:
>>
>>> [FineOffsetUSB]
>>> # This section is for the Fine Offset series of weather stations.
>>> 
>>> # The station model, e.g., WH1080, WS1090, WS2080, WH3081
>>> model = WH1080
>>> 
>>> # How often to poll the station for data, in seconds
>>> polling_interval = 60
>>> 
>>> # The driver to use:
>>> driver = weewx.drivers.fousb
>>>
>>> ...
>>>
>>> [StdReport]
>>>
>>> # Where the skins reside, relative to WEEWX_ROOT
>>> SKIN_ROOT = /etc/weewx/skins
>>>
>>> # Where the generated reports should go, relative to WEEWX_ROOT
>>> HTML_ROOT = /var/www/html/weewx
>>>
>>> # Uncomment and change to override logging for reports
>>> log_success = True
>>> log_failure = True
>>>
>>> # The database binding indicates which data should be used in 
>>> reports.
>>> data_binding = wx_binding
>>>
>>> # Each of the following subsections defines a report that will be 
>>> run.
>>> # See the customizing guide to change the units, plot types and line
>>> # colors, modify the fonts, display additional sensor data, and other
>>> # customizations. Many of those changes can be made here by 
>>> overriding
>>> # parameters, or by modifying templates within the skin itself.
>>>
>>> [[SeasonsReport]]
>>> # The SeasonsReport uses the 'Seasons' skin, which contains the
>>> # images, templates and plots for the report.
>>> skin = Seasons
>>> enable = true
>>>
>>>  After an update to Ubuntu 22.04, weewx stopped updating the 
>>> /var/www/hatml/weewx files. I updated weewx to 4.8.0 and phython 3, and 
>>> after that, I managed to get updated reports from the first  start of the 
>>> server. Alas, after that, no more updates.
>>> Any ideas?
>>> Jun 27 00:58:31 wolfgang-desktop weewx[1609] INFO __main__: Initializing 
>>> weewx version 4.8.0
>>> Jun 27 00:58:31 wolfgang-desktop weewx[1609] INFO __main__: Using Python 
>>> 3.10.4 (main, Apr  2 2022, 09:04:19) [GCC 11.2.0]
>>> Jun 27 00:58:31 wolfgang-desktop weewx[1609] INFO __main__: Platform 
>>> Linux-5.15.0-25-generic-x86_64-with-glibc2.35
>>> Jun 27 00:58:31 wolfgang-desktop weewx[1609] INFO __main__: Locale is 
>>> 'de_DE.UTF-8'
>>> Jun 27 00:58:31 wolfgang-desktop weewx[1609] INFO __

[weewx-user] Re: Hi, I had a running installation of WEEWX on a Ubuntu 21.10 Work station (weewx 4.3.0), installed from a deb package

2022-06-28 Thread gjr80
You have a long archive period (30 minutes) so WeeWX will only generate 
reports at most every 30 minutes. You log extract appears to only cover two 
seconds, was there anything in the subsequent one hour? I don't believe an 
unrecognised magic number is a serious error with the fousb driver. I 
suggest you provide a longer log extract covering the full WeeWX start up 
and at least two archive periods (one hour) of WeeWX operation. Make sure 
you edit weewx.conf and set debug = 1 before restarting WeeWX.

Gary

On Wednesday, 29 June 2022 at 02:44:32 UTC+10 wolfgang...@uni-bamberg.de 
wrote:

> weewx runs as service on the work station. A bit puzzling is that there is 
> an error message in the syslog that the magic number is wrong:
> Jun 27 00:58:32 wolfgang-desktop weewx[1753] ERROR weewx.drivers.fousb: 
> unrecognised magic number 2714
> Jun 27 00:58:32 wolfgang-desktop weewx[1753] INFO weewx.engine: Using 
> archive interval of 1800 seconds (specified by hardware)
> Jun 27 00:58:32 wolfgang-desktop goa-daemon[2908]: goa-daemon version 
> 3.44.0 starting
> Jun 27 00:58:32 wolfgang-desktop weewx[1753] INFO weewx.restx: 
> StationRegistry: Registration not requested.
> Jun 27 00:58:32 wolfgang-desktop weewx[1753] INFO weewx.restx: 
> Wunderground: Posting not enabled.
> Jun 27 00:58:32 wolfgang-desktop weewx[1753] INFO weewx.restx: PWSweather: 
> Posting not enabled.
> Jun 27 00:58:32 wolfgang-desktop weewx[1753] INFO weewx.restx: CWOP: 
> Posting not enabled.
> Jun 27 00:58:32 wolfgang-desktop weewx[1753] INFO weewx.restx: WOW: 
> Posting not enabled.
> Jun 27 00:58:32 wolfgang-desktop weewx[1753] INFO weewx.restx: AWEKAS: 
> Posting not enabled.
> Jun 27 00:58:32 wolfgang-desktop weewx[1753] INFO weewx.engine: 'pyephem' 
> not detected, extended almanac data is not available
> Jun 27 00:58:32 wolfgang-desktop weewx[1753] INFO __main__: Starting up 
> weewx version 4.8.0
> Jun 27 00:58:32 wolfgang-desktop weewx[1753] INFO weewx.engine: Using 
> binding 'wx_binding' to database 'weewx.sdb'
> Jun 27 00:58:32 wolfgang-desktop weewx[1753] INFO weewx.manager: Starting 
> backfill of daily summaries
> Jun 27 00:58:32 wolfgang-desktop weewx[1753] INFO weewx.manager: Daily 
> summaries up to date
>
>
> Wolfgang Bosswick schrieb am Dienstag, 28. Juni 2022 um 16:07:32 UTC+2:
>
>> [FineOffsetUSB]
>> # This section is for the Fine Offset series of weather stations.
>> 
>> # The station model, e.g., WH1080, WS1090, WS2080, WH3081
>> model = WH1080
>> 
>> # How often to poll the station for data, in seconds
>> polling_interval = 60
>> 
>> # The driver to use:
>> driver = weewx.drivers.fousb
>>
>> ...
>>
>> [StdReport]
>>
>> # Where the skins reside, relative to WEEWX_ROOT
>> SKIN_ROOT = /etc/weewx/skins
>>
>> # Where the generated reports should go, relative to WEEWX_ROOT
>> HTML_ROOT = /var/www/html/weewx
>>
>> # Uncomment and change to override logging for reports
>> log_success = True
>> log_failure = True
>>
>> # The database binding indicates which data should be used in reports.
>> data_binding = wx_binding
>>
>> # Each of the following subsections defines a report that will be run.
>> # See the customizing guide to change the units, plot types and line
>> # colors, modify the fonts, display additional sensor data, and other
>> # customizations. Many of those changes can be made here by overriding
>> # parameters, or by modifying templates within the skin itself.
>>
>> [[SeasonsReport]]
>> # The SeasonsReport uses the 'Seasons' skin, which contains the
>> # images, templates and plots for the report.
>> skin = Seasons
>> enable = true
>>
>>  After an update to Ubuntu 22.04, weewx stopped updating the 
>> /var/www/hatml/weewx files. I updated weewx to 4.8.0 and phython 3, and 
>> after that, I managed to get updated reports from the first  start of the 
>> server. Alas, after that, no more updates.
>> Any ideas?
>> Jun 27 00:58:31 wolfgang-desktop weewx[1609] INFO __main__: Initializing 
>> weewx version 4.8.0
>> Jun 27 00:58:31 wolfgang-desktop weewx[1609] INFO __main__: Using Python 
>> 3.10.4 (main, Apr  2 2022, 09:04:19) [GCC 11.2.0]
>> Jun 27 00:58:31 wolfgang-desktop weewx[1609] INFO __main__: Platform 
>> Linux-5.15.0-25-generic-x86_64-with-glibc2.35
>> Jun 27 00:58:31 wolfgang-desktop weewx[1609] INFO __main__: Locale is 
>> 'de_DE.UTF-8'
>> Jun 27 00:58:31 wolfgang-desktop weewx[1609] INFO __main__: Using 
>> configuration file /etc/weewx/weewx.conf
>> Jun 27 00:58:31 wolfgang-desktop weewx[1609] INFO __main__: Debug is 0
>> Jun 27 00:58:31 wolfgang-desktop weewx[1609] INFO __main__: PID file is 
>> /var/run/weewx.pid
>> Jun 27 00:58:31 wolfgang-desktop weewx[1753] INFO weewx.engine: Loading 
>> station type FineOffsetUSB (weewx.drivers.fousb)
>> Jun 27 00:58:31 wolfgang-desktop weewx[1566]:...done.
>> Jun 27 00:58:31 wolfgang-desktop systemd[1]: Started LSB: weewx weathe

[weewx-user] Re: unable to upload to weather underground

2022-06-28 Thread gjr80
Could be any one of a number of issues, before we can give any specific 
advice we really need to see a log extract with debug = 2. This wiki entry 

 
gives details on how to get a good log extract.

Gary
On Wednesday, 29 June 2022 at 05:30:37 UTC+10 enu...@gmail.com wrote:

> I have in weewx.conf the name of the station and my password in weather 
> underground. I try with the name of the station and with the station id but 
> I get Failed to publish record 2022-06-28 21:10:00 CEST (1656443400): 
> Failed upload after 3 tries every 5 minutes

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/87ebac8a-8035-4502-a3cc-952c7e870ddcn%40googlegroups.com.


[weewx-user] unable to upload to weather underground

2022-06-28 Thread enu...@gmail.com
I have in weewx.conf the name of the station and my password in weather 
underground. I try with the name of the station and with the station id but 
I get Failed to publish record 2022-06-28 21:10:00 CEST (1656443400): 
Failed upload after 3 tries every 5 minutes

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/8f7fac29-aae5-4fcf-9205-b19f1bc9c794n%40googlegroups.com.


[weewx-user] Re: Hi, I had a running installation of WEEWX on a Ubuntu 21.10 Work station (weewx 4.3.0), installed from a deb package

2022-06-28 Thread Wolfgang Bosswick
weewx runs as service on the work station. A bit puzzling is that there is 
an error message in the syslog that the magic number is wrong:
Jun 27 00:58:32 wolfgang-desktop weewx[1753] ERROR weewx.drivers.fousb: 
unrecognised magic number 2714
Jun 27 00:58:32 wolfgang-desktop weewx[1753] INFO weewx.engine: Using 
archive interval of 1800 seconds (specified by hardware)
Jun 27 00:58:32 wolfgang-desktop goa-daemon[2908]: goa-daemon version 
3.44.0 starting
Jun 27 00:58:32 wolfgang-desktop weewx[1753] INFO weewx.restx: 
StationRegistry: Registration not requested.
Jun 27 00:58:32 wolfgang-desktop weewx[1753] INFO weewx.restx: 
Wunderground: Posting not enabled.
Jun 27 00:58:32 wolfgang-desktop weewx[1753] INFO weewx.restx: PWSweather: 
Posting not enabled.
Jun 27 00:58:32 wolfgang-desktop weewx[1753] INFO weewx.restx: CWOP: 
Posting not enabled.
Jun 27 00:58:32 wolfgang-desktop weewx[1753] INFO weewx.restx: WOW: Posting 
not enabled.
Jun 27 00:58:32 wolfgang-desktop weewx[1753] INFO weewx.restx: AWEKAS: 
Posting not enabled.
Jun 27 00:58:32 wolfgang-desktop weewx[1753] INFO weewx.engine: 'pyephem' 
not detected, extended almanac data is not available
Jun 27 00:58:32 wolfgang-desktop weewx[1753] INFO __main__: Starting up 
weewx version 4.8.0
Jun 27 00:58:32 wolfgang-desktop weewx[1753] INFO weewx.engine: Using 
binding 'wx_binding' to database 'weewx.sdb'
Jun 27 00:58:32 wolfgang-desktop weewx[1753] INFO weewx.manager: Starting 
backfill of daily summaries
Jun 27 00:58:32 wolfgang-desktop weewx[1753] INFO weewx.manager: Daily 
summaries up to date


Wolfgang Bosswick schrieb am Dienstag, 28. Juni 2022 um 16:07:32 UTC+2:

> [FineOffsetUSB]
> # This section is for the Fine Offset series of weather stations.
> 
> # The station model, e.g., WH1080, WS1090, WS2080, WH3081
> model = WH1080
> 
> # How often to poll the station for data, in seconds
> polling_interval = 60
> 
> # The driver to use:
> driver = weewx.drivers.fousb
>
> ...
>
> [StdReport]
>
> # Where the skins reside, relative to WEEWX_ROOT
> SKIN_ROOT = /etc/weewx/skins
>
> # Where the generated reports should go, relative to WEEWX_ROOT
> HTML_ROOT = /var/www/html/weewx
>
> # Uncomment and change to override logging for reports
> log_success = True
> log_failure = True
>
> # The database binding indicates which data should be used in reports.
> data_binding = wx_binding
>
> # Each of the following subsections defines a report that will be run.
> # See the customizing guide to change the units, plot types and line
> # colors, modify the fonts, display additional sensor data, and other
> # customizations. Many of those changes can be made here by overriding
> # parameters, or by modifying templates within the skin itself.
>
> [[SeasonsReport]]
> # The SeasonsReport uses the 'Seasons' skin, which contains the
> # images, templates and plots for the report.
> skin = Seasons
> enable = true
>
>  After an update to Ubuntu 22.04, weewx stopped updating the 
> /var/www/hatml/weewx files. I updated weewx to 4.8.0 and phython 3, and 
> after that, I managed to get updated reports from the first  start of the 
> server. Alas, after that, no more updates.
> Any ideas?
> Jun 27 00:58:31 wolfgang-desktop weewx[1609] INFO __main__: Initializing 
> weewx version 4.8.0
> Jun 27 00:58:31 wolfgang-desktop weewx[1609] INFO __main__: Using Python 
> 3.10.4 (main, Apr  2 2022, 09:04:19) [GCC 11.2.0]
> Jun 27 00:58:31 wolfgang-desktop weewx[1609] INFO __main__: Platform 
> Linux-5.15.0-25-generic-x86_64-with-glibc2.35
> Jun 27 00:58:31 wolfgang-desktop weewx[1609] INFO __main__: Locale is 
> 'de_DE.UTF-8'
> Jun 27 00:58:31 wolfgang-desktop weewx[1609] INFO __main__: Using 
> configuration file /etc/weewx/weewx.conf
> Jun 27 00:58:31 wolfgang-desktop weewx[1609] INFO __main__: Debug is 0
> Jun 27 00:58:31 wolfgang-desktop weewx[1609] INFO __main__: PID file is 
> /var/run/weewx.pid
> Jun 27 00:58:31 wolfgang-desktop weewx[1753] INFO weewx.engine: Loading 
> station type FineOffsetUSB (weewx.drivers.fousb)
> Jun 27 00:58:31 wolfgang-desktop weewx[1566]:...done.
> Jun 27 00:58:31 wolfgang-desktop systemd[1]: Started LSB: weewx weather 
> system.
> Jun 27 00:58:31 wolfgang-desktop weewx[1753] INFO weewx.drivers.fousb: 
> driver version is 1.20
> Jun 27 00:58:31 wolfgang-desktop weewx[1753] INFO weewx.drivers.fousb: 
> polling mode is PERIODIC
> Jun 27 00:58:31 wolfgang-desktop weewx[1753] INFO weewx.drivers.fousb: 
> polling interval is 60
> Jun 27 00:58:31 wolfgang-desktop sssd_pam[1746]: Starting up
>
>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/7bad5b48-2533-4dc5-94bf-e73c0e635f

[weewx-user] Hi, I had a running installation of WEEWX on a Ubuntu 21.10 Work station (weewx 4.3.0), installed from a deb package

2022-06-28 Thread Wolfgang Bosswick
[FineOffsetUSB]
# This section is for the Fine Offset series of weather stations.

# The station model, e.g., WH1080, WS1090, WS2080, WH3081
model = WH1080

# How often to poll the station for data, in seconds
polling_interval = 60

# The driver to use:
driver = weewx.drivers.fousb

...

[StdReport]

# Where the skins reside, relative to WEEWX_ROOT
SKIN_ROOT = /etc/weewx/skins

# Where the generated reports should go, relative to WEEWX_ROOT
HTML_ROOT = /var/www/html/weewx

# Uncomment and change to override logging for reports
log_success = True
log_failure = True

# The database binding indicates which data should be used in reports.
data_binding = wx_binding

# Each of the following subsections defines a report that will be run.
# See the customizing guide to change the units, plot types and line
# colors, modify the fonts, display additional sensor data, and other
# customizations. Many of those changes can be made here by overriding
# parameters, or by modifying templates within the skin itself.

[[SeasonsReport]]
# The SeasonsReport uses the 'Seasons' skin, which contains the
# images, templates and plots for the report.
skin = Seasons
enable = true

 After an update to Ubuntu 22.04, weewx stopped updating the 
/var/www/hatml/weewx files. I updated weewx to 4.8.0 and phython 3, and 
after that, I managed to get updated reports from the first  start of the 
server. Alas, after that, no more updates.
Any ideas?
Jun 27 00:58:31 wolfgang-desktop weewx[1609] INFO __main__: Initializing 
weewx version 4.8.0
Jun 27 00:58:31 wolfgang-desktop weewx[1609] INFO __main__: Using Python 
3.10.4 (main, Apr  2 2022, 09:04:19) [GCC 11.2.0]
Jun 27 00:58:31 wolfgang-desktop weewx[1609] INFO __main__: Platform 
Linux-5.15.0-25-generic-x86_64-with-glibc2.35
Jun 27 00:58:31 wolfgang-desktop weewx[1609] INFO __main__: Locale is 
'de_DE.UTF-8'
Jun 27 00:58:31 wolfgang-desktop weewx[1609] INFO __main__: Using 
configuration file /etc/weewx/weewx.conf
Jun 27 00:58:31 wolfgang-desktop weewx[1609] INFO __main__: Debug is 0
Jun 27 00:58:31 wolfgang-desktop weewx[1609] INFO __main__: PID file is 
/var/run/weewx.pid
Jun 27 00:58:31 wolfgang-desktop weewx[1753] INFO weewx.engine: Loading 
station type FineOffsetUSB (weewx.drivers.fousb)
Jun 27 00:58:31 wolfgang-desktop weewx[1566]:...done.
Jun 27 00:58:31 wolfgang-desktop systemd[1]: Started LSB: weewx weather 
system.
Jun 27 00:58:31 wolfgang-desktop weewx[1753] INFO weewx.drivers.fousb: 
driver version is 1.20
Jun 27 00:58:31 wolfgang-desktop weewx[1753] INFO weewx.drivers.fousb: 
polling mode is PERIODIC
Jun 27 00:58:31 wolfgang-desktop weewx[1753] INFO weewx.drivers.fousb: 
polling interval is 60
Jun 27 00:58:31 wolfgang-desktop sssd_pam[1746]: Starting up


-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/0ac348ed-dc92-4924-ab47-8e0dc536c9f7n%40googlegroups.com.


[weewx-user] Re: installing Weewx on MacOS

2022-06-28 Thread Thom VC
Thank you for the response, I really appreciate your time looking at it. 

I believe expanding the source archive worked. However, when I try to 
change the directory I receive this message: 

cd: no such file or directory: weewx-X.Y.Z


Is that directory something I need to create? 



On Monday, June 27, 2022 at 3:30:55 PM UTC-5 mscham...@gmail.com wrote:

> It seems you are tried to reinstall python 3.9. No need to do that!
>
> However, you failed to download weewx-X.Y.Z.tar.gz. Here, X.Y.Z is the 
> current version, i.e. 4.8.0.
>
> curl -OL https://weewx.com/downloads/weewx-4.8.0.tar.gz
>
> tar xvfz weewx-4.8.0.tar.gz
>
> etc.
>
> On Monday, June 27, 2022 at 3:09:46 PM UTC-5 Thom VC wrote:
>
>> I'm embarrassed to post this, but I have no experience with Python and am 
>> having issues with install. Ultimately, I am trying to connect to an 
>> Ambient Weather WS-2902C. 
>>
>> I am following the MacOS directions  
>> but cannot get past installing Homebrew. 
>>
>> If anyone can offer any guidance I would be truly appreciative. Thank 
>> you. 
>>
>> MacBook-Air:~ twvancamp$ brew install python
>>
>>
>> Warning: python@3.9 3.9.13_1 is already installed, it's just not linked.
>>
>> To link this version, run:
>>
>>   brew link python@3.9
>>
>> MacBook-Air:~ twvancamp$ 
>>
>> MacBook-Air:~ twvancamp$ brew link python@3.9
>>
>> Linking /usr/local/Cellar/python@3.9/3.9.13_1... 
>>
>> Error: Could not symlink bin/2to3
>>
>> Target /usr/local/bin/2to3
>>
>> already exists. You may want to remove it:
>>
>>   rm '/usr/local/bin/2to3'
>>
>>
>> To force the link and overwrite all conflicting files:
>>
>>   brew link --overwrite python@3.9
>>
>>
>> To list all files that would be deleted:
>>
>>   brew link --overwrite --dry-run python@3.9
>>
>> MacBook-Air:~ twvancamp$ brew link --overwrite --dry-run python@3.9
>>
>> Would remove:
>>
>> /usr/local/bin/2to3 -> 
>> /Library/Frameworks/Python.framework/Versions/3.10/bin/2to3
>>
>> /usr/local/bin/idle3 -> 
>> /Library/Frameworks/Python.framework/Versions/3.10/bin/idle3
>>
>> /usr/local/bin/pydoc3 -> 
>> /Library/Frameworks/Python.framework/Versions/3.10/bin/pydoc3
>>
>> /usr/local/bin/python3 -> 
>> /Library/Frameworks/Python.framework/Versions/3.10/bin/python3
>>
>> /usr/local/bin/python3-config -> 
>> /Library/Frameworks/Python.framework/Versions/3.10/bin/python3-config
>>
>> MacBook-Air:~ twvancamp$   rm '/usr/local/bin/2to3'
>>
>> MacBook-Air:~ twvancamp$   rm '/usr/local/bin/2to3'
>>
>> rm: /usr/local/bin/2to3: No such file or directory
>>
>> MacBook-Air:~ twvancamp$ brew install python
>>
>> Warning: python@3.9 3.9.13_1 is already installed, it's just not linked.
>>
>> To link this version, run:
>>
>>   brew link python@3.9
>>
>> MacBook-Air:~ twvancamp$   brew link python@3.9
>>
>> Linking /usr/local/Cellar/python@3.9/3.9.13_1... 
>>
>> Error: Could not symlink bin/idle3
>>
>> Target /usr/local/bin/idle3
>>
>> already exists. You may want to remove it:
>>
>>   rm '/usr/local/bin/idle3'
>>
>>
>> To force the link and overwrite all conflicting files:
>>
>>   brew link --overwrite python@3.9
>>
>>
>> To list all files that would be deleted:
>>
>>   brew link --overwrite --dry-run python@3.9
>>
>> MacBook-Air:~ twvancamp$   brew link --overwrite python@3.9
>>
>> Linking /usr/local/Cellar/python@3.9/3.9.13_1... 24 symlinks created.
>>
>> MacBook-Air:~ twvancamp$ sudo python3 -m pip install configobj
>>
>> Password:
>>
>> VanSorry, try again.
>>
>> Password:
>>
>> Sorry, try again.
>>
>> Password:
>>
>> WARNING: The directory '/Users/twvancamp/Library/Caches/pip' or its 
>> parent directory is not owned or is not writable by the current user. The 
>> cache has been disabled. Check the permissions and owner of that directory. 
>> If executing pip with sudo, you should use sudo's -H flag.
>>
>> DEPRECATION: Configuring installation scheme with distutils config files 
>> is deprecated and will no longer work in the near future. If you are using 
>> a Homebrew or Linuxbrew Python, please see discussion at 
>> https://github.com/Homebrew/homebrew-core/issues/76621
>>
>> Collecting configobj
>>
>>   Downloading configobj-5.0.6.tar.gz (33 kB)
>>
>>   Preparing metadata (setup.py) ... done
>>
>> Collecting six
>>
>>   Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
>>
>> Building wheels for collected packages: configobj
>>
>>   Building wheel for configobj (setup.py) ... done
>>
>>   Created wheel for configobj: filename=configobj-5.0.6-py3-none-any.whl 
>> size=34528 
>> sha256=f12db5aa2c496326cafbe91a6332c101be756a25e04378fc2c76cad6ae6d1890
>>
>>   Stored in directory: 
>> /private/tmp/pip-ephem-wheel-cache-r6ps7cp6/wheels/4b/35/53/dfa4d3a4196794cb0a777a97c68dcf02b073d33de9c135d72a
>>
>> Successfully built configobj
>>
>> Installing collected packages: six, configobj
>>
>>   DEPRECATION: Configuring installation scheme with distutils config 
>> files is deprecated and will no longer work in the near future. If you are 
>> using a Homebr

Re: [weewx-user] Wind Color Belchertown

2022-06-28 Thread Auchtermuchty Weather
As a general note, 'if . else if .' should finish with 'else', not 
'else if'.  With my previous weather station I got some strange readings, 
and your code - ending in 'else if' rather than 'else' - wouldn't match 
some values leading to deformed HTML being generated.


On Monday, 23 May 2022 at 22:20:02 UTC+1 Jim Munro wrote:

> I played around a bit with this code for wind colors in the Belchertown 
> skin.  I too had some difficulty with the colors and made a few changes.  
> Please see snippet below.  I basically had to reverse order the if/else if 
> code to put the higher wind speed first because the else if would always 
> stop a the first >= and not go any further.  Your windSpeeds/windGusts and 
> colors may not match mine so adjust to taste.
>
> // Change the color of the Windspeed variable according to US-EPA standards
> // (adjusted to match skin colors better)
> function get_windSpeed_color(windSpeed, returnColor = false) {
> windSpeed = parseFloat(windSpeed).toFixed(1); // Convert back to 
> decimal lit
> if (windSpeed <= 1.1) {
> var windSpeed_color = "rgba(18,120,200,1)";
> } else if (windSpeed >= 24.0) {
> var windSpeed_color = "rgba(159,0,197,1)";
> } else if (windSpeed >= 18.0) {
> var windSpeed_color = "rgba(255,69,0,1)";
> } else if (windSpeed >= 12.4) {
> var windSpeed_color = "rgba(255,127,0,1)";
> } else if (windSpeed >= 7.5) {
> var windSpeed_color = "rgba(255,174,0,1)";
> } else if (windSpeed >= 3.7) {
> var windSpeed_color = "rgba(113,188,60,1)";
> } else if (windSpeed >= 1.2) {
> var windSpeed_color = "rgba(31,175,221,1)";
> }
> // Return the color value if requested, otherwise just set the div 
> color
> if (returnColor) {
> return windSpeed_color;
> } else {
> jQuery(".curwindspeed").css("color", windSpeed_color);
> }
>
> }
>
> // Change the color of the aqi variable according to US-EPA standards
> // (adjusted to match skin colors better)
> function get_windGust_color(windGust, returnColor = false) {
> windGust = parseFloat(windGust).toFixed(1); // Convert back to decimal 
> liter
> if (windGust <= 1.1) {
> var windGust_color = "rgba(18,120,200,1)";
> } else if (windGust >= 24.0) {
> var windGust_color = "rgba(159,0,197,1)";
> } else if (windGust >= 18.0) {
> var windGust_color = "rgba(255,69,0,1)";
> } else if (windGust >= 12.4) {
> var windGust_color = "rgba(255,127,0,1)";
> } else if (windGust >= 7.5) {
> var windGust_color = "rgba(255,174,0,1)";
> } else if (windGust >= 3.7) {
> var windGust_color = "rgba(113,188,60,1)";
> } else if (windGust >= 1.2) {
> var windGust_color = "rgba(31,175,221,1)";
> }
> // Return the color value if requested, otherwise just set the div 
> color
> if (returnColor) {
> return windGust_color;
> } else {
> jQuery(".curwindgust").css("color", windGust_color);
> }
> }
>
> cheers Jim
> On Tuesday, May 17, 2022 at 7:54:26 a.m. UTC-4 peterq...@gmail.com wrote:
>
>> Why are you formatting the windspeed as string and then (multiple times) 
>> converting it to float? 
>>
>> This may be unrelated to your problem.
>>
>> I do notice that the outTemp coloring is done with the string value and 
>> converted to the real value in the coloration function itself. Could the 
>> windspeed float variable be going out of scope? I don't usually write 
>> Javascript so, sorry I'm not much help.
>>
>> On Sun, May 15, 2022 at 3:24 AM Meteo Oberwallis  
>> wrote:
>>
>>> Hi Guys
>>> I have a problem with the wind color in Belchertown. I managed to 
>>> display the wind in color as well. Only it doesn't always do so after 
>>> visiting or refreshing the Belchertown page. I've attached my changes. What 
>>> could it be? I have 2 pictures attached. At view a is at page load and also 
>>> a few seconds later. At some point the color will change (see appendix b). 
>>> But that is always different.
>>>
>>> This is my Code:
>>>
>>> // Change the color of the Windspeed variable according to US-EPA 
>>> standards
>>> // (adjusted to match skin colors better)
>>> function get_windSpeed_color(windSpeed, returnColor = false) {
>>> if (windSpeed <= 0) {
>>> var windSpeed_color = "rgba(0,255,0,1)";
>>> } else if (windSpeed >= 19.9) {
>>> var windSpeed_color = "rgba(126,255,0,1)";
>>> } else if (windSpeed >= 39.9) {
>>> var windSpeed_color = "rgba(0,255,0,1)";
>>> } else if (windSpeed >= 59.9) {
>>> var windSpeed_color = "rgba(255,128,0,1)";
>>> } else if (windSpeed >= 79.9) {
>>> var windSpeed_color = "rgba(255,0,0,1)";
>>> } else if (windSpeed >= 99.9) {
>>> var windSpeed_color = "rgba(255,0,120,1)";
>>> } else if (windSpeed >= 118.0) {
>>> var windSpeed_color = "rgba(255,1,113,1)";
>>> }
>>>
>>> // Return the color value if requested, othe