Plugin Fatal: Errors that occur because of invalid XML or a failure inside the plugin initialization code (init method) are considered fatal. They will log an error and cause the Indigo Server to temporarily suspend the plugin – the plugin will remain enabled but won't be running. Once the errors are corrected, the plugin can be restarted by its Reload menu option. Because the plugin is still in the enabled state, it will also be restarted on the next Indigo Server restart.
Is there a way for a plugin to terminate itself if it concludes that it is unable to start or whilst running it has got a permanent error that can't be resolved without user intervention. i.e because a network is missing. The description above infers that it is only Indigo that can make the decision and close the plugin down?
A pertinent example is Netatmo which has been having seemingly major problems with its servers. The Netatmo plugin goes into a loop trying to reconnect every 10 seconds and fills up the log with error messages while it is unable to connect. The user (i.e. me in this case) disables the plugin and a number of hours later retries to see if Netatmo have sorted themselves out. It would be useful for a plugin to close itself down if it it is going into a seemingly permanent failure mode. btw this isn't a comment on the Netatmo plugin but just using it as an example.
In my case it is the Alexa-Hue Bridge - if it can't get access to the network then it can't work! In V3 of the plugin I have added in a network check and just put the plugin into a similar retry loop waiting for the network to become available. It would be good to be able to close the plugin down if say after a user specified amount of time (say 15 minutes) the network is not available.
What's the best way to do this, if indeed it is possible?