×

INDI Library v1.9.8 Released (29 Sep 2022)

Bi-monthly INDI Library released with new drivers and bug fixes.

Is weather safety timer working?

  • Posts: 274
  • Thank you received: 32
Running stable KStars 3.5.3, INDI 1.9.0. Using weatherSafetyProxy driver sending curl requests for updates.
I only receive 2 or 3 requests at the web server which returns weather safe json strings. It appears that the polling stops.
Unsure if I'm doing something wrong but the weather status shows safe but appears to be unprotected. The refresh button will cause another request to be sent.

The weatherSimulator driver does not update status when the control setting for rain is updated unless refresh button is used. Could there be an issue with the timer firing?

The log does not show anything other than the absence of results and the debug option does not seem to be useful. Both logs attached.
 
Mach1, TS86SDQ, ASI071, ASI174, OAG, focusPro
1 year 4 months ago #71436
Attachments:

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

  • Posts: 429
  • Thank you received: 156
I've noticed similar behavior with OpenWeatherMap driver as well, it seems to stop refreshing after a few polls and there seems to be another thread on weather watcher as well so it seems like a common issue with longish timers.
Remote observatory running Ubuntu 21.10 x64 with ScopeDome 2M, Skywatcher EQ8, TS 8" RC, Atik 383L+, ASI178MC, ASI120MM-S, SX Lodestar X2, SX USB wheel with OAG, ZWO EAF, Gemini SnapCap, USB_DewPoint, KomaHub
1 year 4 months ago #71452

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

  • Posts: 274
  • Thank you received: 32
Tried to find what circumstance caused the hangup but did not reproduce the problem today.
Mach1, TS86SDQ, ASI071, ASI174, OAG, focusPro
1 year 4 months ago #71453

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

  • Posts: 274
  • Thank you received: 32
Attempting to reproduce on a test machine was not successful, but it does reproduce on a NUC box with the 9 drivers running.
The stall happens when first starting after 2 or 3 polls. There have been times after repeat use of the refresh button that it starts to run continously, I stopped it after an hour.
To eliminate the curl command/web server from consideration I changed to using a script that just returns a canned weather success message.

Added log messages to the code to try and find where it was stalling.
Weather::TimerHit calls WeatherSafetyProxy::executeScript() which parses the return from the weather sensor script.
It returns to TimerHit which calls SetTimer passing the expected period interval. A valid updateTimerID (example 4) is returned. TimerHit exits but does not get called again.

Something related to the first few cycles? Delaying the connection of WeatherSafetyProxy until the other drivers have settled does not change the behavior.

Drivers running: Mount, 2xZWO_ASI, ASI_EFW, MoonLite, WeatherSafetyProxy, WatchDog, RollOffino, Astrometry

<code>
#!/usr/bin/python3

import sys
import os
import json

def dummy_weather():
standard_result = {
"timestamp_est": "2021-05-22 13:26:15",
"roof_status": {
"open_ok": 1,
"reasons": "weather ok"
}
}
json_result = json.dumps(standard_result)
print(json_result)
return json_result

def main():
dummy_weather()

if __name__ == '__main__':
main()
</code>
Mach1, TS86SDQ, ASI071, ASI174, OAG, focusPro
1 year 4 months ago #71523

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

I've seen a similar timer issue... At what period does this occur?
Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info
1 year 4 months ago #71524

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

  • Posts: 274
  • Thank you received: 32
Seems flexible, first noticed at 30 seconds, now reproducing at 10 seconds to save time.
Mach1, TS86SDQ, ASI071, ASI174, OAG, focusPro
1 year 4 months ago #71525

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

I pushed a possible fix to GIT. Can you check? It appears timers got broken in the recent update, but I couldn't pin point the cause yet. At any rate, try GIT and see if that works.
Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info
1 year 4 months ago #71530

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

  • Posts: 274
  • Thank you received: 32
It seems the same as before. I think I'm using the correct libraries.
/usr/local/lib:
-rw-r--r-- 1 root root 11481296 May 22 20:34 libindidriver.so.1.9.1

Strangely initially it is always timer ID #4 that does not get through. Then each use of the refresh button always results in 2 more requests.

Upon connecting the WeatherProxyServer driver, this is the debug output from the web server, sending its response, after #3 no more requests seen.

192.168.1.106 - - [22/May/2021 21:31:19] "GET /safety HTTP/1.1" 200 -
"roof_status": {"open_ok": 1, "reasons": "Dry"}}

192.168.1.106 - - [22/May/2021 21:31:29] "GET /safety HTTP/1.1" 200 -
"roof_status": {"open_ok": 1, "reasons": "Dry"}}

192.168.1.106 - - [22/May/2021 21:31:39] "GET /safety HTTP/1.1" 200 -
"roof_status": {"open_ok": 1, "reasons": "Dry"}}

This is running without the watchdog which was crashing.
Mach1, TS86SDQ, ASI071, ASI174, OAG, focusPro
1 year 4 months ago #71533

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

I just tested again using your script and weather safety proxy and it's working fine now (running about about 20 minutes).
Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info
1 year 4 months ago #71550

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

  • Posts: 1
  • Thank you received: 0
Timers are great, but they're not infallible. If you forget to leave the light in the on position, the timer won't be able to turn it on. Also, if the power goes out, so does the light.  routing numbers    tutuapp
Last edit: 1 year 3 months ago by sunil paul.
1 year 4 months ago #71555

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

  • Posts: 274
  • Thank you received: 32
Today I purged stable and install nightly.
It is working fine.
Thank you
Mach1, TS86SDQ, ASI071, ASI174, OAG, focusPro
1 year 4 months ago #71559

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

Time to create page: 0.396 seconds