×

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

Bi-monthly release with minor bug fixes and improvements

Weather radio don't want connect

  • Posts: 108
  • Thank you received: 4
Hi Gilles,

after more than 2 years I'd like to ask you what have you accomplished? I'm following this weatherradio threat since about 2 years but still struggling with the data transfer to the webpage.
I run two RPi 4B one on the OTA rig the other in the observatory. Please find the attachement.
Even the last version of weatherradio will not cooperate :-). with the rrd-database and theire scritps. wr_rrd_update.py comes back with"ERROR 11 Resource temporarily not available".
The drivers in Ekos all connect and working. Data are presented and the wifi transmission (JSON pretty print of sensor data "/p") also works fine.
It was also possible to combine the relatively new indi-allsky programm and the "observatory" indi-drivers on different indi ports. So they stoped fighting and concurring about the several devices.

I'm very interested having this system working.

best regards ggtux
1 year 7 months ago #85626
Attachments:

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

  • Posts: 108
  • Thank you received: 4
better scheme
1 year 7 months ago #85628
Attachments:

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

  • Posts: 16
  • Thank you received: 3
My setup has evolved and looks roughly like this now...

I've had weatherradio running for a long while now using xbee units to talk back to a raspberry pi over serial. The raspberry pi is my weatherstation running weewx and processes the data (my main headache is I still can't find good values for the model constants to get cloud cover accurate % enough for my liking). I then chuck the data back out from weewx to mqtt using the weewx-mqtt plugin.

This is where I diverge slightly. Instead of using wolfgang's driver to connect directly to the weatheradio over http, I now use github.com/rkaczorek/indi-weather-mqtt to pull the weather data from mqtt. This allows me to fill in more data than wolfgang's driver (and I can pull data in from anywhere that can throw it on mqtt) which is useful to fill out the fields on the new weather tab in ekos that aren't covered in the driver.

One other advantage of this is that weewx is good at massaging weather data. So I can use unit conversion functions or build other calculations in weewx before dropping the data onto the queue in the format that indi will want it.

-Mark
The following user(s) said Thank You: Gunter
1 year 7 months ago #85630

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

  • Posts: 108
  • Thank you received: 4
Hi Mark,

can you please provide more detail? I have no issue with indi-weatherradio as the driver itself, but can't get the data in the rrd database. I get a a json file from the webserver of the weatherradio microcontroler 8266 like this (http://192.168.178.74:80/p). see attachement.
Do you have experience to deserialize such a file and put the data into the rrd db?
That'll resolve my issue too.

have a good day.

ggtux
1 year 7 months ago #85634
Attachments:

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

  • Posts: 16
  • Thank you received: 3
Hi Gunter - I'm afraid I can't help debug. As above, I don't use the website, instead I feed all the data into my weather station and visualise it that way, so I have no experience with the rrd files. -Mark
1 year 7 months ago #85635

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

  • Posts: 1185
  • Thank you received: 370
Hi Gunter,
did you try to follow the installation instructions ?

The first step that you need running is an INDI server with the weatherradio driver.

If this is the case, the next step is using the python scripts that create and update the RRD files. These scripts all use the weatherradio.ini configuration file. Please take the configuration file distributed and change it according to your settings. The documentation is outdated for the syntax, I changed the configuration file to the typical INI style.

The next step is creating the RRD files. For this, the documentation is accurate.

If this doesn't help, send me a PN here so that we can try to resolve it directly.

HTH
Wolfgang
The following user(s) said Thank You: Gunter
1 year 7 months ago #85637

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

  • Posts: 1185
  • Thank you received: 370
By the way, the error "ERROR 11 Resource temporarily not available" indicates that there is another instance of a script running.
1 year 7 months ago #85638

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

  • Posts: 108
  • Thank you received: 4
Hi Wolfgang,

thank you for your offer to help. I will send you a pn if still necessary. But now I will answer your note.
Yes I followd your instruction in README.md but I have some questions to it:
1. in the first place I was able to create the two rrds, but now I get an error because it seems to be impossible for a regular user to create thosefiles.
How are the permissions for /usr/share/weatherradio and further down? In my case it's pi.pi
2. What does it mean in line 2:
./bin/wr_rrd_update.py
./bin/wr_rrd_ (???)
./bin/wr_rrd_fetch.pv -s 6h
...
3. whitch user should generate the data? root or pi?
Thanks for the hint with the ERROR 11. I disabled all servers and restarted them but still I get the error 11.

In the attached file you will find the service files and the sytemctl status outputs, last part is the weatherradio.conf copy.
Please see also the slide I send about the topology a few entries before this.

In case I run kstars and Ekos I can use weatherradio driver and all other wanted drivers. In parallel I run the indi-allsky package with no issues.
It's getting late now. Have a good evening and clear skies.

Gunter
1 year 7 months ago #85643
Attachments:

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

  • Posts: 294
  • Thank you received: 54
Hi Gunter,

I revived my Indi Weather Radio station recently, following some mods to my observatory. I was not thinking of going the Web interface way but, after reading your message and the follow ups, I thought that a little challenge would be fun. That challenge ended up being more challenging than I thought.

I got as far as getting empty charts on the Web page but, from within /usr/share/weatherradio, when I wanted to create the RRD files, the ./bin/wr_rrd_create.py python script would exit with the following error:
"
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
"
I thought that it was related to ownership of the file but even "sudo ./bin/wr_rrd_create.py" would not work. Looking at the "./bin/wr_config.py" I noticed that the default RRD file names were created in /usr/local/share/..., not /usr/share... Removing the reference to local corrected the problem and I could create the sensors.rrd and weather.rrd files in /usr/share/weatherradio/ . I don't know if it is preferable that the files reside in the /usr/share/... or /usr/local/share/... directories but as long as things work, that's fine with me.

I am now at the point where I get the following error, trying to manually update the weather data with ./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'
"
For this one, I was missing the Python pid library. Solved with pip install pid.

As it is getting late here in eastern Canada, I will call it a day and continue tomorrow.

Gilles
1 year 7 months ago #85652

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

  • Posts: 108
  • Thank you received: 4
Good morning and thanks for your report. I saw all the things you mention. But Wolfgang will help. Please read my note. BTW, I ajusted all the pathes in different scrips to /usr/share/weatherradio. I think we will make it work. What OS du you use? In the Apache2 configuration is one differnece to the instructions of WEATHERRADIO.Wolggang enables a module by:sudo a2enmod weatherradio but there is no one. For me only worked: sudo a2enconfThis could not be the reason for the missing data because the web content / frame is shown.

I thing it is a issue with permissions. We will see.

Have a good day.

Gunter
1 year 7 months ago #85653
Attachments:

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

  • Posts: 1185
  • Thank you received: 370
Hi Gunter,
I would always recommend using a normal user for running the weather radio scripts, never use root. Therefore the directory holding the RRD files must at least be readable for the user, the RRD files must be writable.

I would recommend to add an entry User=pi below [Service] in your indiserver.service file.

And forget line 2, it's simply a mistake.

There are two scripts that need to run such that the web page displays current data:
1. wr_rrd_update.py which reads current weather data and stores it in the RRD file. This needs to run regularly (every 5 min at least)
2. wr_rrd_fetch.py which reads data from the RRD file and creates a JSON file holding the weather data to be displayed on the web page. Since the web page has several time frames (6h, 1d, 7d, 30d), this script needs to run for each time frame with the corresponding options.

As long as wr_rrd_update.py does not run, the other one does not make sense.

OK, let's check now if you get until this point. If yes, we can continue.

Cheers
Wolfgang
1 year 7 months ago #85672

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

  • Posts: 294
  • Thank you received: 54
Hello Gunter and Wolfgang,

Gunter, I am running Ubuntu 20.04 LTS and I faced a similar issue some time ago regarding a2enmod and a2enconf but don't recall which one worked. That was not a problem though as the server would work.

Wolfgang, I access my Weather Radio over Wifi but fail to see how wr_rrd_update.py gets the information from it. If I run wr_rrd_update.py a few times, it does not seem to populate the RRD file. I use the following in wr_config.py but it does not seem to access my Weather Radio. Any clue?

<code>

# web server configuration
self.config.set('WeatherRadio', 'INDISERVER', '192.168.2.245')
self.config.set('WeatherRadio', 'INDIPORT', '7624')

# Weather Radio configuration
self.config.set('WeatherRadio', 'INDIDEVICEMODE', 'Ethernet')
self.config.set('WeatherRadio', 'INDI_IP_ADDRESS', '192.168.2.155')
self.config.set('WeatherRadio', 'INDI_IP_PORT', '80')

</code>

Thanks,

Gilles
Last edit: 1 year 7 months ago by Gilles Gagnon.
1 year 7 months ago #85673

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

Time to create page: 2.618 seconds