Got it. I have to do 'sudo usermod -aG i2c weewx'. I think such information should be find in the weewx user guide.
https://www.mail-archive.com/[email protected]/msg47195.html Judge Richter schrieb am Freitag, 15. August 2025 um 15:55:00 UTC+2: > > Edit to my last answer: it works NOW, it could install the driver. But i > dont See anything in the Webinterface. > Judge Richter schrieb am Freitag, 15. August 2025 um 15:14:47 UTC+2: > >> OK, works not. I had to reboot after adding the user to the group. >> >> But weewx doesn't recognize the sensor. In the webinterface inside temp >> is 17° but acually it's 26°. I have this in syslog >> >> >> *Aug 15 15:09:50 weather weewxd[608]: CRITICAL __main__: **** File >> "/etc/weewx/bin/user/bme280wx.py", line 58, in __init__Aug 15 15:10:00 >> weather weewxd.py[608]: bme280: bme280wx configuration {'i2c_port': '1', >> 'i2c_address': '0x76', 'usUnits': 'US', 'temperatureKeys': 'inTemp', >> 'temperature_must_have': '', 'pressureKeys': 'pressure', >> 'pressure_must_have': 'outTemp', 'humidityKeys': 'inHumidity', >> 'humidity_must_have': ''}* >> >> Your driver is for *waveshare* bme280 but I thought it's from bosch. Is >> it possible we are talking about different sensors? >> >> vince schrieb am Donnerstag, 14. August 2025 um 19:35:21 UTC+2: >> >>> Add your user (typically pi) to group weewx so it has permission to >>> write the config files in /etc/weewx which is group weewx. >>> >>> - sudo usermod -aG weewx pi >>> - then log out as user pi, and log back in to make it take effect >>> - then try the extension install which should work fine 'without' >>> sudo >>> >>> (I had a spare pi to test on and the above worked for me just now) >>> >>> Once the initial weewx package is installed you shouldn't need to use >>> sudo at all, nor should you. Weewx v5 does not run as root. A dpkg >>> installation runs as user 'weewx' group 'weewx'. You can check your group >>> membership via the 'groups' command which should return output that looks >>> something like: >>> >>> pi@raspberrypi:~ $ groups >>> pi adm dialout cdrom sudo audio video plugdev games users input render >>> netdev lpadmin weewx gpio i2c spi >>> >>> On Thursday, August 14, 2025 at 10:06:36 AM UTC-7 Judge Richter wrote: >>> >>>> now i have an other error >>>> >>>> >>>> *weectl extension install -y >>>> >>>> https://gitlab.com/wjcarpenter/bme280wx/-/archive/master/bme280wx-master.zip >>>> >>>> <https://gitlab.com/wjcarpenter/bme280wx/-/archive/master/bme280wx-master.zip>Error >>>> >>>> parsing config file: [Errno 13] Permission denied: '/etc/weewx/weewx.conf'* >>>> >>>> >>>> *Traceback (most recent call last):* >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> * File "/usr/share/weewx/weeutil/startup.py", line 86, in start_app >>>> config_path, config_dict = weecfg.read_config(config_option, [config_arg]) >>>> >>>> >>>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File >>>> "/usr/share/weewx/weecfg/__init__.py", line 150, in read_config >>>> config_dict = configobj.ConfigObj(config_path, >>>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File >>>> "/usr/lib/python3/dist-packages/configobj/__init__.py", line 1229, in >>>> __init__ self._load(infile, configspec) File >>>> "/usr/lib/python3/dist-packages/configobj/__init__.py", line 1236, in >>>> _load with open(infile, 'rb') as h: >>>> ^^^^^^^^^^^^^^^^^^PermissionError: [Errno 13] Permission denied: >>>> '/etc/weewx/weewx.conf'* >>>> >>>> and when i run weectl with sudo >>>> >>>> >>>> >>>> *Using configuration file /etc/weewx/weewx.confTraceback (most recent >>>> call last):* >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> * File "/usr/share/weewx/weectl.py", line 75, in <module> main() >>>> File "/usr/share/weewx/weectl.py", line 67, in main >>>> namespace.func(namespace) File "/usr/share/weewx/weectllib/__init__.py", >>>> line 80, in dispatch config_path, config_dict, log = >>>> weeutil.startup.start_app('weectl', >>>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File >>>> "/usr/share/weewx/weeutil/startup.py", line 111, in start_app >>>> weewx_root, user_module = initialize(config_dict) >>>> ^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/weewx/weeutil/startup.py", >>>> line 76, in initialize importlib.import_module('user.extensions')* >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> * File "/usr/lib/python3.11/importlib/__init__.py", line 126, in >>>> import_module return _bootstrap._gcd_import(name[level:], package, >>>> level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >>>> File >>>> "<frozen importlib._bootstrap>", line 1206, in _gcd_import File "<frozen >>>> importlib._bootstrap>", line 1178, in _find_and_load File "<frozen >>>> importlib._bootstrap>", line 1149, in _find_and_load_unlocked File >>>> "<frozen importlib._bootstrap>", line 690, in _load_unlocked File >>>> "<frozen >>>> importlib._bootstrap_external>", line 940, in exec_module File "<frozen >>>> importlib._bootstrap>", line 241, in _call_with_frames_removed* >>>> >>>> >>>> >>>> >>>> >>>> * File "/etc/weewx/bin/user/extensions.py", line 18, in <module> >>>> locale.setlocale(locale.LC_ALL, '') File "/usr/lib/python3.11/locale.py", >>>> line 626, in setlocale return _setlocale(category, locale) >>>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^locale.Error: unsupported locale setting* >>>> >>>> I have installed weewx using apt >>>> https://weewx.com/docs/5.1/quickstarts/debian/#install >>>> vince schrieb am Donnerstag, 14. August 2025 um 18:12:24 UTC+2: >>>> >>>>> sudo apt install python3-bme280 >>>>> >>>>> On Thursday, August 14, 2025 at 8:21:38 AM UTC-7 Judge Richter wrote: >>>>> >>>>>> Installation of bme280 works but the weewx start failed: >>>>>> >>>>>> I can read the data from bme280 manually with a python script. >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> *Using configuration file /etc/weewx/weewx.confExtension Name >>>>>> Version Descriptionbme280wx 1.0 Add bme280 sensor >>>>>> readings to loop packet datapi@weather:~$ sudo nano >>>>>> /etc/weewx/weewx.confpi@weather:~$ weewxd Using configuration file >>>>>> /etc/weewx/weewx.confTraceback (most recent call last): File >>>>>> "/usr/share/weewx/weewxd.py", line 226, in <module> main() File >>>>>> "/usr/share/weewx/weewxd.py", line 121, in main engine = >>>>>> weewx.engine.StdEngine(config_dict) >>>>>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File >>>>>> "/usr/share/weewx/weewx/engine.py", line 89, in __init__ >>>>>> self.loadServices(config_dict) File "/usr/share/weewx/weewx/engine.py", >>>>>> line 157, in loadServices obj = weeutil.weeutil.get_object(svc)(self, >>>>>> config_dict) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File >>>>>> "/usr/share/weewx/weeutil/weeutil.py", line 1404, in get_object >>>>>> module = >>>>>> importlib.import_module(module_name) >>>>>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File >>>>>> "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module >>>>>> >>>>>> return _bootstrap._gcd_import(name[level:], package, level) >>>>>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "<frozen >>>>>> importlib._bootstrap>", line 1206, in _gcd_import File "<frozen >>>>>> importlib._bootstrap>", line 1178, in _find_and_load File "<frozen >>>>>> importlib._bootstrap>", line 1149, in _find_and_load_unlocked File >>>>>> "<frozen importlib._bootstrap>", line 690, in _load_unlocked File >>>>>> "<frozen >>>>>> importlib._bootstrap_external>", line 940, in exec_module File "<frozen >>>>>> importlib._bootstrap>", line 241, in _call_with_frames_removed File >>>>>> "/etc/weewx/bin/user/bme280wx.py", line 6, in <module> import >>>>>> bme280ModuleNotFoundError: No module named 'bme280'* >>>>>> >>>>> -- 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 visit https://groups.google.com/d/msgid/weewx-user/8c6a1b8b-6cc8-4e12-ae64-b96ee8f565f9n%40googlegroups.com.
