×

INDI Library v1.9.7 Released (29 Jul 2022)

Bi-monthly INDI Library released with new drivers and bug fixes.

How do I install weatherradio and especially the web page?

  • Posts: 234
  • Thank you received: 3
Hello
I'm having a problem with the script, but I checked the rrdtool and it is normally installed
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$

Regards
Chris
3 months 3 weeks ago #82245

Please Log in or Create an account to join the conversation.

  • Posts: 200
  • Thank you received: 40
Hi CHris,

You have the python interface install.
Check here, click 'dependent packages' and the click librrd4
3 months 3 weeks ago #82267

Please Log in or Create an account to join the conversation.

  • Posts: 234
  • Thank you received: 3
Hello
good, so I advance gently. Maitenant I try to install the server for weatherradio, I follow the explanation on the doc. But I'm stuck with a command line I put it to you
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.

I followed this to configure
INDI server setup

Using the INDI driver depends upon the scenario how you want to use Weather Radio. If you want to simply use it in combination with your INDI client of choice (like e.g. KStars), there is no special setup required.

If you want to provide weather data in a 24x7 mode to weather station clients like for example its own web interface (see below), you need to start the INDI server separately. The simples way for this is starting indiserver -v indi_weatherradio from a terminal. On Linux machines, you may create a dedicated service that automaticall starts during startup. Create the following service definition in /etc/systemd/system/indi-weatherradio.service:

[Unit]
Description=INDI server for weather radio
Wants=network-online.target
After=network-online.target

[Service]
Type=simple
User=root
ExecStart=/usr/bin/indiserver -v indi_weatherradio

[Install]
WantedBy=multi-user.target
For activating and starting this service, execute the following commands:

sudo systemctl enable indi-weatherradio.service
sudo systemctl start indi-weatherradio.service

Thank you popur the one who has an idea

Regards
Chris
3 months 3 weeks ago #82358

Please Log in or Create an account to join the conversation.

  • Posts: 15
  • Thank you received: 2
It looks like there is a letter "t" in "target" missing.

Failed to enable unit: "multi-user.targe" is not a valid unit name.

It should be: "multi-user.target"

Regards
Rafael
RockPi 4B 128GB eMMC (Armbian 22.04)
Pegasus Pocket Powerbox Advance
iOptron CEM40
QHY5III-462C, QHY294C Pro, QHY294M Pro, QHYCFW-3M (US)
6"f/4 Newtonian, Stellamira 90mm
3 months 3 weeks ago #82367

Please Log in or Create an account to join the conversation.

  • Posts: 234
  • Thank you received: 3
Thank you,
what a bummer, to be fooled by copy/paste...
I've moved on but I'm stuck here now

<code> 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$
</code>

still no data displayed on the web page
now is this just
<code> # 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', '192.168.1.100')#0.0.0.0 !!!!!!!I have modified here
self.config.set('WeatherRadio', 'INDIPORT', '/dev/ttyACM0')#8624 !!!!!!!I have modified here
</code>

by the way, is the IP indiserver and still the same as the IP of the tinker or how do we find it

Regards
Chris
Last edit: 3 months 3 weeks ago by Porchet.
3 months 3 weeks ago #82368

Please Log in or Create an account to join the conversation.

  • Posts: 15
  • Thank you received: 2
I think i had the same issue.
I had to modify the paths in wr_config.py

modify:
/usr/local/share/weatherradio/ ...
to:
/usr/share/weatherradio/ ...

It was:
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')]

Edit to:
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')]
RockPi 4B 128GB eMMC (Armbian 22.04)
Pegasus Pocket Powerbox Advance
iOptron CEM40
QHY5III-462C, QHY294C Pro, QHY294M Pro, QHYCFW-3M (US)
6"f/4 Newtonian, Stellamira 90mm
Last edit: 3 months 3 weeks ago by Rafael Schlegel.
3 months 3 weeks ago #82369

Please Log in or Create an account to join the conversation.

  • Posts: 234
  • Thank you received: 3
Okay,
I'll try,
and what you changed here, I can put the same thing

self.config.set('WeatherRadio', 'INDISERVER', 'localhost')
self.config.set('WeatherRadio', 'INDIPORT', '7624')
Last edit: 3 months 3 weeks ago by Porchet.
3 months 3 weeks ago #82370

Please Log in or Create an account to join the conversation.

  • Posts: 15
  • Thank you received: 2
If your indiserver is running on the same machine, you can put the same.
RockPi 4B 128GB eMMC (Armbian 22.04)
Pegasus Pocket Powerbox Advance
iOptron CEM40
QHY5III-462C, QHY294C Pro, QHY294M Pro, QHYCFW-3M (US)
6"f/4 Newtonian, Stellamira 90mm
3 months 3 weeks ago #82371

Please Log in or Create an account to join the conversation.

  • Posts: 234
  • Thank you received: 3
So still no info on the web page .....
but why this action doesn't work
 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$
3 months 3 weeks ago #82372

Please Log in or Create an account to join the conversation.

  • Posts: 15
  • Thank you received: 2
can you post your wr_config.py?
RockPi 4B 128GB eMMC (Armbian 22.04)
Pegasus Pocket Powerbox Advance
iOptron CEM40
QHY5III-462C, QHY294C Pro, QHY294M Pro, QHYCFW-3M (US)
6"f/4 Newtonian, Stellamira 90mm
3 months 3 weeks ago #82373

Please Log in or Create an account to join the conversation.

  • Posts: 234
  • Thank you received: 3
ok

here is my file
!/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')]
3 months 3 weeks ago #82374

Please Log in or Create an account to join the conversation.

  • Posts: 15
  • Thank you received: 2
Ok that looks good.
Do you perhaps not have write permissions in the folder?
Can you run it with sudo?
RockPi 4B 128GB eMMC (Armbian 22.04)
Pegasus Pocket Powerbox Advance
iOptron CEM40
QHY5III-462C, QHY294C Pro, QHY294M Pro, QHYCFW-3M (US)
6"f/4 Newtonian, Stellamira 90mm
3 months 3 weeks ago #82375

Please Log in or Create an account to join the conversation.

Time to create page: 0.987 seconds