Problem Running wee_device

87 views
Skip to first unread message

Fred Keller

unread,
Mar 28, 2023, 10:16:32 AM3/28/23
to weewx-user
I am getting an error when I try to run wee_device.

I stopped the weewx service and waited 1 minute before issuing
 wee_device --info

I got the following error message:

wee_device --info

Using configuration file /etc/weewx/weewx.conf

Using Vantage driver version 3.5.2 (weewx.drivers.vantage)

Traceback (most recent call last):

  File "/usr/lib/python3/dist-packages/serial/serialposix.py", line 322, in open

    self.fd = os.open(self.portstr, os.O_RDWR | os.O_NOCTTY | os.O_NONBLOCK)

PermissionError: [Errno 13] Permission denied: '/dev/ttyUSB0'


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

  File "/usr/share/weewx/wee_device", line 76, in <module>

    main()

  File "/usr/share/weewx/wee_device", line 72, in main

    device.configure(config_dict)

  File "/usr/share/weewx/weewx/drivers/__init__.py", line 67, in configure

    self.do_options(options, parser, config_dict, not options.noprompt)

  File "/usr/share/weewx/weewx/drivers/vantage.py", line 2155, in do_options

    station = Vantage(**config_dict[DRIVER_NAME])

  File "/usr/share/weewx/weewx/drivers/vantage.py", line 531, in __init__

    self.port.openPort()

  File "/usr/share/weewx/weewx/drivers/vantage.py", line 318, in openPort

    self.serial_port = serial.Serial(self.port, self.baudrate, timeout=self.timeout)

  File "/usr/lib/python3/dist-packages/serial/serialutil.py", line 244, in __init__

    self.open()

  File "/usr/lib/python3/dist-packages/serial/serialposix.py", line 325, in open

    raise SerialException(msg.errno, "could not open port {}: {}".format(self._port, msg))

serial.serialutil.SerialException: [Errno 13] could not open port /dev/ttyUSB0: [Errno 13] Permission denied: '/dev/ttyUSB0'


I am not sure what to change on my system to allow wee_device to access the /dev/ttyUSB0.


Fred

Tom Keffer

unread,
Mar 28, 2023, 10:23:18 AM3/28/23
to weewx...@googlegroups.com
See the section Permissions in the User's Guide.

--
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/57b51111-8300-4458-8213-2938c3c25c96n%40googlegroups.com.

Fred Keller

unread,
Mar 28, 2023, 10:36:23 PM3/28/23
to weewx...@googlegroups.com
Tom,

Thanks for the quick response.  I don't know why I missed that.  I just used sudo ahead of the wee_device --info command and it worked as expected.  I'm not sure why I wasn't using sudo for this command because I use it for all the others!!  I'm fairly new to the Linux command line.

Thanks again,

Fred

You received this message because you are subscribed to a topic in the Google Groups "weewx-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/98tb_b0X53E/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/CAPq0zECVUhZnH1e6eXgykt%3DtBz3mHm7yuFBMiGFcBXMW%2BWcqgw%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages