Bi-monthly release with minor bug fixes and improvements
nafa@NAFABox:/usr/share/weatherradio$ sudo apt-get install python-rrdtool
[sudo] Mot de passe de nafa :
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances
Lecture des informations d'état... Fait
python-rrdtool est déjà la version la plus récente (1.7.0-1build1).
Les paquets suivants ont été installés automatiquement et ne sont plus nécessaires :
indi-aagcloudwatcher indi-nexstarevo
Veuillez utiliser « sudo apt autoremove » pour les supprimer.
0 mis à jour, 0 nouvellement installés, 0 à enlever et 16 non mis à jour.
nafa@NAFABox:/usr/share/weatherradio$ ./bin/wr_rrd_create.py
Traceback (most recent call last):
File "./bin/wr_rrd_create.py", line 20, in <module>
import rrdtool
ModuleNotFoundError: No module named 'rrdtool'
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 154, in apport_excepthook
os.O_WRONLY | os.O_CREAT | os.O_EXCL, 0o640), 'wb') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/var/crash/_usr_share_weatherradio_bin_wr_rrd_create.py.1000.crash'
Original exception was:
Traceback (most recent call last):
File "./bin/wr_rrd_create.py", line 20, in <module>
import rrdtool
ModuleNotFoundError: No module named 'rrdtool'
nafa@NAFABox:/usr/share/weatherradio$
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
chris@tinkerboard:/etc/systemd/system$ sudo systemctl enable indi-weatherradio.service
[sudo] Mot de passe de chris :
Failed to enable unit: "multi-user.targe" is not a valid unit name.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
from configparser import ConfigParser
from os import path
class WeatherRadioConfig:
config = None
def __init__(self):
# setup configuration
self.config = ConfigParser(interpolation=None)
self.config.optionxform = str
# default values
self.config.add_section('WeatherRadio')
# web server configuration
self.config.set('WeatherRadio', 'INDISERVER', '0.0.0.0')
self.config.set('WeatherRadio', 'INDIPORT', '8624')
# RRD storage holding time series data
self.config.set('WeatherRadio', 'RRDFILE',
'/usr/local/share/weatherradio/weather.rrd')
# RRD storage holding time series for raw sensor data
self.config.set('WeatherRadio', 'RRDSENSORSFILE',
'/usr/local/share/weatherradio/sensors.rrd')
# path to the JSON files holding the data
self.config.set('WeatherRadio', 'DATAPATH',
'/usr/local/share/weatherradio/html/data')
# path to the directory holding web cam images and videos
self.config.set('WeatherRadio', 'MEDIADIR',
'/usr/local/share/weatherradio/html/media')
######### INDI Weather vector and element names
self.config.set('WeatherRadio', 'WEATHER', 'WEATHER_PARAMETERS')
self.config.set('WeatherRadio', 'WEATHER_TEMPERATURE', 'WEATHER_TEMPERATURE')
self.config.set('WeatherRadio', 'WEATHER_PRESSURE', 'WEATHER_PRESSURE')
self.config.set('WeatherRadio', 'WEATHER_HUMIDITY', 'WEATHER_HUMIDITY')
self.config.set('WeatherRadio', 'WEATHER_CLOUD_COVER', 'WEATHER_CLOUD_COVER')
self.config.set('WeatherRadio', 'WEATHER_SQM', 'WEATHER_SQM')
self.config.set('WeatherRadio', 'WEATHER_DEWPOINT', 'WEATHER_DEWPOINT')
self.config.set('WeatherRadio', 'WEATHER_SKY_TEMPERATURE', 'WEATHER_SKY_TEMPERATURE')
self.config.set('WeatherRadio', 'WEATHER_WIND_GUST', 'WEATHER_WIND_GUST')
self.config.set('WeatherRadio', 'WEATHER_WIND_SPEED', 'WEATHER_WIND_SPEED')
self.config.set('WeatherRadio', 'WEATHER_WIND_DIRECTION', 'WEATHER_WIND_DIRECTION')
self.config.set('WeatherRadio', 'WEATHER_RAIN_DROPS', 'WEATHER_RAIN_DROPS')
self.config.set('WeatherRadio', 'WEATHER_RAIN_VOLUME', 'WEATHER_RAIN_VOLUME')
self.config.set('WeatherRadio', 'WEATHER_WETNESS', 'WEATHER_WETNESS')
# read config files
for file in ['/etc/weatherradio.ini',
'/usr/local/share/weatherradio/weatherradio.ini']:
self.config.read(file)
def getDevices(self):
"""Delivers the section names of devices"""
return [x for x in self.config.sections() if x.startswith('Device')]
from configparser import ConfigParser
from os import path
class WeatherRadioConfig:
config = None
def __init__(self):
# setup configuration
self.config = ConfigParser(interpolation=None)
self.config.optionxform = str
# default values
self.config.add_section('WeatherRadio')
# web server configuration
self.config.set('WeatherRadio', 'INDISERVER', 'localhost')
self.config.set('WeatherRadio', 'INDIPORT', '7624')
# RRD storage holding time series data
self.config.set('WeatherRadio', 'RRDFILE',
'/usr/share/weatherradio/weather.rrd')
# RRD storage holding time series for raw sensor data
self.config.set('WeatherRadio', 'RRDSENSORSFILE',
'/usr/share/weatherradio/sensors.rrd')
# path to the JSON files holding the data
self.config.set('WeatherRadio', 'DATAPATH',
'/usr/share/weatherradio/html/data')
# path to the directory holding web cam images and videos
self.config.set('WeatherRadio', 'MEDIADIR',
'/usr/share/weatherradio/html/media')
######### INDI Weather vector and element names
self.config.set('WeatherRadio', 'WEATHER', 'WEATHER_PARAMETERS')
self.config.set('WeatherRadio', 'WEATHER_TEMPERATURE', 'WEATHER_TEMPERATURE')
self.config.set('WeatherRadio', 'WEATHER_PRESSURE', 'WEATHER_PRESSURE')
self.config.set('WeatherRadio', 'WEATHER_HUMIDITY', 'WEATHER_HUMIDITY')
self.config.set('WeatherRadio', 'WEATHER_CLOUD_COVER', 'WEATHER_CLOUD_COVER')
self.config.set('WeatherRadio', 'WEATHER_SQM', 'WEATHER_SQM')
self.config.set('WeatherRadio', 'WEATHER_DEWPOINT', 'WEATHER_DEWPOINT')
self.config.set('WeatherRadio', 'WEATHER_SKY_TEMPERATURE', 'WEATHER_SKY_TEMPERATURE')
self.config.set('WeatherRadio', 'WEATHER_WIND_GUST', 'WEATHER_WIND_GUST')
self.config.set('WeatherRadio', 'WEATHER_WIND_SPEED', 'WEATHER_WIND_SPEED')
self.config.set('WeatherRadio', 'WEATHER_WIND_DIRECTION', 'WEATHER_WIND_DIRECTION')
self.config.set('WeatherRadio', 'WEATHER_RAIN_DROPS', 'WEATHER_RAIN_DROPS')
self.config.set('WeatherRadio', 'WEATHER_RAIN_VOLUME', 'WEATHER_RAIN_VOLUME')
self.config.set('WeatherRadio', 'WEATHER_WETNESS', 'WEATHER_WETNESS')
# read config files
for file in ['/etc/weatherradio.ini',
'/usr/share/weatherradio/weatherradio.ini']:
self.config.read(file)
def getDevices(self):
"""Delivers the section names of devices"""
return [x for x in self.config.sections() if x.startswith('Device')]
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
chris@tinkerboard:~$ cd /usr/share/weatherradio
chris@tinkerboard:/usr/share/weatherradio$ ./bin/wr_rrd_create.py
Traceback (most recent call last):
File "./bin/wr_rrd_create.py", line 44, in <module>
ret = rrdtool.create(rrd_args,
rrdtool.OperationalError: Cannot create temporary file
chris@tinkerboard:/usr/share/weatherradio$
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
!/usr/bin/python3
# -*- coding: latin-1 -*-
#-----------------------------------------------------------------------
# Configuration of Weather Radio.
#
# Copyright (C) 2021 Wolfgang Reissenberger <sterne-jaeger@openfuture.de>
#
# This application is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
#-----------------------------------------------------------------------
from configparser import ConfigParser
from os import path
class WeatherRadioConfig:
config = None
def __init__(self):
# setup configuration
self.config = ConfigParser(interpolation=None)
self.config.optionxform = str
# default values
self.config.add_section('WeatherRadio')
# web server configuration
self.config.set('WeatherRadio', 'INDISERVER', 'localhost')#0.0.0.0
self.config.set('WeatherRadio', 'INDIPORT', '7624')#8624
# RRD storage holding time series data
self.config.set('WeatherRadio', 'RRDFILE',
'/usr/share/weatherradio/weather.rrd')
# RRD storage holding time series for raw sensor data
self.config.set('WeatherRadio', 'RRDSENSORSFILE',
'/usr/share/weatherradio/sensors.rrd')
# path to the JSON files holding the data
self.config.set('WeatherRadio', 'DATAPATH',
'/usr/share/weatherradio/html/data')
# path to the directory holding web cam images and videos
self.config.set('WeatherRadio', 'MEDIADIR',
'/usr/share/weatherradio/html/media')
######### INDI Weather vector and element names
self.config.set('WeatherRadio', 'WEATHER', 'WEATHER_PARAMETERS')
self.config.set('WeatherRadio', 'WEATHER_TEMPERATURE', 'WEATHER_TEMPERATURE')
self.config.set('WeatherRadio', 'WEATHER_PRESSURE', 'WEATHER_PRESSURE')
self.config.set('WeatherRadio', 'WEATHER_HUMIDITY', 'WEATHER_HUMIDITY')
self.config.set('WeatherRadio', 'WEATHER_CLOUD_COVER', 'WEATHER_CLOUD_COVER')
self.config.set('WeatherRadio', 'WEATHER_SQM', 'WEATHER_SQM')
self.config.set('WeatherRadio', 'WEATHER_DEWPOINT', 'WEATHER_DEWPOINT')
self.config.set('WeatherRadio', 'WEATHER_SKY_TEMPERATURE', 'WEATHER_SKY_TEMPERATURE')
self.config.set('WeatherRadio', 'WEATHER_WIND_GUST', 'WEATHER_WIND_GUST')
self.config.set('WeatherRadio', 'WEATHER_WIND_SPEED', 'WEATHER_WIND_SPEED')
self.config.set('WeatherRadio', 'WEATHER_WIND_DIRECTION', 'WEATHER_WIND_DIRECTION')
self.config.set('WeatherRadio', 'WEATHER_RAIN_DROPS', 'WEATHER_RAIN_DROPS')
self.config.set('WeatherRadio', 'WEATHER_RAIN_VOLUME', 'WEATHER_RAIN_VOLUME')
self.config.set('WeatherRadio', 'WEATHER_WETNESS', 'WEATHER_WETNESS')
# read config files
for file in ['/etc/weatherradio.ini',
'/usr/share/weatherradio/weatherradio.ini']:
self.config.read(file)
def getDevices(self):
"""Delivers the section names of devices"""
return [x for x in self.config.sections() if x.startswith('Device')]
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.