Tried installation using Raspbian Bullseye on an RPi4

217 views
Skip to first unread message

mup...@gmail.com

unread,
Jun 8, 2022, 12:36:19 AM6/8/22
to weewx-user
Getting the following error when running for the first time:
weewx@weewx-RPi:~/weewx-4.8.0 $ sudo ./bin/weewxd
Traceback (most recent call last):
  File "/home/weewx/weewx-4.8.0/./bin/weewxd", line 248, in <module>
    main()
  File "/home/weewx/weewx-4.8.0/./bin/weewxd", line 147, in main
    engine = weewx.engine.StdEngine(config_dict)
  File "/home/weewx/weewx-4.8.0/bin/weewx/engine.py", line 81, in __init__
    self.setupStation(config_dict)
  File "/home/weewx/weewx-4.8.0/bin/weewx/engine.py", line 103, in setupStation
    driver = config_dict[station_type]['driver']
  File "/usr/lib/python3/dist-packages/configobj.py", line 554, in __getitem__
    val = dict.__getitem__(self, key)
KeyError: 'unspecified'

I've selected the Vantage driver.  Any thoughts on what is going on?  This is a fresh install.

vince

unread,
Jun 8, 2022, 12:45:26 AM6/8/22
to weewx-user
This one comes up a lot it seems.  You either don't have a weewx.conf or yours isn't configured with a station type.

Are you following the setup.py install example in the quickstart guide ((link) perhaps ?

You can also try to add "--config=/some/path/to/your/weewx.conf" to your command above if you have weewx.conf installed someplace unusual...

gjr80

unread,
Jun 8, 2022, 12:59:03 AM6/8/22
to weewx-user
Actually, exactly how did you install WeeWX? I'm seeing /home/weewx which is suggestive of a setup.py install but I'm also seeing that weewxd is in /home/weewx/weewx-4.8.0/bin - that's non-standard and I'm not surprised WeeWX is having problems.

For a first time user I would suggest either a package install or following the setup.py install to the letter. Also, if you were downloading and unpacking the .tar.gz to /home/weewx it might be an idea to use a different location (like /var/tmp), that way you won't get tangled up between WeeWX being installed in /home/weewx and the untarred files being in /home/weewx/weewx-4.8.0 - I guarantee you will eventually edit/run the wrong file.

Gary

mup...@gmail.com

unread,
Jun 8, 2022, 1:42:31 PM6/8/22
to weewx-user
Thank you Vince and Gary for your replies.
Vince:  I am using the quickstart guide you reference, even thought it references the Buster distro rather than the Bullseye distro.  I found that using Buster, I continuously ended up with 'configobj' problems.  Using Bullseye, that is no longer an issue.  Not sure why that is the case. 
Gary:  My preference for the setup.py install is that is puts everything in one place.  Being sort of new, this is much easier for me to track something down. 
The instructions I am following are as follows: (after installing all of the prerequisites)
3. Install WeeWX

After installing the prerequisites, you can install WeeWX itself.

  1. Expand the source archive:

    tar xvfz weewx-X.Y.Z.tar.gz
  2. Change directory into the expanded archive:

    cd weewx-X.Y.Z
  3. To specify an install location different from the default /home/weewx, modify the parameter home in the setup.cfg file. Mac users will want to change it to /Users/Shared/weewx.

  4. Then build and install. Python 2 users: substitute python2 for python3.

    python3 ./setup.py build
  5. sudo python3 ./setup.py install
4. Run

Run the main program directly:

cd /home/weewx sudo ./bin/weewxd

------

It's a bit confusing that there is no mention of *where* to expand the source archive.  It does say that the default location is in /home/weewx, but clearly running tar as mentioned is going to create a subdirectory of weewx-X.Y.Z.  Might it be prudent to move the contents of the expanded archive into /home/weewx, before the build and install operations?

Thank you, once again.

Michael

vince

unread,
Jun 8, 2022, 2:24:09 PM6/8/22
to weewx-user
The instructions are actually ok as written, as there is no right/wrong rule for where to download/expand the .tar.gz file into.  FWIW -  typically I use /var/tmp when I do it, but there is no right or wrong answer there.

In your case, I suspect you simply neglected to 'cd /home/weewx' in step-4 before running the sudo command.   You need to be in the 'installed' location when you run the sudo command, not the 'source' directory your .tar.gz file expanded into.



mup...@gmail.com

unread,
Jun 8, 2022, 3:31:27 PM6/8/22
to weewx-user
Meant to post this to all!
Got through the installation process and populated my info in the weewx.conf file.  The issue now appears to be one with the serial port selection.
Using /dev/ttyS0, the result is a bunch of data being spit out to my screen, which doesn't appear to be where it should go.
Using /dev/ttyAMA0 locks up the terminal window!
The output from dmesg is:
dmesg | grep tty
[    0.000000] Kernel command line: coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1  smsc95xx.macaddr=DC:A6:32:93:DF:F3 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000  console=tty1 root=PARTUUID=6eead863-02 rootfstype=ext4 fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles
[    0.000359] printk: console [tty1] enabled
[    1.410360] fe201000.serial: ttyAMA0 at MMIO 0xfe201000 (irq = 34, base_baud = 0) is a PL011 rev2
[    1.419455] fe215040.serial: ttyS0 at MMIO 0xfe215040 (irq = 36, base_baud = 62500000) is a 16550
[    3.091117] systemd[1]: Created slice system-getty.slice.

----------
The connection being used is the same from my previous install (original RPi), which uses a MAX3232 IC tied to GPIO pins 8 & 10.  Might there be a permissions issue?  Not sure where to look for a solution at this point.
Another note ... in the previous installation, I found a recommendation that said to purge the hwclock from the system.  Is this still applicable?

Thank you all!

mup...@gmail.com

unread,
Jun 9, 2022, 5:43:15 PM6/9/22
to weewx-user
Update:
I am becoming more certain that the issue I'm having is with the ability to get the serial ports configured properly on a Pi 4.
Any recommendations would be welcomed.
Thank you!
Michael

vince

unread,
Jun 9, 2022, 6:56:23 PM6/9/22
to weewx-user
I thought you told me via email that things worked when you used /dev/ttyS0 ?

Perhaps you might capture the "bunch of data being spit out" and share it with us, because it sure sounds like it's working as expected.

mup...@gmail.com

unread,
Jun 9, 2022, 7:30:44 PM6/9/22
to weewx-user

Just took an installation that used the deb file and changed the /etc/weewx/weewx.conf to reflect /dev/ttyS0.
I no longer get the data spitting out to the console as before.
What I do see is lots of data coming out of sudo tail -f /var/log/syslog.
That seems like it might be a 'good thing'?    I've not yet seen my posting to Weatherunderground at KCAPLACE82.
Perhaps I need to wait a while?  It's been offline for about 3 weeks.
Thanks for coming back to me!

Michael

mup...@gmail.com

unread,
Jun 9, 2022, 10:33:40 PM6/9/22
to weewx-user
I am pleased to say that my station is once again reporting as it used to. 
It did seem to take an extra bit of time to get everything recognized by WxUnderground, but the wait was worth it.
Thanks to all for your input and patience.

Regards,
Michael
K6MLE
Reply all
Reply to author
Forward
0 new messages