×

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

Bi-monthly release with minor bug fixes and improvements

weatherradio lastupdate field blank when no windspeed [SOLVED]

  • Posts: 89
  • Thank you received: 16
From my other post the lastupdate field contains only -- and not the proper date and time.

The root of the problem is that I don not have a wind speed device.

The function in chart.js that updates #lastupdate throws an error due to there being no windspeed.

<code>
Uncaught TypeError: Cannot read property 'toFixed' of null
at Object.success (charts.js:263)
at c (jquery.min.js:2)
at Object.fireWith [as resolveWith] (jquery.min.js:2)
at l (jquery.min.js:2)
at XMLHttpRequest.<anonymous> (jquery.min.js:2)
(anonymous) @ charts.js:263
c @ jquery.min.js:2
fireWith @ jquery.min.js:2
l @ jquery.min.js:2
(anonymous) @ jquery.min.js:2
load (async)
send @ jquery.min.js:2
ajax @ jquery.min.js:2
k.<computed> @ jquery.min.js:2
updateSeries @ charts.js:240
init @ charts.js:232
onload @ weatherradio.html:19
</code>

This is triggered by
<code>
windSpeed.updateSeries([{name: "Wind Speed", data: [currentWindSpeed]}]);
</code>

Moving call to update lastupdated prior to this means it gets updated fine.

Tweaking required if the probes/sensors do not match up with the webpage.
The following user(s) said Thank You: Wolfgang Reissenberger
Last edit: 4 years 5 days ago by Adrian. Reason: Solved
4 years 1 week ago #50968

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

  • Posts: 1185
  • Thank you received: 370
Aaaah, thanks! I didn't check that for the web page. The INDI driver meanwhile should be flexible about which devices are connected.

- Wolfgang
4 years 6 days ago #50971

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

  • Posts: 1185
  • Thank you received: 370
OK, I found the problem. If you want to get the latest version, I am working currently on Version 1.0 .

Btw: the page should update every 5 minutes (I wasn't aware of it anymore :-)). There was another bug that broke this.

- Wolfgang
4 years 6 days ago #50974

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

  • Posts: 1185
  • Thank you received: 370
Version 1.0 is pushed. New to this version is the option to calibrate weather parameters through the INDI client.

- Wolfgang
The following user(s) said Thank You: Adrian
4 years 6 days ago #50999

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

  • Posts: 89
  • Thank you received: 16
Thanks Wolfgang for fixing this.

Those changes to charts.js have fixed the problem with lastupdate when there is no windspeed.

Also it updates every 5 minutes on its own.
The time shown is the last time the data was updated which is before the current time as there is no sync between
the python scripts executing in cron and the webpage update, not a problem.

I will open another topic regarding a question I have on the cron scripts in Readme-WeatherRadio.md

Adrian
4 years 5 days ago #51014

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

Time to create page: 0.237 seconds