Hello George,
Maybe try:
sudo usermod -aG i2c weewx
and 
sudo usermod -aG gpio weewx"

I my case, that fixed the problems I had with the BME280 and as3935 
extensions
PY
Le lundi 18 mars 2024 à 15:52:57 UTC+1, George Nimrodel a écrit :

> I'm making progress...
>
> The last upgrade/downgrade relocated my device's driver (BCRobotics) and 
> extensions file to a new User folder.
>
>  I returned them to the primary User folder. However, upon doing so, I 
> encountered the same error I experienced when I upgraded to version 5.0.2.
>
> Subsequently, I attempted another upgrade to version 5.0.2, and the error 
> persisted:
>
> Mar 18 16:23:41 edessa /weewxd.py[414]: BCRobo: MainThread: W1ThermSensor 
> setup fine.
> Mar 18 16:23:41 edessa weewxd[414]: CRITICAL __main__: Caught OSError: 
> [Errno 13] Permission denied: '/dev/i2c-1'
> Mar 18 16:23:41 edessa weewxd[414]: CRITICAL __main__:     ****  Traceback 
> (most recent call last):
> Mar 18 16:23:41 edessa weewxd[414]: CRITICAL __main__:     ****    File 
> "/usr/share/weewx/weewxd.py", line 160, in main
> Mar 18 16:23:41 edessa weewxd[414]: CRITICAL __main__:     ****     
>  engine = weewx.engine.StdEngine(config_dict)
> Mar 18 16:23:41 edessa weewxd[414]: CRITICAL __main__:     ****    File 
> "/usr/share/weewx/weewx/engine.py", line 77, in __init__
> Mar 18 16:23:41 edessa weewxd[414]: CRITICAL __main__:     ****     
>  self.setupStation(config_dict)
> Mar 18 16:23:41 edessa weewxd[414]: CRITICAL __main__:     ****    File 
> "/usr/share/weewx/weewx/engine.py", line 104, in setupStation
> Mar 18 16:23:41 edessa weewxd[414]: CRITICAL __main__:     ****     
>  __import__(driver)
> Mar 18 16:23:41 edessa weewxd[414]: CRITICAL __main__:     ****    File 
> "/etc/weewx/bin/user/BCRobotics.py", line 80, in <module>
> Mar 18 16:23:41 edessa weewxd[414]: CRITICAL __main__:     ****      i2c = 
> busio.I2C(board.SCL, board.SDA)
> Mar 18 16:23:41 edessa weewxd[414]: CRITICAL __main__:     ****    File 
> "/usr/local/lib/python3.7/dist-packages/busio.py", line 32, in __init__
> Mar 18 16:23:41 edessa weewxd[414]: CRITICAL __main__:     ****     
>  self.init(scl, sda, frequency)
> Mar 18 16:23:41 edessa weewxd[414]: CRITICAL __main__:     ****    File 
> "/usr/local/lib/python3.7/dist-packages/busio.py", line 107, in init
> Mar 18 16:23:41 edessa weewxd[414]: CRITICAL __main__:     ****     
>  self._i2c = _I2C(portId, mode=_I2C.MASTER, baudrate=frequency)
> Mar 18 16:23:41 edessa weewxd[414]: CRITICAL __main__:     ****    File 
> "/usr/local/lib/python3.7/dist-packages/adafruit_blinka/microcontroller/generic_linux/i2c.py",
> Mar 18 16:23:41 edessa weewxd[414]: CRITICAL __main__:     ****     
>  self._i2c_bus = smbus.SMBus(bus_num)
> Mar 18 16:23:41 edessa weewxd[414]: CRITICAL __main__:     ****    File 
> "/usr/local/lib/python3.7/dist-packages/Adafruit_PureIO/smbus.py", line 
> 125, in __init__
> Mar 18 16:23:41 edessa weewxd[414]: CRITICAL __main__:     ****     
>  self.open(bus)
> Mar 18 16:23:41 edessa weewxd[414]: CRITICAL __main__:     ****    File 
> "/usr/local/lib/python3.7/dist-packages/Adafruit_PureIO/smbus.py", line 
> 151, in open
> Mar 18 16:23:41 edessa weewxd[414]: CRITICAL __main__:     ****     
>  self._device = open("/dev/i2c-{0}".format(bus), "r+b", buffering=0)
> Mar 18 16:23:41 edessa weewxd[414]: CRITICAL __main__:     **** 
>  PermissionError: [Errno 13] Permission denied: '/dev/i2c-1'
> Mar 18 16:23:41 edessa weewxd[414]: CRITICAL __main__:     ****  Waiting 
> 10 seconds then retrying... 
>
> I added the weewx user to the group defined on the device.
>
> Station is running but I still get errors from some sensors:
>
> Mar 18 16:47:51 edessa /weewxd.py[416]: BCRobo: MainThread: Error setting 
> up GPIO 17: No access to /dev/mem.  Try running as root!
>
> Another thing I don't understand is how the station reverted to Simulator 
> mode despite keeping the .conf file intact.
>
> On Monday, March 18, 2024 at 3:18:47 PM UTC+2 George Nimrodel wrote:
>
>> Hello again,
>>
>> even after debug=1 I don't see any more information:
>>
>> Mar 18 14:49:45 edessa systemd[1]: Started WeeWX.
>> Mar 18 14:49:48 edessa weewxd[411]: Traceback (most recent call last):
>> Mar 18 14:49:48 edessa weewxd[411]:   File "/usr/share/weewx/weewxd", 
>> line 29, in <module>
>> Mar 18 14:49:48 edessa weewxd[411]:     import user.extensions
>> Mar 18 14:49:48 edessa weewxd[411]: ModuleNotFoundError: No module named 
>> 'user.extensions'
>> Mar 18 14:49:48 edessa systemd[1]: weewx.service: Main process exited, 
>> code=exited, status=1/FAILURE
>> Mar 18 14:49:48 edessa systemd[1]: weewx.service: Failed with result 
>> 'exit-code'.
>>
>> On Monday, March 18, 2024 at 1:13:31 AM UTC+2 Tom Keffer wrote:
>>
>>> Please set debug=1, then restart weewx. Post the log from startup to 
>>> crash.
>>>
>>> The startup gives important clues on where weewxd thinks things are 
>>> located.
>>>
>>> -tk
>>>
>>> On Sun, Mar 17, 2024 at 12:08 PM George Nimrodel <george.t...@gmail.com> 
>>> wrote:
>>>
>>>> Hello everyone,
>>>>
>>>> I encountered an issue with my installation following an update from 
>>>> version 4.10.2 to 5.0.2 (unfortunately, no logs were retained). 
>>>> Consequently, I attempted to revert to the previous version.
>>>>
>>>> However, even after the downgrade, I still encountered difficulties:
>>>>
>>>> ● weewx.service - WeeWX
>>>>    Loaded: loaded (/lib/systemd/system/weewx.service; enabled; vendor 
>>>> preset: enabled)
>>>>    Active: failed (Result: exit-code) since Sat 2024-03-16 12:24:07 
>>>> EET; 1 day 6h ago
>>>>      Docs: https://weewx.com/docs
>>>>   Process: 411 ExecStart=/usr/bin/weewxd /etc/weewx/weewx.conf 
>>>> (code=exited, status=1/FAILURE)
>>>>  Main PID: 411 (code=exited, status=1/FAILURE)
>>>>
>>>>
>>>> Mar 17 18:43:50 edessa weewxd[419]: Traceback (most recent call last):
>>>> Mar 17 18:43:50 edessa weewxd[419]:   File "/usr/share/weewx/weewxd", 
>>>> line 29, in <module>
>>>> Mar 17 18:43:50 edessa weewxd[419]:     import user.extensions
>>>> Mar 17 18:43:50 edessa weewxd[419]: ModuleNotFoundError: No module 
>>>> named 'user.extensions'
>>>> Mar 17 18:43:50 edessa systemd[1]: weewx.service: Main process exited, 
>>>> code=exited, status=1/FAILURE
>>>> Mar 17 18:43:50 edessa systemd[1]: weewx.service: Failed with result 
>>>> 'exit-code'.
>>>>
>>>> This occurred on a Raspberry Pi 3b+ running version 4.10.2 with the 
>>>> BCRobotics 
>>>> driver <https://github.com/David-Enst/WeeWX-BCRobotics>.
>>>>
>>>> Any assistance would be greatly appreciated. Thank you.
>>>>
>>>> -- 
>>>> 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/70b373c6-8597-487f-a8f8-457275c3a510n%40googlegroups.com
>>>>  
>>>> <https://groups.google.com/d/msgid/weewx-user/70b373c6-8597-487f-a8f8-457275c3a510n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/9c845053-d799-4319-a019-608ab969483an%40googlegroups.com.

Reply via email to