indilib / indi

INDI Core Library Repository
https://www.indilib.org
GNU Lesser General Public License v2.1
366 stars 387 forks source link

Integrate Nexdome driver to support ":Rain#" and ":RainStopped#" events to observatory management #1221

Closed xthestreams closed 4 months ago

xthestreams commented 4 years ago

Is your feature request related to a problem? Please describe. I have a Nexdome with an RG-11 rain sensor fitted. I do not have any other rain/observatory management for weather that detects rain.

I would like the Nexdome rain sensor event to be able to trigger a safe shutdown of the observatory. At the moment the event appears to be ignored by the INDI driver and as a result my OTA is sometimes in an unsafe position within the dome and crashes against the shutter motor preventing a close during rain.

Describe the solution you'd like When a "Rain#" message is detected, to set the INDI Dome/Weather status to raining such that my mount can be triggered to go back into a parked position and either pause or cancel the imaging run (ideally Ekos Scheduler rules should determine if it's worth restarting the imaging run instead of just cancelling).

Describe alternatives you've considered I've tried moving the OTA as far back as possible, but there's still a chance of collision.

Additional context This is part of a broader conversation about scheduler & observatory management - my feeling is that we need a system for capturing and managing all events in an IFTTT kind of way outside of simple settings.

knro commented 4 years ago

Is it possible to catch the RJ11 output outside of the Nexdome firmware? i.e. by establishing a connection to RJ11 directly somehow. So right now the design is the dome itself doesn't make weather-related decisions (it has been removed recently). This would enable a high-level manager (Watchdog) to properly command the shutdown procedure of multiple slave devices in a coherent and safe manner.

xthestreams commented 4 years ago

Possible, the RG11 is essentially an intelligent relay that detects (or counts depending on how it’s setup) rain drops.

It requires 12v+DC to power it’s circuitry and the built in heater that dries it off after rain.

The Nexdome has an NO contact point and when closed forces the shutter to close.

My main goal would be to alert Watchdog (where have I seen that German Shepherd before?) to stop/pause image capture until the event clears.

Thanks for reading this far.

knro commented 4 years ago

So might be technically possible to add INDI::WeatherInterface to the Nexdome class. So it will be treated as a weather source for clients. The INDI Watchdog driver can monitor it and then initiate the shutdown procedure once rain is detected. Right now, there is no way in Ekos to pause and resume on weather alerts, it goes into complete shutdown mode and must be restarted explicitly by the user. Maybe the resume feature would be added in sometime in the future but it's currently not implemented.

xthestreams commented 4 years ago

That would be amazing - if you can show me a good example of a driver that does this I can try copying the logic over and doing some basic testing to see if I can get this to hang together. I just need to get the event first.

Rumor is that Lunatico (the AAG Cloudwatcher and Dragonfly guys) are working with NexDome on a new automation capability, so this might either be a waste of time or getting in early!

github-actions[bot] commented 5 months ago

This issue has been inactive for 60 days and is being marked as stale.

github-actions[bot] commented 4 months ago

This issue has been closed due to inactivity.