Bi-monthly release with minor bug fixes and improvements
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.
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.
Please Log in or Create an account to join the conversation.
chris@tinkerboard:~$ sudo systemctl status indi-weatherradio.service
[sudo] Mot de passe de chris :
● indi-weatherradio.service - INDI server for weather radio
Loaded: loaded (/etc/systemd/system/indi-weatherradio.service; enabled; ve>
Active: active (running) since Sun 2022-04-17 15:34:19 CEST; 18h ago
Main PID: 1815 (indiserver)
Tasks: 2 (limit: 4748)
Memory: 3.6M
CGroup: /system.slice/indi-weatherradio.service
├─1815 /usr/bin/indiserver -v indi_weatherradio
└─1820 indi_weatherradio
avr 17 15:34:19 tinkerboard systemd[1]: Started INDI server for weather radio.
avr 17 15:34:19 tinkerboard indiserver[1815]: 2022-04-17T13:34:19: startup: /us>
avr 17 15:34:19 tinkerboard indiserver[1815]: 2022-04-17T13:34:19: Driver indi_>
avr 17 15:34:19 tinkerboard indiserver[1815]: 2022-04-17T13:34:19: listening to>
avr 17 15:34:19 tinkerboard indiserver[1815]: 2022-04-17T13:34:19: Driver indi_>
lines 1-15/15 (END)
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.