Author Topic: Weewx install not working  (Read 1132 times)

0 Members and 1 Guest are viewing this topic.

Offline jay_hoehn

  • WxElement panel
  • Forecaster
  • *****
  • Posts: 658
    • Jay's Woodcrafts
Weewx install not working
« on: May 26, 2025, 05:05:20 PM »
I decided to upgrade weewx when i realized i was way behind.  I purchased a new rasberry pi 5 and tried installing weewx.  Couldn't  get it to run.  Output of weewx status is below.  I'm at a loss./  Help please.

× weewx.service - WeeWX
     Loaded: loaded (/lib/systemd/system/weewx.service; enabled; preset: enabled)
     Active: failed (Result: exit-code) since Mon 2025-05-26 13:30:06 MST; 52s ago
   Duration: 176ms
       Docs: https://weewx.com/docs
    Process: 3408 ExecStart=weewxd /etc/weewx/weewx.conf (code=exited, status=4)
   Main PID: 3408 (code=exited, status=4)
        CPU: 119ms

May 26 13:30:06 raspberrypi weewxd[3408]: CRITICAL weewx.engine:     ****                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
May 26 13:30:06 raspberrypi weewxd[3408]: CRITICAL weewx.engine:     ****    File "/usr/lib/python3/dist-packages/serial/serialutil.py", line 244, in __init__
May 26 13:30:06 raspberrypi weewxd[3408]: CRITICAL weewx.engine:     ****      self.open()
May 26 13:30:06 raspberrypi weewxd[3408]: CRITICAL weewx.engine:     ****    File "/usr/lib/python3/dist-packages/serial/serialposix.py", line 325, in open
May 26 13:30:06 raspberrypi weewxd[3408]: CRITICAL weewx.engine:     ****      raise SerialException(msg.errno, "could not open port {}: {}".format(self._port, msg))
May 26 13:30:06 raspberrypi weewxd[3408]: CRITICAL weewx.engine:     ****  serial.serialutil.SerialException: [Errno 13] could not open port /dev/ttyUSB0: [Errno 13] Permission denied: '/dev/ttyUSB0'
May 26 13:30:06 raspberrypi weewxd[3408]: CRITICAL __main__: Unable to load driver: [Errno 13] could not open port /dev/ttyUSB0: [Errno 13] Permission denied: '/dev/ttyUSB0'
May 26 13:30:06 raspberrypi weewxd[3408]: CRITICAL __main__:     ****  Exiting...
May 26 13:30:06 raspberrypi systemd[1]: weewx.service: Main process exited, code=exited, status=4/NOPERMISSION
May 26 13:30:06 raspberrypi systemd[1]: weewx.service: Failed with result 'exit-code'.
~
~
~
~

weather-new@raspberrypi:~ $

Davis Vantage Pro2 Plus
VVP
Weather Display


Offline jpochmara

  • Member
  • *
  • Posts: 40
Re: Weewx install not working
« Reply #1 on: May 26, 2025, 06:28:44 PM »
The user running weewx does not have permissions to read/write the serial port /dev/ttyUSB0.

You probably just need to added the weewx user to the "dailout" group, this
command should do that:

          $ addgroup weewx dailout

To verify that dialout is the correct group run:

         $ ls -l /dev/ttyUSB0

And see what group the device is in.
Example output from the ls command:

           crw-rw---- 1 root dialout 4, 64 May 23 18:03 /dev/ttyS0


Offline jay_hoehn

  • WxElement panel
  • Forecaster
  • *****
  • Posts: 658
    • Jay's Woodcrafts
Re: Weewx install not working
« Reply #2 on: May 26, 2025, 07:57:32 PM »
Thanks for looking, jpochmara,

tried to add group and I get an error

addgroup with two arguments is an unspecified operation

When I do ls  ls -l /dev/ttyUSB0  I get

ctw--w---- 1 root tty 4, 0 May 28 14:17 /devtty0
Davis Vantage Pro2 Plus
VVP
Weather Display


Offline jpochmara

  • Member
  • *
  • Posts: 40
Re: Weewx install not working
« Reply #3 on: May 26, 2025, 08:46:45 PM »
What version of Linux are you running?

You can manually added the weewx user to the group by editing the file /etc/group.

What does 'ls -L /etc/ttyUSB0' show on your system?  That is the device you care about.



Offline jpochmara

  • Member
  • *
  • Posts: 40
Re: Weewx install not working
« Reply #4 on: May 26, 2025, 08:57:26 PM »
Thanks for looking, jpochmara,

tried to add group and I get an error

addgroup with two arguments is an unspecified operation

When I do ls  ls -l /dev/ttyUSB0  I get

ctw--w---- 1 root tty 4, 0 May 28 14:17 /devtty0

My bad, I gave you the incorrect command, to add a user to a group do:

     $ adduser weewx dailout


Offline RichG

  • Member
  • *
  • Posts: 27
Re: Weewx install not working
« Reply #5 on: May 27, 2025, 02:43:22 AM »
I also think you'll find it's the dialout group.

 

anything