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

2020-05-28 Thread Neville Davis
Just reread are you looking for my sensor data collection file (it collects 
the data from my i2C BMP085) this is done as a service, it gets all my data 
creates a csv file in ram which I then read with the piweather Driver in 
weewx.
On my new install (from scratch) Adafruit_Python_BMP, Adafruit_Python_GPIO, 
Adafruit_Python_ADS1X15 packages were installed on mi Pi3 and a BMP085 
software from Tony DiCola (2014) I can’t remember if I had to make changes 
in it years ago but it run without fault under python3. I had a small test 
file for this and it failed because of print statements syntax which I 
corrected...in fact all my python scripts Iused under python 2 worked only 
my test files need to be edited (print statements).

Nev
 

On Thursday, May 28, 2020 at 4:54:37 PM UTC+10, Gazza wrote:
>
>
> 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/98ecf0c6-2001-4e70-bf07-78ba42c2b37b%40googlegroups.com.


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

2020-05-28 Thread Neville Davis
Don’t know, never thought of it.
I included it with another post the other day, but since then modified 
because it would not work with new install. Which I have now gone to weewx 
v4.1 as well and all OK.

I will experiment and let you know...

Nev

On Thursday, May 28, 2020 at 4:54:37 PM UTC+10, Gazza wrote:
>
>
> 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/39f42f03-5a5b-483d-ab57-ada8a4e859e8%40googlegroups.com.


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

2020-05-28 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.


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 

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] 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 

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: [weewx-user] V4 with python2 OWFS errors

2020-05-27 Thread Neville Davis
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: 
Registration not requested.

May 27 15:14:08 raspberrypi weewx[5110] INFO weewx.restx: Wunderground: 
Posting not enabled.

May 27 15:14:08 raspberrypi weewx[5110] INFO weewx.restx: PWSweather: 
Posting not enabled.

May 27 15:14:08 raspberrypi weewx[5110] INFO weewx.restx: CWOP: Posting not 
enabled.

May 27 15:14:08 raspberrypi weewx[5110] INFO weewx.restx: WOW: Posting not 
enabled.

May 27 15:14:08 raspberrypi weewx[5110] INFO weewx.restx: AWEKAS: Posting 
not enabled.

May 27 15:14:08 raspberrypi weewx[5110] INFO __main__: Starting up weewx 
version 4.0.0

May 27 15:14:08 raspberrypi weewx[5110] INFO weewx.engine: Using binding 
'wx_binding' to database 'weewx_new'

May 27 15:14:08 raspberrypi weewx[5110] INFO weewx.manager: Starting 
backfill of daily summaries

May 27 15:14:08 raspberrypi weewx[5110] INFO weewx.engine: Starting main 
packet loop.

May 27 15:15:16 raspberrypi weewx[5110] INFO weewx.engine: Main loop 
exiting. Shutting engine down.

May 27 15:15:16 raspberrypi weewx[5110] CRITICAL __main__: Caught 
unrecoverable exception:

May 27 15:15:16 raspberrypi weewx[5110] CRITICAL __main__:   
loginf() takes 1 positional argument but 2 were given

May 27 15:15:16 raspberrypi weewx[5110] CRITICAL __main__:   
Traceback (most recent call last):

May 27 15:15:16 raspberrypi weewx[5110] CRITICAL __main__: File 
"/home/weewx/bin/weewx/engine.py", line 195, in run

May 27 15:15:16 raspberrypi weewx[5110] CRITICAL __main__:   
self.dispatchEvent(weewx.Event(weewx.CHECK_LOOP, 

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

2020-05-26 Thread Glenn McKechnie
Thanks Neville,

That's interesting and certainly of note. It may be just what we are
looking for.

Stefano Miccoli is the author of pyownet so we are doubly on topic!

The original post is at...
https://sourceforge.net/p/owfs/mailman/message/36765345/
and part of a much longer thread...
https://sourceforge.net/p/owfs/mailman/owfs-developers/?viewmonth=201909

To me, the take away is to create the override file as follows...

"/etc/systemd/system/owserver.service.d/override.conf is an override
file, that you create with"
sudo systemctl edit owserver.service

and include the following content...

# /etc/systemd/system/owserver.service.d/override.conf
[Service]
User=Debian-ow
Group=Debian-ow
ExecStart=
ExecStart=/usr/bin/owserver -c /etc/owfs.conf --foreground

[Install]
Also=

For context, read the full post at the above link.

I'll add...
We will continue to run owserver as root (skipping his point #1) and
will perform points #2 and #3 by creating the file as he has outlined
above.

I'll add the above to the install notes, and wiki when I get a moment.



On 27/05/2020, Neville Davis  wrote:
> Guys I too have been following, I am now running pythonv3 weewxv4 with
> 1wire rain, my solution is different and messy but seems to work for me,
> But while trying to sort out my problem found a report about problems with
> owserver on Pi using bustergithub miccoli in the config file edit
> owserver.service ExecStart=/user/bin/owserver -c /etc/OWFS,conf
> —foreground, Apparently on the OWFS developer mailing list this is
> discussed. My system is working without the foreground option apparently
> the problem is intermittent.
> Don’t know if this is related to your problem though
>
> On Tuesday, May 26, 2020 at 9:16:24 PM UTC+10, Glenn McKechnie wrote:
>>
>> On 26/05/2020, Messy Potamia > wrote:
>> >
>> > *I'm following this because one of my weewx stations rely heavily on OW
>> >
>> > sensors to augment the data from my Davis Vantage pro2. *
>> > *I'd upgrade to weewx 4.x but really can't lose owfs operability*.
>> > Thx/mp
>>
>> By weewx4 I assume you mean python3 and weewx4?
>>
>> What are the sensors? Just temperature or...?
>>
>>
>> You shouldn't lose anything. The driver does work with weewx4 and python3
>>
>> I have it running with 4.0.b18 which was the last version? before the
>> final release of weewx4.
>> If you know your sensor_map and sensor_type then you are halfway
>> there. Nothings changed in that respect.
>>
>> The biggest hurdle seems to be getting owserver to behave. You could
>> try installing that now and when it runs okay then you'll be set.
>> There may be an interruption if your existing owfs.py (with python-ow
>> I assume) and owserver both point to the busmaster device and attempt
>> a query at the same time (Gaz's was /dev/i2c-1, mine is the USB
>> dongle). It may just simply block on access, or segfault but a restart
>> of either service will fix that, nothing should break.
>> When it comes to restarting services (keeping in mind that I use SysV
>> eg: /etc/init.d/weewx) I no longer use restart. I actually stop them
>> first (regardless of their state) then start them. I have more success
>> that way, probably gives them a chance to regain state.
>>
>> If you do much the same as Gaz but stick with python2.7 then you can
>> test it all before making the big shift to weewx4 running under
>> python3
>>
>> --
>>
>>
>> Cheers
>>  Glenn
>>
>> rorpi - read only raspberry pi & various weewx addons
>> https://github.com/glennmckechnie
>>
>
> --
> 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/414b4af4-9539-4110-8000-207fe8ff5814%40googlegroups.com.
>


-- 


Cheers
 Glenn

rorpi - read only raspberry pi & various weewx addons
https://github.com/glennmckechnie

-- 
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/CAAraAziMBU1Uxq128tN7HQhn7ZcU1Tre4K1JdkcynYbviG70QA%40mail.gmail.com.


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

2020-05-26 Thread Neville Davis
Guys I too have been following, I am now running pythonv3 weewxv4 with 
1wire rain, my solution is different and messy but seems to work for me, 
But while trying to sort out my problem found a report about problems with 
owserver on Pi using bustergithub miccoli in the config file edit 
owserver.service ExecStart=/user/bin/owserver -c /etc/OWFS,conf 
—foreground, Apparently on the OWFS developer mailing list this is 
discussed. My system is working without the foreground option apparently 
the problem is intermittent.
Don’t know if this is related to your problem though

On Tuesday, May 26, 2020 at 9:16:24 PM UTC+10, Glenn McKechnie wrote:
>
> On 26/05/2020, Messy Potamia > wrote: 
> > 
> > *I'm following this because one of my weewx stations rely heavily on OW 
> > sensors to augment the data from my Davis Vantage pro2. * 
> > *I'd upgrade to weewx 4.x but really can't lose owfs operability*. 
> > Thx/mp 
>
> By weewx4 I assume you mean python3 and weewx4? 
>
> What are the sensors? Just temperature or...? 
>
>
> You shouldn't lose anything. The driver does work with weewx4 and python3 
> I have it running with 4.0.b18 which was the last version? before the 
> final release of weewx4. 
> If you know your sensor_map and sensor_type then you are halfway 
> there. Nothings changed in that respect. 
>
> The biggest hurdle seems to be getting owserver to behave. You could 
> try installing that now and when it runs okay then you'll be set. 
> There may be an interruption if your existing owfs.py (with python-ow 
> I assume) and owserver both point to the busmaster device and attempt 
> a query at the same time (Gaz's was /dev/i2c-1, mine is the USB 
> dongle). It may just simply block on access, or segfault but a restart 
> of either service will fix that, nothing should break. 
> When it comes to restarting services (keeping in mind that I use SysV 
> eg: /etc/init.d/weewx) I no longer use restart. I actually stop them 
> first (regardless of their state) then start them. I have more success 
> that way, probably gives them a chance to regain state. 
>
> If you do much the same as Gaz but stick with python2.7 then you can 
> test it all before making the big shift to weewx4 running under 
> python3 
>
> -- 
>
>
> Cheers 
>  Glenn 
>
> rorpi - read only raspberry pi & various weewx addons 
> https://github.com/glennmckechnie 
>

-- 
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/414b4af4-9539-4110-8000-207fe8ff5814%40googlegroups.com.


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

2020-05-26 Thread Glenn McKechnie
On 26/05/2020, Messy Potamia  wrote:
>
> *I'm following this because one of my weewx stations rely heavily on OW
> sensors to augment the data from my Davis Vantage pro2. *
> *I'd upgrade to weewx 4.x but really can't lose owfs operability*.
> Thx/mp

By weewx4 I assume you mean python3 and weewx4?

What are the sensors? Just temperature or...?


You shouldn't lose anything. The driver does work with weewx4 and python3
I have it running with 4.0.b18 which was the last version? before the
final release of weewx4.
If you know your sensor_map and sensor_type then you are halfway
there. Nothings changed in that respect.

The biggest hurdle seems to be getting owserver to behave. You could
try installing that now and when it runs okay then you'll be set.
There may be an interruption if your existing owfs.py (with python-ow
I assume) and owserver both point to the busmaster device and attempt
a query at the same time (Gaz's was /dev/i2c-1, mine is the USB
dongle). It may just simply block on access, or segfault but a restart
of either service will fix that, nothing should break.
When it comes to restarting services (keeping in mind that I use SysV
eg: /etc/init.d/weewx) I no longer use restart. I actually stop them
first (regardless of their state) then start them. I have more success
that way, probably gives them a chance to regain state.

If you do much the same as Gaz but stick with python2.7 then you can
test it all before making the big shift to weewx4 running under
python3

-- 


Cheers
 Glenn

rorpi - read only raspberry pi & various weewx addons
https://github.com/glennmckechnie

-- 
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/CAAraAzjEqh-W-z2VUo6hCsKEyzTxcJEqX_pvEDkx8pcQKShOuw%40mail.gmail.com.


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

2020-05-26 Thread Glenn McKechnie
On 26/05/2020, Gazza  wrote:
> Hi Glen,
>
> My interface board is based on one I milled on my CNC a couple of years
> ago, for the new one I had the board made as it makes it much easier to
> assemble that the bare copper ones.

CNC!
As an ex fitter, toolmaker come "jack of all" that's my language.

> This one is in the shape of a Pi HAT and has a RTC and the DS2482-100 I2C
> Bus plus provision to attach a BME280 barometer module. So far testing has
> shown that the RTC and the 1wire works but I have noticed that the self
> heating of the test DS18B20 probably means that it is not feasible to add
> the barometer to the board and it will need to mounted externally.
>
> If you want one to do some testing I have a few boards spare thanks to
> minimum orders and Maxims (previous) generosity with samples.

That sounds good Gaz. I'll take you up on it.

Bcc'ing you with this mail.


-- 


Cheers
 Glenn

rorpi - read only raspberry pi & various weewx addons
https://github.com/glennmckechnie

-- 
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/CAAraAzhAeoBSgkC7w%3D-6VvZ%2BTX7R%2Bv3AcMF5%3DUZbvJ3gyt%2BZ1g%40mail.gmail.com.


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

2020-05-26 Thread Messy Potamia

*Thanks good to know. I extended my schema ~5 yrs ago, to add some lake 
height and wave height measured by a MaxBotix rangefinder, and lightning, 
parameters. A couple other params I stuffed into unused columns in the 
weewx.sdb and renamed the reports. *

*I'm going to have to rebuild my whole server next time I'm home because I 
think the system took a power hit, my cameras show a bright flash last 
month and stuff started malfunctioning. *

*I'm not energetic enough to build my own I2C owfs interace; as for mine I 
use Sheepwalk Electronics' RPI hat. *
*My whole system is on an isolated (or so I thought), 12V --> 5V / 3.3V 
power supply based on a standard fire/burg system standby power supply. My 
system was up for over 400 days until I started having weird problems, and 
I had to reboot it. Still having problems which are logically inconsistent 
-- weewx ftp (to my web hosting service) often fails and is very slow, 
however -- the logically inconsistent part -- speedtest-cli shows good 
up/down speeds, and ftp from another server at the local network to the 
hosting service is very fast, so it seems something in the weewx ftp 
utility is affected and I'm suspecting it's damaged. I had to rebuild this 
pi a few years ago due to a zap which, i believe, came through the router 
in the boathouse (it's in a boathouse).*
*So that's my main system. I'm temporarily stationed in Germany for another 
couple years but like to know the conditions & status of stuff back home 
(on the Tennessee river, Alabama)*

*"mp"*

On Tuesday, May 26, 2020 at 12:25:54 PM UTC+2, Gazza wrote:
>
>
>
> On Tuesday, May 26, 2020 at 6:18:17 PM UTC+10, Messy Potamia wrote:
>>
>>
>> *I'm following this because one of my weewx stations rely heavily on OW 
>> sensors to augment the data from my Davis Vantage pro2. *
>> *I'd upgrade to weewx 4.x but really can't lose owfs operability*.
>> Thx/mp
>>
>
> This testing has been with a fresh install of Buster on a Pi4 and OWFS 
> seems to be working fine with Weewx V4 and python2 using the wview-extended 
> schema. I specifically wanted to use the extended schema so I could use the 
> additional extraTemp and extraHumid fields (currently using extraTemp1-5 
> and extraHumid1-4). 
>
> I have tested the V3 database to V4 conversion and it worked but I don't 
> think that is much use as some of my sensors will now use different 
> database fields.
>
>
> 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/557c97cf-fdc3-4bf9-9b34-7ed6d7f478a8%40googlegroups.com.


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

2020-05-26 Thread Gazza


On Tuesday, May 26, 2020 at 6:18:17 PM UTC+10, Messy Potamia wrote:
>
>
> *I'm following this because one of my weewx stations rely heavily on OW 
> sensors to augment the data from my Davis Vantage pro2. *
> *I'd upgrade to weewx 4.x but really can't lose owfs operability*.
> Thx/mp
>

This testing has been with a fresh install of Buster on a Pi4 and OWFS 
seems to be working fine with Weewx V4 and python2 using the wview-extended 
schema. I specifically wanted to use the extended schema so I could use the 
additional extraTemp and extraHumid fields (currently using extraTemp1-5 
and extraHumid1-4). 

I have tested the V3 database to V4 conversion and it worked but I don't 
think that is much use as some of my sensors will now use different 
database fields.


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/7d3287eb-29a4-4072-a2bf-4d24113a1e6d%40googlegroups.com.


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

2020-05-26 Thread Glenn McKechnie
>> If you are running the owfs.py from my fork, the syslog message will
>> tell you what module it has opted to run under. That message occurs in
>> the first few log entries after weewx initializes. It's an INFO
>> message
>>
>
> So with python-ow installed I get this in the INFO:
>
> May 26 17:43:02 GazPi4 weewx[1159] INFO user.owfs: service version is 0.23
> ( ow)
[...]

> With python-ow removed I get this:
>
> May 26 17:50:52 GazPi4 weewx[1259] INFO user.owfs: service version is 0.23
> (pyownet)
[...]

> I have waited for a REC  to be generated and the 1wire sensor allocated to
> extraTemp5 is being reported OK, so it does look like it is working fine
> with either method.

That's good news. For you and me ;-)

> I think I was thrown off track when running direct failed, does that mean
> the broken _main_ section is not called when it is running from weewx ?

Correct.

It's a separate section quite distinct from the Driver/Service side.
It does need to be, and will be fixed as it's required to sort out the
system_map. Thankfully you knew yours already.
When it starts raining again, or we get locked up again :)  I'll get
back to it and see if inspiration strikes.

It borrows a few functions from the main script, but the rest of it is
fairly unique. Made more difficult at the moment as ow and pyownet
approach things in different ways.
Almost had it working on mine but I have a 1-wire hub which
complicates a simple directory walk with pyownet.


-- 


Cheers
 Glenn

rorpi - read only raspberry pi & various weewx addons
https://github.com/glennmckechnie

-- 
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/CAAraAzjCqdYpu5nC%3D%3DYo5qwWrcs11g8djVnvgHjsDyXDiQ-OuQ%40mail.gmail.com.


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

2020-05-26 Thread Messy Potamia

*I'm following this because one of my weewx stations rely heavily on OW 
sensors to augment the data from my Davis Vantage pro2. *
*I'd upgrade to weewx 4.x but really can't lose owfs operability*.
Thx/mp

On Tuesday, May 26, 2020 at 10:06:04 AM UTC+2, Gazza wrote:
>
>
> If you are running the owfs.py from my fork, the syslog message will 
>> tell you what module it has opted to run under. That message occurs in 
>> the first few log entries after weewx initializes. It's an INFO 
>> message 
>>
>
> So with python-ow installed I get this in the INFO:
>
> May 26 17:43:02 GazPi4 weewx[1159] INFO user.owfs: service version is 0.23 
> (ow)
> May 26 17:43:02 GazPi4 weewx[1159] INFO user.owfs: interface is localhost:
> 4304
>
> With python-ow removed I get this:
>
> May 26 17:50:52 GazPi4 weewx[1259] INFO user.owfs: service version is 0.23 
> (pyownet)
> May 26 17:50:52 GazPi4 weewx[1259] INFO user.owfs: interface is localhost:
> 4304
> May 26 17:50:52 GazPi4 weewx[1259] INFO user.owfs: sensor map is {u
> 'extraTemp5': u'/uncached/28.E1044104/temperature'}
>
>
> I have waited for a REC  to be generated and the 1wire sensor allocated to 
> extraTemp5 is being reported OK, so it does look like it is working fine 
> with either method.
>
> I think I was thrown off track when running direct failed, does that mean 
> the broken _main_ section is not called when it is running from weewx ?
>
>
> 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/e7e9f9b7-4388-48d0-ac7d-776b91c59dd7%40googlegroups.com.


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

2020-05-26 Thread Gazza


> If you are running the owfs.py from my fork, the syslog message will 
> tell you what module it has opted to run under. That message occurs in 
> the first few log entries after weewx initializes. It's an INFO 
> message 
>

So with python-ow installed I get this in the INFO:

May 26 17:43:02 GazPi4 weewx[1159] INFO user.owfs: service version is 0.23 (
ow)
May 26 17:43:02 GazPi4 weewx[1159] INFO user.owfs: interface is localhost:
4304

With python-ow removed I get this:

May 26 17:50:52 GazPi4 weewx[1259] INFO user.owfs: service version is 0.23 (
pyownet)
May 26 17:50:52 GazPi4 weewx[1259] INFO user.owfs: interface is localhost:
4304
May 26 17:50:52 GazPi4 weewx[1259] INFO user.owfs: sensor map is {u
'extraTemp5': u'/uncached/28.E1044104/temperature'}


I have waited for a REC  to be generated and the 1wire sensor allocated to 
extraTemp5 is being reported OK, so it does look like it is working fine 
with either method.

I think I was thrown off track when running direct failed, does that mean 
the broken _main_ section is not called when it is running from weewx ?


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/4a631711-fbe0-4a73-b815-298cafb9b980%40googlegroups.com.


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

2020-05-26 Thread Glenn McKechnie
On 26/05/2020, Gazza  wrote:
> OK, I have done some more tests, first I have removed python-ow and now the
> owfs service in weewx is not working.

If you are running the owfs.py from my fork, the syslog message will
tell you what module it has opted to run under. That message occurs in
the first few log entries after weewx initializes. It's an INFO
message

This is from my current session, I'm running with (pyownet)
 INFO user.owfs-dallas: driver version is 0.23.6 (pyownet)

Have a look in the last log, before you removed python-ow and see
which one it picked up, it will be either (ow) or (pyownet).
Might as well have a look at what it's using after you deleted
python-ow (ie: now)  and see what it's running with..


to get pyownet installed, how was that done? Through pip?

A quick check to see if python can find them...

$ python2.7
Python 2.7.13 (default, Sep 26 2018, 18:42:22)
[GCC 6.3.0 20170516] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import ow
>>> import pyownet
>>> import arflegarflegloop
Traceback (most recent call last):
  File "", line 1, in 
ImportError: No module named arflegarflegloop
>>>

If the module isn't present it will throw the ImportError message above.



> When I run systemctl status owserver it shows that it is enabled and
> running.
>
> pi@GazPi4:~ $ systemctl status owserver
> * owserver.service - Backend server for 1-wire control
>Loaded: loaded (/lib/systemd/system/owserver.service; enabled; vendor
> preset: enabled)
>Active: active (running) since Tue 2020-05-26 15:08:43 AEST; 34min ago
>  Docs: man:owserver(1)
>  Main PID: 365 (owserver)
> Tasks: 3 (limit: 4915)
>Memory: 2.8M
>CGroup: /system.slice/owserver.service
>`-365 /usr/bin/owserver -c /etc/owfs.conf
>
> May 26 15:08:43 GazPi4 systemd[1]: Starting Backend server for 1-wire
> control...
> May 26 15:08:43 GazPi4 owserver[365]: DEFAULT: ow_opt.c:(670) systemd mode
> -- ignore 'p' option
> May 26 15:08:43 GazPi4 systemd[1]: Started Backend server for 1-wire
> control.

So far so good.

> When I run owdir, the sensor is detected but I get no readings.
>
> pi@GazPi4:~ $ owdir
> /28.E1044104
> /bus.0
> /uncached
> /settings
> /system
> /statistics
> /structure
> /simultaneous
> /alarm

try running...
 owdir /28.E1044104
and you should get the tree for that sensor, of which temperature
should be included in it.

I'm assuming that  /28.E1044104 is your DS1820, in which case the
following is the command to reveal it's temperature reading...
 owget /28.E1044104/temperature


> When I try to to run weewx owfs direct command it fails.
>
>
> pi@GazPi4:~ $ sudo PYTHONPATH=/home/weewx/bin python /home/weewx/bin/user/
> owfs.py --sensors --iface=localhost:4304
> Traceback (most recent call last):
>   File "/home/weewx/bin/user/owfs.py", line 713, in 
> main()
>   File "/home/weewx/bin/user/owfs.py", line 674, in main
> traverse(ow.Sensor('/'), identify_sensor)
>   File "/home/weewx/bin/user/owfs.py", line 264, in Sensor
> return self.proxy.Sensor(path)
> AttributeError: '_Proxy' object has no attribute 'Sensor'

That doesn't surprise me.
I have a note on my fork that the _main_ section is broken if you are
using pyownet.
Mathews revision is a work in progress, as is mine. If memory serves
they can only pickup python-ow, not pyownet and the Sensor tree isn't
functioning , so yes. broken but a work in progress.
 (In my fork, owfs-dallas.py is further advanced - it works under
python3,, but I'm not suggesting to swap to that either.)


> It seems that even though I had changed the weewx.conf from =/dec/i2c-1 to
> =localhost:4304 it was still using pyownet.

When you run weewx, take note of that INFO version message. Then we'll
know which module one to focus on.





-- 


Cheers
 Glenn

rorpi - read only raspberry pi & various weewx addons
https://github.com/glennmckechnie

-- 
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/CAAraAzgjTtuirS734zZvyefCjk20oCk-coTCvCHhbrOx%2B7dg-g%40mail.gmail.com.


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

2020-05-25 Thread Gazza
OK, I have done some more tests, first I have removed python-ow and now the 
owfs service in weewx is not working.

When I run systemctl status owserver it shows that it is enabled and 
running.

pi@GazPi4:~ $ systemctl status owserver
* owserver.service - Backend server for 1-wire control
   Loaded: loaded (/lib/systemd/system/owserver.service; enabled; vendor 
preset: enabled)
   Active: active (running) since Tue 2020-05-26 15:08:43 AEST; 34min ago
 Docs: man:owserver(1)
 Main PID: 365 (owserver)
Tasks: 3 (limit: 4915)
   Memory: 2.8M
   CGroup: /system.slice/owserver.service
   `-365 /usr/bin/owserver -c /etc/owfs.conf

May 26 15:08:43 GazPi4 systemd[1]: Starting Backend server for 1-wire 
control...
May 26 15:08:43 GazPi4 owserver[365]: DEFAULT: ow_opt.c:(670) systemd mode 
-- ignore 'p' option
May 26 15:08:43 GazPi4 systemd[1]: Started Backend server for 1-wire 
control.

When I run owdir, the sensor is detected but I get no readings.

pi@GazPi4:~ $ owdir
/28.E1044104
/bus.0
/uncached
/settings
/system
/statistics
/structure
/simultaneous
/alarm

When I try to to run weewx owfs direct command it fails.


pi@GazPi4:~ $ sudo PYTHONPATH=/home/weewx/bin python /home/weewx/bin/user/
owfs.py --sensors --iface=localhost:4304
Traceback (most recent call last):
  File "/home/weewx/bin/user/owfs.py", line 713, in 
main()
  File "/home/weewx/bin/user/owfs.py", line 674, in main
traverse(ow.Sensor('/'), identify_sensor)
  File "/home/weewx/bin/user/owfs.py", line 264, in Sensor
return self.proxy.Sensor(path)
AttributeError: '_Proxy' object has no attribute 'Sensor'

It seems that even though I had changed the weewx.conf from =/dec/i2c-1 to 
=localhost:4304 it was still using pyownet.


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/20399341-5557-4466-bbe2-e300d40215dd%40googlegroups.com.


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

2020-05-25 Thread Gazza

The system must be using owserver as the weewx.conf has been changed to 
point to localhost:4304.

I haven't removed python-ow should I do that ??


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/5489e320-a6b7-4b43-9354-81f8970267e2%40googlegroups.com.


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

2020-05-25 Thread Glenn McKechnie
Gazza wrote:
> 
> Hi Glen,
> 
> I don't fully understand the pyownet bit but owserver would not run without 
> it being installed.

Okay, that is confusing as pyownet is the client, it needs owserver.
Owserver doesn't care whether pyownet is there or not.
We do, it doesn't.

If you were still running weewx with python-ow then /dev/i2c-1 would still
have been claimed by it; then owserver would complain, and I think it
might even segfault?


owserver does seem to be finicky when initially starting (under debian
Buster) and that could be a systemd thing, but no-one who has had the
problem has clearly defined what the fix is, it just "comes good".
I run Devuan which doesn't use systemd so I'm very low on the list of
possible fixers.

It may be that owserver fails to start (for its own reasons) and
systemd takes that personally and supplies a cryptic message. (too
often, too fast, something...protocols)?

Owserver does need a working config file for it to start, and it needs
the 1-wire bus interface to be correctly defined. That may be why it
comes with an oddly configured owfs.conf file (the fake server).

Getting back to ow, pyownet and owserver...

When python-ow is available, that's all that is needed to talk to the
busmaster (1-wire interface). No owserver is required as ow has wrapped
up owservers library and uses that instead...
weewx -- owfs.py -- ow -- /dev/i2c-1

pyownet is a package that only interfaces with owserver and also does it
using the python language.
Where we once needed to tell ow what the interface was we now need to
give that information to owserver and it does all the protocol,
handshaking business. Think of it as replacing the interface (as ow used it).

Once owserver is working correctly we point pyownet to the owserver and
with that change we should be in business with no further changes (other
than setting up the [OWFS] section as we always did.) We now have...
weewx -- owfs.py -- pyownet -- owserver -- /dev/i2c-1

https://github.com/miccoli/pyownet

Okay. My cup runneth over again. HTHelped :-)

-- 

Cheers
  Glenn

 rorpi - read only raspberry pi & various weewx addons
 https://github.com/glennmckechnie

-- 
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/20200526012725.ur5njorbo4r6mnjr%40gmail.com.


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

2020-05-25 Thread Gazza

Hi Glen,

I don't fully understand the pyownet bit but owserver would not run without 
it being installed.



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/95b3140b-3cde-4686-86ab-5daed7f85f09%40googlegroups.com.


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

2020-05-25 Thread Glenn McKechnie
Hi Gaz,

Excellent.
Good to hear it's working for you, and may it keep doing so!

You've certainly given it a good test, with the Service setup, python
versions, and especially the owserver - pyownet combination!

Great to have your working config setup too. It's always good to have
that sort of info, wraps it up nicely.


On 25/05/2020, Gazza  wrote:
>
> OK, I have had a read of the posts about pyton-ow being no longer supported
>
> and have now installed owserver and owshell and pyownet.
>
> As I am using a DS2482-100 I2C Bus master my owfs.conf contains:
>
> # DS2482-100 I2C Bus master
> server: device = /dev/i2c-1
> server: port = localhost:4304
>
> I changed the weewx service section to:
>
> [OWFS]  # Options for extension owfs.py using owserver
>
> interface = localhost:4304
> [[sensor_map]]
> # 1wire - solar
> extraTemp5 =  /uncached/28.E1044104/temperature   # test
> DS18S20
>
> So far it is all working as expected.
>
>
> Gaz
>
> --


-- 


Cheers
 Glenn

rorpi - read only raspberry pi & various weewx addons
https://github.com/glennmckechnie

-- 
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/CAAraAzhRiY91SGcqRK5r3QUcQ03CCfnNmiuej%2Bas-tqKG1YdMg%40mail.gmail.com.


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

2020-05-25 Thread Gazza

OK, I have had a read of the posts about pyton-ow being no longer supported 
and have now installed owserver and owshell and pyownet.

As I am using a DS2482-100 I2C Bus master my owfs.conf contains:

# DS2482-100 I2C Bus master
server: device = /dev/i2c-1
server: port = localhost:4304

I changed the weewx service section to:

[OWFS]  # Options for extension owfs.py using owserver

interface = localhost:4304
[[sensor_map]]
# 1wire - solar
extraTemp5 =  /uncached/28.E1044104/temperature   # test DS18S20

So far it is all working as expected.


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/0dbcbb96-e95b-47f3-a3e4-ccd6888565b5%40googlegroups.com.


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

2020-05-24 Thread Gazza
OK, me again, ignore the last 2 posts, I can't spell.

It works fine if you get the file name right !!, the new test 1wire sensor 
is the solar hot water, the others are various 433MHz sensors.

[image: hi-lo.JPG]




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/959cb343-e57c-4af4-9f52-ed312ec7c780%40googlegroups.com.


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

2020-05-24 Thread Gazza

Forgot to add the error file.


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/1b0e2147-7075-4cde-9ec9-8da06360d39b%40googlegroups.com.
ay 23 22:00:59 GazPi4 weewx[1120] INFO __main__: Initializing weewx version 
4.0.0
May 23 22:00:59 GazPi4 weewx[1120] INFO __main__: Using Python 2.7.16 (default, 
Oct 10 2019, 22:02:15) #012[GCC 8.3.0]
May 23 22:00:59 GazPi4 weewx[1120] INFO __main__: Platform 
Linux-4.19.97-v7l+-armv7l-with-debian-10.4
May 23 22:00:59 GazPi4 weewx[1120] INFO __main__: Locale is 'en_AU'
May 23 22:00:59 GazPi4 weewx[1120] INFO __main__: Using configuration file 
weewx.conf
May 23 22:00:59 GazPi4 weewx[1120] INFO weewx.engine: Loading station type SDR 
(user.sdr)
May 23 22:00:59 GazPi4 weewx[1120] INFO user.sdr: driver version is 0.77
May 23 22:00:59 GazPi4 weewx[1120] INFO user.sdr: sensor map is {u'windGust': 
u'wind_gust.38.FOWHx080Packet', u'outTempBatteryStatus': 
u'battery.38.FOWHx080Packet', u'rain_total': u'rain_total.38.FOWHx080Packet', 
u'windSpeed': u'wind_speed.38.FOWHx080Packet', u'windDir': 
u'wind_dir.38.FOWHx080Packet', u'outHumidity': u'humidity.38.FOWHx080Packet', 
u'outTemp': u'temperature.38.FOWHx080Packet', u'extraTemp1': 
u'temperature.32D1.AcuriteTowerPacketV2', u'batteryStatus1': 
u'battery.32D1.AcuriteTowerPacketV2', u'extraTemp2': 
u'temperature.39.ProloguePacket', u'extraHumid2': 
u'humidity.39.ProloguePacket', u'batteryStatus2': u'battery.39.ProloguePacket', 
u'extraTemp3': u'temperature.1:180.NexusTemperaturePacket', u'extraHumid3': 
u'humidity.1:180.NexusTemperaturePacket', u'batteryStatus3': 
u'battery.1:180.NexusTemperaturePacket', u'extraTemp4': 
u'temperature.5.ProloguePacket', u'extraHumid4': u'humidity.5.ProloguePacket', 
u'batteryStatus4': u'battery.5.ProloguePacket'}
May 23 22:00:59 GazPi4 weewx[1120] INFO user.sdr: deltas is {'strikes': 
'strikes_total', 'rain': 'rain_total'}
May 23 22:00:59 GazPi4 weewx[1120] INFO user.sdr: startup process 'rtl_433 -M 
utc -F json'
May 23 22:00:59 GazPi4 weewx[1120] INFO user.owfs: service version is 0.23
May 23 22:00:59 GazPi4 weewx[1120] INFO user.owfs: binding is archive
May 23 22:00:59 GazPi4 weewx[1120] INFO user.owfs: interface is /dev/i2c-1
May 23 22:00:59 GazPi4 weewx[1120] INFO user.owfs: sensor map is 
{u'extraTemp5': u'/uncached/28.E1044104/temperature'}
May 23 22:00:59 GazPi4 weewx[1120] INFO user.owfs: sensor type map is {}
May 23 22:00:59 GazPi4 weewx[1120] INFO user.owfs: sensor unit system is metric
May 23 22:00:59 GazPi4 weewx[1120] INFO weewx.engine: StdConvert target unit is 
0x1
May 23 22:00:59 GazPi4 weewx[1120] 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 23 22:00:59 GazPi4 weewx[1120] INFO weewx.wxservices: The following 
algorithms will be used for calculations: altimeter=aaASOS, maxSolarRad=RS
May 23 22:00:59 GazPi4 weewx[1120] INFO weewx.engine: Archive will use data 
binding wx_binding
May 23 22:00:59 GazPi4 weewx[1120] INFO weewx.engine: Record generation will be 
attempted in 'hardware'
May 23 22:00:59 GazPi4 weewx[1120] INFO weewx.engine: Using archive interval of 
300 seconds (specified in weewx configuration)
May 23 22:00:59 GazPi4 weewx[1120] INFO weewx.restx: StationRegistry: 
Registration not requested.
May 23 22:00:59 GazPi4 weewx[1120] INFO weewx.restx: Wunderground: Posting not 
enabled.
May 23 22:00:59 GazPi4 weewx[1120] INFO weewx.restx: PWSweather: Posting not 
enabled.
May 23 22:00:59 GazPi4 weewx[1120] INFO weewx.restx: CWOP: Posting not enabled.
May 23 22:00:59 GazPi4 weewx[1120] INFO weewx.restx: WOW: Posting not enabled.
May 23 22:00:59 GazPi4 weewx[1120] INFO weewx.restx: AWEKAS: Posting not 
enabled.
May 23 22:00:59 GazPi4 weewx[1120] INFO __main__: Starting up weewx version 
4.0.0
May 23 22:00:59 GazPi4 weewx[1120] INFO weewx.engine: Using binding 
'wx_binding' to database 'weewx.sdb'
May 23 22:00:59 GazPi4 weewx[1120] INFO weewx.manager: Starting backfill of 
daily summaries
May 23 22:00:59 GazPi4 weewx[1120] INFO weewx.engine: Starting main packet loop.
May 23 22:00:59 GazPi4 kernel: [  870.052667] r820t 8-001a: destroying instance
May 23 22:00:59 GazPi4 kernel: [  870.053082] dvb_usb_v2: 'Realtek RTL2832U 
reference design:1-1.2' successfully deinitialized and disconnected
May 23 22:02:15 GazPi4 systemd[1]: Starting Cleanup of Temporary Directories...
May 23 22:02:15 GazPi4 systemd[1]: 

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

2020-05-24 Thread Gazza
Hi Glen,

I still get a crash with your new version of owfs.py. 

I am also running a working rtl_sdr install as well and am trying to run 
owfs as a service. I don't understand this bit just before the critical 
messages.

May 23 22:05:22 GazPi4 weewx[1120] INFO weewx.engine: Main loop exiting. 
Shutting engine down.
May 23 22:05:22 GazPi4 weewx[1120] INFO user.sdr: shutdown process rtl_433 -M 
utc -F json

I'll test it as a driver without the SDR stuff in my weewx.conf.


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/5ee43e3c-32c0-48f1-afcb-98c005a7f955%40googlegroups.com.


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

2020-05-24 Thread Glenn McKechnie
Tested and updated the owfs.py file in my fork

Changed the encode() suggestions in the thread above to use plain str()
I believe I've caught all instances and that fix should propagate
through to the various functions.

There is also a tweak to get_float(path) that I required (when using
pyownet and python3) and a tweak to version string which logs the
python module it's running with.

It runs Weewx4 with either python2.7 or python3.

 
https://github.com/glennmckechnie/weewx-owfs/commit/f3c8496bba973b9acba0f2ace573cd4462d7a80b

https://github.com/glennmckechnie/weewx-owfs/raw/master/bin/user/owfs.py



On 23/05/2020, Glenn McKechnie  wrote:
> Looks like another encoding issue.
> You could try changing line 274 in the same fashion. No guarantees, as
> I can't test it.
>
> change...
>
> sv = ow.get(path)
>
> to include the encode fix...
>
> sv = ow.get(path.encode())
>
> I've raised it as an issue on github, hopefully mathew will be along
> and able to apply his expertise to it.
>
> https://github.com/matthewwall/weewx-owfs/issues/3
>
> On 23/05/2020, Gazza  wrote:
>>
>> Tried that change and it crashed with a different set of errors.
>>
>>
>> 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/ec0c7d16-8d7b-4c0b-8285-982a91157a4b%40googlegroups.com.
>>
>
>
> --
>
>
> Cheers
>  Glenn
>
> rorpi - read only raspberry pi & various weewx addons
> https://github.com/glennmckechnie
>


-- 


Cheers
 Glenn

rorpi - read only raspberry pi & various weewx addons
https://github.com/glennmckechnie

-- 
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/CAAraAziKJS-vGJtx6hEDnSTskhjHDfuXkafiu4AahfwGY%2BpGfQ%40mail.gmail.com.


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

2020-05-23 Thread Glenn McKechnie
Looks like another encoding issue.
You could try changing line 274 in the same fashion. No guarantees, as
I can't test it.

change...

sv = ow.get(path)

to include the encode fix...

sv = ow.get(path.encode())

I've raised it as an issue on github, hopefully mathew will be along
and able to apply his expertise to it.

https://github.com/matthewwall/weewx-owfs/issues/3

On 23/05/2020, Gazza  wrote:
>
> Tried that change and it crashed with a different set of errors.
>
>
> 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/ec0c7d16-8d7b-4c0b-8285-982a91157a4b%40googlegroups.com.
>


-- 


Cheers
 Glenn

rorpi - read only raspberry pi & various weewx addons
https://github.com/glennmckechnie

-- 
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/CAAraAzhBLR2Dhjz687LRPWMXuA8RP4KKafb57yuGWo1zByz%3D9Q%40mail.gmail.com.


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

2020-05-23 Thread Gazza

Tried that change and it crashed with a different set of errors.


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/ec0c7d16-8d7b-4c0b-8285-982a91157a4b%40googlegroups.com.
ay 23 22:00:59 GazPi4 weewx[1120] INFO __main__: Initializing weewx version 
4.0.0
May 23 22:00:59 GazPi4 weewx[1120] INFO __main__: Using Python 2.7.16 (default, 
Oct 10 2019, 22:02:15) #012[GCC 8.3.0]
May 23 22:00:59 GazPi4 weewx[1120] INFO __main__: Platform 
Linux-4.19.97-v7l+-armv7l-with-debian-10.4
May 23 22:00:59 GazPi4 weewx[1120] INFO __main__: Locale is 'en_AU'
May 23 22:00:59 GazPi4 weewx[1120] INFO __main__: Using configuration file 
weewx.conf
May 23 22:00:59 GazPi4 weewx[1120] INFO weewx.engine: Loading station type SDR 
(user.sdr)
May 23 22:00:59 GazPi4 weewx[1120] INFO user.sdr: driver version is 0.77
May 23 22:00:59 GazPi4 weewx[1120] INFO user.sdr: sensor map is {u'windGust': 
u'wind_gust.38.FOWHx080Packet', u'outTempBatteryStatus': 
u'battery.38.FOWHx080Packet', u'rain_total': u'rain_total.38.FOWHx080Packet', 
u'windSpeed': u'wind_speed.38.FOWHx080Packet', u'windDir': 
u'wind_dir.38.FOWHx080Packet', u'outHumidity': u'humidity.38.FOWHx080Packet', 
u'outTemp': u'temperature.38.FOWHx080Packet', u'extraTemp1': 
u'temperature.32D1.AcuriteTowerPacketV2', u'batteryStatus1': 
u'battery.32D1.AcuriteTowerPacketV2', u'extraTemp2': 
u'temperature.39.ProloguePacket', u'extraHumid2': 
u'humidity.39.ProloguePacket', u'batteryStatus2': u'battery.39.ProloguePacket', 
u'extraTemp3': u'temperature.1:180.NexusTemperaturePacket', u'extraHumid3': 
u'humidity.1:180.NexusTemperaturePacket', u'batteryStatus3': 
u'battery.1:180.NexusTemperaturePacket', u'extraTemp4': 
u'temperature.5.ProloguePacket', u'extraHumid4': u'humidity.5.ProloguePacket', 
u'batteryStatus4': u'battery.5.ProloguePacket'}
May 23 22:00:59 GazPi4 weewx[1120] INFO user.sdr: deltas is {'strikes': 
'strikes_total', 'rain': 'rain_total'}
May 23 22:00:59 GazPi4 weewx[1120] INFO user.sdr: startup process 'rtl_433 -M 
utc -F json'
May 23 22:00:59 GazPi4 weewx[1120] INFO user.owfs: service version is 0.23
May 23 22:00:59 GazPi4 weewx[1120] INFO user.owfs: binding is archive
May 23 22:00:59 GazPi4 weewx[1120] INFO user.owfs: interface is /dev/i2c-1
May 23 22:00:59 GazPi4 weewx[1120] INFO user.owfs: sensor map is 
{u'extraTemp5': u'/uncached/28.E1044104/temperature'}
May 23 22:00:59 GazPi4 weewx[1120] INFO user.owfs: sensor type map is {}
May 23 22:00:59 GazPi4 weewx[1120] INFO user.owfs: sensor unit system is metric
May 23 22:00:59 GazPi4 weewx[1120] INFO weewx.engine: StdConvert target unit is 
0x1
May 23 22:00:59 GazPi4 weewx[1120] 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 23 22:00:59 GazPi4 weewx[1120] INFO weewx.wxservices: The following 
algorithms will be used for calculations: altimeter=aaASOS, maxSolarRad=RS
May 23 22:00:59 GazPi4 weewx[1120] INFO weewx.engine: Archive will use data 
binding wx_binding
May 23 22:00:59 GazPi4 weewx[1120] INFO weewx.engine: Record generation will be 
attempted in 'hardware'
May 23 22:00:59 GazPi4 weewx[1120] INFO weewx.engine: Using archive interval of 
300 seconds (specified in weewx configuration)
May 23 22:00:59 GazPi4 weewx[1120] INFO weewx.restx: StationRegistry: 
Registration not requested.
May 23 22:00:59 GazPi4 weewx[1120] INFO weewx.restx: Wunderground: Posting not 
enabled.
May 23 22:00:59 GazPi4 weewx[1120] INFO weewx.restx: PWSweather: Posting not 
enabled.
May 23 22:00:59 GazPi4 weewx[1120] INFO weewx.restx: CWOP: Posting not enabled.
May 23 22:00:59 GazPi4 weewx[1120] INFO weewx.restx: WOW: Posting not enabled.
May 23 22:00:59 GazPi4 weewx[1120] INFO weewx.restx: AWEKAS: Posting not 
enabled.
May 23 22:00:59 GazPi4 weewx[1120] INFO __main__: Starting up weewx version 
4.0.0
May 23 22:00:59 GazPi4 weewx[1120] INFO weewx.engine: Using binding 
'wx_binding' to database 'weewx.sdb'
May 23 22:00:59 GazPi4 weewx[1120] INFO weewx.manager: Starting backfill of 
daily summaries
May 23 22:00:59 GazPi4 weewx[1120] INFO weewx.engine: Starting main packet loop.
May 23 22:00:59 GazPi4 kernel: [  870.052667] r820t 8-001a: destroying instance
May 23 22:00:59 GazPi4 kernel: [  870.053082] dvb_usb_v2: 'Realtek RTL2832U 
reference design:1-1.2' successfully deinitialized and disconnected
May 23 22:02:15 GazPi4 systemd[1]: Starting Cleanup of Temporary 

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

2020-05-22 Thread Glenn McKechnie
Strange, I wouldn't have thought that would bite with python2.7 ?
It's really one for an expert,  but you can try the following and see
if it gets you any further.

line 205 in owfs.py
try changing that from...

owbinding.init(iface)

to...

owbinding.init(iface.encode())

On 22/05/2020, Gazza  wrote:
>
> I have just finished a new V4 python2 weewx build to overcome the
> python3-ow issues raised in another post.
>
> So far I have the SDR driver stuff working and my Fine Offset station and
> my other sensors are detected and are reporting correctly.
>
> I have just installed OWFS as a service for a one wire sensor and while it
> seems to have installed correctly and when I run the owfs.py directly I get
>
> the expected result.
>
> pi@GazPi4:/home/weewx $ sudo PYTHONPATH=/home/weewx/bin python /home/weewx/
> bin/user/owfs.py --sensors --iface /dev/i2c-1
> E1044104: /28.E1044104 DS18B20
>
> But when I run weewx directly it crashes with a bunch of critical errors.
> It looks like the OWFS interface is detected correctly on i2c-1 but then
> fail with engine.py and owfs errors.
>
> EMay 22 22:22:24 GazPi4 weewx[1817] INFO __main__: Locale is 'en_AU'
> May 22 22:22:24 GazPi4 weewx[1817] INFO __main__: Using configuration file
> weewx.conf
> May 22 22:22:24 GazPi4 weewx[1817] INFO weewx.engine: Loading station type
> SDR (user.sdr)
> May 22 22:22:24 GazPi4 weewx[1817] INFO user.sdr: driver version is 0.77
> May 22 22:22:24 GazPi4 weewx[1817] INFO user.sdr: sensor map is
> {u'windGust'
> : u'wind_gust.38.FOWHx080Packet', u'outTempBatteryStatus': u
> 'battery.38.FOWHx080Packet', u'rain_total': u'rain_total.38.FOWHx080Packet',
>
> u'windSpeed': u'wind_speed.38.FOWHx080Packet', u'windDir': u
> 'wind_dir.38.FOWHx080Packet', u'outHumidity': u'humidity.38.FOWHx080Packet',
>
> u'outTemp': u'temperature.38.FOWHx080Packet', u'extraTemp1': u
> 'temperature.32D1.AcuriteTowerPacketV2', u'batteryStatus1': u
> 'battery.32D1.AcuriteTowerPacketV2', u'extraTemp2': u
> 'temperature.39.ProloguePacket', u'extraHumid2': u
> 'humidity.39.ProloguePacket', u'batteryStatus2': u
> 'battery.39.ProloguePacket', u'extraTemp3': u
> 'temperature.1:180.NexusTemperaturePacket', u'extraHumid3': u
> 'humidity.1:180.NexusTemperaturePacket', u'batteryStatus3': u
> 'battery.1:180.NexusTemperaturePacket', u'extraTemp4': u
> 'temperature.5.ProloguePacket', u'extraHumid4':
> u'humidity.5.ProloguePacket'
> , u'batteryStatus4': u'battery.5.ProloguePacket'}
> May 22 22:22:24 GazPi4 weewx[1817] INFO user.sdr: deltas is {'strikes':
> 'strikes_total', 'rain': 'rain_total'}
> May 22 22:22:24 GazPi4 weewx[1817] INFO user.sdr: startup process 'rtl_433
> -M utc -F json'
> May 22 22:22:24 GazPi4 weewx[1817] INFO user.owfs: service version is 0.23
> May 22 22:22:24 GazPi4 weewx[1817] INFO user.owfs: binding is archive
> May 22 22:22:24 GazPi4 weewx[1817] INFO user.owfs: interface is /dev/i2c-1
> May 22 22:22:24 GazPi4 weewx[1817] INFO user.owfs: sensor map is {u
> 'extraTemp5': u'/uncached/28.E1044104/temperature'}
> May 22 22:22:24 GazPi4 weewx[1817] INFO user.owfs: sensor type map is {}
> May 22 22:22:24 GazPi4 weewx[1817] INFO user.owfs: sensor unit system is
> metric
> May 22 22:22:24 GazPi4 weewx[1817] INFO user.sdr: shutdown process rtl_433
> -M
> utc -F json
> May 22 22:22:25 GazPi4 kernel: [ 2598.911132] r820t 8-001a: destroying
> instance
> May 22 22:22:25 GazPi4 kernel: [ 2598.911503] dvb_usb_v2: 'Realtek RTL2832U
>
> reference design:1-1.2' successfully deinitialized and disconnected
> May 22 22:22:34 GazPi4 weewx[1817] INFO user.sdr: timed out waiting for
> stdout-thread
> May 22 22:22:44 GazPi4 weewx[1817] INFO user.sdr: timed out waiting for
> stderr-thread
> May 22 22:22:44 GazPi4 weewx[1817] CRITICAL __main__: Caught unrecoverable
> exception:
> May 22 22:22:44 GazPi4 weewx[1817] CRITICAL __main__:   in method
> 'init', argument 1 of type 'char const *'
> May 22 22:22:44 GazPi4 weewx[1817] CRITICAL __main__:   Traceback
> (most
> recent call last):
> May 22 22:22:44 GazPi4 weewx[1817] CRITICAL __main__: File
> "./bin/weewxd", line 148, in main
> May 22 22:22:44 GazPi4 weewx[1817] CRITICAL __main__:   engine =
>
> weewx.engine.StdEngine(config_dict)
> May 22 22:22:44 GazPi4 weewx[1817] CRITICAL __main__: File
> "/home/weewx/bin/weewx/engine.py", line 75, in __init__
> May 22 22:22:44 GazPi4 weewx[1817] CRITICAL __main__:   self.
> loadServices(config_dict)
> May 22 22:22:44 GazPi4 weewx[1817] CRITICAL __main__: File
> "/home/weewx/bin/weewx/engine.py", line 138, in loadServices
> May 22 22:22:44 GazPi4 weewx[1817] CRITICAL __main__:   obj =
> weeutil.weeutil.get_object(svc)(self,config_dict)
> May 22 22:22:44 GazPi4 weewx[1817] CRITICAL __main__: File
> "/home/weewx/bin/user/owfs.py", line 574, in __init__
> May 22 22:22:44 GazPi4 weewx[1817] CRITICAL __main__: 
> ow.init(
> self.interface)
> May 22 22:22:44 GazPi4 weewx[1817]