I'm wondering how we can make the python plugin in a stop mode.
For instance as part of error handling sometime we should stop/pause the plugin. What is the best to do it ?
Python plugin error handling
Moderator: leecollings
Re: Python plugin error handling
@dnpwoo is there any API you would consider adding into the plugin, in order to stop properly and exit ?
- Dnpwwo
- Posts: 820
- Joined: Sunday 23 March 2014 9:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Melbourne, Australia
- Contact:
Re: Python plugin error handling
@pipche,
It should be trivial to add a 'Domoticz.Stop()' API because, like everything else, stopping is just an event (a StopDirective' from memory) that should tidy up any connections, call onStop and then stop the thread.
Once it is stopped though the plugin can't restart itself though.
It should be trivial to add a 'Domoticz.Stop()' API because, like everything else, stopping is just an event (a StopDirective' from memory) that should tidy up any connections, call onStop and then stop the thread.
Once it is stopped though the plugin can't restart itself though.
The reasonable man adapts himself to the world; the unreasonable one persists to adapt the world to himself. Therefore all progress depends on the unreasonable man. George Bernard Shaw
Re: Python plugin error handling
I think this make sense and would be useful.
And agree when the plugin is stopped, no way to restart except from Domoticz Hardware
Envoyé de mon iPhone en utilisant Tapatalk
And agree when the plugin is stopped, no way to restart except from Domoticz Hardware
Envoyé de mon iPhone en utilisant Tapatalk