new install weewx on a new RPi 4b

506 visualizzazioni
Passa al primo messaggio da leggere

sali...@gmail.com

da leggere,
7 feb 2024, 15:36:557 feb
a weewx-user
hello guys,
I want install weewx on a new RPi4b for test ( bullseye)
I follow the  prerequisite ( it is not my 1st install of weewx ) but I have errors.
after the key
[wget -qO - https://weewx.com/keys.html | sudo gpg --dearmor --output /etc/apt/trusted.gpg.d/weewx.gpg
pi@raspberrypi:~ $ wget -qO - https://weewx.com/apt/weewx-python3.list | sudo tee /etc/apt/sources.list.d/weewx.list
deb [arch=all] http://weewx.com/apt/python3 buster main ==> why Buster
pi@raspberrypi:~ $ sudo apt update
Atteint :1 http://archive.raspberrypi.org/debian bullseye InRelease
Atteint :2 http://raspbian.raspberrypi.org/raspbian bullseye InRelease
Réception de :3 http://weewx.com/apt/python3 buster InRelease [3 613 B]
Err :3 http://weewx.com/apt/python3 buster InRelease
  Les signatures suivantes n'ont pas pu être vérifiées car la clé publique n'est pas disponible : NO_PUBKEY ED444FCCF0E2B09E
Lecture des listes de paquets... Fait
W: Erreur de GPG : http://weewx.com/apt/python3 buster InRelease : Les signatures suivantes n'ont pas pu être vérifiées car la clé publique n'est pas disponible : NO_PUBKEY ED444FCCF0E2B09E
E: Le dépôt http://weewx.com/apt/python3 buster InRelease n'est pas signé.
N: Les mises à jour depuis un tel dépôt ne peuvent s'effectuer de manière sécurisée, et sont donc désactivées par défaut.
N: Voir les pages de manuel d'apt-secure(8) pour la création des dépôts et les détails de configuration d'un utilisateur.]

ideas, I have never that !!!!

Patrick

vince

da leggere,
7 feb 2024, 15:59:187 feb
a weewx-user

wget -qO - https://weewx.com/keys-old.html | sudo gpg --dearmor --output /etc/apt/trusted.gpg.d/weewx.gpg
sudo apt update

sali...@gmail.com

da leggere,
7 feb 2024, 16:12:317 feb
a weewx-user
thank vince, that works well
patrick

Tom Keffer

da leggere,
7 feb 2024, 16:29:117 feb
a weewx...@googlegroups.com
Patrick: Yeah, this one has us mystified. The repository is signed with the new keys, but apt keeps insisting on the old keys.

Eventually we'll figure it out. In the meantime, use the old keys.

-tk

--
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/30aeb041-09c3-4f39-b23b-ddcce9db4e3bn%40googlegroups.com.

matthew wall

da leggere,
7 feb 2024, 17:06:397 feb
a weewx-user
On Wednesday, February 7, 2024 at 3:36:55 PM UTC-5 sali...@gmail.com wrote:
pi@raspberrypi:~ $ wget -qO - https://weewx.com/apt/weewx-python3.list | sudo tee /etc/apt/sources.list.d/weewx.list
deb [arch=all] http://weewx.com/apt/python3 buster main ==> why Buster

'buster' (i.e., debian 10) is the oldest release on which the deb package will install.

if you look at the python2 configuration, it uses the label 'squeeze' (debian 6)

the weewx packages are *really* stable with respect to dependencies, so the same package that works with debian 10 also works with debian 11 and debian 12.  besides, i am too old and lazy to build a new deb and new apt repository for every major debian release that comes out :)
 

salinois

da leggere,
8 feb 2024, 02:59:308 feb
a weewx...@googlegroups.com

hello Matthew

OK I understand if that works

thanks also to vince.

Now , I must to try the 5.0.0 version

Patrick

--
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.

salinois

da leggere,
6 mar 2024, 12:47:266 mar
a weewx...@googlegroups.com

hello,

I restart my installation with version weewx 5.0.1 and I have these errors:

on my version which works in 4.10.2, my "byows.py" driver is located here: [/usr/share/weewx/user/] but I saw that the tree structure has changed; where should I put my driver now?

watch these errors:

sudo systemctl status weewx.service
● weewx.service - WeeWX
     Loaded: loaded (/lib/systemd/system/weewx.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Wed 2024-03-06 18:32:05 CET; 2s ago
       Docs: https://weewx.com/docs
    Process: 11182 ExecStart=weewxd /etc/weewx/weewx.conf (code=exited, status=4)
   Main PID: 11182 (code=exited, status=4)
        CPU: 682ms

mars 06 18:32:05 raspberrypi weewxd[11182]: CRITICAL weewx.engine:     ****      pin = self.pin_factory.pin(pin)
mars 06 18:32:05 raspberrypi weewxd[11182]: CRITICAL weewx.engine:     ****    File "/usr/lib/python3/dist-packages/gpiozero/pins/pi.py", line 103, in pin
mars 06 18:32:05 raspberrypi weewxd[11182]: CRITICAL weewx.engine:     ****      pin = self.pin_class(self, n)
mars 06 18:32:05 raspberrypi weewxd[11182]: CRITICAL weewx.engine:     ****    File "/usr/lib/python3/dist-packages/gpiozero/pins/rpigpio.py", line 111, in __init__
mars 06 18:32:05 raspberrypi weewxd[11182]: CRITICAL weewx.engine:     ****      GPIO.setup(self.number, GPIO.IN, self.GPIO_PULL_UPS[self._pull])
mars 06 18:32:05 raspberrypi weewxd[11182]: CRITICAL weewx.engine:     ****  RuntimeError: Not running on a RPi!
mars 06 18:32:05 raspberrypi weewxd[11182]: CRITICAL __main__: Unable to load driver: Not running on a RPi!
mars 06 18:32:05 raspberrypi weewxd[11182]: CRITICAL __main__:     ****  Exiting...
mars 06 18:32:05 raspberrypi systemd[1]: weewx.service: Main process exited, code=exited, status=4/NOPERMISSION
mars 06 18:32:05 raspberrypi systemd[1]: weewx.service: Failed with result 'exit-code'.

Patrick

salinois

da leggere,
6 mar 2024, 13:13:416 mar
a weewx...@googlegroups.com

again me

perhaps , I found

Should I use this method now?

[weectl extension install /home/pi/byows.py]

and after:

weectl station reconfigures --no-prompt --driver=weewx.drivers.byows


Patrick

Tom Keffer

da leggere,
6 mar 2024, 13:23:596 mar
a weewx...@googlegroups.com
If you did a package install, the driver byows.py should go in /etc/weewx/bin/user. But, frankly, this should have been done for you if you did an upgrade from V4 to V5. Take a look in /etc/weewx/bin/user and see if it's in there.

But, the error in the little snippet from your status report is a different one. For some reason, your installation thinks it is not running on a Raspberry Pi, so it cannot access the gpio pins. I'm not an expert on that, but it may be due to a missing installation package. 

vince

da leggere,
6 mar 2024, 13:44:186 mar
a weewx-user
did find some google links where this message appears due to permission problems accessing the hardware. If you look at your error it also says NOPERMISSION.  Try adding the user weewx runs as to group gpio via ‘sudo usermod -aG gpio weewx’ and see if it works now.

salinois

da leggere,
6 mar 2024, 14:29:596 mar
a weewx...@googlegroups.com

ok Tom,

this is a fresh install, not upgrade, but When I put my other sd card with 4.9 version, it is ok, so, it is not a issue with GPIO, I think.

And yes, the driver is here:

[ls -ail /etc/weewx/bin/user/
total 32
526359 drwxrwsr-x 3 weewx weewx  4096  6 mars  18:32 .
526358 drwxrwsr-x 3 weewx weewx  4096  7 févr. 22:15 ..
524298 -rw-r--r-- 1 weewx weewx 10990  8 févr. 13:05 byows.py
526361 -rw-rw-r-- 1 weewx weewx   541  7 févr. 22:15 extensions.py
526360 -rw-rw-r-- 1 weewx weewx   306  7 févr. 22:15 __init__.py
655698 drwxr-sr-x 2 weewx weewx  4096  6 mars  18:32 __pycache__]


and the lines for the driver in weewx.conf are:


[Station]

    # Description of the station location, such as your town.
    location = "Loulle, Jura (France)"

    # Latitude in decimal degrees. Negative for southern hemisphere.
    latitude = 46.2539
    # Longitude in decimal degrees. Negative for western hemisphere.
    longitude = 5.3168

    # Altitude of the station, with the unit it is in. This is used only
    # if the hardware cannot supply a value.
    altitude = 700, meter    # Choose 'foot' or 'meter' for unit

    # Set to type of station hardware. There must be a corresponding stanza
    # in this file, which includes a value for the 'driver' option.
    station_type = BYOWS

and next

#################################################################################


[BYOWS]
   
# This section is for the Raspberry Pi Bring Your Own Weather Station driver.

    # The driver to use
    driver = byows ===> is it the good syntax ?
in version 4.9 I have user.byows

but now, there no more errors:

[ sudo systemctl status weewx.service
● weewx.service - WeeWX
     Loaded: loaded (/lib/systemd/system/weewx.service; enabled; vendor preset: enabled)

     Active: failed (Result: exit-code) since Wed 2024-03-06 20:21:34 CET; 3s ago
       Docs: https://weewx.com/docs
    Process: 29896 ExecStart=weewxd /etc/weewx/weewx.conf (code=exited, status=1/FAILURE)
   Main PID: 29896 (code=exited, status=1/FAILURE)
        CPU: 337ms

mars 06 20:21:34 raspberrypi weewxd[29896]:     self.setupStation(config_dict)
mars 06 20:21:34 raspberrypi weewxd[29896]:   File "/usr/share/weewx/weewx/engine.py", line 104, in setupStation
mars 06 20:21:34 raspberrypi weewxd[29896]:     __import__(driver)
mars 06 20:21:34 raspberrypi weewxd[29896]: ModuleNotFoundError: No module named 'byows'
mars 06 20:21:34 raspberrypi weewxd[29896]: CRITICAL __main__:     ****    File "/usr/share/weewx/weewx/engine.py", line 104, in setupStation
mars 06 20:21:34 raspberrypi weewxd[29896]: CRITICAL __main__:     ****      __import__(driver)
mars 06 20:21:34 raspberrypi weewxd[29896]: CRITICAL __main__:     ****  ModuleNotFoundError: No module named 'byows'
mars 06 20:21:34 raspberrypi weewxd[29896]: CRITICAL __main__:     ****  Exiting.
mars 06 20:21:34 raspberrypi systemd[1]: weewx.service: Main process exited, code=exited, status=1/FAILURE
mars 06 20:21:34 raspberrypi systemd[1]: weewx.service: Failed with result 'exit-code'.]

Patrick

Tom Keffer

da leggere,
6 mar 2024, 15:14:176 mar
a weewx...@googlegroups.com
It should be

driver = user.byows

salinois

da leggere,
6 mar 2024, 15:32:536 mar
a weewx...@googlegroups.com

OK, I took that, thanks.

but I use this command:

# Reconfigure to use your hardware
weectl station reconfigure

watch:

[weectl station reconfigure
Using configuration file /etc/weewx/weewx.conf
Processing configuration file /etc/weewx/weewx.conf

Give a description of the station. This will be used for the title of reports.
description [Loulle, Jura (France)]:

Specify altitude, with units 'foot' or 'meter'.  For example:
  35, foot
  12, meter
altitude [700, meter]:

Specify latitude in decimal degrees, negative for south.
latitude [46.2539]:
Specify longitude in decimal degrees, negative for west.
longitude [5.3168]:

Choose a unit system for the reports. Later, you can modify
your choice, or choose a combination of units. Unit systems
include:
  us         (ºF, inHg, in, mph)
  metricwx   (ºC, mbar, mm, m/s)
  metric     (ºC, mbar, cm, km/h)
unit system [us]:

Choose a driver. Installed drivers include:
  0) BYOWS           (user.byows)
  1) AcuRite         (weewx.drivers.acurite)
  2) BYOWS           (weewx.drivers.byows)
  3) CC3000          (weewx.drivers.cc3000)
  4) FineOffsetUSB   (weewx.drivers.fousb)
  5) Simulator       (weewx.drivers.simulator)
  6) TE923           (weewx.drivers.te923)
  7) Ultimeter       (weewx.drivers.ultimeter)
  8) Vantage         (weewx.drivers.vantage)
  9) WMR100          (weewx.drivers.wmr100)
 10) WMR300          (weewx.drivers.wmr300)
 11) WMR9x8          (weewx.drivers.wmr9x8)
 12) WS1             (weewx.drivers.ws1)
 13) WS23xx          (weewx.drivers.ws23xx)
 14) WS28xx          (weewx.drivers.ws28xx)
driver: 0

You can register the station on weewx.com, where it will be included in a
map. If you choose to register, you will also need a unique URL to identify
the station (such as a website, or a WeatherUnderground link).
register this station (y/n)? [n]
Saving configuration file /etc/weewx/weewx.conf
Saved old configuration file as /etc/weewx/weewx.conf.20240306210700]

And this is better.

sudo systemctl restart weewx.service
pi@raspberrypi:~/Documents $ sudo systemctl status weewx.service
● weewx.service - WeeWX
     Loaded: loaded (/lib/systemd/system/weewx.service; enabled; vendor preset: enabled)
     Active: active (running) since Wed 2024-03-06 21:07:54 CET; 2s ago
       Docs: https://weewx.com/docs
   Main PID: 30869 (python3)
      Tasks: 4 (limit: 4915)
        CPU: 577ms
     CGroup: /system.slice/weewx.service
             └─30869 python3 /usr/share/weewx/weewxd.py /etc/weewx/weewx.conf

mars 06 21:07:54 raspberrypi weewxd[30869]: INFO weewx.restx: CWOP: Posting not enabled.
mars 06 21:07:54 raspberrypi weewxd[30869]: INFO weewx.restx: WOW: Posting not enabled.
mars 06 21:07:54 raspberrypi weewxd[30869]: INFO weewx.restx: AWEKAS: Posting not enabled.
mars 06 21:07:54 raspberrypi weewxd[30869]: INFO weewx.engine: 'pyephem' detected, extended almanac data is available
mars 06 21:07:54 raspberrypi weewxd[30869]: INFO __main__: Starting up weewx version 5.0.2
mars 06 21:07:54 raspberrypi weewxd[30869]: INFO weewx.engine: Using binding 'wx_binding' to database 'weewx.sdb'
mars 06 21:07:54 raspberrypi weewxd[30869]: INFO weewx.manager: Starting backfill of daily summaries
mars 06 21:07:54 raspberrypi weewxd[30869]: INFO weewx.manager: Daily summaries up to date
mars 06 21:07:54 raspberrypi weewxd[30869]: INFO weewx.engine: Starting main packet loop.
mars 06 21:07:54 raspberrypi weewxd.py[30869]: BYOWS RPi: Unknown Wind Vane value: 0.0
but I have again these ERRORS !!!

[Mar  6 21:30:16 raspberrypi weewxd[31170]: INFO weewx.manager: Added record 2024-03-06 21:30:00 CET (1709757000) to database 'weewx.sdb'
Mar  6 21:30:16 raspberrypi weewxd[31170]: INFO weewx.manager: Added record 2024-03-06 21:30:00 CET (1709757000) to daily summary in 'weewx.sdb'
Mar  6 21:30:16 raspberrypi weewxd.py: BYOWS RPi: Unknown Wind Vane value: 0.0
Mar  6 21:30:17 raspberrypi weewxd[31170]: INFO weewx.cheetahgenerator: Generated 8 files for report SeasonsReport in 1.26 seconds
Mar  6 21:30:18 raspberrypi weewxd[31170]: INFO weewx.imagegenerator: Generated 15 images for report SeasonsReport in 0.69 seconds
Mar  6 21:30:18 raspberrypi weewxd[31170]: INFO weewx.reportengine: Copied 0 files to /var/www/html/weewx
Mar  6 21:30:18 raspberrypi weewxd[31170]: ERROR weewx.reportengine: Caught unrecoverable exception in generator 'weewx.cheetahgenerator.CheetahGenerator'
Mar  6 21:30:18 raspberrypi weewxd[31170]: ERROR weewx.reportengine:         ****  No module named 'user.stats'
Mar  6 21:30:18 raspberrypi weewxd[31170]: ERROR weewx.reportengine:         ****  Traceback (most recent call last):
Mar  6 21:30:18 raspberrypi weewxd[31170]: ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 220, in run
Mar  6 21:30:18 raspberrypi weewxd[31170]: ERROR weewx.reportengine:         ****      obj.start()
Mar  6 21:30:18 raspberrypi weewxd[31170]: ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 409, in start
Mar  6 21:30:18 raspberrypi weewxd[31170]: ERROR weewx.reportengine:         ****      self.run()
Mar  6 21:30:18 raspberrypi weewxd[31170]: ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/cheetahgenerator.py", line 163, in run
Mar  6 21:30:18 raspberrypi weewxd[31170]: ERROR weewx.reportengine:         ****      self.init_extensions(gen_dict[section_name])
Mar  6 21:30:18 raspberrypi weewxd[31170]: ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/cheetahgenerator.py", line 194, in init_extensions
Mar  6 21:30:18 raspberrypi weewxd[31170]: ERROR weewx.reportengine:         ****      klass = weeutil.weeutil.get_object(x)
Mar  6 21:30:18 raspberrypi weewxd[31170]: ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weeutil/weeutil.py", line 1404, in get_object
Mar  6 21:30:18 raspberrypi weewxd[31170]: Traceback (most recent call last):
Mar  6 21:30:18 raspberrypi weewxd[31170]:   File "/usr/share/weewx/weewx/reportengine.py", line 220, in run
Mar  6 21:30:18 raspberrypi weewxd[31170]:     obj.start()
Mar  6 21:30:18 raspberrypi weewxd[31170]:   File "/usr/share/weewx/weewx/reportengine.py", line 409, in start
Mar  6 21:30:18 raspberrypi weewxd[31170]:     self.run()
Mar  6 21:30:18 raspberrypi weewxd[31170]:   File "/usr/share/weewx/weewx/cheetahgenerator.py", line 163, in run
Mar  6 21:30:18 raspberrypi weewxd[31170]:     self.init_extensions(gen_dict[section_name])
Mar  6 21:30:18 raspberrypi weewxd[31170]:   File "/usr/share/weewx/weewx/cheetahgenerator.py", line 194, in init_extensions
Mar  6 21:30:18 raspberrypi weewxd[31170]:     klass = weeutil.weeutil.get_object(x)
Mar  6 21:30:18 raspberrypi weewxd[31170]:   File "/usr/share/weewx/weeutil/weeutil.py", line 1404, in get_object
Mar  6 21:30:18 raspberrypi weewxd[31170]:     module = importlib.import_module(module_name)
Mar  6 21:30:18 raspberrypi weewxd[31170]:   File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
Mar  6 21:30:18 raspberrypi weewxd[31170]:     return _bootstrap._gcd_import(name[level:], package, level)
Mar  6 21:30:18 raspberrypi weewxd[31170]:   File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
Mar  6 21:30:18 raspberrypi weewxd[31170]:   File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
Mar  6 21:30:18 raspberrypi weewxd[31170]:   File "<frozen importlib._bootstrap>", line 984, in _find_and_load_unlocked
Mar  6 21:30:18 raspberrypi weewxd[31170]: ModuleNotFoundError: No module named 'user.stats'
Mar  6 21:30:18 raspberrypi weewxd[31170]: ERROR weewx.reportengine:         ****      module = importlib.import_module(module_name)
Mar  6 21:30:18 raspberrypi weewxd[31170]: ERROR weewx.reportengine:         ****    File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
Mar  6 21:30:18 raspberrypi weewxd[31170]: ERROR weewx.reportengine:         ****      return _bootstrap._gcd_import(name[level:], package, level)
Mar  6 21:30:18 raspberrypi weewxd[31170]: ERROR weewx.reportengine:         ****    File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
Mar  6 21:30:18 raspberrypi weewxd[31170]: ERROR weewx.reportengine:         ****    File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
Mar  6 21:30:18 raspberrypi weewxd[31170]: ERROR weewx.reportengine:         ****    File "<frozen importlib._bootstrap>", line 984, in _find_and_load_unlocked
Mar  6 21:30:18 raspberrypi weewxd[31170]: ERROR weewx.reportengine:         ****  ModuleNotFoundError: No module named 'user.stats'
Mar  6 21:30:18 raspberrypi weewxd[31170]: ERROR weewx.reportengine:         ****  Generator terminated
Mar  6 21:30:18 raspberrypi weewxd.py: BYOWS RPi: Unknown Wind Vane value: 0.0]

but, I don't again modify all the weewx.conf, maybe normaly......

Patrick


Tom Keffer

da leggere,
6 mar 2024, 15:44:066 mar
a weewx...@googlegroups.com
You are missing a search list extension called "stats". I suspect that this is the old stats module that came with WeeWX until v4.6. 

If that's the case, I've attached it. Put it in /etc/weewx/bin/user

If it came from somewhere else, I have no idea what it is. Or, perhaps you don't use it at all.

stats.py

salinois

da leggere,
6 mar 2024, 16:12:576 mar
a weewx...@googlegroups.com

yes, I took that.

ls -ail /etc/weewx/bin/user/
total 36
526359 drwxrwsr-x 3 weewx weewx  4096  6 mars  21:52 .


526358 drwxrwsr-x 3 weewx weewx  4096  7 févr. 22:15 ..
524298 -rw-r--r-- 1 weewx weewx 10990  8 févr. 13:05 byows.py
526361 -rw-rw-r-- 1 weewx weewx   541  7 févr. 22:15 extensions.py
526360 -rw-rw-r-- 1 weewx weewx   306  7 févr. 22:15 __init__.py

655698 drwxr-sr-x 2 weewx weewx  4096  6 mars  21:54 __pycache__
524317 -rw-r--r-- 1 pi    weewx  4052  6 mars  21:52 stats.py

This is again better.

[Mar  6 21:57:13 raspberrypi weewxd.py: BYOWS RPi: Unknown Wind Vane value: 0.0
Mar  6 21:57:15 raspberrypi weewxd.py: BYOWS RPi: Unknown Wind Vane value: 0.0
Mar  6 21:57:15 raspberrypi weewxd[31835]: INFO weewx.manager: Added record 2024-03-06 21:57:00 CET (1709758620) to database 'weewx.sdb'
Mar  6 21:57:15 raspberrypi weewxd[31835]: INFO weewx.manager: Added record 2024-03-06 21:57:00 CET (1709758620) to daily summary in 'weewx.sdb'
Mar  6 21:57:16 raspberrypi weewxd.py: BYOWS RPi: Unknown Wind Vane value: 0.0
Mar  6 21:57:17 raspberrypi weewxd[31835]: INFO weewx.cheetahgenerator: Generated 8 files for report SeasonsReport in 1.26 seconds
Mar  6 21:57:18 raspberrypi weewxd[31835]: INFO weewx.imagegenerator: Generated 15 images for report SeasonsReport in 0.65 seconds
Mar  6 21:57:18 raspberrypi weewxd[31835]: INFO weewx.reportengine: Copied 0 files to /var/www/html/weewx
Mar  6 21:57:18 raspberrypi weewxd.py: BYOWS RPi: Unknown Wind Vane value: 0.0]

Weird, I don't use statistics in my driver !!!

but I had just an error When I restart weewx

Mar  6 22:05:16 raspberrypi weewxd[32027]: /usr/lib/python3/dist-packages/gpiozero/pins/pi.py:153: SPISoftwareFallback: failed to initialize hardware SPI, falling back to software (error was: [Errno 13] Permission non accordée)
Mar  6 22:05:16 raspberrypi weewxd[32027]: 

  warnings.warn(

My command that say "OK"

 sudo pip3 install gpiozero
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: gpiozero in /usr/lib/python3/dist-packages (1.6.2)


patrick

vince

da leggere,
6 mar 2024, 16:15:246 mar
a weewx-user
patrick - as I said earlier, " /usr/lib/python3/dist-packages/gpiozero/pins/pi.py:153: SPISoftwareFallback: failed to initialize hardware SPI, falling back to software (error was: [Errno 13] Permission non accordée)" clearly indicates a permission issue.

add the weewx user to group gpio.  Really.

salinois

da leggere,
6 mar 2024, 16:25:206 mar
a weewx...@googlegroups.com

Yes, Vince, I took as you said me.

 $ getent group gpio
gpio:x:997:pi,weewx

but it is always the same things, this error come , only when I restart weewx. !!!

patrick

vince

da leggere,
6 mar 2024, 16:31:106 mar
a weewx-user
You need to work through googling your exact error message. "SPISoftwareFallback: failed to initialize hardware SPI, falling back to software (error was: [Errno 13] Permission"

See if https://roboticsbackend.com/raspberry-pi-hardware-permissions/ helps any.   It might be group 'spi' that you need to add the user to.

Rather than changing things randomly please read the link end to end to understand it.

salinois

da leggere,
6 mar 2024, 16:46:446 mar
a weewx...@googlegroups.com

I understand that you say me, but why I don't have this issue with version weewx 4.9 ?

the only difference is RPi 3b and now RPi 4b with bulleyes.

Weewx 4.9 on RPi 3b with Buster

Weewx 5.0.2 on RPi 4b with bulleyes "error"

I am watching the link "robotics"

Patrick

vince

da leggere,
6 mar 2024, 16:52:596 mar
a weewx-user
4.9 runs as root so you do not see permission issues there.

5.x runs as user 'weewx' so you have to add that user to the correct group(s) to access hardware

salinois

da leggere,
6 mar 2024, 17:06:036 mar
a weewx...@googlegroups.com

OK Vince,

this is new with the version 5.

I'm going to watch the link "github' and I comme back to you.

good night from France.

Patrick

vince

da leggere,
6 mar 2024, 19:53:146 mar
a weewx-user
Patrick - when the sun comes around again in France and you get back to this, I did more research and updated the permissions wiki page.  Check out the new section at the bottom of the page (link) which hopefully explains better.  I got this information from the debian wiki and a few blogs and other documents available online in recent years.

Patrick Tranchant

da leggere,
7 mar 2024, 16:15:437 mar
a weewx...@googlegroups.com
Hi Vince, i am at my son's for few days, when i will back at home , I will watch the link.
Patrick 

salinois

da leggere,
18 mar 2024, 15:34:2418 mar
a weewx...@googlegroups.com

hello Vince,

I am come back at home.

And I have always an error but different:

Mar 18 19:20:51 raspberrypi weewxd[1976]: INFO weewx.engine: Loading station type BYOWS (user.byows)
Mar 18 19:20:51 raspberrypi weewxd.py: BYOWS RPi: using driver BYOWS
Mar 18 19:20:51 raspberrypi weewxd.py: BYOWS RPi: driver version is 0.51
Mar 18 19:20:51 raspberrypi weewxd[1976]: /usr/lib/python3/dist-packages/gpiozero/pins/pi.py:153: SPISoftwareFallback: failed to initialize hardware SPI, falling back to software (error was: [Errno 2] Aucun fichier ou dossier de ce type)
Mar 18 19:20:51 raspberrypi weewxd[1976]:   warnings.warn(
Mar 18 19:20:51 raspberrypi weewxd[1976]: INFO weewx.engine: StdConvert target unit is 0x1

just after a restart of weewx; but weewx works fine.

lines in my /boot/config.txt:

# Uncomment some or all of these to enable the optional hardware interfaces
dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on


I follow all requisites for permissions.

I don't see where is the issue.

Patrick

vince

da leggere,
18 mar 2024, 15:57:2518 mar
a weewx-user
Look at the answer in https://raspberrypi.stackexchange.com/questions/69911/how-to-make-raspbian-load-the-spi-module-on-boot-up

Always always always google for your exact error message.  If you had googled for "SPISoftwareFallback: failed to initialize hardware SPI, falling back to software" you would have found this and similar pages.

salinois

da leggere,
18 mar 2024, 16:09:3318 mar
a weewx...@googlegroups.com

YES YES

but I don't use SPI in my driver !!!!

salinois

da leggere,
18 mar 2024, 16:49:2118 mar
a weewx...@googlegroups.com

again, I follow the link an other time ; I found also the same link with my error

I put this line in my config.txt

# Uncomment some or all of these to enable the optional hardware interfaces
dtparam=i2c_arm=on
#dtparam=i2s=on

dtparam=spi=on

but always an issue with permissions !!!!!

sorry for my ignorance but I can't find it.

Patrick

vince

da leggere,
18 mar 2024, 17:00:5018 mar
a weewx-user
We cannot help if you say you have errors on permissions if you do not include the logs so we can look at them.

salinois

da leggere,
18 mar 2024, 17:13:4318 mar
a weewx...@googlegroups.com

sorry, I wrote too fast !!

my logs with error:


ar 18 22:10:01 raspberrypi weewxd[2022]: INFO __main__: Debug: 0
Mar 18 22:10:01 raspberrypi weewxd[2022]: INFO weewx.engine: Loading station type BYOWS (user.byows)
Mar 18 22:10:01 raspberrypi weewxd.py: BYOWS RPi: using driver BYOWS
Mar 18 22:10:01 raspberrypi weewxd.py: BYOWS RPi: driver version is 0.51
Mar 18 22:10:01 raspberrypi weewxd[2022]: /usr/lib/python3/dist-packages/gpiozero/pins/pi.py:153: SPISoftwareFallback: failed to initialize hardware SPI, falling back to software (error was: [Errno 13] Permission non accordée)
Mar 18 22:10:01 raspberrypi weewxd[2022]:   warnings.warn(

Mar 18 22:10:01 raspberrypi weewxd[2022]: INFO weewx.engine: StdConvert target unit is 0x1
Mar 18 22:10:01 raspberrypi weewxd[2022]: INFO weewx.wxservices: StdWXCalculate

As I said, weewx works fine, this error is just after a restart of weewx.

Patrick

vince

da leggere,
18 mar 2024, 17:34:5318 mar
a weewx-user
What precise driver are you running and where did you get it from ?

And what does "groups weewx" give you as output ?

All I can think of is your weewx user is not in all the groups necessary to access the hardware....

salinois

da leggere,
19 mar 2024, 14:05:3119 mar
a weewx...@googlegroups.com

hello Vince,

now is good, I forgot a only line to add weewx to hardware SPI (group SPI), for i2c it was good.

no errors after restart weewx; thank you for insisting.

When I will upgrade my weewx to 5.0.2 from 4.10, Would I have this problem ?

bye

Patrick

salinois

da leggere,
22 mar 2024, 13:29:2122 mar
a weewx...@googlegroups.com

Hello Vince,

can you answer my question regarding the upgrade?

thanks

Patrick

vince

da leggere,
22 mar 2024, 14:09:3822 mar
a weewx-user
A bme280 works just fine in weewx v5 if your user is in the appropriate groups so that user can access the hardware.

salinois

da leggere,
22 mar 2024, 15:39:4522 mar
a weewx...@googlegroups.com
ok

thanks

patrick
Rispondi a tutti
Rispondi all'autore
Inoltra
0 nuovi messaggi