×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

How do I install weatherradio and especially the web page?

  • Posts: 31
  • 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
1 year 11 months ago #82367

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

  • Posts: 250
  • 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: 1 year 11 months ago by Porchet.
1 year 11 months ago #82368

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

  • Posts: 31
  • 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')]
Last edit: 1 year 11 months ago by Rafael Schlegel.
1 year 11 months ago #82369

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

  • Posts: 250
  • 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: 1 year 11 months ago by Porchet.
1 year 11 months ago #82370

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

  • Posts: 31
  • Thank you received: 2
If your indiserver is running on the same machine, you can put the same.
1 year 11 months ago #82371

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

  • Posts: 250
  • 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$
1 year 11 months ago #82372

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

  • Posts: 31
  • Thank you received: 2
can you post your wr_config.py?
1 year 11 months ago #82373

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

  • Posts: 250
  • 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')]
1 year 11 months ago #82374

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

  • Posts: 31
  • Thank you received: 2
Ok that looks good.
Do you perhaps not have write permissions in the folder?
Can you run it with sudo?
1 year 11 months ago #82375

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

  • Posts: 250
  • Thank you received: 3
OK, it goes through with sudo
but now when I do what is marked there, it doesn't work


First, read the current weather data and create the JSON files:

cd /usr/share/weatherradio
./bin/wr_rrd_update.py
./bin/wr_rrd_
./bin/wr_rrd_fetch.py -s 6h
./bin/wr_rrd_fetch.py -s 1d
./bin/wr_rrd_fetch.py -s 7d
./bin/wr_rrd_fetch.py -s 30d


this is what happens
<code>
chris@tinkerboard:~$ cd /usr/share/weatherradio
chris@tinkerboard:/usr/share/weatherradio$ ./bin/wr_rrd_update.py
Traceback (most recent call last):
File "./bin/wr_rrd_update.py", line 21, in <module>
from pid.decorator import pidfile
ModuleNotFoundError: No module named 'pid'
chris@tinkerboard:/usr/share/weatherradio$ sudo ./bin/wr_rrd_update.py
[sudo] Mot de passe de chris :
Traceback (most recent call last):
File "./bin/wr_rrd_update.py", line 21, in <module>
from pid.decorator import pidfile
ModuleNotFoundError: No module named 'pid'

</code>
Last edit: 1 year 11 months ago by Porchet.
1 year 11 months ago #82377

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

  • Posts: 31
  • Thank you received: 2
1 year 11 months ago #82378

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

  • Posts: 250
  • Thank you received: 3
ok that passed, what do I do now
what happens, because I still have nothing displayed in the web page
Last edit: 1 year 11 months ago by Porchet.
1 year 11 months ago #82379

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

Time to create page: 3.780 seconds