Re: [weewx-user] Delete data between two time points

2020-01-11 Thread Neil S
Bingo!

Thank you for your help.

Neil


On Saturday, 11 January 2020 14:46:36 UTC, Thomas Keffer wrote:
>
> It's actually much simpler. The field 'dateTime' is already in unix epoch 
> time. So, you want
>
> *  delete from archive where dateTime>1578739140 and dateTime<1578741360;*
>
> Then rebuild the daily summaries.
>
> -tk
>
> On Sat, Jan 11, 2020 at 7:29 AM Neil S > 
> wrote:
>
>> I am trying to delete data between two time points as it is erroneous (I 
>> updated and for a short period the station type was reset to simulate).
>>
>> The time points are 11/1/20 at 10:39:00 and 11:16:00 (so I think I have 
>> the right unixepoch timestamps)
>>
>> I have worked out how to delete data that is older or newer than any one 
>> point but not between. In theory the following should work 
>>
>> *sqlite3 /var/lib/weewx/weewx.sdb*
>>
>> *delete from archive where datetime(dateTime,'unixepoch','localtime') 
>> BETWEEN '1578739140' AND '1578741360';*
>> *.exit*
>>
>>
>> but it doesnt and just appears to delete all data up to the last time 
>> stamp. All historic data seems to have been deleted (including all the NOAA 
>> data).
>>
>> I have also tried 
>>
>> *sqlite3 /var/lib/weewx/weewx.sdb*
>> *delete from archive where 
>> (datetime(dateTime,'unixepoch','localtime')>1578739140) AND *
>> *(datetime(dateTime,'unixepoch','localtime')<**1578741360);*
>> *.exit*
>>
>>
>> Strangely the database size seems to be the same though - so is it just a 
>> case of me panicking that I am loosing data and I need to wait for tables 
>> to be rebuilt?
>>
>> TIA
>> Neil
>>
>> -- 
>> 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...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/weewx-user/0f6dc72d-4366-4e63-922a-bde2275822b7%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/weewx-user/0f6dc72d-4366-4e63-922a-bde2275822b7%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
>

-- 
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/487e0a08-3686-4137-ab24-dcc1508741af%40googlegroups.com.


[weewx-user] Delete data between two time points

2020-01-11 Thread Neil S
I am trying to delete data between two time points as it is erroneous (I 
updated and for a short period the station type was reset to simulate).

The time points are 11/1/20 at 10:39:00 and 11:16:00 (so I think I have the 
right unixepoch timestamps)

I have worked out how to delete data that is older or newer than any one 
point but not between. In theory the following should work 

*sqlite3 /var/lib/weewx/weewx.sdb*

*delete from archive where datetime(dateTime,'unixepoch','localtime') 
BETWEEN '1578739140' AND '1578741360';*
*.exit*


but it doesnt and just appears to delete all data up to the last time 
stamp. All historic data seems to have been deleted (including all the NOAA 
data).

I have also tried 

*sqlite3 /var/lib/weewx/weewx.sdb*
*delete from archive where 
(datetime(dateTime,'unixepoch','localtime')>1578739140) AND *
*(datetime(dateTime,'unixepoch','localtime')<**1578741360);*
*.exit*


Strangely the database size seems to be the same though - so is it just a 
case of me panicking that I am loosing data and I need to wait for tables 
to be rebuilt?

TIA
Neil

-- 
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/0f6dc72d-4366-4e63-922a-bde2275822b7%40googlegroups.com.


Re: [weewx-user] Failing to upload to web server

2019-12-27 Thread Neil S
That doesnt work either but then I didnt expect it to as ftp.mycomain.co.uk 
and mydomain.co.uk and www.mydomain.co.uk all resolve to the same IP 
address which is what I tried om Post #3

Anyway thanks for the pointers on lftp. Hammer and possibly nut here but I 
have now got uploads on the go again.

Installed lftp on the weewxx machine (Raspberry Pi) and in the 
\etc\lftp.conf put the lines

*set ssl:verify-certificate no*
*set ftp:ssl-protect-data true*

(OK I know that ignores the certificate but think that it is OK in this 
instance as it is my ISP and all I am uploading is public web pages)

Then upload the files into the weather subdirectory on the server...

*lftp -p 21 -u user,password  ftp.mydomain.co.uk -e "mput /var/www/weewx/* 
-O /weather/; bye"*

Bingo - files uploaded from weewx folder to public web pages.

Now the weewx generates the pages every five minutes (on hour, 5 past 10 
past etc) and in general takes about 80 secs to complete its generation and 
various uploads to Wunderground, WOW Weather etc. So at 2 minutes past, 7 
minutes past, 12 minutes past etc I run the lftp comman as a cron job using 
..

*2-59/5  *  *  *  *  lftp -p 21 -u user,password  ftp.mydomain.co.uk -e 
"mput /var/www/weewx/* -O /weather/; bye"*


As I said most probably, nut , hammer, crack, nut etc etc  but at least 
things are working again. 

Neil



On Monday, 23 December 2019 23:52:31 UTC, Thomas Keffer wrote:
>
> It would appear so, but I'm not much of a SSL expert. 
>
> What happens if you try to connect to simply mydomain.co.uk. that is, 
> without the 'ftp' in front?
>
> -tk
>
>
>
> On Mon, Dec 23, 2019 at 8:15 AM Neil S > 
> wrote:
>
>> Yes WinSCP is on Win10 machine. Tried Filezilla on Win10 machine and 
>> popped up an error about certificates not matching. (Which is reasonable as 
>> the core cert is footholds.net
>>
>> Tried lftp on the raspberry pi itself and came up with this
>>
>> root@pi-Weather:~# lftp -p 21 -u x,yy ftp.mydomain.co.uk
>> lftp xxx...@ftp.mydomain.co.uk:~> ls
>> ls: Fatal error: Certificate verification: certificate common name 
>> doesn't match requested host name 'ftp.mydomain.co.uk'
>> lftp xxx...@ftp.mydomain.co.uk:~>
>>
>>
>> Note I have replaced username with , password with Y and my 
>> domain name with mydomain
>>
>> Is it an issues with the remote certificate not being the correct name '
>> ftpg.mydomain.co.uk' ?
>>
>> Neil
>>
>>
>> On Monday, 23 December 2019 12:09:54 UTC, Thomas Keffer wrote:
>>>
>>> Not sure what's happening.
>>>
>>> If I run nmap from my end, it reveals that your ISP is using an 
>>> implementation of Pure-FTPd. Looking through the Pure-FTPd documentation, 
>>> it lists WinSCP 
>>> <https://download.pureftpd.org/pub/pure-ftpd/doc/README.TLS> as being 
>>> compatible, but it doesn't say anything one way or another about Python's 
>>> client implementation. It's possible there's an incompatibility (although I 
>>> doubt it).
>>>
>>> It's also possible it's a firewall issue, although the fact that nmap 
>>> was able to scan the port suggests not.
>>>
>>> You mention you are able to connect with WinSCP. I assume that's on a 
>>> Windows host, not a Linux host. Are you able to connect using any client on 
>>> your Linux box, such as FileZilla, or the FTP command line?
>>>
>>> -tk
>>>
>>> On Mon, Dec 23, 2019 at 2:29 AM Neil S  wrote:
>>>
>>>> Have set Debug=2 but there doesn’t seem to be much more useful info. 
>>>> Presume I have to look at syslog? 
>>>>
>>>> Have also checked messages and user.log but doesn’t seem to be anything 
>>>> extra in there either?
>>>>
>>>> I have also replaced the website ftp with the direct IP for the time 
>>>> being. 
>>>>
>>>>  
>>>>
>>>> *With **secure_ftp = true* I get the following in syslog
>>>>
>>>>  
>>>>
>>>> root@pi-Weather:~# tail -f /var/log/syslog
>>>>
>>>> Dec 23 09:10:17 localhost weewx[9522]: restx: Ambient: url: 
>>>> https://weatherstation.wunderground.com/weatherstation/updateweatherstation.php?action=updateraw=ILONDONXXX=XXX=weewx-3.9.2=2019-12-23%2009%3A10%3A00=0.00=135=1.6=1.6=0.00
>>>>
>>>> Dec 23 09:10:17 localhost weewx[9522]: reportengine: Running reports 
>>>> for latest time in the database.
>>>>
>>>> Dec 23 09:10:17 localhost weewx[9522]: reportengine: Report 
>>>> 'Stan

Re: [weewx-user] Failing to upload to web server

2019-12-23 Thread Neil S
Yes WinSCP is on Win10 machine. Tried Filezilla on Win10 machine and popped 
up an error about certificates not matching. (Which is reasonable as the 
core cert is footholds.net

Tried lftp on the raspberry pi itself and came up with this

root@pi-Weather:~# lftp -p 21 -u x,yy ftp.mydomain.co.uk
lftp xxx...@ftp.mydomain.co.uk:~> ls
ls: Fatal error: Certificate verification: certificate common name doesn't 
match requested host name 'ftp.mydomain.co.uk'
lftp xxx...@ftp.mydomain.co.uk:~>


Note I have replaced username with , password with Y and my domain 
name with mydomain

Is it an issues with the remote certificate not being the correct name 
'ftpg.mydomain.co.uk' ?

Neil


On Monday, 23 December 2019 12:09:54 UTC, Thomas Keffer wrote:
>
> Not sure what's happening.
>
> If I run nmap from my end, it reveals that your ISP is using an 
> implementation of Pure-FTPd. Looking through the Pure-FTPd documentation, 
> it lists WinSCP 
> <https://download.pureftpd.org/pub/pure-ftpd/doc/README.TLS> as being 
> compatible, but it doesn't say anything one way or another about Python's 
> client implementation. It's possible there's an incompatibility (although I 
> doubt it).
>
> It's also possible it's a firewall issue, although the fact that nmap was 
> able to scan the port suggests not.
>
> You mention you are able to connect with WinSCP. I assume that's on a 
> Windows host, not a Linux host. Are you able to connect using any client on 
> your Linux box, such as FileZilla, or the FTP command line?
>
> -tk
>
> On Mon, Dec 23, 2019 at 2:29 AM Neil S > 
> wrote:
>
>> Have set Debug=2 but there doesn’t seem to be much more useful info. 
>> Presume I have to look at syslog? 
>>
>> Have also checked messages and user.log but doesn’t seem to be anything 
>> extra in there either?
>>
>> I have also replaced the website ftp with the direct IP for the time 
>> being. 
>>
>>  
>>
>> *With **secure_ftp = true* I get the following in syslog
>>
>>  
>>
>> root@pi-Weather:~# tail -f /var/log/syslog
>>
>> Dec 23 09:10:17 localhost weewx[9522]: restx: Ambient: url: 
>> https://weatherstation.wunderground.com/weatherstation/updateweatherstation.php?action=updateraw=ILONDONXXX=XXX=weewx-3.9.2=2019-12-23%2009%3A10%3A00=0.00=135=1.6=1.6=0.00
>>
>> Dec 23 09:10:17 localhost weewx[9522]: reportengine: Running reports for 
>> latest time in the database.
>>
>> Dec 23 09:10:17 localhost weewx[9522]: reportengine: Report 
>> 'StandardReport' not enabled. Skipping.
>>
>> Dec 23 09:10:17 localhost weewx[9522]: reportengine: Running report 
>> 'SeasonsReport'
>>
>> Dec 23 09:10:18 localhost weewx[9522]: restx: WOW: Published record 
>> 2019-12-23 09:10:00 GMT (1577092200)
>>
>> Dec 23 09:10:18 localhost weewx[9522]: restx: StationRegistry: Published 
>> record 2019-12-23 09:10:00 GMT (1577092200)
>>
>> Dec 23 09:10:19 localhost weewx[9522]: restx: Wunderground-PWS: Published 
>> record 2019-12-23 09:10:00 GMT (1577092200)
>>
>> Dec 23 09:10:19 localhost weewx[9522]: reportengine: Found configuration 
>> file /etc/weewx/skins/Seasons/skin.conf for report 'SeasonsReport'
>>
>> Dec 23 09:10:25 localhost weewx[9522]: cheetahgenerator: using search 
>> list ['weewx.cheetahgenerator.Almanac', 'weewx.cheetahgenerator.Station', 
>> 'weewx.cheetahgenerator.Current', 'weewx.cheetahgenerator.Stats', 
>> 'weewx.cheetahgenerator.UnitInfo', 'weewx.cheetahgenerator.Extras']
>>
>> Dec 23 09:10:25 localhost weewx[9522]: manager: Daily summary version is 
>> 2.0
>>
>> Dec 23 09:10:41 localhost weewx[9522]: wmr100: Bad USB report received: 
>> could not detach kernel driver from interface 0: No data available
>>
>> Dec 23 09:11:01 localhost weewx[9522]: wmr100: Bad USB report received: 
>> could not detach kernel driver from interface 0: No data available
>>
>> Dec 23 09:11:41 localhost weewx[9522]: wmr100: Bad USB report received: 
>> could not detach kernel driver from interface 0: No data available
>>
>> Dec 23 09:12:02 localhost weewx[9522]: cheetahgenerator: Generated 8 
>> files for report SeasonsReport in 98.02 seconds
>>
>> Dec 23 09:12:02 localhost rsyslogd-2007: action 'action 17' suspended, 
>> next retry is Mon Dec 23 09:13:32 2019 [try http://www.rsyslog.com/e/2007 
>> ]
>>
>> Dec 23 09:12:03 localhost weewx[9522]: manager: Daily summary version is 
>> 2.0
>>
>> Dec 23 09:12:10 localhost weewx[9522]: imagegenerator: Generated 14 
>> images for SeasonsReport in 7.20 seconds
>>
>> Dec 23 09:12:10 localhost weewx[

Re: [weewx-user] Failing to upload to web server

2019-12-23 Thread Neil S
 available

Dec 23 09:13:44 localhost weewx[9522]: wmr100: Bad USB report received: 
could not detach kernel driver from interface 0: No data available

Dec 23 09:13:44 localhost rsyslogd-2007: action 'action 17' suspended, next 
retry is Mon Dec 23 09:15:14 2019 [try http://www.rsyslog.com/e/2007 ]

 

 

 

*with secure_ftp = false *I get the following in syslog

 

Dec 23 09:21:07 localhost weewx[9631]: cheetahgenerator: Generated 8 files 
for report SeasonsReport in 37.59 seconds

Dec 23 09:21:07 localhost weewx[9631]: manager: Daily summary version is 2.0

Dec 23 09:21:14 localhost weewx[9631]: wmr100: Bad USB report received: 
could not detach kernel driver from interface 0: No data available

Dec 23 09:21:14 localhost weewx[9631]: imagegenerator: Generated 14 images 
for SeasonsReport in 6.99 seconds

Dec 23 09:21:14 localhost weewx[9631]: copygenerator: copied 5 files to 
/var/www/weewx

Dec 23 09:21:14 localhost weewx[9631]: reportengine: Report 
'SmartphoneReport' not enabled. Skipping.

Dec 23 09:21:14 localhost weewx[9631]: reportengine: Report 'MobileReport' 
not enabled. Skipping.

Dec 23 09:21:14 localhost weewx[9631]: reportengine: Running report 'FTP'

Dec 23 09:21:14 localhost weewx[9631]: reportengine: Found configuration 
file /etc/weewx/skins/Ftp/skin.conf for report 'FTP'

Dec 23 09:21:14 localhost weewx[9631]: ftpupload: Attempting connection to 
87.247.245.132

Dec 23 09:21:14 localhost weewx[9631]: ftpupload: Unable to connect or log 
into server : 421-Sorry, cleartext sessions and weak ciphers are not 
accepted on this
server.#012421 Please reconnect using TLS security mechanisms.

Dec 23 09:21:14 localhost weewx[9631]: ftpupload: Unable to connect or log 
into server : 421-Sorry, cleartext sessions and weak ciphers are not 
accepted on this
server.#012421 Please reconnect using TLS security mechanisms.

Dec 23 09:21:15 localhost weewx[9631]: ftpupload: Unable to connect or log 
into server : 421-Sorry, cleartext sessions and weak ciphers are not 
accepted on this
server.#012421 Please reconnect using TLS security mechanisms.

Dec 23 09:21:15 localhost weewx[9631]: ftpupload: Attempted 3 times to 
connect t o server 87.247.245.132. Giving up.

Dec 23 09:21:15 localhost weewx[9631]: ftpgenerator: ftp'd 0 files in 0.12 
seconds

Dec 23 09:21:15 localhost weewx[9631]: reportengine: Running report 'RSYNC'

Dec 23 09:21:15 localhost weewx[9631]: reportengine: Found configuration 
file /etc/weewx/skins/Rsync/skin.conf for report 'RSYNC'

Dec 23 09:21:15 localhost weewx[9631]: rsyncgenerator: rsync upload not 
requested. Skipped.

Dec 23 09:21:41 localhost weewx[9631]: wmr100: Bad USB report received: 
could not detach kernel driver from interface 0: No data available

Dec 23 09:21:41 localhost rsyslogd-2007: action 'action 17' suspended, next 
retry is Mon Dec 23 09:23:11 2019 [try http://www.rsyslog.com/e/2007 ]

Dec 23 09:22:10 localhost weewx[9631]: wmr100: Bad USB report received: 
could not detach kernel driver from interface 0: No data available

^C

 

 

 

Using nmap against the ISP’s server and port 21 I get 

 

Starting Nmap 7.80 ( https://nmap.org ) at 2019-12-22 17:18 GMT Standard 
Time

Nmap scan report for honolulu.footholds.net (87.247.245.132)

Host is up (0.020s latency).

PORT   STATE SERVICE

21/tcp open  ftp

| ssl-enum-ciphers: 

|   TLSv1.2: 

| ciphers: 

|   TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (secp256r1) - A

|   TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (secp256r1) - A

|   TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 (dh 2048) - A

|   TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 (dh 2048) - A

| compressors: 

|   NULL

| cipher preference: server

|_  least strength: A

 

 

Does that help? 


Neil




On Saturday, 21 December 2019 23:12:27 UTC, Thomas Keffer wrote:
>
> In your weewx.conf file, set debug=2. This will give extra information 
> about the FTP connection and, possibly, why, or at least, where, the 
> problem is happening.
>
> -tk
>
> On Fri, Dec 20, 2019 at 12:16 PM Neil S > 
> wrote:
>
>> So it appears that my ISP has done something to the server that now 
>> requires all connections to be secure (having problems with mail client as 
>> well). 
>>
>> However at the same time my Weewx stopped uploading to the server and the 
>> logs report...
>>
>> Dec 20 18:35:48 pi-Weather weewx[5982]: ftpupload: Unable to connect or 
>> log into server : 421-Sorry, cleartext sessions and weak ciph... server.
>> 421 Please reconnect using TLS 
>> security mechanisms.
>> Dec 20 18:35:48 pi-Weather weewx[5982]: ftpupload: Unable to connect or 
>> log into server : 421-Sorry, cleartext sessions and weak ciph... server.
>>   

[weewx-user] Failing to upload to web server

2019-12-20 Thread Neil S
So it appears that my ISP has done something to the server that now 
requires all connections to be secure (having problems with mail client as 
well). 

However at the same time my Weewx stopped uploading to the server and the 
logs report...

Dec 20 18:35:48 pi-Weather weewx[5982]: ftpupload: Unable to connect or log 
into server : 421-Sorry, cleartext sessions and weak ciph... server.
421 Please reconnect using TLS 
security mechanisms.
Dec 20 18:35:48 pi-Weather weewx[5982]: ftpupload: Unable to connect or log 
into server : 421-Sorry, cleartext sessions and weak ciph... server.
421 Please reconnect using TLS 
security mechanisms.
Dec 20 18:35:48 pi-Weather weewx[5982]: ftpupload: Unable to connect or log 
into server : 421-Sorry, cleartext sessions and weak ciph... server.
421 Please reconnect using TLS 
security mechanisms.
Dec 20 18:35:48 pi-Weather weewx[5982]: ftpupload: Attempted 3 times to 
connect to server ftp..co.uk. Giving up.


having searched the forum I have tried altering adding 

 secure_ftp = True 

and also 
secure_ftp = True
secure_data = False

With suitable weewx restart.

If I do either of the above I get 

Dec 20 18:21:16 pi-Weather weewx[5845]: ftpupload: Unable to connect or log 
into server : [Errno 104] Connection reset by peer
Dec 20 18:21:16 pi-Weather weewx[5845]: ftpupload: Unable to connect or log 
into server : [Errno 104] Connection reset by peer
Dec 20 18:21:16 pi-Weather weewx[5845]: ftpupload: Unable to connect or log 
into server : [Errno 104] Connection reset by peer
Dec 20 18:21:16 pi-Weather weewx[5845]: ftpupload: Attempted 3 times to 
connect to server ftp..co.uk. Giving up.
Dec 20 18:21:16 pi-Weather weewx[5845]: ftpgenerator: ftp'd 0 files in 0.29 
seconds

I have tried connecting to my web server using WinSCP and it failed until I 
alter settings to TLS/SSL Explicit encryption (on port 21) at which point 
it works. 

Any ideas what settings I need to change in the Weewx.conf [[FTP]] section 
to get it to upload again?

TIA

Neil



-- 
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/8166e9b2-7093-4745-a2e2-c501e695e7a3%40googlegroups.com.


Re: [weewx-user] Re: index.html not updating

2019-12-16 Thread Neil S
Thanks Thomas.

Yes I did alter it (to add a UV sensor) on 14th July.

So not sure why it finally gave up the ghost on 12th Dec! 

I have re-instated your original sensors.inc and it has started working 
again (albeit without the UV sensor). . 

Well at least it gives me something to do over Xmas to work out why it went 
wrong! 

Thanks for the help. 

If you are interested the sensors.inc that broke it is as follows:-

## sensors module for weewx skins
## Copyright Tom Keffer, Matthew Wall
## See LICENSE.txt for your rights
#errorCatcher Echo

## this is a conditional display of sensor data, including connectivity,
## battery status, and various voltages.  if there are no data available,
## then this degenerates to nothing displayed.

#def get_battery_status($x)
#if $x == 0
OK
#else
LOW
#end if
#end def

## first see what sensor data are available

#set $have_conn = 0
#for $x in [$day.rxCheckPercent]
  #if $x.has_data
#set $have_conn = 1
  #end if
#end for

#set $have_battery_status = 0
#for $x in [$day.txBatteryStatus, $day.windBatteryStatus, 
$day.rainBatteryStatus, $day.outTempBatteryStatus, 
$day.inTempBatteryStatus, $day.uvBatteryStatus]
  #if $x.has_data
#set $have_battery_status = 1
  #end if
#end for
 
#set $have_voltage = 0
#for $x in [$day.consBatteryVoltage, $day.heatingVoltage, 
$day.supplyVoltage, $day.referenceVoltage]
  #if $x.has_data
#set $have_voltage = 1
  #end if

#end for


## now display the available data only

#if $have_conn or $have_battery_status or $have_voltage

  
Sensor Status

  
  
  

#if $have_conn
Connectivity
#if $day.rxCheckPercent.has_data

  $obs.label.rxCheckPercent
  $current.rxCheckPercent

#end if
#end if

#if $have_battery_status
Battery Status
#if $day.txBatteryStatus.has_data

  $obs.label.txBatteryStatus
  $get_battery_status($current.txBatteryStatus.raw)

#end if
#if $day.windBatteryStatus.has_data

  $obs.label.windBatteryStatus
  $get_battery_status($current.windBatteryStatus.raw)

#end if
#if $day.rainBatteryStatus.has_data

  $obs.label.rainBatteryStatus
  $get_battery_status($current.rainBatteryStatus.raw)

#end if
#if $day.outTempBatteryStatus.has_data

  $obs.label.outTempBatteryStatus
  $get_battery_status($current.outTempBatteryStatus.raw)

#end if
#if $day.inTempBatteryStatus.has_data

  $obs.label.inTempBatteryStatus
  $get_battery_status($current.inTempBatteryStatus.raw)

#end if


  $obs.label.uvBatteryStatus
  $get_battery_status($current.uvBatteryStatus.raw)


#end if

#if $have_voltage
Voltage
#if $day.consBatteryVoltage.has_data

  $obs.label.consBatteryVoltage
  $current.consBatteryVoltage

#end if
#if $day.heatingVoltage.has_data

  $obs.label.heatingVoltage
  $current.heatingVoltage

#end if
#if $day.supplyVoltage.has_data

  $obs.label.supplyVoltage
  $current.supplyVoltage

#end if
#if $day.referenceVoltage.has_data

  $obs.label.referenceVoltage
  $current.referenceVoltage

#end if
#end if
  
  


#end if



On Sunday, 15 December 2019 19:36:36 UTC, Thomas Keffer wrote:
>
> In addition to Vince's comments, I would add that the problem is most 
> likely in the file /etc/weewx/skins/Seasons/sensors.inc. Did you change 
> anything in there?
>
> -tk
>
> On Sun, Dec 15, 2019 at 11:00 AM vince > 
> wrote:
>
>> The rsyslogd thing is not related to anything weewx, it's just a 
>> longstanding os annoyance that has been around for years.
>>
>> Cheetah explosions are painful to figure out for sure.   Best guess is 
>> you have some unexpected or missing data that it can't figure out how to do 
>> unit conversions on. 
>>
>> -- 
>> 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...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/weewx-user/325d6a1b-55b4-4f3c-b912-d7d8151aeb67%40googlegroups.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/8f326a6c-9781-4a2f-abc2-176cf07d5832%40googlegroups.com.


[weewx-user] index.html not updating

2019-12-15 Thread Neil S
Weewx working fine for months after upgrade to latest version and Seasons 
skin then all of a sudden on Thur (12/12) at 7am the index.html file 
stopped updating. However the pngs are being updated and are current (so in 
reality when uploaded to the website are showing correct date - it's just 
the time and date that are incorrect.)

Raspberry Pi - Running Jessie
Weewx v3.9.2
Skin Seasons

Now I see the index.temp.html appear briefly on the pi but then disappear. 
Here are the relevant part of the logs I believe. Note that this error 
didn't occur at the 06:55 page generation.

Dec 12 06:55:50 localhost weewx[217]: ftpgenerator: ftp'd 22 files in 1.39 
>> seconds
>
> Dec 12 07:00:23 localhost weewx[217]: manager: Added record 2019-12-12 
>> 07:00:00 GMT (1576134000) to database 'weewx.sdb'
>
> Dec 12 07:00:23 localhost rsyslogd-2007: action 'action 17' suspended, 
>> next retry is Thu Dec 12 07:01:53 2019 [try http://www.rsyslog.com/e/2007 ]
>
> Dec 12 07:00:23 localhost weewx[217]: manager: Added record 2019-12-12 
>> 07:00:00 GMT (1576134000) to daily summary in 'weewx.sdb'
>
> Dec 12 07:00:24 localhost weewx[217]: restx: Wunderground-PWS: Published 
>> record 2019-12-12 07:00:00 GMT (1576134000)
>
> Dec 12 07:00:38 localhost weewx[217]:   Traceback (most recent call 
>> last):
>
> Dec 12 07:00:38 localhost weewx[217]: File 
>> "/usr/share/weewx/weewx/cheetahgenerator.py", line 332, in generate
>
> Dec 12 07:00:38 localhost weewx[217]:   
>> fd.write(str(compiled_template))
>
> Dec 12 07:00:38 localhost weewx[217]: File 
>> "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1005, in 
>> __str__
>
> Dec 12 07:00:38 localhost weewx[217]:   rc = getattr(self, 
>> mainMethName)()
>
> Dec 12 07:00:38 localhost weewx[217]: File 
>> "_etc_weewx_skins_Seasons_index_html_tmpl.py", line 217, in respond
>
> Dec 12 07:00:38 localhost weewx[217]: File 
>> "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1615, in 
>> _handleCheetahInclude
>
> Dec 12 07:00:38 localhost weewx[217]:   
>> self._CHEETAH__cheetahIncludes[_includeID].respond(trans)
>
> Dec 12 07:00:38 localhost weewx[217]: File 
>> "_etc_weewx_skins_Seasons_sensors_inc.py", line 411, in respond
>
> Dec 12 07:00:39 localhost weewx[217]: File 
>> "_etc_weewx_skins_Seasons_sensors_inc.py", line 193, in __errorCatcher14
>
> Dec 12 07:00:39 localhost weewx[217]: File "", line 1, in 
>> 
>
> Dec 12 07:00:39 localhost weewx[217]: File 
>> "/usr/share/weewx/weewx/units.py", line 967, in raw
>
> Dec 12 07:00:39 localhost weewx[217]:   return 
>> self._raw_value_tuple[0]
>
> Dec 12 07:00:39 localhost weewx[217]: File 
>> "/usr/share/weewx/weewx/units.py", line 991, in _raw_value_tuple
>
> Dec 12 07:00:39 localhost weewx[217]:   vtx = 
>> self.converter.convert(self.value_t)
>
> Dec 12 07:00:39 localhost weewx[217]: File 
>> "/usr/share/weewx/weewx/units.py", line 778, in convert
>
> Dec 12 07:00:39 localhost weewx[217]:   if val_t[1] is None and 
>> val_t[2] is None:
>
> Dec 12 07:00:39 localhost weewx[217]:   TypeError: 'UnknownType' 
>> object does not support indexing
>
> Dec 12 07:00:39 localhost weewx[217]:   Traceback (most recent call 
>> last):
>
> Dec 12 07:00:39 localhost weewx[217]: File 
>> "/usr/share/weewx/weewx/cheetahgenerator.py", line 332, in generate
>
> Dec 12 07:00:39 localhost weewx[217]:   
>> fd.write(str(compiled_template))
>
> Dec 12 07:00:39 localhost weewx[217]: File 
>> "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1005, in 
>> __str__
>
> Dec 12 07:00:39 localhost weewx[217]:   rc = getattr(self, 
>> mainMethName)()
>
> Dec 12 07:00:39 localhost weewx[217]: File 
>> "_etc_weewx_skins_Seasons_telemetry_html_tmpl.py", line 194, in respond
>
> Dec 12 07:00:39 localhost weewx[217]: File 
>> "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1615, in 
>> _handleCheetahInclude
>
> Dec 12 07:00:39 localhost weewx[217]:   
>> self._CHEETAH__cheetahIncludes[_includeID].respond(trans)
>
> Dec 12 07:00:39 localhost weewx[217]: File 
>> "_etc_weewx_skins_Seasons_sensors_inc.py", line 411, in respond
>
> Dec 12 07:00:39 localhost weewx[217]: File 
>> "_etc_weewx_skins_Seasons_sensors_inc.py", line 193, in __errorCatcher14
>
> Dec 12 07:00:39 localhost weewx[217]: File "", line 1, in 
>> 
>
> Dec 12 07:00:39 localhost weewx[217]: File 
>> "/usr/share/weewx/weewx/units.py", line 967, in raw
>
> Dec 12 07:00:39 localhost weewx[217]:   return 
>> self._raw_value_tuple[0]
>
> Dec 12 07:00:39 localhost weewx[217]: File 
>> "/usr/share/weewx/weewx/units.py", line 991, in _raw_value_tuple
>
> Dec 12 07:00:39 localhost weewx[217]:   vtx = 
>> self.converter.convert(self.value_t)
>
> Dec 12 07:00:39 localhost weewx[217]: File 
>> 

[weewx-user] Re: UV Sensor Battery Indicator

2019-07-15 Thread Neil S
So as mwall suggested I removed the two lines `#if 
#day.uvBatteryStatus.has_data` and `#end if`

I now have:-

UV Battery  OK

Displayed on the web page.

Thanks mwall. 

N.


On Saturday, 29 June 2019 12:12:22 UTC+1, Neil S wrote:
>
> So I have just upgraded to 3.9.1 (on Raspberry Pi).  Using the nice new 
> skin but cannot work out how to get the UV Sensor battery to show on the 
> web page. UV levels etc show OK but cant get battery status to show 
> (despite some config file fiddling)
>
> (WRM88 weather station) 
>
> Is it possible?
>
> Neil
>

-- 
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/ff8201b8-0e6f-4f09-a983-e575ec6008e2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[weewx-user] Re: UV Sensor Battery Indicator

2019-07-04 Thread Neil S
OK ignore that sensor map I posted - my bad

weewx.conf section is

[WMR100]
# This section is for the Oregon Scientific WMR100

# The station model, e.g., WMR100, WMR100N, WMRS200
model = WMR100

# How long a wind record can be used to calculate wind chill (in 
seconds)
stale_wind = 30

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


(there is no sensor map in the WMR100 section - note it does show Battery 
status of wind, rain, inside & outside sensors)

(also if there are # at the start doesnt it ignore that line??) 

Neil

On Saturday, 29 June 2019 12:12:22 UTC+1, Neil S wrote:
>
> So I have just upgraded to 3.9.1 (on Raspberry Pi).  Using the nice new 
> skin but cannot work out how to get the UV Sensor battery to show on the 
> web page. UV levels etc show OK but cant get battery status to show 
> (despite some config file fiddling)
>
> (WRM88 weather station) 
>
> Is it possible?
>
> Neil
>

-- 
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/422cdf7b-3d22-4869-8029-b37eed57d51e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[weewx-user] Re: UV Sensor Battery Indicator

2019-07-04 Thread Neil S
Yes I see it in the LOOP packets 

LOOP:   2019-07-04 09:27:47 BST (1562228867) dateTime: 1562228867, 
maxSolarRad: 596.436033087, rainRate: 0, usUnits: 1, UV: 3.0, uvBatteryStatus: 
0

I now have a battery map of 
txBatteryStatus = batterytx
windBatteryStatus = batteryWind
rainBatteryStatus = batteryRain
outTempBatteryStatus = battery1
# WARNING: the following are not in the default schema
extraBatteryStatus1 = battery2
extraBatteryStatus2 = battery3
extraBatteryStatus3 = battery4
extraBatteryStatus4 = battery5
uvBatteryStatus = batteryuv

weewx.conf
I have no requirement for historical or tracked battery data so assume I 
dont need to extend the database.

Just need to work out how to now display it in the Battery Status section.

I have added the following to sensors.inc in the Seasons skin folder

#if $day.uvBatteryStatus.has_data

  $obs.label.uvBatteryStatus
  $get_battery_status($current.uvBatteryStatus.raw)

#end if

But still no joy.

Neil


On Saturday, 29 June 2019 12:12:22 UTC+1, Neil S wrote:
>
> So I have just upgraded to 3.9.1 (on Raspberry Pi).  Using the nice new 
> skin but cannot work out how to get the UV Sensor battery to show on the 
> web page. UV levels etc show OK but cant get battery status to show 
> (despite some config file fiddling)
>
> (WRM88 weather station) 
>
> Is it possible?
>
> Neil
>

-- 
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/cc6b54a6-e2d2-4c22-a82f-ede113709020%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[weewx-user] UV Sensor Battery Indicator

2019-06-29 Thread Neil S
So I have just upgraded to 3.9.1 (on Raspberry Pi).  Using the nice new 
skin but cannot work out how to get the UV Sensor battery to show on the 
web page. UV levels etc show OK but cant get battery status to show 
(despite some config file fiddling)

(WRM88 weather station) 

Is it possible?

Neil

-- 
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/4554afb0-695d-491a-958e-1fa30771c2e2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.