v1.9.13: Capteur CO2 Senseair S88 - scaffolding

Table data_S88, flag config S88 + port configurable S88_port
(default /dev/ttyAMA5), service/timer systemd 10s, carte
sensors.html, endpoint launcher.php, toggle admin.html.

read_co2() est un stub NotImplementedError en attente du datasheet.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
PaulVua
2026-06-01 16:15:37 +02:00
parent 05734715a7
commit 239bdfea69
10 changed files with 304 additions and 5 deletions

View File

@@ -237,6 +237,38 @@ AccuracySec=1s
WantedBy=timers.target
EOL
# Create service and timer files for Senseair S88 CO2 Data
cat > /etc/systemd/system/nebuleair-s88-data.service << 'EOL'
[Unit]
Description=NebuleAir Senseair S88 CO2 Data Collection Service
After=network.target
[Service]
Type=oneshot
ExecStart=/usr/bin/python3 /var/www/nebuleair_pro_4g/S88/write_data.py
User=root
WorkingDirectory=/var/www/nebuleair_pro_4g
StandardOutput=append:/var/www/nebuleair_pro_4g/logs/s88_service.log
StandardError=append:/var/www/nebuleair_pro_4g/logs/s88_service_errors.log
[Install]
WantedBy=multi-user.target
EOL
cat > /etc/systemd/system/nebuleair-s88-data.timer << 'EOL'
[Unit]
Description=Run NebuleAir Senseair S88 CO2 Data Collection every 10 seconds
Requires=nebuleair-s88-data.service
[Timer]
OnBootSec=10s
OnUnitActiveSec=10s
AccuracySec=1s
[Install]
WantedBy=timers.target
EOL
# Create service and timer files for Database Cleanup
cat > /etc/systemd/system/nebuleair-db-cleanup-data.service << 'EOL'
[Unit]
@@ -370,7 +402,7 @@ systemctl daemon-reload
# Enable and start all timers
echo "Enabling and starting all services..."
for service in npm envea sara bme280 mppt mhz19 db-cleanup noise; do
for service in npm envea sara bme280 mppt mhz19 s88 db-cleanup noise; do
systemctl enable nebuleair-$service-data.timer
systemctl start nebuleair-$service-data.timer
echo "Started nebuleair-$service-data timer"