Page 1 of 1

How to know if hardware is removed (not stopped)

Posted: Sunday 13 May 2018 12:53
by zak45
Hi,

I need to know if hardware is removed by Domoticz. This will help me to do some clean up.
Have take a look on : onStop Called when the hardware is stopped or deleted from Domoticz.
and also on : onDeviceRemoved.

But I do not have been able to catch hardware removing ??

thanks

Re: How to know if hardware is removed (not stopped)

Posted: Sunday 13 May 2018 23:47
by Dnpwwo
@zak45,

Not sure how we could do what you are asking for.

None of the hardware in Domoticz is notified when it is deleted and I'm not sure it could be. What if the hardware isn't enabled? Should Domoticz restart it to notify it that it is being deleted?

Re: How to know if hardware is removed (not stopped)

Posted: Monday 14 May 2018 12:31
by zak45
Dnpwwo wrote: Sunday 13 May 2018 23:47 @zak45,

Not sure how we could do what you are asking for.

None of the hardware in Domoticz is notified when it is deleted and I'm not sure it could be. What if the hardware isn't enabled? Should Domoticz restart it to notify it that it is being deleted?
Thanks Dnpwwo.
I devlop a plugin that create some files, uservariables.
Goal is to do some clean up only if the Hardware is removed, in all other case, nothing.
Have tried with the OnDeviceRemoved but no luck.