×

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: 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.

  • Posts: 250
  • Thank you received: 3
Hello
how to check that the data arrives at the right place.

Regards
Chris
1 year 11 months ago #82384

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

  • Posts: 250
  • Thank you received: 3
Hello
I still don't have any data, but my server is well connected according to what is written on it, so I ask for the server's status
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)

Chris
1 year 11 months ago #82402

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

  • Posts: 31
  • Thank you received: 2
At what point in the documentation are you now? and what exactly is not working?
1 year 11 months ago #82403

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

Time to create page: 0.939 seconds