OWFS crashing on restart of Weewx

47 views
Skip to first unread message

gord hart

unread,
Jan 15, 2021, 2:36:38 PM1/15/21
to weewx-user
Hello
I am trying to get  a RP3 to talk to a older Dallas OneWire weather instrument.
The WeeWx installation works with the simulator and outputs weather reports but will not start when I use OWFS as the driver in the weewx.conf.
The 1wire is connected to the RP3 via a i2C board and this is working as I can see data via a browser at  localhost:2121
Using the latest build for Raspban.
On restart Weewx reports

  Initializing weewx version 4.3.0
Jan 15 15:17:01 raspberrypi weewx[4497] INFO __main__: Using Python 3.7.3 (default, Jul 25 2020, 13:03:44) #012[GCC 8.3.0]
Jan 15 15:17:01 raspberrypi weewx[4497] INFO __main__: Platform Linux-5.4.79-v7+-armv7l-with-debian-10.7
Jan 15 15:17:01 raspberrypi weewx[4497] INFO __main__: Locale is 'en_CA.UTF-8'
Jan 15 15:17:01 raspberrypi weewx[4497] INFO __main__: PID file is /var/run/weewx.pid
Jan 15 15:17:01 raspberrypi weewx[4515] INFO __main__: Using configuration file /etc/weewx/weewx.conf
Jan 15 15:17:01 raspberrypi weewx[4515] INFO __main__: Debug is 0
Jan 15 15:17:01 raspberrypi weewx[4515] INFO weewx.engine: Loading station type OWFS (user.owfs)
Jan 15 15:17:01 raspberrypi weewx[4515] CRITICAL __main__: Caught unrecoverable exception:
Jan 15 15:17:01 raspberrypi weewx[4515] CRITICAL __main__:     ****  No one-wire library found
Jan 15 15:17:01 raspberrypi weewx[4485]: Starting weewx weather system: weewx.
Jan 15 15:17:01 raspberrypi systemd[1]: Started LSB: weewx weather system.
Jan 15 15:17:01 raspberrypi weewx[4515] CRITICAL __main__:     ****  Traceback (most recent call last):
Jan 15 15:17:01 raspberrypi weewx[4515] CRITICAL __main__:     ****    File "/usr/share/weewx/user/owfs.py", line 264, in <module>
Jan 15 15:17:01 raspberrypi weewx[4515] CRITICAL __main__:     ****      ow = OWFSBinding()
Jan 15 15:17:01 raspberrypi weewx[4515] CRITICAL __main__:     ****    File "/usr/share/weewx/user/owfs.py", line 202, in __init__
Jan 15 15:17:01 raspberrypi weewx[4515] CRITICAL __main__:     ****      import ow as owbinding
Jan 15 15:17:01 raspberrypi weewx[4515] CRITICAL __main__:     ****  ModuleNotFoundError: No module named 'ow'
Jan 15 15:17:01 raspberrypi weewx[4515] CRITICAL __main__:     ****  
Jan 15 15:17:01 raspberrypi weewx[4515] CRITICAL __main__:     ****  During handling of the above exception, another exception occurred:
Jan 15 15:17:01 raspberrypi weewx[4515] CRITICAL __main__:     ****  
Jan 15 15:17:01 raspberrypi weewx[4515] CRITICAL __main__:     ****  Traceback (most recent call last):
Jan 15 15:17:01 raspberrypi weewx[4515] CRITICAL __main__:     ****    File "/usr/share/weewx/user/owfs.py", line 267, in <module>
Jan 15 15:17:01 raspberrypi weewx[4515] CRITICAL __main__:     ****      ow = OWNetBinding()
Jan 15 15:17:01 raspberrypi weewx[4515] CRITICAL __main__:     ****    File "/usr/share/weewx/user/owfs.py", line 231, in __init__
Jan 15 15:17:01 raspberrypi weewx[4515] CRITICAL __main__:     ****      import pyownet
Jan 15 15:17:01 raspberrypi weewx[4515] CRITICAL __main__:     ****  ModuleNotFoundError: No module named 'pyownet'
Jan 15 15:17:01 raspberrypi weewx[4515] CRITICAL __main__:     ****  
Jan 15 15:17:01 raspberrypi weewx[4515] CRITICAL __main__:     ****  During handling of the above exception, another exception occurred:
Jan 15 15:17:01 raspberrypi weewx[4515] CRITICAL __main__:     ****  
Jan 15 15:17:01 raspberrypi weewx[4515] CRITICAL __main__:     ****  Traceback (most recent call last):
Jan 15 15:17:01 raspberrypi weewx[4515] CRITICAL __main__:     ****    File "/usr/share/weewx/weewxd", line 148, in main
Jan 15 15:17:01 raspberrypi weewx[4515] CRITICAL __main__:     ****      engine = weewx.engine.StdEngine(config_dict)
Jan 15 15:17:01 raspberrypi weewx[4515] CRITICAL __main__:     ****    File "/usr/share/weewx/weewx/engine.py", line 81, in __init__
Jan 15 15:17:01 raspberrypi weewx[4515] CRITICAL __main__:     ****      self.setupStation(config_dict)
Jan 15 15:17:01 raspberrypi weewx[4515] CRITICAL __main__:     ****    File "/usr/share/weewx/weewx/engine.py", line 108, in setupStation
Jan 15 15:17:01 raspberrypi weewx[4515] CRITICAL __main__:     ****      __import__(driver)
Jan 15 15:17:01 raspberrypi weewx[4515] CRITICAL __main__:     ****    File "/usr/share/weewx/user/owfs.py", line 269, in <module>
Jan 15 15:17:01 raspberrypi weewx[4515] CRITICAL __main__:     ****      raise Exception("No one-wire library found")
Jan 15 15:17:01 raspberrypi weewx[4515] CRITICAL __main__:     ****  Exception: No one-wire library found
Jan 15 15:17:01 raspberrypi weewx[4515] CRITICAL __main__:     ****  Exiting.


Any one have any ideas?
Cheers
Gordon

gjr80

unread,
Jan 15, 2021, 2:42:57 PM1/15/21
to weewx-user
Hi,

Did you install the one-wire python bindings as per step 1 in the install instructions?

Gary

Glenn McKechnie

unread,
Jan 15, 2021, 5:04:39 PM1/15/21
to weewx...@googlegroups.com
Hi Gordon,

python3-ow disappeared from the RPI linux repo, which leaves you with
the fallback module - pyownet. That module is used along with the
requirement of a running owserver (from owfs, which it sounds like you
have one running already).

Mathews driver for the owfs has been forked to...
https://github.com/glennmckechnie/weewx-owfs

where there are additional notes in the README (as well as notes in
the drivers source).

That driver is working here, and has been used by others with weewx4
and python3 (also with an i-2C board) so once you're over that
initial module hiccup you should hopefully be okay.

basically, the notes for your issue are...

python3.x for weewx versions > 4
sudo apt-get install owserver
pip3 install pyownet (if it is not available via apt-get.
(use apt-get install pip3-python to install pip3 )


Once you have pyownet installed and running, that fork of the driver
should then work for you.


On 16/01/2021, gjr80 <gjrod...@gmail.com> wrote:
> Hi,
>
> Did you install the one-wire python bindings as per step 1 in the install
> instructions <https://github.com/weewx/weewx/wiki/owfs>?
> --
> 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/26c25bc5-35b9-417a-b493-85571cdfb37en%40googlegroups.com.
>


--


Cheers
Glenn

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

gord hart

unread,
Jan 15, 2021, 5:11:32 PM1/15/21
to weewx-user
Hi Gary
python-ow installed just fine but python3-ow gives file not found  unable to locate package error.
wee_extension --install weewx-owfs.zip worked.

sudo PYTHONPATH=/usr/share/weewx python /usr/share/weewx/user/owfs.py iface=i2c-1 --sensors
Gives
Traceback (most recent call last):
  File "/usr/share/weewx/user/owfs.py", line 191, in <module>
    from weewx.engine import StdService
  File "/usr/share/weewx/weewx/engine.py", line 20, in <module>
    import configobj
ImportError: No module named configobj

Even though I have installed configobj previously. 

Any thoughts?
Cheers
Gordon


gjr80

unread,
Jan 15, 2021, 5:24:41 PM1/15/21
to weewx-user
You need to follow Glenn’s advice. 

As an aside you are running WeeWX under python3 so you need a python3 version of the python ow bindings; python-ow is a python2 library so that is why it does not work with your WeeWX install even though it was successfully installed 

Gary 

Reply all
Reply to author
Forward
0 new messages