Mapping to proper USB-serial port - MacO/VantagePro2

122 views
Skip to first unread message

David Bach

unread,
Dec 28, 2019, 3:25:40 PM12/28/19
to weewx-user
I'm attempting to install weewx on a Mac mini that has been running wview for years. The installation of weewx went relatively smoothly. I copied the database from wview to weewx and double-checked the configuration files.

I start weewx and receive:

WeatherMini:weewx dsbach$ ./bin/weewxd weewx.conf
Traceback (most recent call last):
  File "./bin/weewxd", line 64, in <module>
    weewx.engine.main(options, args)
  File "/Users/Shared/weewx/bin/weewx/engine.py", line 888, in main
    engine = engine_class(config_dict)
  File "/Users/Shared/weewx/bin/weewx/engine.py", line 72, in __init__
    self.setupStation(config_dict)
  File "/Users/Shared/weewx/bin/weewx/engine.py", line 90, in setupStation
    driver = config_dict[stationType]['driver']
  File "/Library/Python/2.7/site-packages/configobj.py", line 554, in __getitem__
    val = dict.__getitem__(self, key)
KeyError: 'Vantage'

The wview installation required a serial to USB converter by Silicon Labs that shows up in /dev as /tty.SLAB_USBtoUART. Two others I tried didn't work back when I installed wview.

I used screen to attempt to connect to this USB port and it was successful. I attempted to connect to /dev/ttyUSB0 and ttyUSB1 without success (there are no such devs listed). So I believe that the former is the correct port. But how do I tell weewx to look there for the loop data.

I don't know how to make sense our of the section about udev and creating an alias in the documentation. 

My installation of weewx is straightforward. I'm just trying to replace wview with weewx at http://hillhousehome.net/weewx.

MacOS El Capitan, MacMini, weewx 3.9.2, final version of wview, 

I'm not unfamiliar with weewx - I have a working installation on another VantagePro 2 weather station on a Raspberry Pi.

I know the basics of linux command line, but often I come across situations I cannot understand, such as writing udev rules.

gjr80

unread,
Dec 28, 2019, 3:37:54 PM12/28/19
to weewx-user
Hi,

Not much help with the Mac USB issue but the error trace you posted indicates that WeeWX cannot find a [Vantage] stanza in weewx.conf. That issue is going to need to be fixed before WeeWX can do anything with USB ports.

Gary

Thomas Keffer

unread,
Dec 28, 2019, 6:49:42 PM12/28/19
to weewx-user
As Gary notes, the problem is that your configuration file, weewx.conf, was not configured to use the Vantage driver properly.

How did you do the install? The easiest is to follow the directions for MacOS. This will prompt you for which driver you want to use. Just indicate the Vantage driver, and the setup utility will take care of setting up weewx.conf.

-tk

--
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/f20f7e94-8271-488e-830e-2a4f21838f5d%40googlegroups.com.

David Bach

unread,
Dec 28, 2019, 7:03:17 PM12/28/19
to weewx-user
Thomas,

Thanks for the reply. Yes, I did use the directions for MacOS. Somewhere along the wayI accidentally deleted the vantage section. Inserting that allowed me to answer the critical question: where do I specify the USB/serial port for the loop data. Because the vantage section was missing that value was also missing. I "knew" I had seen that line somewhere.

Thanks, again. 

David
To unsubscribe from this group and stop receiving emails from it, send an email to weewx...@googlegroups.com.

David Bach

unread,
Dec 28, 2019, 7:59:49 PM12/28/19
to weewx-user
weewx is running - files going into public_html and manager writing to the database (catching up). However, I'm getting this message:

12/28/19 4:50:42.759 PM sudo[713]:   dsbach : TTY=ttys000 ; PWD=/Users/Shared/weewx ; USER=root ; COMMAND=/bin/launchctl load /Library/LaunchDaemons/com.weewx.weewxd.plist
12/28/19 4:55:15.217 PM weewx[715]: manager: Added record 2019-12-28 16:55:00 PST (1577580900) to database 'weewx.sdb'
12/28/19 4:55:15.222 PM weewx[715]: manager: Added record 2019-12-28 16:55:00 PST (1577580900) to daily summary in 'weewx.sdb'
12/28/19 4:55:15.276 PM weewx[715]: reportengine: Unable to instantiate generator 'weewx.cheetahgenerator.CheetahGenerator'
12/28/19 4:55:15.276 PM weewx[715]:         ****  No module named Cheetah.Template
12/28/19 4:55:15.278 PM weewx[715]:         ****  Generator ignored
12/28/19 4:55:21.701 PM weewx[715]: reportengine: Unable to instantiate generator 'weewx.cheetahgenerator.CheetahGenerator'
12/28/19 4:55:21.701 PM weewx[715]:         ****  No module named Cheetah.Template
12/28/19 4:55:21.703 PM weewx[715]:         ****  Generator ignored

Ideas?

David

On Saturday, December 28, 2019 at 3:49:42 PM UTC-8, Thomas Keffer wrote:
To unsubscribe from this group and stop receiving emails from it, send an email to weewx...@googlegroups.com.

Thomas Keffer

unread,
Dec 28, 2019, 8:02:27 PM12/28/19
to weewx...@googlegroups.com
Did you install cheetah?

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/3f42c3b7-8433-40ef-b24f-928b977fee2f%40googlegroups.com.
--
-tk

David Bach

unread,
Dec 29, 2019, 12:03:21 AM12/29/19
to weewx-user
I thought I had. It was one of the install pip ... commands.

Trying again I get this:

WeatherMini:/ dsbach$ sudo pip install Cheetah
Password:
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting Cheetah
     |████████████████████████████████| 194kB 2.3MB/s 
Collecting Markdown>=2.0.1
     |████████████████████████████████| 92kB 7.1MB/s 
Collecting setuptools>=36
     |████████████████████████████████| 583kB 8.2MB/s 
Building wheels for collected packages: Cheetah
  Building wheel for Cheetah (setup.py) ... done
  Created wheel for Cheetah: filename=Cheetah-2.4.4-cp27-cp27m-macosx_10_11_intel.whl size=179374 sha256=19991a600a0fef09cf0603ceda5d05a7975e2e1c47fd3ca1d9d98b24f6231dd5
  Stored in directory: /Users/dsbach/Library/Caches/pip/wheels/27/8d/d0/7cee58a5a59f3c305cb1117416530229231440293e565030ff
Successfully built Cheetah
Installing collected packages: setuptools, Markdown, Cheetah
  Found existing installation: setuptools 1.1.6
    Uninstalling setuptools-1.1.6:
ERROR: Could not install packages due to an EnvironmentError: [('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.py', '/private/tmp/pip-uninstall-9UwGWW/__init__.py', "[Errno 1] Operation not permitted: '/private/tmp/pip-uninstall-9UwGWW/__init__.py'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.pyc', '/private/tmp/pip-uninstall-9UwGWW/__init__.pyc', "[Errno 1] Operation not permitted: '/private/tmp/pip-uninstall-9UwGWW/__init__.pyc'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.py', '/private/tmp/pip-uninstall-9UwGWW/markers.py', "[Errno 1] Operation not permitted: '/private/tmp/pip-uninstall-9UwGWW/markers.py'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.pyc', '/private/tmp/pip-uninstall-9UwGWW/markers.pyc', "[Errno 1] Operation not permitted: '/private/tmp/pip-uninstall-9UwGWW/markers.pyc'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib', '/private/tmp/pip-uninstall-9UwGWW', "[Errno 1] Operation not permitted: '/private/tmp/pip-uninstall-9UwGWW'")]

I don't know what to make the last part of this.

David
Did you install cheetah?

David Bach

unread,
Dec 29, 2019, 12:29:36 AM12/29/19
to weewx-user
I did the install of Cheetah.

Restarted the Mac, restarted weewx (checked for wview using the port (no sign) and got this:

12/28/19 9:20:15.764 PM weewx[83]: manager: Added record 2019-12-28 21:20:00 PST (1577596800) to database 'weewx.sdb'
12/28/19 9:20:15.769 PM weewx[83]: manager: Added record 2019-12-28 21:20:00 PST (1577596800) to daily summary in 'weewx.sdb'
12/28/19 9:20:15.816 PM weewx[83]: reportengine: Unable to instantiate generator 'weewx.cheetahgenerator.CheetahGenerator'
12/28/19 9:20:15.816 PM weewx[83]:         ****  No module named Cheetah.Template
12/28/19 9:20:15.819 PM weewx[83]:         ****  Generator ignored
12/28/19 9:20:22.319 PM weewx[83]: reportengine: Unable to instantiate generator 'weewx.cheetahgenerator.CheetahGenerator'
12/28/19 9:20:22.319 PM weewx[83]:         ****  No module named Cheetah.Template
12/28/19 9:20:22.319 PM weewx[83]:         ****  Generator ignored

Also a lot of json-style information was written to the terminal - appeared to be the data intended for Cheetah.

WeatherMini:weewx dsbach$ ./bin/weewxd weewx.conf
LOOP:   2019-12-28 21:21:22 PST (1577596882) appTemp: 40.9650108791, barometer: 30.119, cloudbase: 1801.21794114, consBatteryVoltage: 4.61, dateTime: 1577596882, dayET: 0.02, dayRain: 0.01, dewpoint: 37.367441059, extraAlarm1: 0, extraAlarm2: 0, extraAlarm3: 0, extraAlarm4: 0, extraAlarm5: 0, extraAlarm6: 0, extraAlarm7: 0, extraAlarm8: 0, forecastIcon: 6, forecastRule: 44, heatindex: 44.8, humidex: 44.8, inDewpoint: 47.8314402429, inHumidity: 38.0, insideAlarm: 0, inTemp: 75.2, leafWet4: 0.0, maxSolarRad: 186.732005992, monthET: 0.51, monthRain: 7.96, outHumidity: 75.0, outsideAlarm1: 0, outsideAlarm2: 0, outTemp: 44.8, radiation: 0.0, rain: None, rainAlarm: 0, rainRate: 0.0, soilLeafAlarm1: 0, soilLeafAlarm2: 0, soilLeafAlarm3: 0, soilLeafAlarm4: 0, stormRain: 0.0, sunrise: 1577548560, sunset: 1577578980, trendIcon: 0, txBatteryStatus: 0, usUnits: 1, UV: 0.0, windchill: 44.8, windDir: 103.0, windGust: 2.0, windGustDir: 103.0, windSpeed: 2.0, windSpeed10: 3.0, yearET: 28.6, yearRain: 39.79

and later in the same stream:

raceback (most recent call last):
  File "/Users/Shared/weewx/bin/weewx/reportengine.py", line 185, in run
    obj = weeutil.weeutil._get_object(generator)(
  File "/Users/Shared/weewx/bin/weeutil/weeutil.py", line 1107, in _get_object
    mod = __import__(module)
  File "/Users/Shared/weewx/bin/weewx/cheetahgenerator.py", line 66, in <module>
    import Cheetah.Template
ImportError: No module named Cheetah.Template

It seems that somethings is really messed up.

db
Did you install cheetah?

David Bach

unread,
Dec 29, 2019, 12:39:16 AM12/29/19
to weewx-user
I believe for another issue I need to reboot the Vantage console - it appears to be stuck. I found a similar issue on not being able to get the loop data on the Pi. The console is 8 miles away so it will be a while before I accomplish this.

Thanks for your assistance. 

db

Thomas Keffer

unread,
Dec 29, 2019, 7:33:28 AM12/29/19
to weewx-user
I know you say that you did the install of Cheetah, but for whatever reason, it looks like Cheetah did not install, at least not anywhere python can find it. 

One thing I've discovered: you cannot use pip in the directory where you unpack the weewx tarball. The reason is that pip sees the setup.cfg file that comes with weewx, and tries to install in the directory it specifies. So, try going to your home directory first, then running pip from there.

cd
sudo pip install Cheetah
cd /Users/Shared/weewx
./bin/weewxd weewx.conf

The "json-style information" is normal. That's output from the service StdPrint, which prints LOOP packets and archive records, so you can see what's going on. It has nothing to do with Cheetah.

-tk

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/cc9aa1c9-18ce-4fb6-9c52-64d4e03bc1b4%40googlegroups.com.

Chris Richmond

unread,
Dec 29, 2019, 11:26:11 AM12/29/19
to weewx-user
Doesn't look like Cheetah actually installed.  Did you check that last path for existence and permissions?
I've never see a /private/tmp path before, so if the path is invalid, it won't work.  You can always create it
with the same permissions as /tmp, but I'd wonder why that is necessary in the first place.

Chris


On Saturday, December 28, 2019 at 9:03:21 PM UTC-8, David Bach wrote:
I thought I had. It was one of the install pip ... commands.

Trying again I get this:

WeatherMini:/ dsbach$ sudo pip install Cheetah
Password:

David Bach

unread,
Dec 31, 2019, 2:07:09 PM12/31/19
to weewx-user
thanks for the reply.

here's the command-line output

WeatherMini:~ dsbach$ sudo pip install Cheetah
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Processing ./Library/Caches/pip/wheels/27/8d/d0/7cee58a5a59f3c305cb1117416530229231440293e565030ff/Cheetah-2.4.4-cp27-cp27m-macosx_10_11_intel.whl
Collecting Markdown>=2.0.1
Collecting setuptools>=36
Installing collected packages: setuptools, Markdown, Cheetah
  Found existing installation: setuptools 1.1.6
    Uninstalling setuptools-1.1.6:
ERROR: Could not install packages due to an EnvironmentError: [('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.py', '/private/tmp/pip-uninstall-uEpSVa/__init__.py', "[Errno 1] Operation not permitted: '/private/tmp/pip-uninstall-uEpSVa/__init__.py'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.pyc', '/private/tmp/pip-uninstall-uEpSVa/__init__.pyc', "[Errno 1] Operation not permitted: '/private/tmp/pip-uninstall-uEpSVa/__init__.pyc'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.py', '/private/tmp/pip-uninstall-uEpSVa/markers.py', "[Errno 1] Operation not permitted: '/private/tmp/pip-uninstall-uEpSVa/markers.py'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.pyc', '/private/tmp/pip-uninstall-uEpSVa/markers.pyc', "[Errno 1] Operation not permitted: '/private/tmp/pip-uninstall-uEpSVa/markers.pyc'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib', '/private/tmp/pip-uninstall-uEpSVa', "[Errno 1] Operation not permitted: '/private/tmp/pip-uninstall-uEpSVa'")]

weewx started and began writing to the archive database. Sill no cheetah (probably obvious from the above),

Here's a snippet from the console:

12/31/19 10:30:16.917 AM weewx[83]: reportengine: Unable to instantiate generator 'weewx.cheetahgenerator.CheetahGenerator'
12/31/19 10:30:16.918 AM weewx[83]:         ****  No module named Cheetah.Template
12/31/19 10:30:16.921 AM weewx[83]:         ****  Generator ignored

OK. Thanks for your time and expertise. I'm going to bet on getting weewx to work because the installs have crippled my wview installation. So I am uninstalling and re-installing weewx, 

Well, the same issue:

WeatherMini:Downloads dsbach$ sudo pip install Cheetah
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Processing /Users/dsbach/Library/Caches/pip/wheels/27/8d/d0/7cee58a5a59f3c305cb1117416530229231440293e565030ff/Cheetah-2.4.4-cp27-cp27m-macosx_10_11_intel.whl
Collecting Markdown>=2.0.1
Collecting setuptools>=36
Installing collected packages: setuptools, Markdown, Cheetah
  Found existing installation: setuptools 1.1.6
    Uninstalling setuptools-1.1.6:
ERROR: Could not install packages due to an EnvironmentError: [('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.py', '/private/tmp/pip-uninstall-tU5uzW/__init__.py', "[Errno 1] Operation not permitted: '/private/tmp/pip-uninstall-tU5uzW/__init__.py'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.pyc', '/private/tmp/pip-uninstall-tU5uzW/__init__.pyc', "[Errno 1] Operation not permitted: '/private/tmp/pip-uninstall-tU5uzW/__init__.pyc'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.py', '/private/tmp/pip-uninstall-tU5uzW/markers.py', "[Errno 1] Operation not permitted: '/private/tmp/pip-uninstall-tU5uzW/markers.py'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.pyc', '/private/tmp/pip-uninstall-tU5uzW/markers.pyc', "[Errno 1] Operation not permitted: '/private/tmp/pip-uninstall-tU5uzW/markers.pyc'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib', '/private/tmp/pip-uninstall-tU5uzW', "[Errno 1] Operation not permitted: '/private/tmp/pip-uninstall-tU5uzW'")]

Something about permissions in Python.framework? 

Ideas?

Thomas Keffer

unread,
Dec 31, 2019, 5:58:54 PM12/31/19
to weewx-user
Your version of setuptools, v1.1.6, is extremely old (the current version is v43.0.0!) It looks like Cheetah needs version 36 or greater, so it's trying an upgrade, but is unable to do so.

The reason why is that pip is attempting to uninstall the old version of setuptools, which is located under /System/Library, which is protected by the Mac's "System Integrity Protection" (SIP). Even though you are running as root, SIP won't let pip uninstall the old version. 

What to do? You can try the option --ignore-installed. This will cause pip to just go ahead with the install, and not try to uninstall the old version. Because pip installs to /Library/Python, which is not protected by SIP, it will succeed. 

sudo pip --install Cheetah --ignore-installed.

If you're uneasy about doing that, there are a few other options:

1. Install python by using brew. This will install a brand new version of python in /usr/local, which is not protected by SIP. Then, using that version of python, use pip to install the prerequisites. They will install to /usr/local/lib.

2. Install python by using pyenv (this is what I do). This will install python in ~/.pyenv, which, of course, is not protected.  An added benefit is that pyenv allows you to manage many different versions of python. If you run as a daemon, just use a direct path to the python executable. It will automatically find the libraries installed by pip using that version of python.

3. Install using pip, but use the --user flag. This will install in ~/.local. No root privilege required. However, if you run as a daemon, you will have to specify the library directory as a PYTHONPATH.

Probably option #1 is easiest and safest.

-tk








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/844670a7-270e-4790-a33a-bd34a6e021bc%40googlegroups.com.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages