Re: [weewx-user] V4 with python2 OWFS errors

2020-05-27 Thread Gazza

Hi Neville,

Do you know if the pyweather driver can be used as service not a driver ?

I only need the barometer bit but as you have confirmed it it working with 
python3 it might be a better way to go than the other i2c solution.


Gaz

-- 
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/45301d0d-0a93-4965-b3f7-f93babd257a2%40googlegroups.com.


[weewx-user] Re: TE923 Nexus: daily max. wind gust on WU and weewx website

2020-05-27 Thread Andrew Milner
try and set loop_hilo = true in [StdArchive] which will then store loop 
values as highs and lows.  The default is to use only the archive records.  
This should give you the mmissing values.


On Wednesday, 27 May 2020 19:46:51 UTC+3, Felix Maltzahn wrote:
>
> Hello,
>
> I have a little problem with my RPI and TE923 TFA Nexus...
>
> The daily max wind gust (shown on the weather stations display) is all 
> time much higher than the value uploaded on WU, PWS, Awekas or on the weewx 
> generated website.
> The archive interval is set to 60 seconds. The update intval on the TE923 
> for wind data is 33 seconds. I think a lot of gusts are simply missed... 
> Is there any solution available?
>
> With wee_device --minmax I can read the correct daily max gust value... 
> But how can I use this for my website and for my upload to WU, Awekas 
> etc??
>
>
>

-- 
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/5c4a2c9d-a1c0-40b3-b827-f69b7a1904c1%40googlegroups.com.


Re: [weewx-user] V4 with python2 OWFS errors

2020-05-27 Thread Glenn McKechnie
Really good to hear of another success!

I've just bumped mine to weewx v4.1.0 and that's also working like a charm.

I know the feeling with the heavy rain. Thankfully it's only ever been
phantom downfalls and therefore easily fixed.


On 28/05/2020, Neville Davis  wrote:
> Glenn
>
> Success my system is fully operational with python 3.7 weewx v4.0.0 with
>  1Wire rain, and my i2C sensor system, with ow-server and pyownet.
>
> For your information Glenn I am using your OWFS-dallas.py downloaded
> yesterday.after my silly mistake  we are lo longer under several meters
>
> of water falling in one loop cycle  :)
>
> Now I just need to get my old skins working under python3..
>
> regards
>
> Neville
>
> On Wednesday, May 27, 2020 at 8:15:07 PM UTC+10, Neville Davis wrote:
>>
>> Thanks very much Glen I will do the mods in the morning.
>> I had specified a sensor type in my old system...but just forgot..
>>
>> Neville
>>
>> On Wednesday, May 27, 2020 at 5:31:30 PM UTC+10, Glenn McKechnie wrote:
>>>
>>> Hi Neville,
>>>
>>> Within the [OWFS] section of weewx you need to specify a [[sensor_type]]
>>>
>>>
>>> Firstly, you are correct with the count incrementing when the bucket
>>> tips but you need to turn that into a time based value
>>> A rain value is evaluated as the difference between the current count
>>> and the last count for the time it was taken.
>>> This is where the sensor_type comes into it.
>>>
>>> owfs.py provides the function rainwise_bucket that assumes there is
>>> 0.1 " per tip ( 0.0254cm ) of the tipping bucket. By comparing the
>>> current count with the last reading (count) taken, and knowing the
>>> times involved it returns the measurement in cm.
>>>
>>> So, to enable that function you need to specify the following after
>>> your [sensor_map] section
>>>
>>> [[sensor_type]]
>>> rain = rainwise_bucket
>>>
>>> Once that's done you'll find the maths is taken care of and tipping
>>> water into the bucket will register a meaningful volume / measure.
>>> If it's not 0.01" per tip you can adjust that value by using the
>>> [StdCalibrate][[Corrections]] section of weewx.conf
>>>
>>> Incidentally. You have owfs.py configured as a Driver and as a
>>> Service. I'm thinking you only want the Service side of it, that way
>>> it supplements your main stations data.
>>>
>>> If that assumption is correct, remove the "driver = user.owfs " line
>>> from the [OWFS] section. Leave the [Engine][[Services]] data_services
>>> = user.owfs.OWFSService as it is
>>>
>>>
>>>
>>>
>>> On 27/05/2020, Neville Davis  wrote:
>>> > Glen
>>> >
>>> > My solution is proving to be beyond my capabilities to get to be
>>> correct,
>>> > while I can get the data I have run into several issues that just makes
>>> >
>>> it
>>> > too messy.
>>> > After reading this and looking at your far more elegant solutions I
>>> have
>>> > installed and it is has several problems.
>>> > First I run with loop and the print out below shows that I have an
>>> enormous
>>> >
>>> > amount of rain...and the quality control kicks in and prevents any
>>> further
>>> > stuff up.
>>> > I then ran without loop and the system crashed.
>>> > when I query using owget I get the current count value in the sensor
>>> > (counter.b) as 16570. This has been operational for a few years. This
>>> count
>>> >
>>> > does increment with bucket tips.
>>> > My system is home grown i2C (BMP085, qty two SHT31-D, si1145) on range
>>> >
>>> > extenders, with Davis wind direction and speed sensors.
>>> > The following from the log
>>> > Any suggestions appreciated
>>> > I am defaulted to python3 and weewx v4 on latest debian on Pi3
>>> >
>>> > Regards
>>> >
>>> > Neville
>>> >
>>> > May 27 15:14:08 raspberrypi weewx[5106] INFO __main__: Initializing
>>> weewx
>>> > version 4.0.0
>>> >
>>> > May 27 15:14:08 raspberrypi weewx[5106] INFO __main__: Using Python
>>> 3.7.3
>>> > (default, Dec 20 2019, 18:57:59) #012[GCC 8.3.0]
>>> >
>>> > May 27 15:14:08 raspberrypi weewx[5106] INFO __main__: Platform
>>> > Linux-4.19.97-v7+-armv7l-with-debian-10.4
>>> >
>>> > May 27 15:14:08 raspberrypi weewx[5106] INFO __main__: Locale is
>>> > 'en_US.UTF-8'
>>> >
>>> > May 27 15:14:08 raspberrypi weewx[5106] INFO __main__: PID file is
>>> > /var/run/weewx.pid
>>> >
>>> > May 27 15:14:08 raspberrypi weewx[5110] INFO __main__: Using
>>> configuration
>>> > file /home/weewx/weewx.conf
>>> >
>>> > May 27 15:14:08 raspberrypi weewx[5110] INFO weewx.engine: Loading
>>> station
>>> > type PiWeather (user.piweather)
>>> >
>>> > May 27 15:14:08 raspberrypi weewx[5110] INFO user.owfs: service version
>>> >
>>> is
>>> > 0.23.6 (pyownet)
>>> >
>>> > May 27 15:14:08 raspberrypi weewx[5110] INFO user.owfs: binding is
>>> archive
>>> >
>>> > May 27 15:14:08 raspberrypi weewx[5110] INFO user.owfs: interface is
>>> > localhost:4304
>>> >
>>> > May 27 15:14:08 raspberrypi weewx[5110] INFO user.owfs: sensor map is
>>> > {'rain': '/uncached/1D.E3AB0D00/counter.b'}
>>> >
>>> > May 27 15:

Re: [weewx-user] Database Problem

2020-05-27 Thread Tom Keffer
There are now two ways of specifying a database schema. In the old way, the
presence of 'wind' was detected by setting the database manager to
WXDaySummaryManager. In the new way, it is explicitly mentioned in the
schema.

Unfortunately, you're mixing the two ways.

If you wish to use the old way, make sure that option 'manager' is set to
WXDaySummaryManager. So, your section [DataBindings] should read something
like

[DataBindings]

[[wx_binding]]
# The database must match one of the sections in [Databases].
# This is likely to be the only option you would want to change.
database = archive_sqlite
# The name of the table within the database
table_name = archive
# The manager handles aggregation of data for historical summaries
manager = weewx.wxmanager.WXDaySummaryManager
# The schema defines the structure of the database.
# It is *only* used when the database is created.
schema = user.extensions.schema_extended

Then try creating the new database.

An obscure error, I know!

-tk


On Wed, May 27, 2020 at 4:06 PM Phil Owers  wrote:

> Have just tried to add avg_distance and lightning_strikes to the
> weewx.sdb. schema by adding
> import schemas.wview
> schema_extended = schemas.wview.schema + [('avg_distance',
> 'REAL'),('lightning_strikes', 'REAL')]
> in the extension.py file
> and in the weewx.conf
>  changed schema = schemas.wview_extended.schema
>  to schema = user.extensions.schema_extended
> then
> sudo ./bin/wee_database weewx.conf --reconfigure
>
> The new weewx.sdb was produced and so I then did --rebuild-daily.
> Restarted weewx and started getting a failure with $day.wind.max and also
> the following was produced in the log with
> May 27 19:20:11 raspberrypi weewx[529] INFO user.rtgd: rtgdthread:
>  data = self.calculate(cached_packet)
> May 27 19:20:11 raspberrypi weewx[529] INFO user.rtgd: rtgdthread: 
> File "/home/weewx/bin/user/rtgd.py", line 1926, in calculate
> May 27 19:20:11 raspberrypi weewx[529] INFO user.rtgd: rtgdthread:
>  wgust_tm_vt = ValueTuple(self.day_stats['wind'].max,
> May 27 19:20:11 raspberrypi weewx[529] INFO user.rtgd: rtgdthread: 
> KeyError: 'wind'
>
> Had a look at the old and new weew.sdb and in the database file structure
> the tables had gone from 114 Table Schema in the original to 54 Table
> Schema after I had done the above change with daily_archive_wind missing
> with lots of others.
> Reverted back to the original weewx.sdb and it was Ok again.
> Im using weewx Ver 4.1
> Just wondered if there was a different way of doing the above since
> version 4
> Thanks for any help
> Phil
>
> --
> 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/b4a60685-724e-4260-834e-3589af69dcba%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/CAPq0zECDq%2Biig%3DNTfNkx%3DWAxBSL947QPvq7ta8AQ4U4UicRjwg%40mail.gmail.com.


[weewx-user] Re: Database Problem

2020-05-27 Thread vince
If you switch to the extended schema, you don't need to add the lightning 
elements a second time in weewx.conf, as they're already in the v4 extended 
schema, but you'd need to line up the names you picked so that they match 
the database schema.   The element names are "lightning_strike_count" and 
"lightning_distance" in the extended schema.  Look in bin/schemas for the 
schema definitions.

The procedure you followed looks right to me:

   - reconfigure so it uses the new database schema for the archive table
   - rebuild_daily to do the various summary tables.

The error you posted looks like you referred to a field in an extension 
(ie, 'wind') that isn't in the database schema.   Do you perhaps mean 
"windSpeed" in your user.rtgd file ?

Short answer is you probably want to do a little tweaking of your extension 
to use the built-in element names.   I think there was at least one post 
recently about how to clean up your archive tables if you need to rename 
something and want to save your old data, but it's probably worth the time 
longterm to do so and not need your customizations at all.

Wise choice keeping the old version to revert to :-)


-- 
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/1c096511-3ffa-4710-af11-3d6f6e84380b%40googlegroups.com.


[weewx-user] Re: WeeWX 4.1.0: Server uptime, extra data and plots

2020-05-27 Thread Marius Schamschula
Success!

Thanks!

On Wednesday, May 27, 2020 at 9:06:27 AM UTC-5, Marius Schamschula wrote:
>
> After some debugging, my FreeBSD server is finally running WeeWX 4.1.0 
> using Python 3.8 (instead of Python 2.7). Two things
>
> 1) The server uptime is no longer correct. I, getting
>
> Weewx uptime: 0 days, 21 hours, 5 minutes
> Server uptime: 18409 days, 14 hours, 0 minutes
> weewx v4.1.0
>
> That's longer than I've had the server
>
> It used to be correct (WeeWX 4.0.0 and below, using Python 2.7).
>
> 2) The Solar Radiation, ET and UV data and plots started showing, even 
> though my VantagePro II doesn't have those sensors installed.
>
> No big deal: I've just removed these items from the template.
>
>

-- 
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/e49641b3-6ad6-45ca-bb71-29a3294fd289%40googlegroups.com.


Re: [weewx-user] Re: Ubuntu 16 installation issues

2020-05-27 Thread Tom Keffer
Thanks, but I need to see farther up the log. You posted just the very end
of the error.

On Wed, May 27, 2020 at 4:39 PM Francisco Puig  wrote:

> Hi Tom,
>
> I'm using Python 2, that I think its the correct for Ubuntu 16?
>
> I replaced the ultimeter.py and below are the log entries;
>
> May 27 19:38:02 alpharetta weewx[23054] CRITICAL __main__: 
> File "/usr/share/weewx/weewx/engine.py", line 188, in run
>
> May 27 19:38:02 alpharetta weewx[23054] CRITICAL __main__: 
> for packet in self.console.genLoopPackets():
>
> May 27 19:38:02 alpharetta weewx[23054] CRITICAL __main__: 
> File "/usr/share/weewx/weewx/drivers/ultimeter.py", line 131, in
> genLoopPackets
>
> May 27 19:38:02 alpharetta weewx[23054] CRITICAL __main__: 
> data = Station.parse_readings(readings)
>
> May 27 19:38:02 alpharetta weewx[23054] CRITICAL __main__: 
> File "/usr/share/weewx/weewx/drivers/ultimeter.py", line 298, in
> parse_readings
>
> May 27 19:38:02 alpharetta weewx[23054] CRITICAL __main__: 
> data['windSpeed'] = Station._decode(buf[0:4], 0.1 * MILE_PER_KM)  # mph
>
> May 27 19:38:02 alpharetta weewx[23054] CRITICAL __main__: 
> File "/usr/share/weewx/weewx/drivers/ultimeter.py", line 327, in _decode
>
> May 27 19:38:02 alpharetta weewx[23054] CRITICAL __main__:   v
> = int(s, 16)
>
> May 27 19:38:02 alpharetta weewx[23054] CRITICAL __main__: 
> TypeError: int() can't convert non-string with explicit base
>
> May 27 19:38:02 alpharetta weewx[23054] CRITICAL __main__: 
> Exiting.
>
>
> Thanks for you help.
>
> On Wednesday, May 27, 2020 at 3:28:25 PM UTC-4, Francisco Puig wrote:
>>
>> Hi all,
>>
>> I'm trying to migrate my WeeWX RPi server to a Ubuntu 16 server and I'm
>> getting these errors. I have no idea where to start troubleshooting.
>>
>> Traceback (most recent call last):
>>
>>   File "/usr/share/weewx/weewxd", line 261, in 
>>
>> main()
>>
>>   File "/usr/share/weewx/weewxd", line 154, in main
>>
>> engine.run()
>>
>>   File "/usr/share/weewx/weewx/engine.py", line 188, in run
>>
>> for packet in self.console.genLoopPackets():
>>
>>   File "/usr/share/weewx/weewx/drivers/ultimeter.py", line 131, in
>> genLoopPackets
>>
>> data = Station.parse_readings(readings)
>>
>>   File "/usr/share/weewx/weewx/drivers/ultimeter.py", line 298, in
>> parse_readings
>>
>> data['windSpeed'] = Station._decode(buf[0:4], 0.1 * MILE_PER_KM)  #
>> mph
>>
>>   File "/usr/share/weewx/weewx/drivers/ultimeter.py", line 326, in _decode
>>
>> v = int(s, 16)
>>
>> TypeError: int() can't convert non-string with explicit base
>>
>>
>> Any help will be appreciate.
>>
>> Thanks,
>>
>> Frank.
>>
> --
> 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/59c70ced-e608-4dd7-9b78-ba6171670e53%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/CAPq0zECbGgA4RqHJqEVfyCKsjsaw%3DmExAVK_Mpq-23akFU-5Mw%40mail.gmail.com.


Re: [weewx-user] Re: WeeWX 4.1.0: Server uptime, extra data and plots

2020-05-27 Thread Tom Keffer
Oops. Typo in the file. Try this one.

-tk


On Wed, May 27, 2020 at 4:06 PM Marius Schamschula 
wrote:

> Tom,
>
> That didn't help:
>
> I manually installed the station.py file, ran
>
> python3 -m compileall ./station.py
>
>
> to get the .pyc file and restarted the weewx service.
>
> On Wednesday, May 27, 2020 at 9:06:27 AM UTC-5, Marius Schamschula wrote:
>>
>> After some debugging, my FreeBSD server is finally running WeeWX 4.1.0
>> using Python 3.8 (instead of Python 2.7). Two things
>>
>> 1) The server uptime is no longer correct. I, getting
>>
>> Weewx uptime: 0 days, 21 hours, 5 minutes
>> Server uptime: 18409 days, 14 hours, 0 minutes
>> weewx v4.1.0
>>
>> That's longer than I've had the server
>>
>> It used to be correct (WeeWX 4.0.0 and below, using Python 2.7).
>>
>> 2) The Solar Radiation, ET and UV data and plots started showing, even
>> though my VantagePro II doesn't have those sensors installed.
>>
>> No big deal: I've just removed these items from the template.
>>
>> --
> 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/70c2b472-49e6-45b7-9e10-5552f8e0144a%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/CAPq0zEDBexiR7FtQ2HUf5ai-qaff5z1xwmgtdmqMZ%2BRWag28nA%40mail.gmail.com.
#
#Copyright (c) 2009-2020 Tom Keffer 
#
#See the file LICENSE.txt for your full rights.
#
"""Defines (mostly static) information about a station."""
from __future__ import absolute_import
import sys
import time

import weeutil.weeutil
import weewx.units

class StationInfo(object):
"""Readonly class with static station information. It has no formatting information. Just a POS.

Attributes:

altitude_vt: Station altitude as a ValueTuple
hardware:A string holding a hardware description
rain_year_start: The start of the rain year (1=January)
latitude_f:  Floating point latitude
longitude_f: Floating point longitude
location:String holding a description of the station location
week_start:  The start of the week (0=Monday)
station_url: An URL with an informative website (if any) about the station
"""

def __init__(self, console=None, **stn_dict):
"""Extracts info from the console and stn_dict and stores it in self."""

if console and hasattr(console, "altitude_vt"):
self.altitude_vt = console.altitude_vt
else:
altitude_t = weeutil.weeutil.option_as_list(stn_dict.get('altitude', (None, None)))
try:
self.altitude_vt = weewx.units.ValueTuple(float(altitude_t[0]), altitude_t[1], "group_altitude")
except KeyError as e:
raise weewx.ViolatedPrecondition("Value 'altitude' needs a unit (%s)" % e)

if console and hasattr(console, 'hardware_name'):
self.hardware = console.hardware_name
else:
self.hardware = stn_dict.get('station_type', 'Unknown')

if console and hasattr(console, 'rain_year_start'):
self.rain_year_start = getattr(console, 'rain_year_start')
else:
self.rain_year_start = int(stn_dict.get('rain_year_start', 1))

self.latitude_f  = float(stn_dict['latitude'])
self.longitude_f = float(stn_dict['longitude'])
# Locations frequently have commas in them. Guard against ConfigObj turning it into a list:
self.location= weeutil.weeutil.list_as_string(stn_dict.get('location', 'Unknown'))
self.week_start  = int(stn_dict.get('week_start', 6))
self.station_url = stn_dict.get('station_url')
# For backwards compatibility:
self.webpath = self.station_url

class Station(object):
"""Formatted version of StationInfo."""

def __init__(self, stn_info, formatter, converter, skin_dict):

# Store away my instance of StationInfo
self.stn_info = stn_info
self.formatter = formatter
self.converter = converter

# Add a bunch of formatted attributes:
label_dict = skin_dict.get('Labels', {})
hemispheres= label_dict.get('hemispheres', ('N','S','E','W'))
latlon_formats = label_dict.get('latlon_formats')
self.latitude  = weeutil.weeutil.latlon_string(stn_info.latitude_f,
  

[weewx-user] Re: Ubuntu 16 installation issues

2020-05-27 Thread Francisco Puig
Hi Tom,

I'm using Python 2, that I think its the correct for Ubuntu 16?

I replaced the ultimeter.py and below are the log entries;

May 27 19:38:02 alpharetta weewx[23054] CRITICAL __main__: File 
"/usr/share/weewx/weewx/engine.py", line 188, in run

May 27 19:38:02 alpharetta weewx[23054] CRITICAL __main__:   
for packet in self.console.genLoopPackets():

May 27 19:38:02 alpharetta weewx[23054] CRITICAL __main__: File 
"/usr/share/weewx/weewx/drivers/ultimeter.py", line 131, in genLoopPackets

May 27 19:38:02 alpharetta weewx[23054] CRITICAL __main__:   
data = Station.parse_readings(readings)

May 27 19:38:02 alpharetta weewx[23054] CRITICAL __main__: File 
"/usr/share/weewx/weewx/drivers/ultimeter.py", line 298, in parse_readings

May 27 19:38:02 alpharetta weewx[23054] CRITICAL __main__:   
data['windSpeed'] = Station._decode(buf[0:4], 0.1 * MILE_PER_KM)  # mph

May 27 19:38:02 alpharetta weewx[23054] CRITICAL __main__: File 
"/usr/share/weewx/weewx/drivers/ultimeter.py", line 327, in _decode

May 27 19:38:02 alpharetta weewx[23054] CRITICAL __main__:   v 
= int(s, 16)

May 27 19:38:02 alpharetta weewx[23054] CRITICAL __main__:   
TypeError: int() can't convert non-string with explicit base

May 27 19:38:02 alpharetta weewx[23054] CRITICAL __main__:   
Exiting.


Thanks for you help.

On Wednesday, May 27, 2020 at 3:28:25 PM UTC-4, Francisco Puig wrote:
>
> Hi all, 
>
> I'm trying to migrate my WeeWX RPi server to a Ubuntu 16 server and I'm 
> getting these errors. I have no idea where to start troubleshooting. 
>
> Traceback (most recent call last):
>
>   File "/usr/share/weewx/weewxd", line 261, in 
>
> main()
>
>   File "/usr/share/weewx/weewxd", line 154, in main
>
> engine.run()
>
>   File "/usr/share/weewx/weewx/engine.py", line 188, in run
>
> for packet in self.console.genLoopPackets():
>
>   File "/usr/share/weewx/weewx/drivers/ultimeter.py", line 131, in 
> genLoopPackets
>
> data = Station.parse_readings(readings)
>
>   File "/usr/share/weewx/weewx/drivers/ultimeter.py", line 298, in 
> parse_readings
>
> data['windSpeed'] = Station._decode(buf[0:4], 0.1 * MILE_PER_KM)  # mph
>
>   File "/usr/share/weewx/weewx/drivers/ultimeter.py", line 326, in _decode
>
> v = int(s, 16)
>
> TypeError: int() can't convert non-string with explicit base
>
>
> Any help will be appreciate.
>
> Thanks,
>
> Frank.
>

-- 
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/59c70ced-e608-4dd7-9b78-ba6171670e53%40googlegroups.com.


[weewx-user] Database Problem

2020-05-27 Thread Phil Owers
Have just tried to add avg_distance and lightning_strikes to the weewx.sdb. 
schema by adding
import schemas.wview
schema_extended = schemas.wview.schema + [('avg_distance', 
'REAL'),('lightning_strikes', 'REAL')]
in the extension.py file
and in the weewx.conf
 changed schema = schemas.wview_extended.schema
 to schema = user.extensions.schema_extended
then
sudo ./bin/wee_database weewx.conf --reconfigure

The new weewx.sdb was produced and so I then did --rebuild-daily.
Restarted weewx and started getting a failure with $day.wind.max and also 
the following was produced in the log with 
May 27 19:20:11 raspberrypi weewx[529] INFO user.rtgd: rtgdthread:  
data = self.calculate(cached_packet)
May 27 19:20:11 raspberrypi weewx[529] INFO user.rtgd: rtgdthread:    
File "/home/weewx/bin/user/rtgd.py", line 1926, in calculate
May 27 19:20:11 raspberrypi weewx[529] INFO user.rtgd: rtgdthread:  
wgust_tm_vt = ValueTuple(self.day_stats['wind'].max,
May 27 19:20:11 raspberrypi weewx[529] INFO user.rtgd: rtgdthread:  
KeyError: 'wind'

Had a look at the old and new weew.sdb and in the database file structure 
the tables had gone from 114 Table Schema in the original to 54 Table 
Schema after I had done the above change with daily_archive_wind missing 
with lots of others.
Reverted back to the original weewx.sdb and it was Ok again.
Im using weewx Ver 4.1
Just wondered if there was a different way of doing the above since version 
4
Thanks for any help
Phil

-- 
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/b4a60685-724e-4260-834e-3589af69dcba%40googlegroups.com.


[weewx-user] Re: WeeWX 4.1.0: Server uptime, extra data and plots

2020-05-27 Thread Marius Schamschula
Tom,

That didn't help:

I manually installed the station.py file, ran 

python3 -m compileall ./station.py


to get the .pyc file and restarted the weewx service.

On Wednesday, May 27, 2020 at 9:06:27 AM UTC-5, Marius Schamschula wrote:
>
> After some debugging, my FreeBSD server is finally running WeeWX 4.1.0 
> using Python 3.8 (instead of Python 2.7). Two things
>
> 1) The server uptime is no longer correct. I, getting
>
> Weewx uptime: 0 days, 21 hours, 5 minutes
> Server uptime: 18409 days, 14 hours, 0 minutes
> weewx v4.1.0
>
> That's longer than I've had the server
>
> It used to be correct (WeeWX 4.0.0 and below, using Python 2.7).
>
> 2) The Solar Radiation, ET and UV data and plots started showing, even 
> though my VantagePro II doesn't have those sensors installed.
>
> No big deal: I've just removed these items from the template.
>
>

-- 
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/70c2b472-49e6-45b7-9e10-5552f8e0144a%40googlegroups.com.


Re: [weewx-user] V4 with python2 OWFS errors

2020-05-27 Thread Neville Davis
Glenn

Success my system is fully operational with python 3.7 weewx v4.0.0 with 
 1Wire rain, and my i2C sensor system, with ow-server and pyownet.

For your information Glenn I am using your OWFS-dallas.py downloaded 
yesterday.after my silly mistake  we are lo longer under several meters 
of water falling in one loop cycle  :)

Now I just need to get my old skins working under python3..

regards

Neville

On Wednesday, May 27, 2020 at 8:15:07 PM UTC+10, Neville Davis wrote:
>
> Thanks very much Glen I will do the mods in the morning.
> I had specified a sensor type in my old system...but just forgot..
>
> Neville
>
> On Wednesday, May 27, 2020 at 5:31:30 PM UTC+10, Glenn McKechnie wrote:
>>
>> Hi Neville, 
>>
>> Within the [OWFS] section of weewx you need to specify a [[sensor_type]] 
>>
>> Firstly, you are correct with the count incrementing when the bucket 
>> tips but you need to turn that into a time based value 
>> A rain value is evaluated as the difference between the current count 
>> and the last count for the time it was taken. 
>> This is where the sensor_type comes into it. 
>>
>> owfs.py provides the function rainwise_bucket that assumes there is 
>> 0.1 " per tip ( 0.0254cm ) of the tipping bucket. By comparing the 
>> current count with the last reading (count) taken, and knowing the 
>> times involved it returns the measurement in cm. 
>>
>> So, to enable that function you need to specify the following after 
>> your [sensor_map] section 
>>
>> [[sensor_type]] 
>> rain = rainwise_bucket 
>>
>> Once that's done you'll find the maths is taken care of and tipping 
>> water into the bucket will register a meaningful volume / measure. 
>> If it's not 0.01" per tip you can adjust that value by using the 
>> [StdCalibrate][[Corrections]] section of weewx.conf 
>>
>> Incidentally. You have owfs.py configured as a Driver and as a 
>> Service. I'm thinking you only want the Service side of it, that way 
>> it supplements your main stations data. 
>>
>> If that assumption is correct, remove the "driver = user.owfs " line 
>> from the [OWFS] section. Leave the [Engine][[Services]] data_services 
>> = user.owfs.OWFSService as it is 
>>
>>
>>
>>
>> On 27/05/2020, Neville Davis  wrote: 
>> > Glen 
>> > 
>> > My solution is proving to be beyond my capabilities to get to be 
>> correct, 
>> > while I can get the data I have run into several issues that just makes 
>> it 
>> > too messy. 
>> > After reading this and looking at your far more elegant solutions I 
>> have 
>> > installed and it is has several problems. 
>> > First I run with loop and the print out below shows that I have an 
>> enormous 
>> > 
>> > amount of rain...and the quality control kicks in and prevents any 
>> further 
>> > stuff up. 
>> > I then ran without loop and the system crashed. 
>> > when I query using owget I get the current count value in the sensor 
>> > (counter.b) as 16570. This has been operational for a few years. This 
>> count 
>> > 
>> > does increment with bucket tips. 
>> > My system is home grown i2C (BMP085, qty two SHT31-D, si1145) on range 
>> > extenders, with Davis wind direction and speed sensors. 
>> > The following from the log 
>> > Any suggestions appreciated 
>> > I am defaulted to python3 and weewx v4 on latest debian on Pi3 
>> > 
>> > Regards 
>> > 
>> > Neville 
>> > 
>> > May 27 15:14:08 raspberrypi weewx[5106] INFO __main__: Initializing 
>> weewx 
>> > version 4.0.0 
>> > 
>> > May 27 15:14:08 raspberrypi weewx[5106] INFO __main__: Using Python 
>> 3.7.3 
>> > (default, Dec 20 2019, 18:57:59) #012[GCC 8.3.0] 
>> > 
>> > May 27 15:14:08 raspberrypi weewx[5106] INFO __main__: Platform 
>> > Linux-4.19.97-v7+-armv7l-with-debian-10.4 
>> > 
>> > May 27 15:14:08 raspberrypi weewx[5106] INFO __main__: Locale is 
>> > 'en_US.UTF-8' 
>> > 
>> > May 27 15:14:08 raspberrypi weewx[5106] INFO __main__: PID file is 
>> > /var/run/weewx.pid 
>> > 
>> > May 27 15:14:08 raspberrypi weewx[5110] INFO __main__: Using 
>> configuration 
>> > file /home/weewx/weewx.conf 
>> > 
>> > May 27 15:14:08 raspberrypi weewx[5110] INFO weewx.engine: Loading 
>> station 
>> > type PiWeather (user.piweather) 
>> > 
>> > May 27 15:14:08 raspberrypi weewx[5110] INFO user.owfs: service version 
>> is 
>> > 0.23.6 (pyownet) 
>> > 
>> > May 27 15:14:08 raspberrypi weewx[5110] INFO user.owfs: binding is 
>> archive 
>> > 
>> > May 27 15:14:08 raspberrypi weewx[5110] INFO user.owfs: interface is 
>> > localhost:4304 
>> > 
>> > May 27 15:14:08 raspberrypi weewx[5110] INFO user.owfs: sensor map is 
>> > {'rain': '/uncached/1D.E3AB0D00/counter.b'} 
>> > 
>> > May 27 15:14:08 raspberrypi weewx[5110] INFO user.owfs: sensor type map 
>> is 
>> > {} 
>> > 
>> > May 27 15:14:08 raspberrypi weewx[5110] INFO user.owfs: dallas 
>> direction 
>> > map is {} 
>> > 
>> > May 27 15:14:08 raspberrypi weewx[5110] INFO user.owfs: sensor unit 
>> system 
>> > is metric 
>> > 
>> > May 27 15:14:08 raspberrypi weewx[5110] 

Re: [weewx-user] Re: Ubuntu 16 installation issues

2020-05-27 Thread Tom Keffer
Hello, Francisco

1. Are you using Python 2 or Python 3?

2. Can you replace your copy of /usr/share/weewx/weewx/drivers/ultimeter.py
with the attached? It will tell us what is causing the TypeError.

-tk


On Wed, May 27, 2020 at 12:30 PM Francisco Puig  wrote:

> I used the apt-get installation method.
>
> On Wednesday, May 27, 2020 at 3:28:25 PM UTC-4, Francisco Puig wrote:
>>
>> Hi all,
>>
>> I'm trying to migrate my WeeWX RPi server to a Ubuntu 16 server and I'm
>> getting these errors. I have no idea where to start troubleshooting.
>>
>> Traceback (most recent call last):
>>
>>   File "/usr/share/weewx/weewxd", line 261, in 
>>
>> main()
>>
>>   File "/usr/share/weewx/weewxd", line 154, in main
>>
>> engine.run()
>>
>>   File "/usr/share/weewx/weewx/engine.py", line 188, in run
>>
>> for packet in self.console.genLoopPackets():
>>
>>   File "/usr/share/weewx/weewx/drivers/ultimeter.py", line 131, in
>> genLoopPackets
>>
>> data = Station.parse_readings(readings)
>>
>>   File "/usr/share/weewx/weewx/drivers/ultimeter.py", line 298, in
>> parse_readings
>>
>> data['windSpeed'] = Station._decode(buf[0:4], 0.1 * MILE_PER_KM)  #
>> mph
>>
>>   File "/usr/share/weewx/weewx/drivers/ultimeter.py", line 326, in _decode
>>
>> v = int(s, 16)
>>
>> TypeError: int() can't convert non-string with explicit base
>>
>>
>> Any help will be appreciate.
>>
>> Thanks,
>>
>> Frank.
>>
> --
> 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/62188d7d-d03f-45e8-996a-b74f0a2c436c%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/CAPq0zEASyHZL3hvKuZ29Ri4q4Xnu0Uqg8vEscmeFdaUynRwFqA%40mail.gmail.com.
#!/usr/bin/env python
#
# Copyright 2014 Matthew Wall
# Copyright 2014 Nate Bargmann 
# See the file LICENSE.txt for your rights.
#
# Credit to and contributions from:
#   Jay Nugent (WB8TKL) and KRK6 for weather-2.kr6k-V2.1
# http://server1.nuge.com/~weather/
#   Steve (sesykes71) for testing the first implementations of this driver
#   Garret Power for improved decoding and proper handling of negative values
#   Chris Thompstone for testing the fast-read implementation
#
# Thanks to PeetBros for publishing the communication protocols and details
# about each model they manufacture.

"""Driver for Peet Bros Ultimeter weather stations except the Ultimeter II

This driver assumes the Ultimeter is emitting data in Peet Bros Data Logger
mode format.  This driver will set the mode automatically on stations
manufactured after 2004.  Stations manufactured before 2004 must be set to
data logger mode using the buttons on the console.

Resources for the Ultimeter stations

Ultimeter Models 2100, 2000, 800, & 100 serial specifications:
  http://www.peetbros.com/shop/custom.aspx?recid=29

Ultimeter 2000 Pinouts and Parsers:
  http://www.webaugur.com/ham-radio/52-ultimeter-2000-pinouts-and-parsers.html

Ultimeter II
  not supported by this driver

All models communicate over an RS-232 compatible serial port using three
wires--RXD, TXD, and Ground (except Ultimeter II which omits TXD).  Port
parameters are 2400, 8N1, with no flow control.

The Ultimeter hardware supports several "modes" for providing station data
to the serial port.  This driver utilizes the "modem mode" to set the date
and time of the Ultimeter upon initialization and then sets it into Data
Logger mode for continuous updates.

Modem Mode commands used by the driver
>A  Set Date and Time (decimal digits  = day of year,
 = minute of day; Jan 1 = , Midnight = )

>I  Set output mode to Data Logger Mode (continuous output)

"""

from __future__ import with_statement
from __future__ import absolute_import
from __future__ import print_function

import logging
import serial
import time

import weewx.drivers
import weewx.wxformulas
from weewx.units import INHG_PER_MBAR, MILE_PER_KM
from weeutil.weeutil import timestamp_to_string

log = logging.getLogger(__name__)

DRIVER_NAME = 'Ultimeter'
DRIVER_VERSION = '0.40'


def loader(config_dict, _):
return UltimeterDriver(**config_dict[DRIVER_NAME])


def confeditor_loader():
return UltimeterConfEditor()


def _fmt(x):
return ' '.join(["%0.2X" % c for c in x])


class UltimeterDriver(weewx.drivers.AbstractDevice):
"""weewx driver that communicates with a Peet Bros Ul

Re: [weewx-user] Re: event.record['ET'] throws me a KeyError. Why?

2020-05-27 Thread Maarten van der Hoeven
Thanks Tom! I've put suggestion 1 and 2 in place.

About 3, yeah, you are right. Picking up and using some working code doesnt 
mean it should remain called AddElectricity. CalcDrought should be more in 
place.

Again, thank you both!

Op woensdag 27 mei 2020 22:27:33 UTC+2 schreef Tom Keffer:
>
> 1. The ordering of your services is still not quite right. The group 
> "data_services" is run before "process_services." You want
>
> data_services = ,
> process_services = weewx.engine.StdConvert, weewx.engine.StdCalibrate, 
> weewx.engine.StdQC, 
> weewx.wxservices.StdWXCalculate, user.electricity.AddElectricity
>
> 2. In the interest of realism, the simulator occasionally emits a None 
> value for a datum. This is what is causing your ET to be None. You need to 
> get in the habit of checking for None. Something like:
>
> ET = event.record.get('ET')
> if ET is not None:
>   event.record['neerslagtekort'] = ...
>
> 3. Incidentally, you really should change the names to something more 
> meaningful than "electricity.py" and "AddElectricity".
>
> -tk
>
> On Wed, May 27, 2020 at 1:20 PM Maarten van der Hoeven  > wrote:
>
>> Hmmm, maybe adding ET to Simulator is not such a bad idea... Just adding 
>> the ET-observation to this code:
>>
>> self.observations = {
>> 'outTemp': Observation(magnitude=20.0,  average= 50.0, 
>> period=24.0, phase_lag=14.0, start=start_ts),
>> 'inTemp' : Observation(magnitude=5.0,   average= 68.0, 
>> period=24.0, phase_lag=12.0, start=start_ts),
>> 'barometer'  : Observation(magnitude=1.0,   average= 30.1, 
>> period=48.0, phase_lag= 0.0, start=start_ts),
>> 'pressure'   : Observation(magnitude=1.0,   average= 30.1, 
>> period=48.0, phase_lag= 0.0, start=start_ts),
>> 'windSpeed'  : Observation(magnitude=5.0,   average=  5.0, 
>> period=48.0, phase_lag=24.0, start=start_ts),
>> 'windDir': Observation(magnitude=180.0, average=180.0, 
>> period=48.0, phase_lag= 0.0, start=start_ts),
>> 'windGust'   : Observation(magnitude=6.0,   average=  6.0, 
>> period=48.0, phase_lag=24.0, start=start_ts),
>> 'windGustDir': Observation(magnitude=180.0, average=180.0, 
>> period=48.0, phase_lag= 0.0, start=start_ts),
>> 'outHumidity': Observation(magnitude=30.0,  average= 50.0, 
>> period=48.0, phase_lag= 0.0, start=start_ts),
>> 'inHumidity' : Observation(magnitude=10.0,  average= 20.0, 
>> period=24.0, phase_lag= 0.0, start=start_ts),
>> 'radiation'  : Solar(magnitude=1000, solar_start=6, 
>> solar_length=12),
>> 'UV' : Solar(magnitude=14,   solar_start=6, 
>> solar_length=12),
>> 'rain'   : Rain(rain_start=0, rain_length=3, 
>> total_rain=0.2, loop_interval=self.loop_interval),
>> 'txBatteryStatus': BatteryStatus(),
>> 'windBatteryStatus': BatteryStatus(),
>> 'rainBatteryStatus': BatteryStatus(),
>> 'outTempBatteryStatus': BatteryStatus(),
>> 'inTempBatteryStatus': BatteryStatus(),
>> 'consBatteryVoltage': BatteryVoltage(),
>>
>>
>> Op dinsdag 26 mei 2020 23:38:26 UTC+2 schreef Maarten van der Hoeven:
>>>
>>> Hi group,
>>>
>>> Having programming experience, but new to python. Want to write some 
>>> piece of code, that calculates the amount of precipitation shortage (rain 
>>> minus evaotranspiration). It's a measure of drought.
>>>
>>> Using some example coding, and extended those.
>>>
>>>
>>> See the piece of code below. event.record['barometer'] and 
>>> event.record['outTemp'] is working (used as an example, no drought-relation 
>>> ship); they give real values.
>>>
>>> However, event.record['ET'] gives me a KeyError. I dont understand it. 
>>> It is in my wview_extended schema (which I extended), its also populated in 
>>> my database.
>>>
>>> Why the KeyError?
>>>
>>>
>>> import schemas.wview_extended
>>> schema = {
>>> 'table': schemas.wview_extended.table + [('neerslagtekort', 'REAL')],
>>> 'day_summaries' : schemas.wview_extended.day_summaries + 
>>> [('neerslagtekort', 'SCALAR')]
>>> }
>>>
>>> import weewx.units
>>> weewx.units.obs_group_dict['neerslagtekort'] = 'group_rain'
>>>
>>>
>>> neerslag = 0
>>> verdamping = 0
>>> neerslagtekort = 0
>>>
>>> class AddElectricity(StdService):
>>>
>>> def __init__(self, engine, config_dict):
>>>
>>>   # Initialize my superclass first:
>>>   super(AddElectricity, self).__init__(engine, config_dict)
>>>
>>>   # Bind to any new archive record events:
>>>   self.bind(weewx.NEW_ARCHIVE_RECORD, self.new_archive_record)
>>>
>>>   self.last_total = None
>>>
>>> def new_archive_record(self, event):
>>>
>>>
>>>barometer = event.record['barometer']
>>>outTemp = event.record['outTemp']
>>>ET = event.record['ET']
>>>shortage = precipitation - evaporation
>>>
>>>if self.last_total:
>>>   event.record['neerslagtekort'] = shortage

[weewx-user] Re: event.record['ET'] throws me a KeyError. Why?

2020-05-27 Thread Maarten van der Hoeven
Yes, the simulator doesnt provide ET, whereas the Vantage driver does 
provide ET.

But, bingo, your suggestion did the trick. Now I've placed my service just 
after StdWxCalculate, and now there is an ET popping up

Thanks!

Op woensdag 27 mei 2020 22:26:49 UTC+2 schreef gjr80:
>
> As you say the use of simulator/VP2 explains it, the simulator driver does 
> not emit ET so it must rely on StdWXCalculate when using the vantage driver 
> it does (in your case) emit ET so it is there for your service.
>
> Regards the order I apologise, I mislead you, you do indeed need to change 
> the order but not by changing the order of the service lines (it will have 
> no effect by itself) but rather moving your service to another service line 
> such that it is processed after StdWXCalculate but before the record is 
> saved to archive by StdArchive, something like this should work (untested):
>
> [Engine]
>
> [[Services]]
> # This section specifies the services that should be run. They are
> # grouped by type, and the order of services within each group
> # determines the order in which the services will be run.
> prep_services = weewx.engine.StdTimeSynch
> data_services = ,
> process_services = weewx.engine.StdConvert, 
> weewx.engine.StdCalibrate, weewx.engine.StdQC, 
> weewx.wxservices.StdWXCalculate, user.electricity.AddElectricity
> archive_services = weewx.engine.StdArchive
> restful_services = weewx.restx.StdStationRegistry, 
> weewx.restx.StdWunderground, weewx.restx.StdPWSweather, 
> weewx.restx.StdCWOP, weewx.restx.StdWOW, weewx.restx.StdAWEKAS
> report_services = weewx.engine.StdPrint, weewx.engine.StdReport
>
> Equally you could add it to the archive_services line before StdArchive, 
> but that is a little misleading in terms of what your service does.
>
>

-- 
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/6a2de8d1-4a12-4ad1-8c79-95bf36ff86c3%40googlegroups.com.


Re: [weewx-user] Re: event.record['ET'] throws me a KeyError. Why?

2020-05-27 Thread Tom Keffer
1. The ordering of your services is still not quite right. The group
"data_services" is run before "process_services." You want

data_services = ,
process_services = weewx.engine.StdConvert, weewx.engine.StdCalibrate,
weewx.engine.StdQC,
weewx.wxservices.StdWXCalculate, user.electricity.AddElectricity

2. In the interest of realism, the simulator occasionally emits a None
value for a datum. This is what is causing your ET to be None. You need to
get in the habit of checking for None. Something like:

ET = event.record.get('ET')
if ET is not None:
  event.record['neerslagtekort'] = ...

3. Incidentally, you really should change the names to something more
meaningful than "electricity.py" and "AddElectricity".

-tk

On Wed, May 27, 2020 at 1:20 PM Maarten van der Hoeven 
wrote:

> Hmmm, maybe adding ET to Simulator is not such a bad idea... Just adding
> the ET-observation to this code:
>
> self.observations = {
> 'outTemp': Observation(magnitude=20.0,  average= 50.0,
> period=24.0, phase_lag=14.0, start=start_ts),
> 'inTemp' : Observation(magnitude=5.0,   average= 68.0,
> period=24.0, phase_lag=12.0, start=start_ts),
> 'barometer'  : Observation(magnitude=1.0,   average= 30.1,
> period=48.0, phase_lag= 0.0, start=start_ts),
> 'pressure'   : Observation(magnitude=1.0,   average= 30.1,
> period=48.0, phase_lag= 0.0, start=start_ts),
> 'windSpeed'  : Observation(magnitude=5.0,   average=  5.0,
> period=48.0, phase_lag=24.0, start=start_ts),
> 'windDir': Observation(magnitude=180.0, average=180.0,
> period=48.0, phase_lag= 0.0, start=start_ts),
> 'windGust'   : Observation(magnitude=6.0,   average=  6.0,
> period=48.0, phase_lag=24.0, start=start_ts),
> 'windGustDir': Observation(magnitude=180.0, average=180.0,
> period=48.0, phase_lag= 0.0, start=start_ts),
> 'outHumidity': Observation(magnitude=30.0,  average= 50.0,
> period=48.0, phase_lag= 0.0, start=start_ts),
> 'inHumidity' : Observation(magnitude=10.0,  average= 20.0,
> period=24.0, phase_lag= 0.0, start=start_ts),
> 'radiation'  : Solar(magnitude=1000, solar_start=6,
> solar_length=12),
> 'UV' : Solar(magnitude=14,   solar_start=6,
> solar_length=12),
> 'rain'   : Rain(rain_start=0, rain_length=3,
> total_rain=0.2, loop_interval=self.loop_interval),
> 'txBatteryStatus': BatteryStatus(),
> 'windBatteryStatus': BatteryStatus(),
> 'rainBatteryStatus': BatteryStatus(),
> 'outTempBatteryStatus': BatteryStatus(),
> 'inTempBatteryStatus': BatteryStatus(),
> 'consBatteryVoltage': BatteryVoltage(),
>
>
> Op dinsdag 26 mei 2020 23:38:26 UTC+2 schreef Maarten van der Hoeven:
>>
>> Hi group,
>>
>> Having programming experience, but new to python. Want to write some
>> piece of code, that calculates the amount of precipitation shortage (rain
>> minus evaotranspiration). It's a measure of drought.
>>
>> Using some example coding, and extended those.
>>
>>
>> See the piece of code below. event.record['barometer'] and
>> event.record['outTemp'] is working (used as an example, no drought-relation
>> ship); they give real values.
>>
>> However, event.record['ET'] gives me a KeyError. I dont understand it. It
>> is in my wview_extended schema (which I extended), its also populated in my
>> database.
>>
>> Why the KeyError?
>>
>>
>> import schemas.wview_extended
>> schema = {
>> 'table': schemas.wview_extended.table + [('neerslagtekort', 'REAL')],
>> 'day_summaries' : schemas.wview_extended.day_summaries +
>> [('neerslagtekort', 'SCALAR')]
>> }
>>
>> import weewx.units
>> weewx.units.obs_group_dict['neerslagtekort'] = 'group_rain'
>>
>>
>> neerslag = 0
>> verdamping = 0
>> neerslagtekort = 0
>>
>> class AddElectricity(StdService):
>>
>> def __init__(self, engine, config_dict):
>>
>>   # Initialize my superclass first:
>>   super(AddElectricity, self).__init__(engine, config_dict)
>>
>>   # Bind to any new archive record events:
>>   self.bind(weewx.NEW_ARCHIVE_RECORD, self.new_archive_record)
>>
>>   self.last_total = None
>>
>> def new_archive_record(self, event):
>>
>>
>>barometer = event.record['barometer']
>>outTemp = event.record['outTemp']
>>ET = event.record['ET']
>>shortage = precipitation - evaporation
>>
>>if self.last_total:
>>   event.record['neerslagtekort'] = shortage
>>
>>self.last_total = shortage
>>print(" NEERSLAGTEKORT  ")
>>print(shortage)
>>
>>
>>
>> Traceback (most recent call last):
>>   File "/usr/share/weewx/weewxd", line 261, in 
>> main()
>>   File "/usr/share/weewx/weewxd", line 154, in main
>> engine.run()
>>   File "/usr/share/weewx/weewx/engine.py", line 202, in run
>> self.dispatchEvent(weewx.Event(weewx.POST_LOOP))
>>   File "/usr/share/weewx/weewx/engine.py",

[weewx-user] Re: event.record['ET'] throws me a KeyError. Why?

2020-05-27 Thread gjr80
As you say the use of simulator/VP2 explains it, the simulator driver does not 
emit ET so it must rely on StdWXCalculate when using the vantage driver it does 
(in your case) emit ET so it is there for your service.

Regards the order I apologise, I mislead you, you do indeed need to change the 
order but not by changing the order of the service lines (it will have no 
effect by itself) but rather moving your service to another service line such 
that it is processed after StdWXCalculate but before the record is saved to 
archive by StdArchive, something like this should work (untested):

[Engine]

[[Services]]
# This section specifies the services that should be run. They are
# grouped by type, and the order of services within each group
# determines the order in which the services will be run.
prep_services = weewx.engine.StdTimeSynch
data_services = ,
process_services = weewx.engine.StdConvert, weewx.engine.StdCalibrate, 
weewx.engine.StdQC, weewx.wxservices.StdWXCalculate, 
user.electricity.AddElectricity
archive_services = weewx.engine.StdArchive
restful_services = weewx.restx.StdStationRegistry, 
weewx.restx.StdWunderground, weewx.restx.StdPWSweather, weewx.restx.StdCWOP, 
weewx.restx.StdWOW, weewx.restx.StdAWEKAS
report_services = weewx.engine.StdPrint, weewx.engine.StdReport

Equally you could add it to the archive_services line before StdArchive, but 
that is a little misleading in terms of what your service does.

-- 
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/6c54978f-91bb-4610-8ea3-bcef45b52ee1%40googlegroups.com.


[weewx-user] Re: event.record['ET'] throws me a KeyError. Why?

2020-05-27 Thread Maarten van der Hoeven
Hmmm, maybe adding ET to Simulator is not such a bad idea... Just adding 
the ET-observation to this code:

self.observations = {
'outTemp': Observation(magnitude=20.0,  average= 50.0, 
period=24.0, phase_lag=14.0, start=start_ts),
'inTemp' : Observation(magnitude=5.0,   average= 68.0, 
period=24.0, phase_lag=12.0, start=start_ts),
'barometer'  : Observation(magnitude=1.0,   average= 30.1, 
period=48.0, phase_lag= 0.0, start=start_ts),
'pressure'   : Observation(magnitude=1.0,   average= 30.1, 
period=48.0, phase_lag= 0.0, start=start_ts),
'windSpeed'  : Observation(magnitude=5.0,   average=  5.0, 
period=48.0, phase_lag=24.0, start=start_ts),
'windDir': Observation(magnitude=180.0, average=180.0, 
period=48.0, phase_lag= 0.0, start=start_ts),
'windGust'   : Observation(magnitude=6.0,   average=  6.0, 
period=48.0, phase_lag=24.0, start=start_ts),
'windGustDir': Observation(magnitude=180.0, average=180.0, 
period=48.0, phase_lag= 0.0, start=start_ts),
'outHumidity': Observation(magnitude=30.0,  average= 50.0, 
period=48.0, phase_lag= 0.0, start=start_ts),
'inHumidity' : Observation(magnitude=10.0,  average= 20.0, 
period=24.0, phase_lag= 0.0, start=start_ts),
'radiation'  : Solar(magnitude=1000, solar_start=6, 
solar_length=12),
'UV' : Solar(magnitude=14,   solar_start=6, 
solar_length=12),
'rain'   : Rain(rain_start=0, rain_length=3, 
total_rain=0.2, loop_interval=self.loop_interval),
'txBatteryStatus': BatteryStatus(),
'windBatteryStatus': BatteryStatus(),
'rainBatteryStatus': BatteryStatus(),
'outTempBatteryStatus': BatteryStatus(),
'inTempBatteryStatus': BatteryStatus(),
'consBatteryVoltage': BatteryVoltage(),


Op dinsdag 26 mei 2020 23:38:26 UTC+2 schreef Maarten van der Hoeven:
>
> Hi group,
>
> Having programming experience, but new to python. Want to write some piece 
> of code, that calculates the amount of precipitation shortage (rain minus 
> evaotranspiration). It's a measure of drought.
>
> Using some example coding, and extended those.
>
>
> See the piece of code below. event.record['barometer'] and 
> event.record['outTemp'] is working (used as an example, no drought-relation 
> ship); they give real values.
>
> However, event.record['ET'] gives me a KeyError. I dont understand it. It 
> is in my wview_extended schema (which I extended), its also populated in my 
> database.
>
> Why the KeyError?
>
>
> import schemas.wview_extended
> schema = {
> 'table': schemas.wview_extended.table + [('neerslagtekort', 'REAL')],
> 'day_summaries' : schemas.wview_extended.day_summaries + 
> [('neerslagtekort', 'SCALAR')]
> }
>
> import weewx.units
> weewx.units.obs_group_dict['neerslagtekort'] = 'group_rain'
>
>
> neerslag = 0
> verdamping = 0
> neerslagtekort = 0
>
> class AddElectricity(StdService):
>
> def __init__(self, engine, config_dict):
>
>   # Initialize my superclass first:
>   super(AddElectricity, self).__init__(engine, config_dict)
>
>   # Bind to any new archive record events:
>   self.bind(weewx.NEW_ARCHIVE_RECORD, self.new_archive_record)
>
>   self.last_total = None
>
> def new_archive_record(self, event):
>
>
>barometer = event.record['barometer']
>outTemp = event.record['outTemp']
>ET = event.record['ET']
>shortage = precipitation - evaporation
>
>if self.last_total:
>   event.record['neerslagtekort'] = shortage
>
>self.last_total = shortage
>print(" NEERSLAGTEKORT  ")
>print(shortage)
>
>
>
> Traceback (most recent call last):
>   File "/usr/share/weewx/weewxd", line 261, in 
> main()
>   File "/usr/share/weewx/weewxd", line 154, in main
> engine.run()
>   File "/usr/share/weewx/weewx/engine.py", line 202, in run
> self.dispatchEvent(weewx.Event(weewx.POST_LOOP))
>   File "/usr/share/weewx/weewx/engine.py", line 224, in dispatchEvent
> callback(event)
>   File "/usr/share/weewx/weewx/engine.py", line 596, in post_loop
> self._software_catchup()
>   File "/usr/share/weewx/weewx/engine.py", line 656, in _software_catchup
> self.engine.dispatchEvent(weewx.Event(weewx.NEW_ARCHIVE_RECORD,
>   File "/usr/share/weewx/weewx/engine.py", line 224, in dispatchEvent
> callback(event)
>   File "/usr/share/weewx/user/electricity.py", line 64, in 
> new_archive_record
> ET = event.record['ET']
> KeyError: 'ET'
>
>
> mysql> select from_unixtime(datetime), neerslagtekort,ET,rain from archive 
> order by datetime desc limit 5;
>
> +-+-+--+--+
> | from_unixtime(datetime) | neerslagtekort  | ET  
>  | rain |
>
> +-+-+--+--+
> | 2020-05-26 

[weewx-user] Re: event.record['ET'] throws me a KeyError. Why?

2020-05-27 Thread Maarten van der Hoeven
Hi,

thanks for the pointer. While coding and testing, I use the Simulator to 
generate loops and archive records. When I connect my real Vantage Pro to 
WeeWX, the error disappears. The station is now providing all the value, 
including ET. Simulator is not providing ET, thats for sure now.

When hooking up the Simulator again, I followed your suggestion, and moved 
my service completely to the bottom (to be sure), see below. Still no 
success, ET is still a KeyError when using the Simulator.

Is there a way to enhance the Simulator with the ET-field (so to speak), 
that you know of?


[Engine]

[[Services]]
# This section specifies the services that should be run. They are
# grouped by type, and the order of services within each group
# determines the order in which the services will be run.
prep_services = weewx.engine.StdTimeSynch
process_services = weewx.engine.StdConvert, 
weewx.engine.StdCalibrate, weewx.engine.StdQC, 
weewx.wxservices.StdWXCalculate
archive_services = weewx.engine.StdArchive
restful_services = weewx.restx.StdStationRegistry, 
weewx.restx.StdWunderground, weewx.restx.StdPWSweather, 
weewx.restx.StdCWOP, weewx.restx.StdWOW, weewx.restx.StdAWEKAS, 
user.mqtt.MQTT
report_services = weewx.engine.StdPrint, weewx.engine.StdReport
data_services = user.electricity.AddElectricity


Op woensdag 27 mei 2020 14:33:08 UTC+2 schreef gjr80:
>
> Hi,
>
> Where does your service sit in the service order in relation to 
> StdWXCalculate in weewx.conf under [Engine] [[Services]]? One possible 
> reason is that if your station does not provide field ET (not many (any?) 
> provide a numeric value in every archive record) and the StdWXCalculate 
> service then calculate ET if it can. If your service that references ET is 
> executed before StdWXCalculate then field ET will not (yet) exist in the 
> archive record. In this case the solution is put your service after 
> StdWXCalculate.
>
> Gary
>
>

-- 
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/f3c0bc2b-68dd-48fb-afc3-abaf3447c860%40googlegroups.com.


Re: [weewx-user] Re: WeeWX 4.1.0: Server uptime, extra data and plots

2020-05-27 Thread Tom Keffer
Marius, try this version of station.py.

-tk

On Wed, May 27, 2020 at 8:21 AM Marius Schamschula 
wrote:

> # python3.8 test.py
>
> 1590592851.7261915
>
> c_int(0)
>
> # python2.7 test.py
>
> 1567100.76301
>
> c_int(1589025758)
>
>
> On Wednesday, May 27, 2020 at 9:06:27 AM UTC-5, Marius Schamschula wrote:
>>
>> After some debugging, my FreeBSD server is finally running WeeWX 4.1.0
>> using Python 3.8 (instead of Python 2.7). Two things
>>
>> 1) The server uptime is no longer correct. I, getting
>>
>> Weewx uptime: 0 days, 21 hours, 5 minutes
>> Server uptime: 18409 days, 14 hours, 0 minutes
>> weewx v4.1.0
>>
>> That's longer than I've had the server
>>
>> It used to be correct (WeeWX 4.0.0 and below, using Python 2.7).
>>
>> 2) The Solar Radiation, ET and UV data and plots started showing, even
>> though my VantagePro II doesn't have those sensors installed.
>>
>> No big deal: I've just removed these items from the template.
>>
>> --
> 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/ea64d734-a472-4aa8-a857-7ec89d97c953%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/CAPq0zEAxCSzREr6b-Q2aCARGm9rNAzdg4vfk2om-_hVcNFmjgg%40mail.gmail.com.
#
#Copyright (c) 2009-2020 Tom Keffer 
#
#See the file LICENSE.txt for your full rights.
#
"""Defines (mostly static) information about a station."""
from __future__ import absolute_import
import sys
import time

import weeutil.weeutil
import weewx.units

class StationInfo(object):
"""Readonly class with static station information. It has no formatting information. Just a POS.

Attributes:

altitude_vt: Station altitude as a ValueTuple
hardware:A string holding a hardware description
rain_year_start: The start of the rain year (1=January)
latitude_f:  Floating point latitude
longitude_f: Floating point longitude
location:String holding a description of the station location
week_start:  The start of the week (0=Monday)
station_url: An URL with an informative website (if any) about the station
"""

def __init__(self, console=None, **stn_dict):
"""Extracts info from the console and stn_dict and stores it in self."""

if console and hasattr(console, "altitude_vt"):
self.altitude_vt = console.altitude_vt
else:
altitude_t = weeutil.weeutil.option_as_list(stn_dict.get('altitude', (None, None)))
try:
self.altitude_vt = weewx.units.ValueTuple(float(altitude_t[0]), altitude_t[1], "group_altitude")
except KeyError as e:
raise weewx.ViolatedPrecondition("Value 'altitude' needs a unit (%s)" % e)

if console and hasattr(console, 'hardware_name'):
self.hardware = console.hardware_name
else:
self.hardware = stn_dict.get('station_type', 'Unknown')

if console and hasattr(console, 'rain_year_start'):
self.rain_year_start = getattr(console, 'rain_year_start')
else:
self.rain_year_start = int(stn_dict.get('rain_year_start', 1))

self.latitude_f  = float(stn_dict['latitude'])
self.longitude_f = float(stn_dict['longitude'])
# Locations frequently have commas in them. Guard against ConfigObj turning it into a list:
self.location= weeutil.weeutil.list_as_string(stn_dict.get('location', 'Unknown'))
self.week_start  = int(stn_dict.get('week_start', 6))
self.station_url = stn_dict.get('station_url')
# For backwards compatibility:
self.webpath = self.station_url

class Station(object):
"""Formatted version of StationInfo."""

def __init__(self, stn_info, formatter, converter, skin_dict):

# Store away my instance of StationInfo
self.stn_info = stn_info
self.formatter = formatter
self.converter = converter

# Add a bunch of formatted attributes:
label_dict = skin_dict.get('Labels', {})
hemispheres= label_dict.get('hemispheres', ('N','S','E','W'))
latlon_formats = label_dict.get('latlon_formats')
self.latitude  = weeutil.weeutil.latlon_string(stn_info.latitude_f,
   hemispheres[0:2],

[weewx-user] Re: Ubuntu 16 installation issues

2020-05-27 Thread Francisco Puig
I used the apt-get installation method.

On Wednesday, May 27, 2020 at 3:28:25 PM UTC-4, Francisco Puig wrote:
>
> Hi all, 
>
> I'm trying to migrate my WeeWX RPi server to a Ubuntu 16 server and I'm 
> getting these errors. I have no idea where to start troubleshooting. 
>
> Traceback (most recent call last):
>
>   File "/usr/share/weewx/weewxd", line 261, in 
>
> main()
>
>   File "/usr/share/weewx/weewxd", line 154, in main
>
> engine.run()
>
>   File "/usr/share/weewx/weewx/engine.py", line 188, in run
>
> for packet in self.console.genLoopPackets():
>
>   File "/usr/share/weewx/weewx/drivers/ultimeter.py", line 131, in 
> genLoopPackets
>
> data = Station.parse_readings(readings)
>
>   File "/usr/share/weewx/weewx/drivers/ultimeter.py", line 298, in 
> parse_readings
>
> data['windSpeed'] = Station._decode(buf[0:4], 0.1 * MILE_PER_KM)  # mph
>
>   File "/usr/share/weewx/weewx/drivers/ultimeter.py", line 326, in _decode
>
> v = int(s, 16)
>
> TypeError: int() can't convert non-string with explicit base
>
>
> Any help will be appreciate.
>
> Thanks,
>
> Frank.
>

-- 
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/62188d7d-d03f-45e8-996a-b74f0a2c436c%40googlegroups.com.


[weewx-user] Ubuntu 16 installation issues

2020-05-27 Thread Francisco Puig
Hi all, 

I'm trying to migrate my WeeWX RPi server to a Ubuntu 16 server and I'm 
getting these errors. I have no idea where to start troubleshooting. 

Traceback (most recent call last):

  File "/usr/share/weewx/weewxd", line 261, in 

main()

  File "/usr/share/weewx/weewxd", line 154, in main

engine.run()

  File "/usr/share/weewx/weewx/engine.py", line 188, in run

for packet in self.console.genLoopPackets():

  File "/usr/share/weewx/weewx/drivers/ultimeter.py", line 131, in 
genLoopPackets

data = Station.parse_readings(readings)

  File "/usr/share/weewx/weewx/drivers/ultimeter.py", line 298, in 
parse_readings

data['windSpeed'] = Station._decode(buf[0:4], 0.1 * MILE_PER_KM)  # mph

  File "/usr/share/weewx/weewx/drivers/ultimeter.py", line 326, in _decode

v = int(s, 16)

TypeError: int() can't convert non-string with explicit base


Any help will be appreciate.

Thanks,

Frank.

-- 
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/99f2382a-4baa-494f-ad39-b2cb8e9d9336%40googlegroups.com.


Re: [weewx-user] FTP problems

2020-05-27 Thread Tom Keffer
Two things to try:

1. Make sure the FTP username has write permissions on the server.

2. Try different variations on the FTP path. For example,

path = public_html/weewx/# What you have
path = public_html/weewx
path = /public_html/weewx/
path = /public_html/weewx
path = weewx
path = /weewx






On Wed, May 27, 2020 at 10:02 AM Richard Cropper <
richardcropper...@gmail.com> wrote:

> Thanks Tom
>
> Yes all the files are in /var/www/html/weewx
>
> If I understand you correctly, this has more to do with the file path of
> the remote host server.
>
> I am at a loss to understand what is going on at that end.
>
> I can at least connect but I either get a message as you have seen or a
> 'broken pipe' message if I play around with the file path.
>
> I guess this is more to do with the remote server than weewx but thanks
> for your advice.
>
> Regards
>
> Richard
> On Wednesday, May 27, 2020 at 3:17:35 PM UTC+1, Tom Keffer wrote:
>>
>> Hello, Richard
>>
>> Unfortunately, the error message is misleading (and should be changed).
>> When it says
>>
>> Failed uploading public_html/weewx/monthtempfeel.png to ftp.tq7weather.uk.
>> Reason: 553 Can't open that file: No such file or directory
>>
>> what it means is it could not upload to the *target*
>> public_html/weewx/monthtempfeel.png*.* The unfortunate part is that the
>> error message doesn't give the source.
>>
>> Take a look in /var/www/html/weewx and make sure the files you expect to
>> be in there are actually in there.
>>
>> -tk
>>
>>
>> On Wed, May 27, 2020 at 5:50 AM Richard Cropper 
>> wrote:
>>
>>> Hi
>>> Having secured a connection, I still don't  seem to be able to upload
>>> files
>>>
>>> I get the following error message on the log
>>>
>>> May 27 13:30:36 raspberrypi weewx[899] ERROR weeutil.ftpupload: Attempt
>>> #1. Failed uploading public_html/weewx/monthtempfeel.png to
>>> ftp.tq7weather.uk. Reason: 553 Can't open that file: No such file or
>>> directory
>>>
>>> May 27 13:30:36 raspberrypi weewx[899] ERROR weeutil.ftpupload: Attempt
>>> #2. Failed uploading public_html/weewx/monthtempfeel.png to
>>> ftp.tq7weather.uk. Reason: 553 Can't open that file: No such file or
>>> directory
>>>
>>> May 27 13:30:37 raspberrypi weewx[899] ERROR weeutil.ftpupload: Attempt
>>> #3. Failed uploading public_html/weewx/monthtempfeel.png to
>>> ftp.tq7weather.uk. Reason: 553 Can't open that file: No such file or
>>> directory
>>>
>>> May 27 13:30:37 raspberrypi weewx[899] ERROR weeutil.ftpupload: Failed
>>> to upload file public_html/weewx/monthtempfeel.png
>>>
>>> May 27 13:30:37 raspberrypi weewx[899] ERROR weeutil.ftpupload: Attempt
>>> #1. Failed uploading public_html/weewx/yearwind.png to ftp.tq7weather.uk.
>>> Reason: 553 Can't open that file: No such file or directory
>>>
>>> May 27 13:30:38 raspberrypi weewx[899] ERROR weeutil.ftpupload: Attempt
>>> #2. Failed uploading public_html/weewx/yearwind.png to ftp.tq7weather.uk.
>>> Reason: 553 Can't open that file: No such file or directory
>>>
>>> May 27 13:30:38 raspberrypi weewx[899] ERROR weeutil.ftpupload: Attempt
>>> #3. Failed uploading public_html/weewx/yearwind.png to ftp.tq7weather.uk.
>>> Reason: 553 Can't open that file: No such file or directory
>>>
>>> May 27 13:30:38 raspberrypi weewx[899] ERROR weeutil.ftpupload: Failed
>>> to upload file public_html/weewx/yearwind.png
>>>
>>> May 27 13:30:39 raspberrypi weewx[899] ERROR weeutil.ftpupload: Attempt
>>> #1. Failed uploading public_html/weewx/statistics.html to
>>> ftp.tq7weather.uk. Reason: 553 Can't open that file: No such file or
>>> directory
>>>
>>> May 27 13:30:39 raspberrypi weewx[899] ERROR weeutil.ftpupload: Attempt
>>> #2. Failed uploading public_html/weewx/statistics.html to
>>> ftp.tq7weather.uk. Reason: 553 Can't open that file: No such file or
>>> directory
>>>
>>> May 27 13:30:40 raspberrypi weewx[899] ERROR weeutil.ftpupload: Attempt
>>> #3. Failed uploading public_html/weewx/statistics.html to
>>> ftp.tq7weather.uk. Reason: 553 Can't open that file: No such file or
>>> directory
>>>
>>> May 27 13:30:40 raspberrypi weewx[899] ERROR weeutil.ftpupload: Failed
>>> to upload file public_html/weewx/statistics.html
>>>
>>> May 27 13:30:41 raspberrypi weewx[899] ERROR weeutil.ftpupload: Attempt
>>> #1. Failed uploading public_html/weewx/weekbarometer.png to
>>> ftp.tq7weather.uk. Reason: 553 Can't open that file: No such file or
>>> directory
>>>
>>>
>>> Here's the relevant bit of my weewx.conf:
>>>
>>>
>>>  [[FTP]]
>>>
>>> # FTP'ing the results to a webserver is treated as just another
>>> report,
>>>
>>> # albeit one with an unusual report generator!
>>>
>>> skin = Ftp
>>>
>>>
>>> # If you wish to use FTP, set "enable" to "true", then
>>>
>>> # fill out the next four lines.
>>>
>>> # Use quotes around passwords to guard against parsing errors.
>>>
>>> enable = true
>>>
>>> user =[user name]
>>>
>>> password = [password]
>>>
>>> server =  [server name]# T

[weewx-user] Re: wee_extension inigo-data.txt is not generated

2020-05-27 Thread Ronald Berghammer
I test it and it works fine.

Thank you very much 😀😎

-- 
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/0039d89b-a34c-4981-bc81-7562dd241430%40googlegroups.com.


[weewx-user] Installattion of tfrec on Raspberry PI with Raspbian Buster

2020-05-27 Thread Luc Heijst


See readme file of https://github.com/matthewwall/weewx-tfrc


For Raspbian Stretch and Raspbian Buster these are the steps:


sudo apt-get install clang cmake git pkg-config librtlsdr-dev -y


b) install rtl-sdr:

cd /home/weewx

git clone https://github.com/steve-m/librtlsdr.git

cd librtlsdr

mkdir build

cd build

cmake ../ -DINSTALL_UDEV_RULES=ON

make

sudo make install

sudo ldconfig


c) install tfrc:

cd /home/weewx

sudo git clone https://github.com/baycom/tfrec.git

cd tfrec


For Rapbbian Stretch

Compile tfrec source:

For RasPI3 use:

sudo make -f Makefile.arm

for RasPI 2 or Zero:

make -f Makefile.raspi2


For Raspbian Buster:

Note: In Raspbian Buster the make command gets undefined reference errors 
like:

/usr/bin/ld: sdr.o: in function `sdr::read_thread()':

sdr.cpp:(.text+0xd8): undefined reference to `rtlsdr_read_async'


The followings steps will fix this error: 


1. modify file /home/weewx/librtlsdr/build/librtlsdr.pc


Change the first four lines:

prefix=

exec_prefix=

libdir=

includedir=

into:

prefix=/usr/local

exec_prefix=${prefix}

libdir=${exec_prefix}/lib

includedir=${prefix}/include


2. modify file /home/weewx/tfrec/Makefile.arm 

(or file /home/weewx/tfrec/Makefile.raspi2 for RasPI 2 or Zero)


Change the first line:

PACKAGES= librtlsdr

into:

PACKAGES= /home/weewx/librtlsdr/build/librtlsdr.pc


3. repeat the make command

sudo make -f Makefile.arm

Now the make command will finish without errors


Test tfrec:

/home/weewx/tfrec/tfrec -D -T 1


Luc

-- 
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/9b70d249-95fa-4ca4-b71b-a61f38166983%40googlegroups.com.


Re: [weewx-user] FTP problems

2020-05-27 Thread Richard Cropper
Thanks Tom

Yes all the files are in /var/www/html/weewx 

If I understand you correctly, this has more to do with the file path of 
the remote host server.

I am at a loss to understand what is going on at that end.

I can at least connect but I either get a message as you have seen or a 
'broken pipe' message if I play around with the file path.

I guess this is more to do with the remote server than weewx but thanks for 
your advice.

Regards

Richard
On Wednesday, May 27, 2020 at 3:17:35 PM UTC+1, Tom Keffer wrote:
>
> Hello, Richard
>
> Unfortunately, the error message is misleading (and should be changed). 
> When it says
>
> Failed uploading public_html/weewx/monthtempfeel.png to ftp.tq7weather.uk. 
> Reason: 553 Can't open that file: No such file or directory
>
> what it means is it could not upload to the *target* 
> public_html/weewx/monthtempfeel.png*.* The unfortunate part is that the 
> error message doesn't give the source.
>
> Take a look in /var/www/html/weewx and make sure the files you expect to 
> be in there are actually in there.
>
> -tk
>
>
> On Wed, May 27, 2020 at 5:50 AM Richard Cropper  > wrote:
>
>> Hi
>> Having secured a connection, I still don't  seem to be able to upload 
>> files
>>
>> I get the following error message on the log
>>
>> May 27 13:30:36 raspberrypi weewx[899] ERROR weeutil.ftpupload: Attempt 
>> #1. Failed uploading public_html/weewx/monthtempfeel.png to 
>> ftp.tq7weather.uk. Reason: 553 Can't open that file: No such file or 
>> directory
>>
>> May 27 13:30:36 raspberrypi weewx[899] ERROR weeutil.ftpupload: Attempt 
>> #2. Failed uploading public_html/weewx/monthtempfeel.png to 
>> ftp.tq7weather.uk. Reason: 553 Can't open that file: No such file or 
>> directory
>>
>> May 27 13:30:37 raspberrypi weewx[899] ERROR weeutil.ftpupload: Attempt 
>> #3. Failed uploading public_html/weewx/monthtempfeel.png to 
>> ftp.tq7weather.uk. Reason: 553 Can't open that file: No such file or 
>> directory
>>
>> May 27 13:30:37 raspberrypi weewx[899] ERROR weeutil.ftpupload: Failed to 
>> upload file public_html/weewx/monthtempfeel.png
>>
>> May 27 13:30:37 raspberrypi weewx[899] ERROR weeutil.ftpupload: Attempt 
>> #1. Failed uploading public_html/weewx/yearwind.png to ftp.tq7weather.uk. 
>> Reason: 553 Can't open that file: No such file or directory
>>
>> May 27 13:30:38 raspberrypi weewx[899] ERROR weeutil.ftpupload: Attempt 
>> #2. Failed uploading public_html/weewx/yearwind.png to ftp.tq7weather.uk. 
>> Reason: 553 Can't open that file: No such file or directory
>>
>> May 27 13:30:38 raspberrypi weewx[899] ERROR weeutil.ftpupload: Attempt 
>> #3. Failed uploading public_html/weewx/yearwind.png to ftp.tq7weather.uk. 
>> Reason: 553 Can't open that file: No such file or directory
>>
>> May 27 13:30:38 raspberrypi weewx[899] ERROR weeutil.ftpupload: Failed to 
>> upload file public_html/weewx/yearwind.png
>>
>> May 27 13:30:39 raspberrypi weewx[899] ERROR weeutil.ftpupload: Attempt 
>> #1. Failed uploading public_html/weewx/statistics.html to 
>> ftp.tq7weather.uk. Reason: 553 Can't open that file: No such file or 
>> directory
>>
>> May 27 13:30:39 raspberrypi weewx[899] ERROR weeutil.ftpupload: Attempt 
>> #2. Failed uploading public_html/weewx/statistics.html to 
>> ftp.tq7weather.uk. Reason: 553 Can't open that file: No such file or 
>> directory
>>
>> May 27 13:30:40 raspberrypi weewx[899] ERROR weeutil.ftpupload: Attempt 
>> #3. Failed uploading public_html/weewx/statistics.html to 
>> ftp.tq7weather.uk. Reason: 553 Can't open that file: No such file or 
>> directory
>>
>> May 27 13:30:40 raspberrypi weewx[899] ERROR weeutil.ftpupload: Failed to 
>> upload file public_html/weewx/statistics.html
>>
>> May 27 13:30:41 raspberrypi weewx[899] ERROR weeutil.ftpupload: Attempt 
>> #1. Failed uploading public_html/weewx/weekbarometer.png to 
>> ftp.tq7weather.uk. Reason: 553 Can't open that file: No such file or 
>> directory
>>
>>
>> Here's the relevant bit of my weewx.conf:
>>
>>
>>  [[FTP]]
>>
>> # FTP'ing the results to a webserver is treated as just another 
>> report,
>>
>> # albeit one with an unusual report generator!
>>
>> skin = Ftp
>>
>>
>> # If you wish to use FTP, set "enable" to "true", then
>>
>> # fill out the next four lines.
>>
>> # Use quotes around passwords to guard against parsing errors.
>>
>> enable = true
>>
>> user =[user name]
>>
>> password = [password]
>>
>> server =  [server name]# The ftp server name, e.g, 
>> www.myserver.org
>>
>> path = public_html/weewx/# The destination directory, e.g., 
>> /weather
>>
>>
>> # Set to True for an FTP over TLS (FTPS) connection. Not all 
>> servers
>>
>> # support this.
>>
>> secure_ftp = True
>>
>> secure_data = True
>>
>>
>># To upload files from something other than what HTML_ROOT is set
>>
>> # to above, specify a different HTML_ROOT here.
>>
>>  HTML_ROOT =

[weewx-user] TE923 Nexus: daily max. wind gust on WU and weewx website

2020-05-27 Thread Felix Maltzahn
Hello,

I have a little problem with my RPI and TE923 TFA Nexus...

The daily max wind gust (shown on the weather stations display) is all time 
much higher than the value uploaded on WU, PWS, Awekas or on the weewx 
generated website.
The archive interval is set to 60 seconds. The update intval on the TE923 
for wind data is 33 seconds. I think a lot of gusts are simply missed... 
Is there any solution available?

With wee_device --minmax I can read the correct daily max gust value... But 
how can I use this for my website and for my upload to WU, Awekas etc??


-- 
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/c7ddd1b3-8f74-4ba6-a161-176f693ccedb%40googlegroups.com.


Re: [weewx-user] FTP problems

2020-05-27 Thread Richard Cropper
Thanks Tom

Yes all the files are in /var/www/html/weewx 

If I understand you correctly, this has more to do with the file path of 
the remote host server.

I am at a loss to understand what is going on at that end.

I upload my webcam pic every five minutes using curl but if I use the same 
credentials on weewx.conf, I get a "login authentication failed" message. 

By setting up a separate ftp account with  a different login but otherwise 
the same , I can at least connect but I either get a message as you have 
seen or a 'broken pipe' message if I play around with the file path.

I guess this is more to do with the remote server than weewx but thanks for 
your advice.

Regards

Richard

On Wednesday, May 27, 2020 at 3:17:35 PM UTC+1, Tom Keffer wrote:
>
> Hello, Richard
>
> Unfortunately, the error message is misleading (and should be changed). 
> When it says
>
> Failed uploading public_html/weewx/monthtempfeel.png to ftp.tq7weather.uk. 
> Reason: 553 Can't open that file: No such file or directory
>
> what it means is it could not upload to the *target* 
> public_html/weewx/monthtempfeel.png*.* The unfortunate part is that the 
> error message doesn't give the source.
>
> Take a look in /var/www/html/weewx and make sure the files you expect to 
> be in there are actually in there.
>
> -tk
>
>
> On Wed, May 27, 2020 at 5:50 AM Richard Cropper  > wrote:
>
>> Hi
>> Having secured a connection, I still don't  seem to be able to upload 
>> files
>>
>> I get the following error message on the log
>>
>> May 27 13:30:36 raspberrypi weewx[899] ERROR weeutil.ftpupload: Attempt 
>> #1. Failed uploading public_html/weewx/monthtempfeel.png to 
>> ftp.tq7weather.uk. Reason: 553 Can't open that file: No such file or 
>> directory
>>
>> May 27 13:30:36 raspberrypi weewx[899] ERROR weeutil.ftpupload: Attempt 
>> #2. Failed uploading public_html/weewx/monthtempfeel.png to 
>> ftp.tq7weather.uk. Reason: 553 Can't open that file: No such file or 
>> directory
>>
>> May 27 13:30:37 raspberrypi weewx[899] ERROR weeutil.ftpupload: Attempt 
>> #3. Failed uploading public_html/weewx/monthtempfeel.png to 
>> ftp.tq7weather.uk. Reason: 553 Can't open that file: No such file or 
>> directory
>>
>> May 27 13:30:37 raspberrypi weewx[899] ERROR weeutil.ftpupload: Failed to 
>> upload file public_html/weewx/monthtempfeel.png
>>
>> May 27 13:30:37 raspberrypi weewx[899] ERROR weeutil.ftpupload: Attempt 
>> #1. Failed uploading public_html/weewx/yearwind.png to ftp.tq7weather.uk. 
>> Reason: 553 Can't open that file: No such file or directory
>>
>> May 27 13:30:38 raspberrypi weewx[899] ERROR weeutil.ftpupload: Attempt 
>> #2. Failed uploading public_html/weewx/yearwind.png to ftp.tq7weather.uk. 
>> Reason: 553 Can't open that file: No such file or directory
>>
>> May 27 13:30:38 raspberrypi weewx[899] ERROR weeutil.ftpupload: Attempt 
>> #3. Failed uploading public_html/weewx/yearwind.png to ftp.tq7weather.uk. 
>> Reason: 553 Can't open that file: No such file or directory
>>
>> May 27 13:30:38 raspberrypi weewx[899] ERROR weeutil.ftpupload: Failed to 
>> upload file public_html/weewx/yearwind.png
>>
>> May 27 13:30:39 raspberrypi weewx[899] ERROR weeutil.ftpupload: Attempt 
>> #1. Failed uploading public_html/weewx/statistics.html to 
>> ftp.tq7weather.uk. Reason: 553 Can't open that file: No such file or 
>> directory
>>
>> May 27 13:30:39 raspberrypi weewx[899] ERROR weeutil.ftpupload: Attempt 
>> #2. Failed uploading public_html/weewx/statistics.html to 
>> ftp.tq7weather.uk. Reason: 553 Can't open that file: No such file or 
>> directory
>>
>> May 27 13:30:40 raspberrypi weewx[899] ERROR weeutil.ftpupload: Attempt 
>> #3. Failed uploading public_html/weewx/statistics.html to 
>> ftp.tq7weather.uk. Reason: 553 Can't open that file: No such file or 
>> directory
>>
>> May 27 13:30:40 raspberrypi weewx[899] ERROR weeutil.ftpupload: Failed to 
>> upload file public_html/weewx/statistics.html
>>
>> May 27 13:30:41 raspberrypi weewx[899] ERROR weeutil.ftpupload: Attempt 
>> #1. Failed uploading public_html/weewx/weekbarometer.png to 
>> ftp.tq7weather.uk. Reason: 553 Can't open that file: No such file or 
>> directory
>>
>>
>> Here's the relevant bit of my weewx.conf:
>>
>>
>>  [[FTP]]
>>
>> # FTP'ing the results to a webserver is treated as just another 
>> report,
>>
>> # albeit one with an unusual report generator!
>>
>> skin = Ftp
>>
>>
>> # If you wish to use FTP, set "enable" to "true", then
>>
>> # fill out the next four lines.
>>
>> # Use quotes around passwords to guard against parsing errors.
>>
>> enable = true
>>
>> user =[user name]
>>
>> password = [password]
>>
>> server =  [server name]# The ftp server name, e.g, 
>> www.myserver.org
>>
>> path = public_html/weewx/# The destination directory, e.g., 
>> /weather
>>
>>
>> # Set to True for an FTP over TLS (FTPS) connection. Not all 
>> servers
>>
>> # support t

[weewx-user] Re: sftp on 3.9.2, RPI3B -- **still** not working with several methods

2020-05-27 Thread Rob Cranfill
Dear Mr or Ms Potamia, ;-)

I have code that I hacked into the standard Weewx base that implements proper 
sftp. If you would like a copy I can send it to you. (And anyone else who’d 
like a copy.) Just one modified file. 

/rob 

-- 
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/c5343073-bb74-4002-a42c-f8da9b76bfed%40googlegroups.com.


[weewx-user] Re: WeeWX 4.1.0: Server uptime, extra data and plots

2020-05-27 Thread Marius Schamschula


# python3.8 test.py 

1590592851.7261915

c_int(0)

# python2.7 test.py 

1567100.76301

c_int(1589025758)


On Wednesday, May 27, 2020 at 9:06:27 AM UTC-5, Marius Schamschula wrote:
>
> After some debugging, my FreeBSD server is finally running WeeWX 4.1.0 
> using Python 3.8 (instead of Python 2.7). Two things
>
> 1) The server uptime is no longer correct. I, getting
>
> Weewx uptime: 0 days, 21 hours, 5 minutes
> Server uptime: 18409 days, 14 hours, 0 minutes
> weewx v4.1.0
>
> That's longer than I've had the server
>
> It used to be correct (WeeWX 4.0.0 and below, using Python 2.7).
>
> 2) The Solar Radiation, ET and UV data and plots started showing, even 
> though my VantagePro II doesn't have those sensors installed.
>
> No big deal: I've just removed these items from the template.
>
>

-- 
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/ea64d734-a472-4aa8-a857-7ec89d97c953%40googlegroups.com.


[weewx-user] Confusion on installing Weewx 4.1

2020-05-27 Thread michael form
Hello:

I am confused about what is necessary to install Weewx 4.1 using Python 3. 
I have seen many problems with people trying to do this using a *1-Wire 
interface* like I am using on a Raspberry Pi, running Buster. Others seemed 
to have better luck installing Weewx using Python 2. I am a hardware 
designer, not a Linux expert, so that might be the problem. :)

With the help of this user group (especially Glenn) I am currently running 
Weewx 3.9 using Python 2.7 on a pair of Raspberry Pi's.Thanks to everyone.

1. Can Weewx 4.1 be installed using Python 3 using the *1-Wire *interface?* 
If so, any special steps?* I tried following the Installation Guide to 
install on a test Ubuntu system but got errors about Cheetah 3 not found 
(or something like that).

2. What is the benefit of using Python 3 rather than Python 2 (other than 3 
is supported)?

Thanks in advance for any help.

Michael Form

-- 
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/229cfec7-4245-471f-ad5c-871504e020dc%40googlegroups.com.


Re: [weewx-user] WeeWX 4.1.0: Server uptime, extra data and plots

2020-05-27 Thread Tom Keffer
Could you try running the following under Python 3.8 and Python 2.7? Thanks!

import ctypes
from ctypes.util import find_library

libc = ctypes.CDLL(find_library('c'))
size = ctypes.c_size_t()
buf = ctypes.c_int()
size.value = ctypes.sizeof(buf)
libc.sysctlbyname("kern.boottime", ctypes.byref(buf), ctypes.byref(size),
None, 0)
os_uptime_secs = time.time() - float(buf.value)
print(os_uptime_secs)
print(buf)

-tk



On Wed, May 27, 2020 at 7:06 AM Marius Schamschula 
wrote:

> After some debugging, my FreeBSD server is finally running WeeWX 4.1.0
> using Python 3.8 (instead of Python 2.7). Two things
>
> 1) The server uptime is no longer correct. I, getting
>
> Weewx uptime: 0 days, 21 hours, 5 minutes
> Server uptime: 18409 days, 14 hours, 0 minutes
> weewx v4.1.0
>
> That's longer than I've had the server
>
> It used to be correct (WeeWX 4.0.0 and below, using Python 2.7).
>
> 2) The Solar Radiation, ET and UV data and plots started showing, even
> though my VantagePro II doesn't have those sensors installed.
>
> No big deal: I've just removed these items from the template.
>
> --
> 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/9388f157-8302-499b-99da-fb99db9c1f14%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/CAPq0zEDUPfL_%2BvgXAVEZv8Yo_gPNF54Fo6mCEF%3D%2BKmqYAUCBpw%40mail.gmail.com.


Re: [weewx-user] FTP problems

2020-05-27 Thread Tom Keffer
Fixed in commit 7ac6eaf

.

On Wed, May 27, 2020 at 7:17 AM Tom Keffer  wrote:

> Hello, Richard
>
> Unfortunately, the error message is misleading (and should be changed).
> When it says
>
> Failed uploading public_html/weewx/monthtempfeel.png to ftp.tq7weather.uk.
> Reason: 553 Can't open that file: No such file or directory
>
> what it means is it could not upload to the *target*
> public_html/weewx/monthtempfeel.png*.* The unfortunate part is that the
> error message doesn't give the source.
>
> Take a look in /var/www/html/weewx and make sure the files you expect to
> be in there are actually in there.
>
> -tk
>
>
> On Wed, May 27, 2020 at 5:50 AM Richard Cropper <
> richardcropper...@gmail.com> wrote:
>
>> Hi
>> Having secured a connection, I still don't  seem to be able to upload
>> files
>>
>> I get the following error message on the log
>>
>> May 27 13:30:36 raspberrypi weewx[899] ERROR weeutil.ftpupload: Attempt
>> #1. Failed uploading public_html/weewx/monthtempfeel.png to
>> ftp.tq7weather.uk. Reason: 553 Can't open that file: No such file or
>> directory
>>
>> May 27 13:30:36 raspberrypi weewx[899] ERROR weeutil.ftpupload: Attempt
>> #2. Failed uploading public_html/weewx/monthtempfeel.png to
>> ftp.tq7weather.uk. Reason: 553 Can't open that file: No such file or
>> directory
>>
>> May 27 13:30:37 raspberrypi weewx[899] ERROR weeutil.ftpupload: Attempt
>> #3. Failed uploading public_html/weewx/monthtempfeel.png to
>> ftp.tq7weather.uk. Reason: 553 Can't open that file: No such file or
>> directory
>>
>> May 27 13:30:37 raspberrypi weewx[899] ERROR weeutil.ftpupload: Failed to
>> upload file public_html/weewx/monthtempfeel.png
>>
>> May 27 13:30:37 raspberrypi weewx[899] ERROR weeutil.ftpupload: Attempt
>> #1. Failed uploading public_html/weewx/yearwind.png to ftp.tq7weather.uk.
>> Reason: 553 Can't open that file: No such file or directory
>>
>> May 27 13:30:38 raspberrypi weewx[899] ERROR weeutil.ftpupload: Attempt
>> #2. Failed uploading public_html/weewx/yearwind.png to ftp.tq7weather.uk.
>> Reason: 553 Can't open that file: No such file or directory
>>
>> May 27 13:30:38 raspberrypi weewx[899] ERROR weeutil.ftpupload: Attempt
>> #3. Failed uploading public_html/weewx/yearwind.png to ftp.tq7weather.uk.
>> Reason: 553 Can't open that file: No such file or directory
>>
>> May 27 13:30:38 raspberrypi weewx[899] ERROR weeutil.ftpupload: Failed to
>> upload file public_html/weewx/yearwind.png
>>
>> May 27 13:30:39 raspberrypi weewx[899] ERROR weeutil.ftpupload: Attempt
>> #1. Failed uploading public_html/weewx/statistics.html to
>> ftp.tq7weather.uk. Reason: 553 Can't open that file: No such file or
>> directory
>>
>> May 27 13:30:39 raspberrypi weewx[899] ERROR weeutil.ftpupload: Attempt
>> #2. Failed uploading public_html/weewx/statistics.html to
>> ftp.tq7weather.uk. Reason: 553 Can't open that file: No such file or
>> directory
>>
>> May 27 13:30:40 raspberrypi weewx[899] ERROR weeutil.ftpupload: Attempt
>> #3. Failed uploading public_html/weewx/statistics.html to
>> ftp.tq7weather.uk. Reason: 553 Can't open that file: No such file or
>> directory
>>
>> May 27 13:30:40 raspberrypi weewx[899] ERROR weeutil.ftpupload: Failed to
>> upload file public_html/weewx/statistics.html
>>
>> May 27 13:30:41 raspberrypi weewx[899] ERROR weeutil.ftpupload: Attempt
>> #1. Failed uploading public_html/weewx/weekbarometer.png to
>> ftp.tq7weather.uk. Reason: 553 Can't open that file: No such file or
>> directory
>>
>>
>> Here's the relevant bit of my weewx.conf:
>>
>>
>>  [[FTP]]
>>
>> # FTP'ing the results to a webserver is treated as just another
>> report,
>>
>> # albeit one with an unusual report generator!
>>
>> skin = Ftp
>>
>>
>> # If you wish to use FTP, set "enable" to "true", then
>>
>> # fill out the next four lines.
>>
>> # Use quotes around passwords to guard against parsing errors.
>>
>> enable = true
>>
>> user =[user name]
>>
>> password = [password]
>>
>> server =  [server name]# The ftp server name, e.g,
>> www.myserver.org
>>
>> path = public_html/weewx/# The destination directory, e.g.,
>> /weather
>>
>>
>> # Set to True for an FTP over TLS (FTPS) connection. Not all
>> servers
>>
>> # support this.
>>
>> secure_ftp = True
>>
>> secure_data = True
>>
>>
>># To upload files from something other than what HTML_ROOT is set
>>
>> # to above, specify a different HTML_ROOT here.
>>
>>  HTML_ROOT = /var/www/html/weewx/
>>
>>
>> # Most FTP servers use port 21
>>
>> port = 21
>>
>>
>> # Set to 1 to use passive mode, zero for active mode
>>
>> passive = 1
>>
>>
>> The connection is FTP over TLS.
>>
>>
>> My weather data is from an Aercus Weather Sleuth using interceptor on a
>> Raspberry pi.
>>
>>
>> It's as if FTP is looking for the wrong

Re: [weewx-user] FTP problems

2020-05-27 Thread Tom Keffer
Hello, Richard

Unfortunately, the error message is misleading (and should be changed).
When it says

Failed uploading public_html/weewx/monthtempfeel.png to ftp.tq7weather.uk.
Reason: 553 Can't open that file: No such file or directory

what it means is it could not upload to the *target*
public_html/weewx/monthtempfeel.png*.* The unfortunate part is that the
error message doesn't give the source.

Take a look in /var/www/html/weewx and make sure the files you expect to be
in there are actually in there.

-tk


On Wed, May 27, 2020 at 5:50 AM Richard Cropper 
wrote:

> Hi
> Having secured a connection, I still don't  seem to be able to upload files
>
> I get the following error message on the log
>
> May 27 13:30:36 raspberrypi weewx[899] ERROR weeutil.ftpupload: Attempt
> #1. Failed uploading public_html/weewx/monthtempfeel.png to
> ftp.tq7weather.uk. Reason: 553 Can't open that file: No such file or
> directory
>
> May 27 13:30:36 raspberrypi weewx[899] ERROR weeutil.ftpupload: Attempt
> #2. Failed uploading public_html/weewx/monthtempfeel.png to
> ftp.tq7weather.uk. Reason: 553 Can't open that file: No such file or
> directory
>
> May 27 13:30:37 raspberrypi weewx[899] ERROR weeutil.ftpupload: Attempt
> #3. Failed uploading public_html/weewx/monthtempfeel.png to
> ftp.tq7weather.uk. Reason: 553 Can't open that file: No such file or
> directory
>
> May 27 13:30:37 raspberrypi weewx[899] ERROR weeutil.ftpupload: Failed to
> upload file public_html/weewx/monthtempfeel.png
>
> May 27 13:30:37 raspberrypi weewx[899] ERROR weeutil.ftpupload: Attempt
> #1. Failed uploading public_html/weewx/yearwind.png to ftp.tq7weather.uk.
> Reason: 553 Can't open that file: No such file or directory
>
> May 27 13:30:38 raspberrypi weewx[899] ERROR weeutil.ftpupload: Attempt
> #2. Failed uploading public_html/weewx/yearwind.png to ftp.tq7weather.uk.
> Reason: 553 Can't open that file: No such file or directory
>
> May 27 13:30:38 raspberrypi weewx[899] ERROR weeutil.ftpupload: Attempt
> #3. Failed uploading public_html/weewx/yearwind.png to ftp.tq7weather.uk.
> Reason: 553 Can't open that file: No such file or directory
>
> May 27 13:30:38 raspberrypi weewx[899] ERROR weeutil.ftpupload: Failed to
> upload file public_html/weewx/yearwind.png
>
> May 27 13:30:39 raspberrypi weewx[899] ERROR weeutil.ftpupload: Attempt
> #1. Failed uploading public_html/weewx/statistics.html to
> ftp.tq7weather.uk. Reason: 553 Can't open that file: No such file or
> directory
>
> May 27 13:30:39 raspberrypi weewx[899] ERROR weeutil.ftpupload: Attempt
> #2. Failed uploading public_html/weewx/statistics.html to
> ftp.tq7weather.uk. Reason: 553 Can't open that file: No such file or
> directory
>
> May 27 13:30:40 raspberrypi weewx[899] ERROR weeutil.ftpupload: Attempt
> #3. Failed uploading public_html/weewx/statistics.html to
> ftp.tq7weather.uk. Reason: 553 Can't open that file: No such file or
> directory
>
> May 27 13:30:40 raspberrypi weewx[899] ERROR weeutil.ftpupload: Failed to
> upload file public_html/weewx/statistics.html
>
> May 27 13:30:41 raspberrypi weewx[899] ERROR weeutil.ftpupload: Attempt
> #1. Failed uploading public_html/weewx/weekbarometer.png to
> ftp.tq7weather.uk. Reason: 553 Can't open that file: No such file or
> directory
>
>
> Here's the relevant bit of my weewx.conf:
>
>
>  [[FTP]]
>
> # FTP'ing the results to a webserver is treated as just another
> report,
>
> # albeit one with an unusual report generator!
>
> skin = Ftp
>
>
> # If you wish to use FTP, set "enable" to "true", then
>
> # fill out the next four lines.
>
> # Use quotes around passwords to guard against parsing errors.
>
> enable = true
>
> user =[user name]
>
> password = [password]
>
> server =  [server name]# The ftp server name, e.g,
> www.myserver.org
>
> path = public_html/weewx/# The destination directory, e.g.,
> /weather
>
>
> # Set to True for an FTP over TLS (FTPS) connection. Not all
> servers
>
> # support this.
>
> secure_ftp = True
>
> secure_data = True
>
>
># To upload files from something other than what HTML_ROOT is set
>
> # to above, specify a different HTML_ROOT here.
>
>  HTML_ROOT = /var/www/html/weewx/
>
>
> # Most FTP servers use port 21
>
> port = 21
>
>
> # Set to 1 to use passive mode, zero for active mode
>
> passive = 1
>
>
> The connection is FTP over TLS.
>
>
> My weather data is from an Aercus Weather Sleuth using interceptor on a
> Raspberry pi.
>
>
> It's as if FTP is looking for the wrong path on my  pi but maybe I
> misunderstand the error message. That's why I tried removing the hash
> before HTML_ROOT but I got the same result with the hash.
>
>
> Otherwise very pleased with weewx  which I can view on my pi using nginx
>
>
> Any help gratefully received.
>
>
> Richard
>
>
> --
> You received this message because you are subscribed to 

[weewx-user] WeeWX 4.1.0: Server uptime, extra data and plots

2020-05-27 Thread Marius Schamschula
After some debugging, my FreeBSD server is finally running WeeWX 4.1.0 
using Python 3.8 (instead of Python 2.7). Two things

1) The server uptime is no longer correct. I, getting

Weewx uptime: 0 days, 21 hours, 5 minutes
Server uptime: 18409 days, 14 hours, 0 minutes
weewx v4.1.0

That's longer than I've had the server

It used to be correct (WeeWX 4.0.0 and below, using Python 2.7).

2) The Solar Radiation, ET and UV data and plots started showing, even 
though my VantagePro II doesn't have those sensors installed.

No big deal: I've just removed these items from the template.

-- 
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/9388f157-8302-499b-99da-fb99db9c1f14%40googlegroups.com.


[weewx-user] FTP problems

2020-05-27 Thread Richard Cropper
Hi
Having secured a connection, I still don't  seem to be able to upload files

I get the following error message on the log

May 27 13:30:36 raspberrypi weewx[899] ERROR weeutil.ftpupload: Attempt #1. 
Failed uploading public_html/weewx/monthtempfeel.png to ftp.tq7weather.uk. 
Reason: 553 Can't open that file: No such file or directory

May 27 13:30:36 raspberrypi weewx[899] ERROR weeutil.ftpupload: Attempt #2. 
Failed uploading public_html/weewx/monthtempfeel.png to ftp.tq7weather.uk. 
Reason: 553 Can't open that file: No such file or directory

May 27 13:30:37 raspberrypi weewx[899] ERROR weeutil.ftpupload: Attempt #3. 
Failed uploading public_html/weewx/monthtempfeel.png to ftp.tq7weather.uk. 
Reason: 553 Can't open that file: No such file or directory

May 27 13:30:37 raspberrypi weewx[899] ERROR weeutil.ftpupload: Failed to 
upload file public_html/weewx/monthtempfeel.png

May 27 13:30:37 raspberrypi weewx[899] ERROR weeutil.ftpupload: Attempt #1. 
Failed uploading public_html/weewx/yearwind.png to ftp.tq7weather.uk. 
Reason: 553 Can't open that file: No such file or directory

May 27 13:30:38 raspberrypi weewx[899] ERROR weeutil.ftpupload: Attempt #2. 
Failed uploading public_html/weewx/yearwind.png to ftp.tq7weather.uk. 
Reason: 553 Can't open that file: No such file or directory

May 27 13:30:38 raspberrypi weewx[899] ERROR weeutil.ftpupload: Attempt #3. 
Failed uploading public_html/weewx/yearwind.png to ftp.tq7weather.uk. 
Reason: 553 Can't open that file: No such file or directory

May 27 13:30:38 raspberrypi weewx[899] ERROR weeutil.ftpupload: Failed to 
upload file public_html/weewx/yearwind.png

May 27 13:30:39 raspberrypi weewx[899] ERROR weeutil.ftpupload: Attempt #1. 
Failed uploading public_html/weewx/statistics.html to ftp.tq7weather.uk. 
Reason: 553 Can't open that file: No such file or directory

May 27 13:30:39 raspberrypi weewx[899] ERROR weeutil.ftpupload: Attempt #2. 
Failed uploading public_html/weewx/statistics.html to ftp.tq7weather.uk. 
Reason: 553 Can't open that file: No such file or directory

May 27 13:30:40 raspberrypi weewx[899] ERROR weeutil.ftpupload: Attempt #3. 
Failed uploading public_html/weewx/statistics.html to ftp.tq7weather.uk. 
Reason: 553 Can't open that file: No such file or directory

May 27 13:30:40 raspberrypi weewx[899] ERROR weeutil.ftpupload: Failed to 
upload file public_html/weewx/statistics.html

May 27 13:30:41 raspberrypi weewx[899] ERROR weeutil.ftpupload: Attempt #1. 
Failed uploading public_html/weewx/weekbarometer.png to ftp.tq7weather.uk. 
Reason: 553 Can't open that file: No such file or directory


Here's the relevant bit of my weewx.conf:


 [[FTP]]

# FTP'ing the results to a webserver is treated as just another 
report,

# albeit one with an unusual report generator!

skin = Ftp


# If you wish to use FTP, set "enable" to "true", then

# fill out the next four lines.

# Use quotes around passwords to guard against parsing errors.

enable = true

user =[user name]

password = [password]

server =  [server name]# The ftp server name, e.g, 
www.myserver.org

path = public_html/weewx/# The destination directory, e.g., 
/weather


# Set to True for an FTP over TLS (FTPS) connection. Not all servers

# support this.

secure_ftp = True

secure_data = True


   # To upload files from something other than what HTML_ROOT is set

# to above, specify a different HTML_ROOT here.

 HTML_ROOT = /var/www/html/weewx/


# Most FTP servers use port 21

port = 21


# Set to 1 to use passive mode, zero for active mode

passive = 1


The connection is FTP over TLS.


My weather data is from an Aercus Weather Sleuth using interceptor on a 
Raspberry pi.


It's as if FTP is looking for the wrong path on my  pi but maybe I 
misunderstand the error message. That's why I tried removing the hash 
before HTML_ROOT but I got the same result with the hash.


Otherwise very pleased with weewx  which I can view on my pi using nginx


Any help gratefully received.


Richard


-- 
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/35d77ba3-e9a1-4919-9b2e-bb0680490b8a%40googlegroups.com.


[weewx-user] event.record['ET'] throws me a KeyError. Why?

2020-05-27 Thread gjr80
Hi,

Where does your service sit in the service order in relation to StdWXCalculate 
in weewx.conf under [Engine] [[Services]]? One possible reason is that if your 
station does not provide field ET (not many (any?) provide a numeric value in 
every archive record) and the StdWXCalculate service then calculate ET if it 
can. If your service that references ET is executed before StdWXCalculate then 
field ET will not (yet) exist in the archive record. In this case the solution 
is put your service after StdWXCalculate.

Gary

-- 
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/8be968cc-0ef0-4935-8734-c9afbf998f23%40googlegroups.com.


[weewx-user] Re: wee_extension inigo-data.txt is not generated

2020-05-27 Thread John Smith


On Wednesday, 27 May 2020 03:13:04 UTC+10, Ronald Berghammer wrote:
>
> Thanks a lot, no Stress it is not urgent


I just posted new versions of the inigo plugin:

https://github.com/evilbunny2008/weeWXWeatherApp/releases/tag/0.8.26 

-- 
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/524b94f0-5f0c-4bc6-8676-76633f806319%40googlegroups.com.


Re: [weewx-user] V4 with python2 OWFS errors

2020-05-27 Thread Neville Davis
Thanks very much Glen I will do the mods in the morning.
I had specified a sensor type in my old system...but just forgot..

Neville

On Wednesday, May 27, 2020 at 5:31:30 PM UTC+10, Glenn McKechnie wrote:
>
> Hi Neville, 
>
> Within the [OWFS] section of weewx you need to specify a [[sensor_type]] 
>
> Firstly, you are correct with the count incrementing when the bucket 
> tips but you need to turn that into a time based value 
> A rain value is evaluated as the difference between the current count 
> and the last count for the time it was taken. 
> This is where the sensor_type comes into it. 
>
> owfs.py provides the function rainwise_bucket that assumes there is 
> 0.1 " per tip ( 0.0254cm ) of the tipping bucket. By comparing the 
> current count with the last reading (count) taken, and knowing the 
> times involved it returns the measurement in cm. 
>
> So, to enable that function you need to specify the following after 
> your [sensor_map] section 
>
> [[sensor_type]] 
> rain = rainwise_bucket 
>
> Once that's done you'll find the maths is taken care of and tipping 
> water into the bucket will register a meaningful volume / measure. 
> If it's not 0.01" per tip you can adjust that value by using the 
> [StdCalibrate][[Corrections]] section of weewx.conf 
>
> Incidentally. You have owfs.py configured as a Driver and as a 
> Service. I'm thinking you only want the Service side of it, that way 
> it supplements your main stations data. 
>
> If that assumption is correct, remove the "driver = user.owfs " line 
> from the [OWFS] section. Leave the [Engine][[Services]] data_services 
> = user.owfs.OWFSService as it is 
>
>
>
>
> On 27/05/2020, Neville Davis > wrote: 
> > Glen 
> > 
> > My solution is proving to be beyond my capabilities to get to be 
> correct, 
> > while I can get the data I have run into several issues that just makes 
> it 
> > too messy. 
> > After reading this and looking at your far more elegant solutions I have 
> > installed and it is has several problems. 
> > First I run with loop and the print out below shows that I have an 
> enormous 
> > 
> > amount of rain...and the quality control kicks in and prevents any 
> further 
> > stuff up. 
> > I then ran without loop and the system crashed. 
> > when I query using owget I get the current count value in the sensor 
> > (counter.b) as 16570. This has been operational for a few years. This 
> count 
> > 
> > does increment with bucket tips. 
> > My system is home grown i2C (BMP085, qty two SHT31-D, si1145) on range 
> > extenders, with Davis wind direction and speed sensors. 
> > The following from the log 
> > Any suggestions appreciated 
> > I am defaulted to python3 and weewx v4 on latest debian on Pi3 
> > 
> > Regards 
> > 
> > Neville 
> > 
> > May 27 15:14:08 raspberrypi weewx[5106] INFO __main__: Initializing 
> weewx 
> > version 4.0.0 
> > 
> > May 27 15:14:08 raspberrypi weewx[5106] INFO __main__: Using Python 
> 3.7.3 
> > (default, Dec 20 2019, 18:57:59) #012[GCC 8.3.0] 
> > 
> > May 27 15:14:08 raspberrypi weewx[5106] INFO __main__: Platform 
> > Linux-4.19.97-v7+-armv7l-with-debian-10.4 
> > 
> > May 27 15:14:08 raspberrypi weewx[5106] INFO __main__: Locale is 
> > 'en_US.UTF-8' 
> > 
> > May 27 15:14:08 raspberrypi weewx[5106] INFO __main__: PID file is 
> > /var/run/weewx.pid 
> > 
> > May 27 15:14:08 raspberrypi weewx[5110] INFO __main__: Using 
> configuration 
> > file /home/weewx/weewx.conf 
> > 
> > May 27 15:14:08 raspberrypi weewx[5110] INFO weewx.engine: Loading 
> station 
> > type PiWeather (user.piweather) 
> > 
> > May 27 15:14:08 raspberrypi weewx[5110] INFO user.owfs: service version 
> is 
> > 0.23.6 (pyownet) 
> > 
> > May 27 15:14:08 raspberrypi weewx[5110] INFO user.owfs: binding is 
> archive 
> > 
> > May 27 15:14:08 raspberrypi weewx[5110] INFO user.owfs: interface is 
> > localhost:4304 
> > 
> > May 27 15:14:08 raspberrypi weewx[5110] INFO user.owfs: sensor map is 
> > {'rain': '/uncached/1D.E3AB0D00/counter.b'} 
> > 
> > May 27 15:14:08 raspberrypi weewx[5110] INFO user.owfs: sensor type map 
> is 
> > {} 
> > 
> > May 27 15:14:08 raspberrypi weewx[5110] INFO user.owfs: dallas direction 
> > map is {} 
> > 
> > May 27 15:14:08 raspberrypi weewx[5110] INFO user.owfs: sensor unit 
> system 
> > is metric 
> > 
> > May 27 15:14:08 raspberrypi weewx[5110] INFO weewx.engine: StdConvert 
> > target unit is 0x1 
> > 
> > May 27 15:14:08 raspberrypi weewx[5110] INFO weewx.wxservices: The 
> > following values will be calculated: pressure=prefer_hardware, 
> > altimeter=prefer_hardware, appTemp=prefer_hardware, 
> > barometer=prefer_hardware, beaufort=prefer_hardware, 
> > cloudbase=prefer_hardware, dewpoint=prefer_hardware, ET=prefer_hardware, 
> > heatindex=prefer_hardware, humidex=prefer_hardware, 
> > inDewpoint=prefer_hardware, maxSolarRad=prefer_hardware, 
> > rainRate=prefer_hardware, windchill=prefer_hardware, 
> > windrun=prefer_hardware 
> > 
> > May 27 15:14:08 rasp

[weewx-user] Re: Belchertown MQTT update time is chaotic

2020-05-27 Thread Keimpe Bleeker
How simple it can be sometimes ... I was thinking in a stove-pipe and was 
looking much too deep. 

Thanks for all assistance, as far as I am concerned, item closed.


Op dinsdag 26 mei 2020 20:24:59 UTC+2 schreef Jacques Terrettaz:
>
> In the original skin.conf of Belchertown v 1.1 , i see :
>
> mqtt_websockets_connected   = Connected to weather station live. Data 
> received
>
> On my side, I have a running Belchertown 1.1 template, translated 
> in French,  ( see http://meteo-sciez.fr/weewx/belchertown/ ) with :
>
> mqtt_websockets_connected   = Connecté à la station. Mesures du
>
> On your side, if you have for instance :
>
> mqtt_websockets_connected   = Verbonden met weerstation. Data received on 
>
> with "Data received on"  translated in your language,  does it works ?
>
> If not, I really don't know where is the cause of your problem.
>
>
>  
>

-- 
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/370a70a6-cc7f-4eee-89b0-7a1893dc4c6b%40googlegroups.com.


Re: [weewx-user] V4 with python2 OWFS errors

2020-05-27 Thread Glenn McKechnie
Hi Neville,

Within the [OWFS] section of weewx you need to specify a [[sensor_type]]

Firstly, you are correct with the count incrementing when the bucket
tips but you need to turn that into a time based value
A rain value is evaluated as the difference between the current count
and the last count for the time it was taken.
This is where the sensor_type comes into it.

owfs.py provides the function rainwise_bucket that assumes there is
0.1 " per tip ( 0.0254cm ) of the tipping bucket. By comparing the
current count with the last reading (count) taken, and knowing the
times involved it returns the measurement in cm.

So, to enable that function you need to specify the following after
your [sensor_map] section

[[sensor_type]]
rain = rainwise_bucket

Once that's done you'll find the maths is taken care of and tipping
water into the bucket will register a meaningful volume / measure.
If it's not 0.01" per tip you can adjust that value by using the
[StdCalibrate][[Corrections]] section of weewx.conf

Incidentally. You have owfs.py configured as a Driver and as a
Service. I'm thinking you only want the Service side of it, that way
it supplements your main stations data.

If that assumption is correct, remove the "driver = user.owfs " line
from the [OWFS] section. Leave the [Engine][[Services]] data_services
= user.owfs.OWFSService as it is




On 27/05/2020, Neville Davis  wrote:
> Glen
>
> My solution is proving to be beyond my capabilities to get to be correct,
> while I can get the data I have run into several issues that just makes it
> too messy.
> After reading this and looking at your far more elegant solutions I have
> installed and it is has several problems.
> First I run with loop and the print out below shows that I have an enormous
>
> amount of rain...and the quality control kicks in and prevents any further
> stuff up.
> I then ran without loop and the system crashed.
> when I query using owget I get the current count value in the sensor
> (counter.b) as 16570. This has been operational for a few years. This count
>
> does increment with bucket tips.
> My system is home grown i2C (BMP085, qty two SHT31-D, si1145) on range
> extenders, with Davis wind direction and speed sensors.
> The following from the log
> Any suggestions appreciated
> I am defaulted to python3 and weewx v4 on latest debian on Pi3
>
> Regards
>
> Neville
>
> May 27 15:14:08 raspberrypi weewx[5106] INFO __main__: Initializing weewx
> version 4.0.0
>
> May 27 15:14:08 raspberrypi weewx[5106] INFO __main__: Using Python 3.7.3
> (default, Dec 20 2019, 18:57:59) #012[GCC 8.3.0]
>
> May 27 15:14:08 raspberrypi weewx[5106] INFO __main__: Platform
> Linux-4.19.97-v7+-armv7l-with-debian-10.4
>
> May 27 15:14:08 raspberrypi weewx[5106] INFO __main__: Locale is
> 'en_US.UTF-8'
>
> May 27 15:14:08 raspberrypi weewx[5106] INFO __main__: PID file is
> /var/run/weewx.pid
>
> May 27 15:14:08 raspberrypi weewx[5110] INFO __main__: Using configuration
> file /home/weewx/weewx.conf
>
> May 27 15:14:08 raspberrypi weewx[5110] INFO weewx.engine: Loading station
> type PiWeather (user.piweather)
>
> May 27 15:14:08 raspberrypi weewx[5110] INFO user.owfs: service version is
> 0.23.6 (pyownet)
>
> May 27 15:14:08 raspberrypi weewx[5110] INFO user.owfs: binding is archive
>
> May 27 15:14:08 raspberrypi weewx[5110] INFO user.owfs: interface is
> localhost:4304
>
> May 27 15:14:08 raspberrypi weewx[5110] INFO user.owfs: sensor map is
> {'rain': '/uncached/1D.E3AB0D00/counter.b'}
>
> May 27 15:14:08 raspberrypi weewx[5110] INFO user.owfs: sensor type map is
> {}
>
> May 27 15:14:08 raspberrypi weewx[5110] INFO user.owfs: dallas direction
> map is {}
>
> May 27 15:14:08 raspberrypi weewx[5110] INFO user.owfs: sensor unit system
> is metric
>
> May 27 15:14:08 raspberrypi weewx[5110] INFO weewx.engine: StdConvert
> target unit is 0x1
>
> May 27 15:14:08 raspberrypi weewx[5110] INFO weewx.wxservices: The
> following values will be calculated: pressure=prefer_hardware,
> altimeter=prefer_hardware, appTemp=prefer_hardware,
> barometer=prefer_hardware, beaufort=prefer_hardware,
> cloudbase=prefer_hardware, dewpoint=prefer_hardware, ET=prefer_hardware,
> heatindex=prefer_hardware, humidex=prefer_hardware,
> inDewpoint=prefer_hardware, maxSolarRad=prefer_hardware,
> rainRate=prefer_hardware, windchill=prefer_hardware,
> windrun=prefer_hardware
>
> May 27 15:14:08 raspberrypi weewx[5110] INFO weewx.wxservices: The
> following algorithms will be used for calculations: altimeter=aaASOS,
> maxSolarRad=RS
>
> May 27 15:14:08 raspberrypi weewx[5110] INFO weewx.engine: Archive will use
>
> data binding wx_binding
>
> May 27 15:14:08 raspberrypi weewx[5110] INFO weewx.engine: Record
> generation will be attempted in 'hardware'
>
> May 27 15:14:08 raspberrypi weewx[5110] INFO weewx.engine: Using archive
> interval of 300 seconds (specified in weewx configuration)
>
> May 27 15:14:08 raspberrypi weewx[5110] INFO weewx.restx: StationRegistry:
> Re