Closed groetg closed 1 month ago
I decided to run Weewx as root, so now I have no problems anymore
See my last reaction
I decided to run Weewx as root, so now I have no problems anymore
You must give your non-root user access to the GPIO pins. Here is some information on how to do that: https://raspberrypi.stackexchange.com/questions/40105/access-gpio-pins-without-root-no-access-to-dev-mem-try-running-as-root
I installed Weewx 5.1 on a RPI 2 and made a BYOWS station. It worked, but I screwed up installing updates and shutdown the RPI, so my SD was skrewed. I made a new installation, but no having trouble to get Weewx with BYOWS driver working. BYOWS scripts work, Weewx installing works (works fine with simulator. But when I install BYOWS driver and set the BYOWS as default in weewx.conf I get this error:
groetg@byows-jim:~ $ sudo systemctl status weewx × weewx.service - WeeWX Loaded: loaded (/lib/systemd/system/weewx.service; enabled; preset: enabled) Active: failed (Result: exit-code) since Tue 2024-07-09 17:38:35 CEST; 5min ago Duration: 1.661s Docs: https://weewx.com/docs Process: 17613 ExecStart=weewxd /etc/weewx/weewx.conf (code=exited, status=4) Main PID: 17613 (code=exited, status=4) CPU: 1.651s
Jul 09 17:38:35 byows-jim weewxd[17613]: CRITICAL weewx.engine: File "/usr/local/lib/python3.11/dist-packages/gpiozero/pins/pi.py", line 639, in _set_when_changed Jul 09 17:38:35 byows-jim weewxd[17613]: CRITICAL weewx.engine: self._enable_event_detect() Jul 09 17:38:35 byows-jim weewxd[17613]: CRITICAL weewx.engine: File "/usr/local/lib/python3.11/dist-packages/gpiozero/pins/rpigpio.py", line 220, in _enable_event_detect Jul 09 17:38:35 byows-jim weewxd[17613]: CRITICAL weewx.engine: GPIO.add_event_detect( Jul 09 17:38:35 byows-jim weewxd[17613]: CRITICAL weewx.engine: RuntimeError: Failed to add edge detection Jul 09 17:38:35 byows-jim weewxd[17613]: CRITICAL main: Unable to load driver: Failed to add edge detection Jul 09 17:38:35 byows-jim weewxd[17613]: CRITICAL main: Exiting... Jul 09 17:38:35 byows-jim systemd[1]: weewx.service: Main process exited, code=exited, status=4/NOPERMISSION Jul 09 17:38:35 byows-jim systemd[1]: weewx.service: Failed with result 'exit-code'. Jul 09 17:38:35 byows-jim systemd[1]: weewx.service: Consumed 1.651s CPU time.
DEBUG info: Using configuration file /etc/weewx/weewx.conf
System info Platform: Linux-6.6.31+rpt-rpi-v7-armv7l-with-glibc2.36 Python Version: 3.11.2
Load Information 1 minute load average: 0.14
5 minute load average: 0.37
15 minute load average: 0.35
General Weewx info Weewx version 5.1.0 detected.
Currently installed extensions Extension Name Version Description byows_rpi 0.51 Bring Your Own Weather Station (BYOWS) Driver for the Raspberry Pi
Archive info Database name: weewx.sdb Table name: archive Version 4.0 Unit system: 1 (US) First good timestamp: 2024-07-09 15:50:00 CEST (1720533000) Last good timestamp: 2024-07-09 17:25:00 CEST (1720538700) Number of records: 20 weewx (weewx.conf) is set to use an archive interval of 300 seconds. The station hardware was not interrogated to determine the archive interval.
Supported SQL keys dateTime usUnits interval
altimeter appTemp appTemp1
barometer batteryStatus1 batteryStatus2
batteryStatus3 batteryStatus4 batteryStatus5
batteryStatus6 batteryStatus7 batteryStatus8
cloudbase co co2
consBatteryVoltage dewpoint dewpoint1
ET extraHumid1 extraHumid2
extraHumid3 extraHumid4 extraHumid5
extraHumid6 extraHumid7 extraHumid8
extraTemp1 extraTemp2 extraTemp3
extraTemp4 extraTemp5 extraTemp6
extraTemp7 extraTemp8 forecast
hail hailBatteryStatus hailRate
heatindex heatindex1 heatingTemp
heatingVoltage humidex humidex1
inDewpoint inHumidity inTemp
inTempBatteryStatus leafTemp1 leafTemp2
leafWet1 leafWet2 lightning_distance
lightning_disturber_count lightning_energy lightning_noise_count
lightning_strike_count luminosity maxSolarRad
nh3 no2 noise
o3 outHumidity outTemp
outTempBatteryStatus pb pm10_0
pm1_0 pm2_5 pressure
radiation rain rainBatteryStatus
rainRate referenceVoltage rxCheckPercent
signal1 signal2 signal3
signal4 signal5 signal6
signal7 signal8 snow
snowBatteryStatus snowDepth snowMoisture
snowRate so2 soilMoist1
soilMoist2 soilMoist3 soilMoist4
soilTemp1 soilTemp2 soilTemp3
soilTemp4 supplyVoltage txBatteryStatus
UV uvBatteryStatus windBatteryStatus
windchill windDir windGust
windGustDir windrun windSpeed
Databases configured in weewx.conf: archive_sqlite: database_name weewx.sdb
driver weedb.sqlite
SQLITE_ROOT /var/lib/weewx
archive_mysql: database_name weewx
driver weedb.mysql
host localhost
user weewx
password weewx
--- Start configuration file /etc/weewx/weewx.conf ---
WEEWX CONFIGURATION FILE
#
Copyright (c) 2009-2024 Tom Keffer tkeffer@gmail.com
See the file LICENSE.txt for your rights.
##############################################################################
This section is for general configuration information.
Set to 1 for extra debug info, otherwise comment it out or set to zero.
debug = 1
Whether to log successful operations. May get overridden below.
log_success = True
Whether to log unsuccessful operations. May get overridden below.
log_failure = True
This configuration file was created by ...
version = 5.1.0 config_path = /etc/weewx/weewx.conf WEEWX_ROOT = /etc/weewx
##############################################################################
This section is for information about the station.
[Station]
##############################################################################
[Simulator]
This section is for the weewx weather station simulator.
##############################################################################
This section is for uploading data to Internet sites
[StdRESTful]
##############################################################################
This section specifies what reports, using which skins, to generate.
[StdReport]
##############################################################################
This service converts the unit system coming from the hardware to a unit
system in the database.
[StdConvert]
##############################################################################
This section can adjust data using calibration expressions.
[StdCalibrate]
##############################################################################
This section is for quality control checks. If units are not specified,
values must be in the units defined in the StdConvert section.
[StdQC]
##############################################################################
This section controls the origin of derived values.
[StdWXCalculate]
##############################################################################
For hardware that supports it, this section controls how often the
onboard clock gets updated.
[StdTimeSynch]
##############################################################################
This section is for configuring the archive service.
[StdArchive]
##############################################################################
This section binds a data store to a database.
[DataBindings]
##############################################################################
This section defines various databases.
[Databases]
##############################################################################
This section defines defaults for the different types of databases.
[DatabaseTypes]
##############################################################################
This section configures the internal weewx engine.
[Engine]
[BYOWS]
This section is for the Raspberry Pi Bring Your Own Weather Station driver.