×

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
with this method, I am here and it blocks the continuation
nafa@NAFABox:~$ sudo apt-get install python 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 est déjà la version la plus récente (2.7.15~rc1-1).
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:~$ pip install simplejson utidylib pathlib ffmpeg-python
Collecting simplejson
  Downloading https://files.pythonhosted.org/packages/7a/47/c7cc3d4ed15f09917838a2fb4e1759eafb6d2f37ebf7043af984d8b36cf7/simplejson-3.17.6.tar.gz (83kB)
    100% |████████████████████████████████| 92kB 640kB/s 
Collecting utidylib
  Downloading https://files.pythonhosted.org/packages/98/18/e63c117fa751263b2b6b5ea2770d410c6593164d96faf6dc6c9b37807bf3/uTidylib-0.6.tar.gz
Collecting pathlib
  Downloading https://files.pythonhosted.org/packages/ac/aa/9b065a76b9af472437a0059f77e8f962fe350438b927cb80184c32f075eb/pathlib-1.0.1.tar.gz (49kB)
    100% |████████████████████████████████| 51kB 428kB/s 
Collecting ffmpeg-python
  Downloading https://files.pythonhosted.org/packages/dd/5e/d5f9105d59c1325759d838af4e973695081fbbc97182baf73afc78dec266/ffmpeg-python-0.2.0.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-7B4mBt/ffmpeg-python/setup.py", line 96, in <module>
        'Programming Language :: Python :: 3.6',
      File "/usr/lib/python2.7/dist-packages/setuptools/__init__.py", line 128, in setup
        _install_setup_requires(attrs)
      File "/usr/lib/python2.7/dist-packages/setuptools/__init__.py", line 123, in _install_setup_requires
        dist.fetch_build_eggs(dist.setup_requires)
      File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 513, in fetch_build_eggs
        replace_conflicting=True,
      File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 774, in resolve
        replace_conflicting=replace_conflicting
      File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 1057, in best_match
        return self.obtain(req, installer)
      File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 1069, in obtain
        return installer(requirement)
      File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 580, in fetch_build_egg
        return cmd.easy_install(req)
      File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 698, in easy_install
        return self.install_item(spec, dist.location, tmpdir, deps)
      File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 724, in install_item
        dists = self.install_eggs(spec, download, tmpdir)
      File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 895, in install_eggs
        os.path.abspath(dist_filename)
    distutils.errors.DistutilsError: Couldn't find a setup script in /tmp/easy_install-CoUhkP/pytest-runner-6.0.0.tar.gz
 
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-7B4mBt/ffmpeg-python/
nafa@NAFABox:~$ sudo mkdir /usr/share/weatherradio
nafa@NAFABox:~$ cp -a add-on/weatherradio/html add-on/weatherradio/bin  /usr/share/weatherradio
cp: impossible d'évaluer 'add-on/weatherradio/html': Aucun fichier ou dossier de ce type
cp: impossible d'évaluer 'add-on/weatherradio/bin': Aucun fichier ou dossier de ce type
1 year 11 months ago #82205

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

  • Posts: 250
  • Thank you received: 3
Hello, I always have problems to install the web page
who has an idea
afa@NAFABox:~$ pip3 install simplejson utidylib pathlib ffmpeg-python
Collecting simplejson
  Using cached https://files.pythonhosted.org/packages/7a/47/c7cc3d4ed15f09917838a2fb4e1759eafb6d2f37ebf7043af984d8b36cf7/simplejson-3.17.6.tar.gz
Collecting utidylib
  Downloading https://files.pythonhosted.org/packages/8e/24/adf05607f7dcb3fd8a5dd9162e3cad0e37a5deb76458bd7cc8882bbed15a/uTidylib-0.8-py3-none-any.whl
Collecting pathlib
  Using cached https://files.pythonhosted.org/packages/ac/aa/9b065a76b9af472437a0059f77e8f962fe350438b927cb80184c32f075eb/pathlib-1.0.1.tar.gz
Collecting ffmpeg-python
  Downloading https://files.pythonhosted.org/packages/d7/0c/56be52741f75bad4dc6555991fabd2e07b432d333da82c11ad701123888a/ffmpeg_python-0.2.0-py3-none-any.whl
Collecting future (from ffmpeg-python)
  Downloading https://files.pythonhosted.org/packages/45/0b/38b06fd9b92dc2b68d58b75f900e97884c45bedd2ff83203d933cf5851c9/future-0.18.2.tar.gz (829kB)
    100% |████████████████████████████████| 829kB 540kB/s 
Building wheels for collected packages: simplejson, pathlib, future
  Running setup.py bdist_wheel for simplejson ... error
  Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-01n8yf0v/simplejson/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmpvhi_h9hfpip-wheel- --python-tag cp36:
  usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: -c --help [cmd1 cmd2 ...]
     or: -c --help-commands
     or: -c cmd --help
 
  error: invalid command 'bdist_wheel'
 
  ----------------------------------------
  Failed building wheel for simplejson
  Running setup.py clean for simplejson
  Running setup.py bdist_wheel for pathlib ... error
  Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-01n8yf0v/pathlib/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmp9zg4zbvrpip-wheel- --python-tag cp36:
  usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: -c --help [cmd1 cmd2 ...]
     or: -c --help-commands
     or: -c cmd --help
 
  error: invalid command 'bdist_wheel'
 
  ----------------------------------------
  Failed building wheel for pathlib
  Running setup.py clean for pathlib
  Running setup.py bdist_wheel for future ... error
  Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-01n8yf0v/future/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmp77rwl48jpip-wheel- --python-tag cp36:
  usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: -c --help [cmd1 cmd2 ...]
     or: -c --help-commands
     or: -c cmd --help
 
  error: invalid command 'bdist_wheel'
 
  ----------------------------------------
  Failed building wheel for future
  Running setup.py clean for future
Failed to build simplejson pathlib future
Installing collected packages: simplejson, utidylib, pathlib, future, ffmpeg-python
  Running setup.py install for simplejson ... done
  Running setup.py install for pathlib ... done
  Running setup.py install for future ... done
Successfully installed ffmpeg-python-0.2.0 future-0.18.2 pathlib-1.0.1 simplejson-3.17.6 utidylib-0.8
nafa@NAFABox:~$ 

Chris
1 year 11 months ago #82226

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

  • Posts: 276
  • Thank you received: 52
Chris,

A search on a given error message can help
exerror.com/error-invalid-command-bdist_wheel/

Gene
1 year 11 months ago #82235

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

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

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

  • Posts: 276
  • Thank you received: 52
Hi CHris,

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

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

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

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

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

Time to create page: 1.015 seconds