Replying to my own thread.
I've had weewx running for a very long time on a different mac mini and already had a launchd plist as follows that I think M Wall authored:
<?xml version="1.0" encoding="UTF-8"?>
<!-- property list file for weewx daemon -->
<!-- put this file in /Library/LaunchDaemons -->
<!-- to start weewx: -->
<!-- sudo launchctl load -w /Library/LaunchDaemons/com.weewx.weewxd.plist -->
<!-- sudo launchctl unload /Library/LaunchDaemons/com.weewx.weewxd.plist -->
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.weewx.weewxd</string>
<key>Disabled</key>
<false/>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
<key>ProgramArguments</key>
<array>
<string>/Users/Shared/weewx/bin/weewxd</string>
<string>/Users/Shared/weewx/weewx.conf</string>
</array>
</dict>
</plist>
The script that is included with weewx since 3.1.0 is below:
<?xml version="1.0" encoding="UTF-8"?>
<!-- $Id: com.weewx.weewxd.plist 2830 2015-01-06 04:13:39Z mwall $ -->
<!-- property list file for weewx daemon -->
<!-- put this file in /Library/LaunchDaemons -->
<!-- to start weewx: -->
<!-- sudo launchctl load -w /Library/LaunchDaemons/com.weewx.weewxd.plist -->
<!-- sudo launchctl unload /Library/LaunchDaemons/com.weewx.weewxd.plist -->
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.weewx.weewxd</string>
<key>Disabled</key>
<false/>
<key>RunAtLoad</key>
<true/>
<key>ProgramArguments</key>
<array>
<string>/Users/weewx/bin/weewxd</string>
<string>/Users/weewx/weewx.conf</string>
</array>
</dict>
</plist>
As you can see, As you can see,<key>KeepAlive</key><true/> has been added. When Weewx starts at startup, it exits with error 4. With keep alive directive it respawns after 8 seconds. I don't know if it is the USB that becomes available after weewx tries to start or what condition needs to be satisfied, but on the respawn, the problem is solved.
Problem solved for now. Perhaps the plist for launchd should be updated to include KeepAlive?
-Geoff