V4 with python2 OWFS errors

235 visualizzazioni
Passa al primo messaggio da leggere

Gazza

da leggere,
22 mag 2020, 08:48:0922/05/20
a weewx-user

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
E10441040000
: /28.E10441040000 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.E10441040000/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] CRITICAL __main__:     ****    File "/home/weewx/bin/user/owfs.py", line 205, in init
May 22 22:22:44 GazPi4 weewx[1817] CRITICAL __main__:     ****      owbinding.init(iface)
May 22 22:22:44 GazPi4 weewx[1817] CRITICAL __main__:     ****    File "/usr/lib/python2.7/dist-packages/ow/__init__.py", line 220, in init
May 22 22:22:44 GazPi4 weewx[1817] CRITICAL __main__:     ****      if not _OW.init( iface ):
May 22 22:22:44 GazPi4 weewx[1817] CRITICAL __main__:     ****  TypeError: in method 'init', argument 1 of type 'char const *'
May 22 22:22:44 GazPi4 weewx[1817] CRITICAL __main__:     ****  Exiting.
May 22 22:22:46 GazPi4 kernel: [ 2620.490958] usb 1-1.2: dvb_usb_v2: found a 'Realtek RTL2832U reference design' in warm state
May 22 22:22:46 GazPi4 kernel: [ 2620.547959] usb 1-1.2: dvb_usb_v2: will pass the complete MPEG2 transport stream to the software demuxer
May 22 22:22:46 GazPi4 kernel: [ 2620.548004] dvbdev: DVB: registering new adapter (Realtek RTL2832U reference design)
May 22 22:22:46 GazPi4 kernel: [ 2620.563832] i2c i2c-7: Added multiplexed i2c bus 8
May 22 22:22:46 GazPi4 kernel: [ 2620.563857] rtl2832 7-0010: Realtek RTL2832 successfully attached
May 22 22:22:46 GazPi4 kernel: [ 2620.563964] usb 1-1.2: DVB: registering adapter 0 frontend 0 (Realtek RTL2832 (DVB-T))...
May 22 22:22:46 GazPi4 kernel: [ 2620.564273] r820t 8-001a: creating new instance
May 22 22:22:46 GazPi4 kernel: [ 2620.571436] r820t 8-001a: Rafael Micro r820t successfully identified
May 22 22:22:46 GazPi4 kernel: [ 2620.599402] Registered IR keymap rc-empty
May 22 22:22:46 GazPi4 kernel: [ 2620.599555] rc rc0: Realtek RTL2832U reference design as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.2/rc/rc0
May 22 22:22:46 GazPi4 kernel: [ 2620.599752] input: Realtek RTL2832U reference design as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.2/rc/rc0/input9
May 22 22:22:46 GazPi4 kernel: [ 2620.600104] rc rc0: lirc_dev: driver dvb_usb_rtl28xxu registered at minor = 0, raw IR receiver, no transmitter
May 22 22:22:46 GazPi4 kernel: [ 2620.600310] usb 1-1.2: dvb_usb_v2: schedule remote query interval to 200 msecs
May 22 22:22:46 GazPi4 kernel: [ 2620.608788] usb 1-1.2: dvb_usb_v2: 'Realtek RTL2832U reference design' successfully initialized and connected
May 22 22:22:47 GazPi4 systemd-udevd[1842]: Process '/usr/sbin/th-cmd --socket /var/run/thd.socket --passfd --udev' failed with exit code 1.


My current weewx.conf with a few bits removed is attached.


Gaz

weewx.conf

Glenn McKechnie

da leggere,
22 mag 2020, 21:00:1222/05/20
a weewx...@googlegroups.com
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())
> --
> 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+...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/weewx-user/fea093e6-b69d-4749-9244-35fe0227f225%40googlegroups.com.
>


--


Cheers
Glenn

rorpi - read only raspberry pi & various weewx addons
https://github.com/glennmckechnie
Il messaggio è stato eliminato

Gazza

da leggere,
23 mag 2020, 08:30:4623/05/20
a weewx-user

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


Gaz



error2b.txt

Glenn McKechnie

da leggere,
23 mag 2020, 08:53:0923/05/20
a weewx...@googlegroups.com
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 <gaz...@gmail.com> 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+...@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.

Glenn McKechnie

da leggere,
24 mag 2020, 05:51:0124/05/20
a weewx...@googlegroups.com
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

Gazza

da leggere,
24 mag 2020, 06:18:0024/05/20
a weewx-user
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

Gazza

da leggere,
24 mag 2020, 06:19:2224/05/20
a weewx-user

Forgot to add the error file.


Gaz
error3.txt

Gazza

da leggere,
24 mag 2020, 06:41:4524/05/20
a weewx-user
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.

hi-lo.JPG





Gaz

Gazza

da leggere,
25 mag 2020, 08:24:3625/05/20
a weewx-user

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.E10441040000/temperature   # test DS18S20

So far it is all working as expected.


Gaz

Glenn McKechnie

da leggere,
25 mag 2020, 19:28:5025/05/20
a weewx...@googlegroups.com
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.
> --

Gazza

da leggere,
25 mag 2020, 19:34:1025/05/20
a weewx-user

Hi Glen,

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



Gaz

Glenn McKechnie

da leggere,
25 mag 2020, 21:27:3625/05/20
a weewx-user
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 :-)

Gazza

da leggere,
25 mag 2020, 23:53:0825/05/20
a weewx-user

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

Gazza

da leggere,
26 mag 2020, 01:54:2026/05/20
a weewx-user
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.E10441040000
/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 <module>
    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

Glenn McKechnie

da leggere,
26 mag 2020, 03:28:4426/05/20
a weewx...@googlegroups.com
On 26/05/2020, Gazza <gaz...@gmail.com> 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 "<stdin>", line 1, in <module>
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.E10441040000
> /bus.0
> /uncached
> /settings
> /system
> /statistics
> /structure
> /simultaneous
> /alarm

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

I'm assuming that /28.E10441040000 is your DS1820, in which case the
following is the command to reveal it's temperature reading...
owget /28.E10441040000/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 <module>
> 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.

Gazza

da leggere,
26 mag 2020, 04:06:0426/05/20
a weewx-user

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.E10441040000/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


Messy Potamia

da leggere,
26 mag 2020, 04:18:1726/05/20
a weewx-user
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

Glenn McKechnie

da leggere,
26 mag 2020, 04:31:4026/05/20
a weewx...@googlegroups.com
>> 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.

Gazza

da leggere,
26 mag 2020, 06:10:5126/05/20
a weewx-user
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.

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.

weather interface board 4-s.jpg



Gaz

Gazza

da leggere,
26 mag 2020, 06:25:5426/05/20
a weewx-user


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


Messy Potamia

da leggere,
26 mag 2020, 06:44:1926/05/20
a weewx-user
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"

Glenn McKechnie

da leggere,
26 mag 2020, 07:03:4826/05/20
a weewx...@googlegroups.com
On 26/05/2020, Gazza <gaz...@gmail.com> 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.

Glenn McKechnie

da leggere,
26 mag 2020, 07:16:2426/05/20
a weewx...@googlegroups.com
On 26/05/2020, Messy Potamia <messyp...@gmail.com> 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

Neville Davis

da leggere,
26 mag 2020, 16:47:1726/05/20
a weewx-user
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 buster....github 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

Glenn McKechnie

da leggere,
26 mag 2020, 19:36:3126/05/20
a weewx...@googlegroups.com
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 <nevilled...@gmail.com> 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 buster....github 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:
>>
> --
> 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+...@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.

Neville Davis

da leggere,
27 mag 2020, 02:09:2227/05/20
a weewx-user
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.E3AB0D000000/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, packet=packet))

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

May 27 15:15:16 raspberrypi weewx[5110] CRITICAL __main__:     ****      callback(event)

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

May 27 15:15:16 raspberrypi weewx[5110] CRITICAL __main__:     ****      raise BreakLoop

May 27 15:15:16 raspberrypi weewx[5110] CRITICAL __main__:     ****  weewx.engine.BreakLoop

May 27 15:15:16 raspberrypi weewx[5110] CRITICAL __main__:     ****  

May 27 15:15:16 raspberrypi weewx[5110] CRITICAL __main__:     ****  During handling of the above exception, another exception occurred:

May 27 15:15:16 raspberrypi weewx[5110] CRITICAL __main__:     ****  

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 594, in post_loop

May 27 15:15:16 raspberrypi weewx[5110] CRITICAL __main__:     ****      self._catchup(self.engine.console.genArchiveRecords)

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

May 27 15:15:16 raspberrypi weewx[5110] CRITICAL __main__:     ****      for record in generator(lastgood_ts):

May 27 15:15:16 raspberrypi weewx[5110] CRITICAL __main__:     ****    File "/home/weewx/bin/weewx/drivers/__init__.py", line 30, in genArchiveRecords

May 27 15:15:16 raspberrypi weewx[5110] CRITICAL __main__:     ****      raise NotImplementedError("Method 'genArchiveRecords' not implemented")

May 27 15:15:16 raspberrypi weewx[5110] CRITICAL __main__:     ****  NotImplementedError: Method 'genArchiveRecords' not implemented

May 27 15:15:16 raspberrypi weewx[5110] CRITICAL __main__:     ****  

May 27 15:15:16 raspberrypi weewx[5110] CRITICAL __main__:     ****  During handling of the above exception, another exception occurred:

May 27 15:15:16 raspberrypi weewx[5110] CRITICAL __main__:     ****  

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/weewxd", line 154, in main

May 27 15:15:16 raspberrypi weewx[5110] CRITICAL __main__:     ****      engine.run()

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

May 27 15:15:16 raspberrypi weewx[5110] CRITICAL __main__:     ****      self.dispatchEvent(weewx.Event(weewx.POST_LOOP))

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

May 27 15:15:16 raspberrypi weewx[5110] CRITICAL __main__:     ****      callback(event)

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

May 27 15:15:16 raspberrypi weewx[5110] CRITICAL __main__:     ****      self._software_catchup()

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

May 27 15:15:16 raspberrypi weewx[5110] CRITICAL __main__:     ****      origin='software'))

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

May 27 15:15:16 raspberrypi weewx[5110] CRITICAL __main__:     ****      callback(event)

May 27 15:15:16 raspberrypi weewx[5110] CRITICAL __main__:     ****    File "/home/weewx/bin/user/owfs.py", line 916, in handle_new_archive

May 27 15:15:16 raspberrypi weewx[5110] CRITICAL __main__:     ****      loginf("-----data = %s", data)

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

May 27 15:15:16 raspberrypi weewx[5110] CRITICAL __main__:     ****  Exiting.







with loop enabled


May 27 15:20:13 raspberrypi weewx[5261] INFO __main__: Using configuration file /home/weewx/weewx.conf

May 27 15:20:13 raspberrypi weewx[5261] INFO weewx.engine: Loading station type PiWeather (user.piweather)

May 27 15:20:13 raspberrypi weewx[5261] INFO user.owfs: service version is 0.23.6 (pyownet)

May 27 15:20:13 raspberrypi weewx[5261] INFO user.owfs: binding is loop

May 27 15:20:13 raspberrypi weewx[5261] INFO user.owfs: interface is localhost:4304

May 27 15:20:13 raspberrypi weewx[5261] INFO user.owfs: sensor map is {'rain': '/uncached/1D.E3AB0D000000/counter.b'}

May 27 15:20:13 raspberrypi weewx[5261] INFO user.owfs: sensor type map is {}

May 27 15:20:13 raspberrypi weewx[5261] INFO user.owfs: dallas direction map is {}

May 27 15:20:13 raspberrypi weewx[5261] INFO user.owfs: sensor unit system is metric

May 27 15:20:13 raspberrypi weewx[5261] INFO weewx.engine: StdConvert target unit is 0x1

May 27 15:20:14 raspberrypi weewx[5261] 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:20:14 raspberrypi weewx[5261] INFO weewx.wxservices: The following algorithms will be used for calculations: altimeter=aaASOS, maxSolarRad=RS

May 27 15:20:14 raspberrypi weewx[5261] INFO weewx.engine: Archive will use data binding wx_binding

May 27 15:20:14 raspberrypi weewx[5261] INFO weewx.engine: Record generation will be attempted in 'hardware'

May 27 15:20:14 raspberrypi weewx[5261] INFO weewx.engine: Using archive interval of 300 seconds (specified in weewx configuration)

May 27 15:20:14 raspberrypi weewx[5261] INFO weewx.restx: StationRegistry: Registration not requested.

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

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

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

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

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

May 27 15:20:14 raspberrypi weewx[5261] INFO __main__: Starting up weewx version 4.0.0

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

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

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

May 27 15:20:14 raspberrypi weewx[5261] WARNING weewx.qc: 2020-05-27 15:20:13 AEST (1590556813) LOOP value 'rain' 6529.921259842519 outside limits (0.0, 10.0)

May 27 15:20:16 raspberrypi weewx[5261] WARNING weewx.qc: 2020-05-27 15:20:16 AEST (1590556816) LOOP value 'rain' 6529.921259842519 outside limits (0.0, 10.0)

May 27 15:20:19 raspberrypi weewx[5261] WARNING weewx.qc: 2020-05-27 15:20:18 AEST (1590556818) LOOP value 'rain' 6529.921259842519 outside limits (0.0, 10.0)

May 27 15:20:21 raspberrypi weewx[5261] WARNING weewx.qc: 2020-05-27 15:20:21 AEST (1590556821) LOOP value 'rain' 6529.921259842519 outside limits (0.0, 10.0)

May 27 15:20:24 raspberrypi weewx[5261] WARNING weewx.qc: 2020-05-27 15:20:23 AEST (1590556823) LOOP value 'rain' 6529.921259842519 outside limits (0.0, 10.0)

May 27 15:20:26 raspberrypi weewx[5261] WARNING weewx.qc: 2020-05-27 15:20:26 AEST (1590556826) LOOP value 'rain' 6529.921259842519 outside limits (0.0, 10.0)

May 27 15:20:29 raspberrypi weewx[5261] WARNING weewx.qc: 2020-05-27 15:20:28 AEST (1590556828) LOOP value 'rain' 6529.921259842519 outside limits (0.0, 10.0)

May 27 15:20:31 raspberrypi weewx[5261] WARNING weewx.qc: 2020-05-27 15:20:31 AEST (1590556831) LOOP value 'rain' 6529.921259842519 outside limits (0.0, 10.0)

May 27 15:20:34 raspberrypi weewx[5261] WARNING weewx.qc: 2020-05-27 15:20:33 AEST (1590556833) LOOP value 'rain' 6529.921259842519 outside limits (0.0, 10.0)

May 27 15:20:36 raspberrypi weewx[5261] WARNING weewx.qc: 2020-05-27 15:20:36 AEST (1590556836) LOOP value 'rain' 6529.921259842519 outside limits (0.0, 10.0)

May 27 15:20:39 raspberrypi weewx[5261] WARNING weewx.qc: 2020-05-27 15:20:38 AEST (1590556838) LOOP value 'rain' 6529.921259842519 outside limits (0.0, 10.0)

May 27 15:20:41 raspberrypi weewx[5261] WARNING weewx.qc: 2020-05-27 15:20:41 AEST (1590556841) LOOP value 'rain' 6529.921259842519 outside limits (0.0, 10.0)

May 27 15:20:44 raspberrypi weewx[5261] WARNING weewx.qc: 2020-05-27 15:20:43 AEST (1590556843) LOOP value 'rain' 6529.921259842519 outside limits (0.0, 10.0)

May 27 15:20:46 raspberrypi weewx[5261] WARNING weewx.qc: 2020-05-27 15:20:46 AEST (1590556846) LOOP value 'rain' 6529.921259842519 outside limits (0.0, 10.0)

May 27 15:20:49 raspberrypi weewx[5261] WARNING weewx.qc: 2020-05-27 15:20:48 AEST (1590556848) LOOP value 'rain' 6529.921259842519 outside limits (0.0, 10.0)

May 27 15:20:51 raspberrypi weewx[5261] WARNING weewx.qc: 2020-05-27 15:20:51 AEST (1590556851) LOOP value 'rain' 6529.921259842519 outside limits (0.0, 10.0)

May 27 15:20:54 raspberrypi weewx[5261] WARNING weewx.qc: 2020-05-27 15:20:53 AEST (1590556853) LOOP value 'rain' 6529.921259842519 outside limits (0.0, 10.0)

May 27 15:20:56 raspberrypi weewx[5261] WARNING weewx.qc: 2020-05-27 15:20:56 AEST (1590556856) LOOP value 'rain' 6529.921259842519 outside limits (0.0, 10.0)

May 27 15:20:59 raspberrypi weewx[5261] WARNING weewx.qc: 2020-05-27 15:20:58 AEST (1590556858) LOOP value 'rain' 6529.921259842519 outside limits (0.0, 10.0)

May 27 15:21:01 raspberrypi weewx[5261] WARNING weewx.qc: 2020-05-27 15:21:01 AEST (1590556861) LOOP value 'rain' 6529.921259842519 outside limits (0.0, 10.0)

May 27 15:21:04 raspberrypi weewx[5261] WARNING weewx.qc: 2020-05-27 15:21:03 AEST (1590556863) LOOP value 'rain' 6529.921259842519 outside limits (0.0, 10.0)

May 27 15:21:06 raspberrypi weewx[5261] WARNING weewx.qc: 2020-05-27 15:21:06 AEST (1590556866) LOOP value 'rain' 6529.921259842519 outside limits (0.0, 10.0)

May 27 15:21:09 raspberrypi weewx[5261] WARNING weewx.qc: 2020-05-27 15:21:08 AEST (1590556868) LOOP value 'rain' 6529.921259842519 outside limits (0.0, 10.0)

May 27 15:21:11 raspberrypi weewx[5261] WARNING weewx.qc: 2020-05-27 15:21:11 AEST (1590556871) LOOP value 'rain' 6529.921259842519 outside limits (0.0, 10.0)

May 27 15:21:14 raspberrypi weewx[5261] WARNING weewx.qc: 2020-05-27 15:21:13 AEST (1590556873) LOOP value 'rain' 6529.921259842519 outside limits (0.0, 10.0)


#   This section configures the internal weewx engine.


[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 = user.owfs.OWFSService

        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,$

        report_services = weewx.engine.StdPrint, weewx.engine.StdReport



#############################################################################


[PiWeather]

    loop_interval = 2.5

    driver = user.piweather


#############################################################################



#############################################################################


# Options for extension 'owfs'

[OWFS]

    #interface = u

    interface = localhost:4304

    binding = loop

    driver = user.owfs

    [[sensor_map]]

        rain = /uncached/1D.E3AB0D000000/counter.b

        #rain = /1D.E3AB0D000000/counter.b



pi@raspberrypi:/home/sensorreadings $ python owget.py /1D.E3AB0D000000/counter.b

       16586

pi@raspberrypi:/home/sensorreadings $ 

Glenn McKechnie

da leggere,
27 mag 2020, 03:31:3027/05/20
a weewx...@googlegroups.com
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
> *pi@raspberrypi*:*/home/sensorreadings $* python owget.py
> /1D.E3AB0D000000/counter.b
>
> 16586
>
> *pi@raspberrypi*:*/home/sensorreadings $*
>> > email to weewx...@googlegroups.com <javascript:>.
>> > 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+...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/weewx-user/e413a708-30a9-4433-a88e-d56a029cc21b%40googlegroups.com.

Neville Davis

da leggere,
27 mag 2020, 06:15:0727/05/20
a weewx-user
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

Neville Davis

da leggere,
27 mag 2020, 17:12:5627/05/20
a weewx-user
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

Glenn McKechnie

da leggere,
27 mag 2020, 22:17:1227/05/20
a weewx...@googlegroups.com
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.
> email to weewx-user+...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/weewx-user/d09bc866-7f1a-4d7b-910d-5175bc4afb1e%40googlegroups.com.

Gazza

da leggere,
28 mag 2020, 02:54:3728/05/20
a weewx-user

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

Neville Davis

da leggere,
28 mag 2020, 16:47:0228/05/20
a weewx-user
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

Neville Davis

da leggere,
28 mag 2020, 17:11:4728/05/20
a weewx-user
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:
Rispondi a tutti
Rispondi all'autore
Inoltra
0 nuovi messaggi