×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

Weather radio don't want connect

  • Posts: 1185
  • Thank you received: 370
That's OK. The RRD file contains columns for all supported sensors, not only for the used ones.

Regarding the problem above with the -v flag - hm, strange, never seen. Try to use the debugger pdb.
3 years 3 weeks ago #69257

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

  • Posts: 2255
  • Thank you received: 223
I will try the pdb to debug, however I do not understand why the weatherradio.html returns nothing while the sensordata.html does.
3 years 3 weeks ago #69265

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

  • Posts: 1185
  • Thank you received: 370
weatherradio.html and sensordata.html have different RRD files as data source.
3 years 3 weeks ago #69266

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

  • Posts: 2255
  • Thank you received: 223
yes, the weather.rrd does not seem to be populated correctly, and that gives you an "empty" json file after so it's not showing anything on the webpage.

root@heidenrod-obs:/usr/share/weatherradio# ll
total 6352
drwxr-xr-x 4 root root 4096 Mar 25 13:17 ./
drwxr-xr-x 148 root root 4096 Mar 24 22:21 ../
drwxr-xr-x 4 root root 4096 Mar 25 17:15 bin/
drwxr-xr-x 5 root root 4096 Mar 25 17:16 html/
-rw-r--r-- 1 root root 2584784 Mar 25 22:29 sensors.rrd
-rw-r--r-- 1 root root 3896880 Mar 25 22:29 weather.rrd
root@heidenrod-obs:/usr/share/weatherradio# rrdtool fetch weather.rrd AVERAGE -s -1d -r 1h
Temperature Pressure Humidity DewPoint CloudCover SkyTemperature SQM WindSpeed WindGust WindDirection RaindropFrequency RainVolume

1616626800: nan nan nan nan nan nan nan nan nan nan nan nan
1616630400: nan nan nan nan nan nan nan nan nan nan nan nan
1616634000: nan nan nan nan nan nan nan nan nan nan nan nan
1616637600: nan nan nan nan nan nan nan nan nan nan nan nan
1616641200: nan nan nan nan nan nan nan nan nan nan nan nan
1616644800: nan nan nan nan nan nan nan nan nan nan nan nan
1616648400: nan nan nan nan nan nan nan nan nan nan nan nan
1616652000: nan nan nan nan nan nan nan nan nan nan nan nan
1616655600: nan nan nan nan nan nan nan nan nan nan nan nan
1616659200: nan nan nan nan nan nan nan nan nan nan nan nan
1616662800: nan nan nan nan nan nan nan nan nan nan nan nan
1616666400: nan nan nan nan nan nan nan nan nan nan nan nan
1616670000: nan nan nan nan nan nan nan nan nan nan nan nan
1616673600: nan nan nan nan nan nan nan nan nan nan nan nan
1616677200: nan nan nan nan nan nan nan nan nan nan nan nan
1616680800: 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 nan nan nan nan nan
1616684400: 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 nan nan nan nan nan
1616688000: 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 nan nan nan nan nan
1616691600: 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 nan nan nan nan nan
1616695200: 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 nan nan nan nan nan
1616698800: 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 nan nan nan nan nan
1616702400: 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 nan nan nan nan nan
1616706000: 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 nan nan nan nan nan
1616709600: 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 nan nan nan nan nan
1616713200: nan nan nan nan nan nan nan nan nan nan nan nan
root@heidenrod-obs:/usr/share/weatherradio#
3 years 3 weeks ago #69269

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

  • Posts: 2255
  • Thank you received: 223
I ran the pdb, nothing came up also strace'd it and nothing bad came up
3 years 3 weeks ago #69272

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

  • Posts: 1185
  • Thank you received: 370
And what happens without the "-v" flag? Try running
python -m pdb /usr/share/weatherradio/bin/wr_rrd_update.py
3 years 3 weeks ago #69273

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

  • Posts: 2255
  • Thank you received: 223
this:
root@heidenrod-obs:/usr/share/weatherradio# python -m pdb /usr/share/weatherradio/bin/wr_rrd_update.py
> /usr/share/weatherradio/bin/wr_rrd_update.py(16)<module>()
-> import sys
(Pdb) n
> /usr/share/weatherradio/bin/wr_rrd_update.py(17)<module>()
-> from indiclient import *
(Pdb)
> /usr/share/weatherradio/bin/wr_rrd_update.py(18)<module>()
-> from weatherradio import *
(Pdb)
> /usr/share/weatherradio/bin/wr_rrd_update.py(19)<module>()
-> from os import path
(Pdb)
> /usr/share/weatherradio/bin/wr_rrd_update.py(20)<module>()
-> import argparse
(Pdb)
> /usr/share/weatherradio/bin/wr_rrd_update.py(21)<module>()
-> from pid.decorator import pidfile
(Pdb)
> /usr/share/weatherradio/bin/wr_rrd_update.py(22)<module>()
-> from pid import PidFileError
(Pdb)
> /usr/share/weatherradio/bin/wr_rrd_update.py(25)<module>()
-> @pidfile()
(Pdb)
> /usr/share/weatherradio/bin/wr_rrd_update.py(26)<module>()
-> def update(args, indi=None):
(Pdb)
> /usr/share/weatherradio/bin/wr_rrd_update.py(66)<module>()
-> if __name__ == "__main__":
(Pdb)
> /usr/share/weatherradio/bin/wr_rrd_update.py(67)<module>()
-> parser = argparse.ArgumentParser(description="Fetch weather data and store it into the RRD file")
(Pdb)
> /usr/share/weatherradio/bin/wr_rrd_update.py(68)<module>()
-> parser.add_argument("-v", "--verbose", action='store_true',
(Pdb)
> /usr/share/weatherradio/bin/wr_rrd_update.py(69)<module>()
-> help="Display progress information")
(Pdb)
> /usr/share/weatherradio/bin/wr_rrd_update.py(68)<module>()
-> parser.add_argument("-v", "--verbose", action='store_true',
(Pdb)
> /usr/share/weatherradio/bin/wr_rrd_update.py(70)<module>()
-> parser.add_argument("rrdfile", nargs='?', default=RRDFILE,
(Pdb)
> /usr/share/weatherradio/bin/wr_rrd_update.py(71)<module>()
-> help="RRD file holding all time series")
(Pdb)
> /usr/share/weatherradio/bin/wr_rrd_update.py(70)<module>()
-> parser.add_argument("rrdfile", nargs='?', default=RRDFILE,
(Pdb)
> /usr/share/weatherradio/bin/wr_rrd_update.py(72)<module>()
-> parser.add_argument("rrdsensorsfile", nargs='?', default=RRDSENSORSFILE,
(Pdb)
> /usr/share/weatherradio/bin/wr_rrd_update.py(73)<module>()
-> help="RRD file holding all sensor data time series")
(Pdb)
> /usr/share/weatherradio/bin/wr_rrd_update.py(72)<module>()
-> parser.add_argument("rrdsensorsfile", nargs='?', default=RRDSENSORSFILE,
(Pdb)
> /usr/share/weatherradio/bin/wr_rrd_update.py(75)<module>()
-> args = parser.parse_args()
(Pdb)
> /usr/share/weatherradio/bin/wr_rrd_update.py(77)<module>()
-> try:
(Pdb)
> /usr/share/weatherradio/bin/wr_rrd_update.py(78)<module>()
-> update(args)
(Pdb)
--Return--
> /usr/share/weatherradio/bin/wr_rrd_update.py(78)<module>()->None
-> update(args)
(Pdb)
--Return--
> <string>(1)<module>()->None
(Pdb)
The program finished and will be restarted
Last edit: 1 year 2 months ago by Gonzothegreat.
3 years 3 weeks ago #69274

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

  • Posts: 2255
  • Thank you received: 223
Interesting, I get no output this time.

root@heidenrod-obs:/usr/share/weatherradio# /usr/share/weatherradio/bin/wr_rrd_update.py
root@heidenrod-obs:/usr/share/weatherradio#

the rrd files are not being updated
3 years 3 weeks ago #69276

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

  • Posts: 2255
  • Thank you received: 223
using python 3.8 by the way

:/usr/share/weatherradio# python -V
Python 3.8.5
3 years 3 weeks ago #69277

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

  • Posts: 2255
  • Thank you received: 223
I've spent a fair bit of time on this issue, without the -v it does not connect and I am unable to get any data in the weather.rdd file (just a bunch of 0's)

I have tried to flash the board for 9600 and 115200 speed, tried python debugging, tried strace it. I cannot see what's going on.
3 years 3 weeks ago #69303

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

  • Posts: 2255
  • Thank you received: 223
Interesting find:

root@heidenrod-obs:/usr/share/weatherradio/html/data# ll RTdata_*
-rw-r--r-- 1 root root 22684 Mar 26 15:00 RTdata_1d.json
-rw-r--r-- 1 root root 732 Mar 26 00:00 RTdata_30d.json
-rw-r--r-- 1 root root 27598 Mar 26 15:00 RTdata_6h.json
-rw-r--r-- 1 root root 5674 Mar 26 15:00 RTdata_7d.json
-rw-r--r-- 1 root root 275 Mar 26 15:00 RTdata_lastupdate.json
root@heidenrod-obs:/usr/share/weatherradio/html/data#

all bar the RTdata_lastupdate.json are being populated, and if I understand correctly, the RTdata_ files are the ones used on the weatherradio.html page...
3 years 3 weeks ago #69305

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

  • Posts: 1185
  • Thank you received: 370
It's really awkward. What about shifting our communication to PN?

I would set a breakpoint at line 42 of wr_rrd_update.py and step through carefully.

HTH
Wolfgang
3 years 3 weeks ago #69314

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

Time to create page: 0.415 seconds