No I didn't
Neither /usr/lib/udev/rules.d/60-weewx.rules nor 
/etc/udev/rules.d/60-weewx.rules exists
found this file though /etc/udev/rules.d/99-com.rules

FYI this is an upgrade from v4 to 5 using FineOffset weather station


_____________________________________________________________________

pi@weepi:~ $ more /etc/udev/rules.d/99-com.rules
SUBSYSTEM=="input", GROUP="input", MODE="0660"
SUBSYSTEM=="i2c-dev", GROUP="i2c", MODE="0660"
SUBSYSTEM=="spidev", GROUP="spi", MODE="0660"
SUBSYSTEM=="bcm2835-gpiomem", GROUP="gpio", MODE="0660"
SUBSYSTEM=="rpivid-*", GROUP="video", MODE="0660"

KERNEL=="vcsm-cma", GROUP="video", MODE="0660"
SUBSYSTEM=="dma_heap", GROUP="video", MODE="0660"

SUBSYSTEM=="gpio", GROUP="gpio", MODE="0660"
SUBSYSTEM=="gpio", KERNEL=="gpiochip*", ACTION=="add", PROGRAM="/bin/sh -c 
'chgrp -R gpio /sys/class/gpio && chmod -R g=u /sys/class/gpio'"
SUBSYSTEM=="gpio", ACTION=="add", PROGRAM="/bin/sh -c 'chgrp -R gpio /sys%p 
&& chmod -R g=u /sys%p'"

# PWM export results in a "change" action on the pwmchip device (not "add" 
of a new device), so match actions other than "remove".
SUBSYSTEM=="pwm", ACTION!="remove", PROGRAM="/bin/sh -c 'chgrp -R gpio 
/sys%p && chmod -R g=u /sys%p'"

KERNEL=="ttyAMA0", PROGRAM="/bin/sh -c '\
        ALIASES=/proc/device-tree/aliases; \
        if cmp -s $$ALIASES/uart0 $$ALIASES/serial0; then \
                echo 0;\
        elif cmp -s $$ALIASES/uart0 $$ALIASES/serial1; then \
                echo 1; \
        else \
                exit 1; \
        fi\
'", SYMLINK+="serial%c"

KERNEL=="ttyAMA1", PROGRAM="/bin/sh -c '\
        ALIASES=/proc/device-tree/aliases; \
        if [ -e /dev/ttyAMA0 ]; then \
                exit 1; \
        elif cmp -s $$ALIASES/uart0 $$ALIASES/serial0; then \
                echo 0;\
        elif cmp -s $$ALIASES/uart0 $$ALIASES/serial1; then \
                echo 1; \
        else \
                exit 1; \
        fi\
'", SYMLINK+="serial%c"

KERNEL=="ttyS0", PROGRAM="/bin/sh -c '\
        ALIASES=/proc/device-tree/aliases; \
        if cmp -s $$ALIASES/uart1 $$ALIASES/serial0; then \
                echo 0; \
        elif cmp -s $$ALIASES/uart1 $$ALIASES/serial1; then \
                echo 1; \
        else \
                exit 1; \
        fi \
'", SYMLINK+="serial%c"

ACTION=="add", SUBSYSTEM=="vtconsole", KERNEL=="vtcon1", RUN+="/bin/sh -c '\
        if echo RPi-Sense FB | cmp -s /sys/class/graphics/fb0/name; then \
                echo 0 > /sys$devpath/bind; \
        fi; \
'"

On Monday, June 24, 2024 at 6:49:36 PM UTC+1 [email protected] wrote:

> Did you install an udev rule?
>
> [email protected] schrieb am Montag, 24. Juni 2024 um 18:01:17 
> UTC+2:
>
>> Thanks Michael I've worked through the doc but not found a resolution.
>>
>> pi the weewx user is in the following groups pi adm dialout cdrom sudo 
>> audio video plugdev games users input netdev lpadmin gpio i2c spi
>>
>> The arm device is as follows;
>> (weewx-venv) pi@weepi:/home/weewx $ ls -l /dev/ttyAMA0
>> crw-rw---- 1 root dialout 204, 64 Jun 24 11:10 /dev/ttyAMA0
>>
>> ps -ef | grep weewx - shows no instances running
>>
>> If I sudo weewxd then it runs.
>> when running with sudo I see an error "unrecognised magic number 5528" in 
>> the log
>>
>> Jun 24 16:57:46 weepi weewx[1345] INFO weewx.manager: Daily summaries up 
>> to date
>> Jun 24 16:57:47 weepi weewx[1345] ERROR weewx.drivers.fousb: unrecognised 
>> magic number 5528
>> Jun 24 16:57:47 weepi weewx[1345] DEBUG weewx.drivers.fousb: get 4079 
>> records since 2024-06-24 15:52:30
>> Jun 24 16:57:47 weepi weewx[1345] INFO weewx.drivers.fousb: synchronising 
>> to the weather station (quality=1)
>> Jun 24 16:57:48 weepi weewx[1345] DEBUG weewx.drivers.fousb: status 
>> {'rain_overflow': 0, 'lost_connection': 0, 'unknown': 0} (0)
>> Jun 24 16:58:05 weepi weewx[1345] DEBUG weewx.drivers.fousb: new data
>> Jun 24 16:58:05 weepi weewx[1345] DEBUG weewx.drivers.fousb: setting 
>> sensor clock 29.5306
>> Jun 24 16:58:05 weepi weewx[1345] DEBUG weewx.drivers.fousb: live 
>> synchronised
>> Jun 24 16:58:05 weepi weewx[1345] DEBUG weewx.drivers.fousb: packet 
>> timestamp is 15:58:05
>>
>> Thanks in advance
>> Mike
>>
>> On Monday, June 24, 2024 at 2:05:37 PM UTC+1 [email protected] wrote:
>>
>>> Maybe this sections will help you: 
>>> https://github.com/weewx/weewx/wiki/Understanding-permissions#how-to-fix-device-permissions
>>>
>>> [email protected] schrieb am Montag, 24. Juni 2024 um 
>>> 14:27:38 UTC+2:
>>>
>>>> Hi,
>>>> I've worked my way through the upgrade steps  following 
>>>> https://github.com/weewx/weewx/wiki/v5-upgrade and got to step 4 
>>>>  weewxd --config=/home/weewx/weewx.conf
>>>>
>>>> running as pi I get the error 
>>>> weepi weewxd[17081]: CRITICAL weewxd: Unable to load driver: [Errno 13] 
>>>> Access denied (insufficient permissions)
>>>>
>>>> I have changed the file ownership as per step 2 and everything under 
>>>> /weewx/home/ looks to have pi as the owner
>>>>
>>>> if I sudo weewxd if does run without the driver error. I get a 
>>>> different error "TypeError: 'NoneType' object is not callable"  but weew 
>>>> is 
>>>> running and updating.
>>>>
>>>> I have to confess I'm I'm not sure where to look to spot the incorrect 
>>>> privilege.
>>>>
>>>> I'm using a RPI4 and Fine Offset weather station.
>>>>
>>>> Thanks
>>>> Mike
>>>>
>>>> _____________________________________________________________________________________
>>>> Jun 24 13:17:01 weepi CRON[17056]: (root) CMD (   cd / && run-parts 
>>>> --report /etc/cron.hourly)
>>>> Jun 24 13:17:05 weepi weewxd[17081]: INFO weewxd: Initializing weewxd 
>>>> version 5.0.2
>>>> Jun 24 13:17:05 weepi weewxd[17081]: INFO weewxd: Command line: 
>>>> /home/pi/weewx-venv/bin/weewxd --config=/home/weewx/weewx.conf
>>>> Jun 24 13:17:05 weepi weewxd[17081]: INFO weewxd: Using Python 3.7.3 
>>>> (default, Jan 22 2021, 20:04:44) #012[GCC 8.3.0]
>>>> Jun 24 13:17:05 weepi weewxd[17081]: INFO weewxd: Located at 
>>>> /home/pi/weewx-venv/bin/python3
>>>> Jun 24 13:17:05 weepi weewxd[17081]: INFO weewxd: Platform 
>>>> Linux-5.10.63-v7l+-armv7l-with-debian-10.11
>>>> Jun 24 13:17:05 weepi weewxd[17081]: INFO weewxd: Locale: 'en_GB'
>>>> Jun 24 13:17:05 weepi weewxd[17081]: INFO weewxd: Entry path: 
>>>> /home/pi/weewx-venv/lib/python3.7/site-packages/weewxd.py
>>>> Jun 24 13:17:05 weepi weewxd[17081]: INFO weewxd: WEEWX_ROOT: 
>>>> /home/weewx
>>>> Jun 24 13:17:05 weepi weewxd[17081]: INFO weewxd: Configuration file: 
>>>> /home/weewx/weewx.conf
>>>> Jun 24 13:17:05 weepi weewxd[17081]: INFO weewxd: User module: 
>>>> /home/weewx/bin/user
>>>> Jun 24 13:17:05 weepi weewxd[17081]: INFO weewxd: Debug: 0
>>>> Jun 24 13:17:05 weepi weewxd[17081]: INFO weewx.engine: Loading station 
>>>> type FineOffsetUSB (weewx.drivers.fousb)
>>>> Jun 24 13:17:05 weepi weewxd[17081]: INFO weewx.drivers.fousb: driver 
>>>> version is 1.3
>>>> Jun 24 13:17:05 weepi weewxd[17081]: INFO weewx.drivers.fousb: polling 
>>>> mode is PERIODIC
>>>> Jun 24 13:17:05 weepi weewxd[17081]: INFO weewx.drivers.fousb: polling 
>>>> interval is 60
>>>> Jun 24 13:17:05 weepi weewxd[17081]: INFO weewx.drivers.fousb: found 
>>>> station on USB bus= device=
>>>> Jun 24 13:17:05 weepi weewxd[17081]: CRITICAL weewx.drivers.fousb: 
>>>> Unable to claim USB interface 0: [Errno 13] Access denied (insufficient 
>>>> permissions)
>>>> Jun 24 13:17:05 weepi weewxd[17081]: ERROR weewx.engine: Import of 
>>>> driver failed: [Errno 13] Access denied (insufficient permissions) (<class 
>>>> 'weewx.WeeWxIOError'>)
>>>> Jun 24 13:17:05 weepi weewxd[17081]: CRITICAL weewx.engine:     **** 
>>>>  Traceback (most recent call last):
>>>> Jun 24 13:17:05 weepi weewxd[17081]: CRITICAL weewx.engine:     ****   
>>>>  File 
>>>> "/home/pi/weewx-venv/lib/python3.7/site-packages/weewx/drivers/fousb.py", 
>>>> line 1036, in openPort
>>>> Jun 24 13:17:05 weepi weewxd[17081]: CRITICAL weewx.engine:     ****   
>>>>    self.devh.claimInterface(self.usb_interface)
>>>> Jun 24 13:17:05 weepi weewxd[17081]: CRITICAL weewx.engine:     ****   
>>>>  File "/home/pi/weewx-venv/lib/python3.7/site-packages/usb/legacy.py", 
>>>> line 
>>>> 232, in claimInterface
>>>> Jun 24 13:17:05 weepi weewxd[17081]: CRITICAL weewx.engine:     ****   
>>>>    util.claim_interface(self.dev, interface)
>>>> Jun 24 13:17:05 weepi weewxd[17081]: CRITICAL weewx.engine:     ****   
>>>>  File "/home/pi/weewx-venv/lib/python3.7/site-packages/usb/util.py", line 
>>>> 207, in claim_interface
>>>> Jun 24 13:17:05 weepi weewxd[17081]: CRITICAL weewx.engine:     ****   
>>>>    device._ctx.managed_claim_interface(device, interface)
>>>> Jun 24 13:17:05 weepi weewxd[17081]: CRITICAL weewx.engine:     ****   
>>>>  File "/home/pi/weewx-venv/lib/python3.7/site-packages/usb/core.py", line 
>>>> 113, in wrapper
>>>> Jun 24 13:17:05 weepi weewxd[17081]: CRITICAL weewx.engine:     ****   
>>>>    return f(self, *args, **kwargs)
>>>> Jun 24 13:17:05 weepi weewxd[17081]: CRITICAL weewx.engine:     ****   
>>>>  File "/home/pi/weewx-venv/lib/python3.7/site-packages/usb/core.py", line 
>>>> 170, in managed_claim_interface
>>>> Jun 24 13:17:05 weepi weewxd[17081]: CRITICAL weewx.engine:     ****   
>>>>    self.managed_open()
>>>> Jun 24 13:17:05 weepi weewxd[17081]: CRITICAL weewx.engine:     ****   
>>>>  File "/home/pi/weewx-venv/lib/python3.7/site-packages/usb/core.py", line 
>>>> 113, in wrapper
>>>> Jun 24 13:17:05 weepi weewxd[17081]: CRITICAL weewx.engine:     ****   
>>>>    return f(self, *args, **kwargs)
>>>> Jun 24 13:17:05 weepi weewxd[17081]: CRITICAL weewx.engine:     ****   
>>>>  File "/home/pi/weewx-venv/lib/python3.7/site-packages/usb/core.py", line 
>>>> 131, in managed_open
>>>> Jun 24 13:17:05 weepi weewxd[17081]: CRITICAL weewx.engine:     ****   
>>>>    self.handle = self.backend.open_device(self.dev)
>>>> Jun 24 13:17:05 weepi weewxd[17081]: CRITICAL weewx.engine:     ****   
>>>>  File 
>>>> "/home/pi/weewx-venv/lib/python3.7/site-packages/usb/backend/libusb1.py", 
>>>> line 804, in open_device
>>>> Jun 24 13:17:05 weepi weewxd[17081]: CRITICAL weewx.engine:     ****   
>>>>    return _DeviceHandle(dev)
>>>> Jun 24 13:17:05 weepi weewxd[17081]: CRITICAL weewx.engine:     ****   
>>>>  File 
>>>> "/home/pi/weewx-venv/lib/python3.7/site-packages/usb/backend/libusb1.py", 
>>>> line 652, in __init__
>>>> Jun 24 13:17:05 weepi weewxd[17081]: CRITICAL weewx.engine:     ****   
>>>>    _check(_lib.libusb_open(self.devid, byref(self.handle)))
>>>> Jun 24 13:17:05 weepi weewxd[17081]: CRITICAL weewx.engine:     ****   
>>>>  File 
>>>> "/home/pi/weewx-venv/lib/python3.7/site-packages/usb/backend/libusb1.py", 
>>>> line 604, in _check
>>>> Jun 24 13:17:05 weepi weewxd[17081]: CRITICAL weewx.engine:     ****   
>>>>    raise USBError(_strerror(ret), ret, _libusb_errno[ret])
>>>> Jun 24 13:17:05 weepi weewxd[17081]: CRITICAL weewx.engine:     **** 
>>>>  usb.core.USBError: [Errno 13] Access denied (insufficient permissions)
>>>> Jun 24 13:17:05 weepi weewxd[17081]: CRITICAL weewx.engine:     ****
>>>> Jun 24 13:17:05 weepi weewxd[17081]: CRITICAL weewx.engine:     **** 
>>>>  During handling of the above exception, another exception occurred:
>>>> Jun 24 13:17:05 weepi weewxd[17081]: CRITICAL weewx.engine:     ****
>>>> Jun 24 13:17:05 weepi weewxd[17081]: CRITICAL weewx.engine:     **** 
>>>>  Traceback (most recent call last):
>>>> Jun 24 13:17:05 weepi weewxd[17081]: CRITICAL weewx.engine:     ****   
>>>>  File "/home/pi/weewx-venv/lib/python3.7/site-packages/weewx/engine.py", 
>>>> line 115, in setupStation
>>>> Jun 24 13:17:05 weepi weewxd[17081]: CRITICAL weewx.engine:     ****   
>>>>    self.console = loader_function(config_dict, self)
>>>> Jun 24 13:17:05 weepi weewxd[17081]: CRITICAL weewx.engine:     ****   
>>>>  File 
>>>> "/home/pi/weewx-venv/lib/python3.7/site-packages/weewx/drivers/fousb.py", 
>>>> line 232, in loader
>>>> Jun 24 13:17:05 weepi weewxd[17081]: CRITICAL weewx.engine:     ****   
>>>>    return FineOffsetUSB(**config_dict[DRIVER_NAME])
>>>> Jun 24 13:17:05 weepi weewxd[17081]: CRITICAL weewx.engine:     ****   
>>>>  File 
>>>> "/home/pi/weewx-venv/lib/python3.7/site-packages/weewx/drivers/fousb.py", 
>>>> line 967, in __init__
>>>> Jun 24 13:17:05 weepi weewxd[17081]: CRITICAL weewx.engine:     ****   
>>>>    self.openPort()
>>>> Jun 24 13:17:05 weepi weewxd[17081]: CRITICAL weewx.engine:     ****   
>>>>  File 
>>>> "/home/pi/weewx-venv/lib/python3.7/site-packages/weewx/drivers/fousb.py", 
>>>> line 1040, in openPort
>>>> Jun 24 13:17:05 weepi weewxd[17081]: CRITICAL weewx.engine:     ****   
>>>>    raise weewx.WeeWxIOError(e)
>>>> Jun 24 13:17:05 weepi weewxd[17081]: CRITICAL weewx.engine:     **** 
>>>>  weewx.WeeWxIOError: [Errno 13] Access denied (insufficient permissions)
>>>> Jun 24 13:17:05 weepi weewxd[17081]: CRITICAL weewxd: Unable to load 
>>>> driver: [Errno 13] Access denied (insufficient permissions)
>>>> Jun 24 13:17:05 weepi weewxd[17081]: CRITICAL weewxd:     **** 
>>>>  Exiting...
>>>>
>>>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/cd39c13c-abd2-4ea2-bc91-9fb382a814a2n%40googlegroups.com.

Reply via email to