problem with mac

176 views
Skip to first unread message

andi klein

unread,
Dec 14, 2024, 5:23:53 PM12/14/24
to weewx-user
I installed weewx 5.1 for a friend on an iMac M1. While running just weewxd everything works great, I get connected andc all the info is correct in the terminal: (One thing I noted is that I need to run under bash and not his default zsh). Thanks for any help, I spent two days scratching my head and googling.

LOOP:   2024-12-14 14:16:53 PST (1734214613) 'altimeter': '29.553886849491384', 'appTemp': 'None', 'barometer': 'None', 'channel': '3', 'cloudbase': 'None', 'dateTime': '1734214613', 'dewpoint': 'None', 'ET': 'None', 'heatindex': 'None', 'humidex': 'None', 'inDewpoint': 'None', 'inTemp': '65.84000257760286', 'maxSolarRad': '105.00260614815654', 'outTempBatteryStatus': '0', 'pressure': '29.236533249218752', 'rain': 'None', 'rain_total': '129.94639999999998', 'rainRate': '0.0', 'rssi': '3', 'rxCheckPercent': '100.0', 'sensor_battery': '0', 'sensor_id': '3433', 'usUnits': '1', 'windchill': 'None', 'windDir': '45.0', 'windrun': 'None', 'windSpeed': '2.678862142244647'

If I try to run it as a daemon with launchctl it bombs on me with backend not found:

2024-12-14 13:17:00 weewxd[2083]: INFO __main__: Using Python: 3.9.6 (default, Nov 11 2024, 03:15:38) 

[Clang 16.0.0 (clang-1600.0.26.6)]

2024-12-14 13:17:00 weewxd[2083]: INFO __main__: Located at:   /Users/xxx/weewx-venv/bin/python3

2024-12-14 13:17:00 weewxd[2083]: INFO __main__: Platform:     macOS-14.6.1-arm64-arm-64bit

2024-12-14 13:17:00 weewxd[2083]: INFO __main__: Locale:       'C/UTF-8/C/C/C/C'

2024-12-14 13:17:00 weewxd[2083]: INFO __main__: Entry path:   /Users/xxx/weewx-venv/lib/python3.9/site-packages/weewxd.py

2024-12-14 13:17:00 weewxd[2083]: INFO __main__: WEEWX_ROOT:   /Users/xxx/weewx-data

2024-12-14 13:17:00 weewxd[2083]: INFO __main__: Config file:  /Users/xxx/weewx-data/weewx.conf

2024-12-14 13:17:00 weewxd[2083]: INFO __main__: User module:  /Users/xxx/weewx-data/bin/user

2024-12-14 13:17:00 weewxd[2083]: INFO __main__: Debug:        0

2024-12-14 13:17:00 weewxd[2083]: INFO __main__: User:         root

2024-12-14 13:17:00 weewxd[2083]: INFO __main__: Group:        wheel

2024-12-14 13:17:00 weewxd[2083]: INFO __main__: Groups:       wheel daemon kmem sys tty operator procview procmod everyone staff certusers localaccou

nts admin com.apple.sharepoint.group.1 _appstore _lpadmin _lpoperator _developer _analyticsusers com.apple.access_ftp com.apple.access_screensharing c

om.apple.access_ssh com.apple.access_remote_ae

2024-12-14 13:17:00 weewxd[2083]: INFO weewx.engine: Loading station type AcuRite (weewx.drivers.acurite)

2024-12-14 13:17:00 weewxd[2083]: INFO weewx.drivers.acurite: driver version is 0.4

2024-12-14 13:17:00 weewxd[2083]: INFO weewx.drivers.acurite: R2 will be decoded using sensor constants

2024-12-14 13:17:00 weewxd[2083]: INFO weewx.engine: StdConvert target unit is 0x1

2024-12-14 13:17:00 weewxd[2083]: INFO weewx.wxservices: StdWXCalculate will use data binding wx_binding

2024-12-14 13:17:00 weewxd[2083]: INFO weewx.engine: Archive will use data binding wx_binding

2024-12-14 13:17:00 weewxd[2083]: INFO weewx.engine: Record generation will be attempted in 'hardware'

2024-12-14 13:17:00 weewxd[2083]: INFO weewx.engine: Using archive interval of 300 seconds (specified in weewx configuration)

2024-12-14 13:17:00 weewxd[2083]: INFO weewx.restx: StationRegistry: Registration not requested.

2024-12-14 13:17:00 weewxd[2083]: INFO weewx.restx: Wunderground: Posting not enabled.

2024-12-14 13:17:00 weewxd[2083]: INFO weewx.restx: PWSweather: Posting not enabled.

2024-12-14 13:17:00 weewxd[2083]: INFO weewx.restx: CWOP: Posting not enabled.

2024-12-14 13:17:00 weewxd[2083]: INFO weewx.restx: WOW: Posting not enabled.

2024-12-14 13:17:00 weewxd[2083]: INFO weewx.restx: AWEKAS: Posting not enabled.

2024-12-14 13:17:00 weewxd[2083]: INFO weewx.engine: 'pyephem' not detected, extended almanac data is not available

2024-12-14 13:17:00 weewxd[2083]: INFO __main__: Starting up weewx version 5.1.0

2024-12-14 13:17:00 weewxd[2083]: INFO weewx.engine: Using binding 'wx_binding' to database 'weewx.sdb'

2024-12-14 13:17:00 weewxd[2083]: INFO weewx.manager: Starting backfill of daily summaries

2024-12-14 13:17:00 weewxd[2083]: INFO weewx.manager: Empty database

2024-12-14 13:17:00 weewxd[2083]: INFO weewx.engine: Starting main packet loop.

2024-12-14 13:17:00 weewxd[2083]: INFO weewx.engine: Main loop exiting. Shutting engine down.

2024-12-14 13:17:00 weewxd[2083]: CRITICAL __main__: Caught unrecoverable exception:

2024-12-14 13:17:00 weewxd[2083]: CRITICAL __main__:     ****  No backend available

2024-12-14 13:17:00 weewxd[2083]: CRITICAL __main__:     ****  Traceback (most recent call last):


2024-12-14 13:17:00 weewxd[2083]: CRITICAL __main__:     ****    File "/Users/xxx/weewx-venv/lib/python3.9/site-packages/weewxd.py", line

 127, in main


2024-12-14 13:17:00 weewxd[2083]: CRITICAL __main__:     ****      engine.run()

2024-12-14 13:17:00 weewxd[2083]: CRITICAL __main__:     ****      raise NoBackendError('No backend available')


2024-12-14 13:17:00 weewxd[2083]: CRITICAL __main__:     ****  usb.core.NoBackendError: No backend available


:

Tom Keffer

unread,
Dec 14, 2024, 6:53:24 PM12/14/24
to weewx...@googlegroups.com
See if this answers your question.

--
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 visit https://groups.google.com/d/msgid/weewx-user/44ea9378-6d80-4cb1-b1ce-1a7135757900n%40googlegroups.com.

andi klein

unread,
Dec 14, 2024, 7:46:41 PM12/14/24
to weewx...@googlegroups.com, pabl...@gmail.com
Thanks, I don't think thi i the problem. I can connect to the acurite with weewxd but not through loading the deamon. I can also see the acurite with
system_profiler SPUSBDataType

Tom Keffer

unread,
Dec 14, 2024, 7:50:18 PM12/14/24
to weewx...@googlegroups.com, pabl...@gmail.com
I'm guessing that the path used by the dynamic loader is different when run from a command line, vs run as a daemon.

Did you try the suggestions in the post?

vince

unread,
Dec 14, 2024, 7:57:42 PM12/14/24
to weewx-user

andi klein

unread,
Dec 15, 2024, 12:07:46 PM12/15/24
to weewx...@googlegroups.com, pabl...@gmail.com
Thanks I tried the suggestion using the different python3. It did not work. I am able to run the whole thing in the virtual environment, which uses the python3 installed there. So I guess that might not be the problem. Having now spent three days on this, I will go out and buy a raspi3 and forget about the mac. I am convinced it has to do with the imac I am trying to run this and now the weewx installation. I Installed everything on my MacBook pro (M1), following the manual and it run like a charm within half an hour.
andi

andi klein

unread,
Dec 15, 2024, 1:13:05 PM12/15/24
to weewx-user
I found more issue. If I run weewxd in zsh, it crashes, hwoever if I run in bash weewxd works fine. So could it be that I need to have some way to change the shell to bash in the plist load file, for the daemon to work? and how would I do this?

vince

unread,
Dec 15, 2024, 2:04:26 PM12/15/24
to weewx-user
If you go raspi, get a pi4 for the higher performance and memory. You’ll thank yourself. The 4gb pi4 to me is the sweetspot for weewx. No need to go pi5.

Your followups re: which mac you use or which shell make  no sense to me if your plist file is correct but you are providing no logs we can go on, so best of luck I guess. Be sure to set up mac logging per 
https://weewx.com/docs/5.1/usersguide/monitoring/ if you haven’t done so, if you want to keep battling that.

andi klein

unread,
Dec 16, 2024, 10:51:52 AM12/16/24
to weewx...@googlegroups.com, pabl...@gmail.com
Thanks for the pi tip.
I attached  the log file and the plist file and I cannot find anything beside what I sent earlier. It just can't find the backend. And this happens also exactly the same way, when I don't change to bash with just running weewxd.
com.weewx.weewxd.plist
weewxd.log

vince

unread,
Dec 16, 2024, 2:20:59 PM12/16/24
to weewx-user
That message is coming from the libusb python module.   My 'guess' is your macs might have different versions of the python modules installed, or even perhaps one mac is missing something.   Activate your venv and run "pip3 list" on each mac to see if there are any differences.

andi klein

unread,
Dec 16, 2024, 4:22:48 PM12/16/24
to weewx...@googlegroups.com, pabl...@gmail.com
Yes, I understand it comes from the libusb module. I still don't understand, why I can run weewxd out of the bash, but not from the daemon. It makes really no sense.
 I will look into the pip3 list.


macbook pro:
configobj  5.0.9
CT3        3.4.0
ephem      4.1.6
pillow     11.0.0
pip        24.3.1
PyMySQL    1.1.1
pyserial   3.5
pyusb      1.2.1
setuptools 68.0.0
weewx      5.1.0


imac
configobj  5.0.9
CT3        3.4.0
ephem      4.1.6
pillow     11.0.0
pip        24.3.1
pyfwup     0.5.2
PyMySQL    1.1.1
pyserial   3.5
pyusb      1.2.1
setuptools 58.0.4
tqdm       4.67.1
weewx      5.1.0

So the imac has pyfwup and tqdm, while the laptop does not have this. Neither one has in my opinion has anything to do with wewx. And interestingly the setup tools are older on the imac. I upgraded the setuptools but no dice.

vince

unread,
Dec 17, 2024, 1:10:38 PM12/17/24
to weewx-user
Is there a mismatch between your plist file and your weewx-venv/pyvenv.cfg file ?

(my plist file)
        <string>/Users/vince/weewx-venv/bin/python3</string>
        <string>/Users/vince/weewx-venv/lib/python3.12/site-packages/weewxd.py</string>
        <string>/Users/vince/weewx-data/weewx.conf</string>

(my weewx-venv/pyvenv.cfg file)
    home = /opt/homebrew/opt/pyt...@3.12/bin
    include-system-site-packages = false
    version = 3.12.3
    executable = /opt/homebrew/Cellar/pyt...@3.12/3.12.3/Frameworks/Python.framework/Versions/3.12/bin/python3.12
    command = /opt/homebrew/opt/pyt...@3.12/bin/python3.12 -m venv /Users/vince/weewx-venv


If they look similar with the python version agreeing between the files, then I'm out of ideas.  Sorry.
Reply all
Reply to author
Forward
0 new messages