New install of 4.4 but owfs crashes it

141 views
Skip to first unread message

messyp...@gmail.com

unread,
Apr 1, 2021, 10:40:48 AM4/1/21
to weewx-user
Installed 4.4 using latest install method in documentation - configure apt, install. It runs fine. Then I look for the "latest" info on installing owfs, and I found and followed this
https://github.com/weewx/weewx/wiki/owfss  & I read the introduction. 
At this point I should note I have previous weewx running for several yrs including a Davis and the Sheepwalk "rpi3v2" pi hat which provides ow bus, the 4 measurements are incorporated into my system just fine. I installed that using the setup.py, and I'm sure I followed something similar to my above quote, if not that exactly. I'm not going to touch that setup. 
This 
sudo PYTHONPATH=/usr/share/weewx python /usr/share/weewx/user/owfs.py --readings
has NEVER worked for me even on the existing PI3b running weewx 3.91 but data comes through fine, so I wasn't surprised about it. Anyway here is some pertinent settings:
pi@PI4BUSB:~ $ sudo python -V
Python 2.7.16
Note: I also have Python v3 installed, it was installed via pip3 to get the almanac stuff.
Excerpt from weewx.conf:
[Engine]

    # The following section specifies which services should be run and in what order.
    [[Services]]
        prep_services = weewx.engine.StdTimeSynch
        data_services = user.owfs.OWFSService
        process_services = weewx.engine.StdConvert, weewx.engine.StdCalibrate, weewx.engine.StdQC, weewx.wxservices.StdWXCalculate
        xtype_services = weewx.wxxtypes.StdWXXTypes, weewx.wxxtypes.StdPressureCooker, weewx.wxxtypes.StdRainRater, weewx.wxxtypes.StdDelta
        archive_services = weewx.engine.StdArchive
        restful_services = weewx.restx.StdStationRegistry, weewx.restx.StdWunderground, weewx.restx.StdPWSweather, weewx.restx.StdCWOP, weewx.restx.StdWOW, weewx.restx.StdAWEKAS
        report_services = weewx.engine.StdPrint, weewx.engine.StdReport
[OWFS]
    driver = user.owfs
    interface = /dev/i2c-1
    [[sensor_map]]
        extraTemp1 = uncached/28.029007D6013C/temperature
        extraTemp2 = uncached/28.D28607D6013C/temperature
        extraTemp3 = uncached/28.9BAB07D6013C/temperature
    [[sensor_type]]
        extraTemp1 = gauge
        extraTemp2 = gauge
        extraTemp3 = gauge
#
Here's the weewx.log upon restarting:
Apr  1 09:06:07 PI4BUSB weewx[8998]: Starting weewx weather system: weewx.
Apr  1 09:06:07 PI4BUSB weewx[9013] CRITICAL __main__: Caught unrecoverable exception:
Apr  1 09:06:07 PI4BUSB weewx[9013] CRITICAL __main__:     ****  No one-wire library found
Apr  1 09:06:07 PI4BUSB weewx[9013] CRITICAL __main__:     ****  Traceback (most recent call last):
Apr  1 09:06:07 PI4BUSB weewx[9013] CRITICAL __main__:     ****    File "/usr/share/weewx/user/owfs.py", line 264, in <module>
Apr  1 09:06:07 PI4BUSB weewx[9013] CRITICAL __main__:     ****      ow = OWFSBinding()
Apr  1 09:06:07 PI4BUSB weewx[9013] CRITICAL __main__:     ****    File "/usr/share/weewx/user/owfs.py", line 202, in __init__
Apr  1 09:06:07 PI4BUSB weewx[9013] CRITICAL __main__:     ****      import ow as owbinding
Apr  1 09:06:07 PI4BUSB weewx[9013] CRITICAL __main__:     ****  ModuleNotFoundError: No module named 'ow'
Apr  1 09:06:07 PI4BUSB weewx[9013] CRITICAL __main__:     ****  
Apr  1 09:06:07 PI4BUSB weewx[9013] CRITICAL __main__:     ****  During handling of the above exception, another exception occurred:
Apr  1 09:06:07 PI4BUSB weewx[9013] CRITICAL __main__:     ****  
Apr  1 09:06:07 PI4BUSB weewx[9013] CRITICAL __main__:     ****  Traceback (most recent call last):
Apr  1 09:06:07 PI4BUSB weewx[9013] CRITICAL __main__:     ****    File "/usr/share/weewx/user/owfs.py", line 267, in <module>
Apr  1 09:06:07 PI4BUSB weewx[9013] CRITICAL __main__:     ****      ow = OWNetBinding()
Apr  1 09:06:07 PI4BUSB weewx[9013] CRITICAL __main__:     ****    File "/usr/share/weewx/user/owfs.py", line 231, in __init__
Apr  1 09:06:07 PI4BUSB weewx[9013] CRITICAL __main__:     ****      import pyownet
Apr  1 09:06:07 PI4BUSB weewx[9013] CRITICAL __main__:     ****  ModuleNotFoundError: No module named 'pyownet'
Apr  1 09:06:07 PI4BUSB weewx[9013] CRITICAL __main__:     ****  
Apr  1 09:06:07 PI4BUSB weewx[9013] CRITICAL __main__:     ****  During handling of the above exception, another exception occurred:
Apr  1 09:06:07 PI4BUSB weewx[9013] CRITICAL __main__:     ****  
Apr  1 09:06:07 PI4BUSB weewx[9013] CRITICAL __main__:     ****  Traceback (most recent call last):
Apr  1 09:06:07 PI4BUSB weewx[9013] CRITICAL __main__:     ****    File "/usr/share/weewx/weewxd", line 151, in main
Apr  1 09:06:07 PI4BUSB weewx[9013] CRITICAL __main__:     ****      engine = weewx.engine.StdEngine(config_dict)
Apr  1 09:06:07 PI4BUSB weewx[9013] CRITICAL __main__:     ****    File "/usr/share/weewx/weewx/engine.py", line 93, in __init__
Apr  1 09:06:07 PI4BUSB weewx[9013] CRITICAL __main__:     ****      self.loadServices(config_dict)
Apr  1 09:06:07 PI4BUSB weewx[9013] CRITICAL __main__:     ****    File "/usr/share/weewx/weewx/engine.py", line 161, in loadServices
Apr  1 09:06:07 PI4BUSB weewx[9013] CRITICAL __main__:     ****      obj = weeutil.weeutil.get_object(svc)(self, config_dict)
Apr  1 09:06:07 PI4BUSB weewx[9013] CRITICAL __main__:     ****    File "/usr/share/weewx/weeutil/weeutil.py", line 1093, in get_object
Apr  1 09:06:07 PI4BUSB weewx[9013] CRITICAL __main__:     ****      mod = __import__(module)
Apr  1 09:06:07 PI4BUSB weewx[9013] CRITICAL __main__:     ****    File "/usr/share/weewx/user/owfs.py", line 269, in <module>
Apr  1 09:06:07 PI4BUSB weewx[9013] CRITICAL __main__:     ****      raise Exception("No one-wire library found")
Apr  1 09:06:07 PI4BUSB weewx[9013] CRITICAL __main__:     ****  Exception: No one-wire library found
Apr  1 09:06:07 PI4BUSB weewx[9013] CRITICAL __main__:     ****  Exiting.
========
Weather station type: Simulator
Installation method: apt
========
Somewhere I have gotten caught up in the disconnect between the different documentation between github & Weewx documentation. Like I said, I have this ow host adapter running just fine on weewx 3.9.1 on a Pi3b, for several years, installed via setup.py method (although my instint tells me the setup method may not be the problem).
I'd appreciate your help, Thanks.

vince

unread,
Apr 1, 2021, 11:44:30 AM4/1/21
to weewx-user
On Thursday, April 1, 2021 at 7:40:48 AM UTC-7 messyp...@gmail.com wrote:
Apr  1 09:06:07 PI4BUSB weewx[8998]: Starting weewx weather system: weewx.
Apr  1 09:06:07 PI4BUSB weewx[9013] CRITICAL __main__: Caught unrecoverable exception:
Apr  1 09:06:07 PI4BUSB weewx[9013] CRITICAL __main__:     ****  No one-wire library found
Apr  1 09:06:07 PI4BUSB weewx[9013] CRITICAL __main__:     ****  Traceback (most recent call last):
Apr  1 09:06:07 PI4BUSB weewx[9013] CRITICAL __main__:     ****    File "/usr/share/weewx/user/owfs.py", line 264, in <module>
Apr  1 09:06:07 PI4BUSB weewx[9013] CRITICAL __main__:     ****      ow = OWFSBinding()
Apr  1 09:06:07 PI4BUSB weewx[9013] CRITICAL __main__:     ****    File "/usr/share/weewx/user/owfs.py", line 202, in __init__
Apr  1 09:06:07 PI4BUSB weewx[9013] CRITICAL __main__:     ****      import ow as owbinding
Apr  1 09:06:07 PI4BUSB weewx[9013] CRITICAL __main__:     ****  ModuleNotFoundError: No module named 'ow'


Best guess is you installed weewx 4 which defaults to python3, and you have not installed the python3 version of the library the driver needs.


Messy Potamia

unread,
Apr 1, 2021, 12:14:13 PM4/1/21
to weewx...@googlegroups.com
I didn't see anything in the documentation I read about how to get "the python3 version of the library the driver needs". I know 3 is installed because I installed the pyephem & got it working using pip3. Can someone point me to a procedure to correct this? Thanks.

--
You received this message because you are subscribed to a topic in the Google Groups "weewx-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/5ybl8_8K4QA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/20ed4b86-87c2-4af6-9383-ec05265444a2n%40googlegroups.com.

vince

unread,
Apr 1, 2021, 2:38:52 PM4/1/21
to weewx-user
If you use python3, you need python3 versions of all python modules 'and' python3-compatible versions of all drivers, extensions, and skins you install.

That should be somewhat obvious I'd hope, given hundreds of posts since v4 came out with people battling the python3 transition.

vince

unread,
Apr 1, 2021, 3:01:20 PM4/1/21
to weewx-user
There appear to be two pages in the wiki with slightly different filenames.

Try https://github.com/weewx/weewx/wiki/owfs and look at step1 which mentions python3 specifically.

Glenn McKechnie

unread,
Apr 1, 2021, 5:01:19 PM4/1/21
to weewx...@googlegroups.com
Back around May 2020 the python3-ow version of ow disappeared from the
RPi and Debian repos. Where it went, or why no-one knows. There is a
user group post titled "python3-ow for OWFS" where this cropped up.

All that aside, you need pyownet (the module using 'pip3 install
pyownet' if the apt repo doesn't have it) and owserver (from OWFS
using sudo apt-get install owserver).

The following is a fork of the original owfs driver / service and is
known to work with weewx4 and your i2c combo.
You should also find that the --readings stanza should work with this version.

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

The README at that fork should hold enough info to expand on those
dependencies, if not ask for clarification.

pydoc_owfs.txt will also hold some clues regarding the owserver configuration.
ie:-
server: device /dev/i2c-1 # for a pi using i2c-1
server: port = 4304
>>>> <https://groups.google.com/d/msgid/weewx-user/20ed4b86-87c2-4af6-9383-ec05265444a2n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "weewx-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to weewx-user+...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/weewx-user/402490d2-bc67-4c5f-ac84-855c20e02c62n%40googlegroups.com.
>


--


Cheers
Glenn

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

Messy Potamia

unread,
Apr 1, 2021, 6:28:18 PM4/1/21
to weewx...@googlegroups.com
I read the readme.txt at https://github.com/glennmckechnie/weewx-owfs.
In fact several times.
I'm sorry but it is not clear to me what I'm supposed to do. Although
I'm currently running Simulator, whenever I enable the line in
weewx.conf that says
[Engine]
data_services = user.owfs.OWFSService
it crashes weewx, with several lines of errors (posted above in
entireity) but the main ones seem to be:
CRITICAL __main__: **** No one-wire library found
CRITICAL __main__: **** ModuleNotFoundError: No module named 'ow'
CRITICAL __main__: **** ModuleNotFoundError: No module named 'pyownet'
all this even though I have installed (several times now) pyownet and ow.
sudo apt-get install python-ow
sudo apt-get install pyownet #NOT FOUND SO USED:
pip3 install pyownet
wee_extension --install weewx-owfs.zip
Even before all this, my i2c-1 (Sheepwalk rpi3v2) was serving up the 4
DS18B20's I hooked up to my browser at http://192.168.2.108:2121/
It is just that the weewx 4 that crashes with the above errors. I
cannot follow the rest of these notes about weewx4/python3/buster
problems. I've about got your readme.txt memorized.
Also, my station type will not be OWFS, it will be a Davis and extra
measurements will be gotten through the i2c-1 ow device.
Rebooting one last time...
> To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/CAAraAzh2qyhF-7SEbXSOo0FVCtAEO6xQnNR4b5pOa6viz81bVg%40mail.gmail.com.

Messy Potamia

unread,
Apr 1, 2021, 6:33:53 PM4/1/21
to weewx...@googlegroups.com
I am still getting the same errors when in [engine][[services]] I
uncomment data_services = user.owfs.OWFSService

Glenn McKechnie

unread,
Apr 1, 2021, 6:39:47 PM4/1/21
to weewx...@googlegroups.com
Okay...

Need to see a full syslog from a weewx restart.

Also your vetted weewx.conf file (sans passwords etc) I think it's
wee_debug that outputs that information.

Not sure why you're running the simulator when you have the Davis as
the main driver?
Correct that owfs will be run as a service in that case.
> https://groups.google.com/d/msgid/weewx-user/CAB7-S77C814R56ZbrJDQ5AAzYMJoawHTn1SGajkzPMSyk2U9uA%40mail.gmail.com.

Messy Potamia

unread,
Apr 1, 2021, 6:49:16 PM4/1/21
to weewx...@googlegroups.com
Glenn, here is the log entries:

Apr 1 17:31:36 PI4BUSB weewx[759] INFO __main__: Initializing weewx
version 4.4.0
Apr 1 17:31:36 PI4BUSB weewx[759] INFO __main__: Using Python 3.7.3
(default, Jan 22 2021, 20:04:44) #012[GCC 8.3.0]
Apr 1 17:31:36 PI4BUSB weewx[759] INFO __main__: Platform
Linux-5.4.83-v7l+-armv7l-with-debian-10.7
Apr 1 17:31:36 PI4BUSB weewx[759] INFO __main__: Locale is 'en_US.UTF-8'
Apr 1 17:31:36 PI4BUSB weewx[759] INFO __main__: PID file is /var/run/weewx.pid
Apr 1 17:31:36 PI4BUSB weewx[763] INFO __main__: Using configuration
file /etc/weewx/weewx.conf
Apr 1 17:31:36 PI4BUSB weewx[763] INFO __main__: Debug is 0
Apr 1 17:31:36 PI4BUSB weewx[763] INFO weewx.engine: Loading station
type Simulator (weewx.drivers.simulator)
Apr 1 17:31:36 PI4BUSB weewx[748]: Starting weewx weather system: weewx.
Apr 1 17:31:36 PI4BUSB weewx[763] CRITICAL __main__: Caught
unrecoverable exception:
Apr 1 17:31:36 PI4BUSB weewx[763] CRITICAL __main__: **** No
one-wire library found
Apr 1 17:31:36 PI4BUSB weewx[763] CRITICAL __main__: ****
Traceback (most recent call last):
Apr 1 17:31:36 PI4BUSB weewx[763] CRITICAL __main__: **** File
"/usr/share/weewx/user/owfs.py", line 264, in <module>
Apr 1 17:31:36 PI4BUSB weewx[763] CRITICAL __main__: **** ow
= OWFSBinding()
Apr 1 17:31:36 PI4BUSB weewx[763] CRITICAL __main__: **** File
"/usr/share/weewx/user/owfs.py", line 202, in __init__
Apr 1 17:31:36 PI4BUSB weewx[763] CRITICAL __main__: ****
import ow as owbinding
Apr 1 17:31:36 PI4BUSB weewx[763] CRITICAL __main__: ****
ModuleNotFoundError: No module named 'ow'
Apr 1 17:31:36 PI4BUSB weewx[763] CRITICAL __main__: ****
Apr 1 17:31:36 PI4BUSB weewx[763] CRITICAL __main__: **** During
handling of the above exception, another exception occurred:
Apr 1 17:31:36 PI4BUSB weewx[763] CRITICAL __main__: ****
Apr 1 17:31:36 PI4BUSB weewx[763] CRITICAL __main__: ****
Traceback (most recent call last):
Apr 1 17:31:36 PI4BUSB weewx[763] CRITICAL __main__: **** File
"/usr/share/weewx/user/owfs.py", line 267, in <module>
Apr 1 17:31:36 PI4BUSB weewx[763] CRITICAL __main__: **** ow
= OWNetBinding()
Apr 1 17:31:36 PI4BUSB weewx[763] CRITICAL __main__: **** File
"/usr/share/weewx/user/owfs.py", line 231, in __init__
Apr 1 17:31:36 PI4BUSB weewx[763] CRITICAL __main__: ****
import pyownet
Apr 1 17:31:36 PI4BUSB weewx[763] CRITICAL __main__: ****
ModuleNotFoundError: No module named 'pyownet'
Apr 1 17:31:36 PI4BUSB weewx[763] CRITICAL __main__: ****
Apr 1 17:31:36 PI4BUSB weewx[763] CRITICAL __main__: **** During
handling of the above exception, another exception occurred:
Apr 1 17:31:36 PI4BUSB weewx[763] CRITICAL __main__: ****
Apr 1 17:31:36 PI4BUSB weewx[763] CRITICAL __main__: ****
Traceback (most recent call last):
Apr 1 17:31:36 PI4BUSB weewx[763] CRITICAL __main__: **** File
"/usr/share/weewx/weewxd", line 151, in main
Apr 1 17:31:36 PI4BUSB weewx[763] CRITICAL __main__: ****
engine = weewx.engine.StdEngine(config_dict)
Apr 1 17:31:36 PI4BUSB weewx[763] CRITICAL __main__: **** File
"/usr/share/weewx/weewx/engine.py", line 93, in __init__
Apr 1 17:31:36 PI4BUSB weewx[763] CRITICAL __main__: ****
self.loadServices(config_dict)
Apr 1 17:31:36 PI4BUSB weewx[763] CRITICAL __main__: **** File
"/usr/share/weewx/weewx/engine.py", line 161, in loadServices
Apr 1 17:31:36 PI4BUSB weewx[763] CRITICAL __main__: ****
obj = weeutil.weeutil.get_object(svc)(self, config_dict)
Apr 1 17:31:36 PI4BUSB weewx[763] CRITICAL __main__: **** File
"/usr/share/weewx/weeutil/weeutil.py", line 1093, in get_object
Apr 1 17:31:36 PI4BUSB weewx[763] CRITICAL __main__: ****
mod = __import__(module)
Apr 1 17:31:36 PI4BUSB weewx[763] CRITICAL __main__: **** File
"/usr/share/weewx/user/owfs.py", line 269, in <module>
Apr 1 17:31:36 PI4BUSB weewx[763] CRITICAL __main__: ****
raise Exception("No one-wire library found")
Apr 1 17:31:36 PI4BUSB weewx[763] CRITICAL __main__: ****
Exception: No one-wire library found
Apr 1 17:31:36 PI4BUSB weewx[763] CRITICAL __main__: **** Exiting.
And here is the weewx.conf in its entireity. (Note, I'm running
simulator on this pi because my Davis / PI3B is in production and
don't want to deploy this PI4 to it, it's not easily accessible!)
-- I will attach it -- There are no passwords anywhere yet as it's not
put into service yet -- Let me know if you do not get the atch --
Thanks -

On Thu, Apr 1, 2021 at 5:39 PM Glenn McKechnie
> To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/CAAraAzjFpLb8C_eVE5jy1D42Am-JfmRomAeBNf5cs4w5eZcF-w%40mail.gmail.com.
weewx.conf

Glenn McKechnie

unread,
Apr 1, 2021, 7:37:27 PM4/1/21
to weewx...@googlegroups.com
Firstly...
pip3 show pyownet
If you have pyownet installed, that should return something meaningful.

Or run python3 and import pyownet from that command line eg:-

$ python3
Python 3.7.3 (default, Dec 20 2019, 18:57:59)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyownet
>>>

If you don't have a good result as in the above, then what follows is mute.

Wordwrap is making that log dump hard to read but you are running python3.7
Not sure which owfs.py is being used as it appears to dump before we
get to that point.

which owfs.py are you using mwalls original, or my fork?
I know my fork works. mwalls has / had a few gotchas.


Reviewing your weewx.conf file, there is confusion within that.

[[Services]]
[...]
# data_services = user.owfs.OWFSService

[OWFS]
interface = /dev/i2c-1
driver = user.owfs
[...]

You have the [OWFS] stanza configured as a driver
(driver = user.owfs)

which makes sense as the [[Services]] is commented out
# data_services = user.owfs.OWFSService

yet you're running with the Simulator driver.
Weewx can't have 2 drivers! 1 driver, the rest are services.

If you run it as a driver then the weewx.conf is almost correct but
you need to adjust the station_type.
station_type = OWFS

If you run it as a service then comment out # driver = user.owfs and
the station type will be whatever is the main driver (probably
Simulator as you have at the moment)

But...
The biggest issue is the interface.
interface = /dev/i2c-1

With pyownet the interface is no longer the adapter, it requires
owserver to handle that part.
owserver becomes the interface.

Install owserver.

modify weewx.conf
(optional) modify the [OWFS] section to point to owserver using
interface = localhost:4304
Or just comment out
#interface = /dev/i2c-1
and owfs.py should default to the correct one.

modify the owserver config file etc/owfs.conf file to point to your i2-c device

server: device /dev/i2c-1 # for a pi using i2c-1
server: port = 4304

If memory serves, those are the only 2 lines you will need in /etc/owfs.conf

check if pyownet is installed

Fix weewx.conf (choose either driver or service)

restart the owserver

restart weewx

Hope that makes sense.
Let us know how it goes.
> https://groups.google.com/d/msgid/weewx-user/CAB7-S74OV%2BWL2LXMoPeCuJAuzYguCNQ_PZD_o1rPkFO5Bs%3DZdw%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages