Page 1 of 1

Device presumed dead

Posted: Thursday 11 February 2016 8:17
by valdoison
Hello
When a device is "presumed death" the banner of the devicel turns red. The only way to recover is to restart Domoticz.
How can we recover information that do pass the red headband, to use it and revive Domoticz automatically by a script?

Re: Device presumed dead

Posted: Thursday 11 February 2016 8:29
by gizmocuz
Not a solution, but you can also disable and enable the openzwave hardware i suppose ?

Re: Device presumed dead

Posted: Thursday 11 February 2016 8:31
by Egregius

Re: Device presumed dead

Posted: Thursday 11 February 2016 16:22
by valdoison
Thank you for your answer.
However, before putting it into production, I made the following little test with several peripherals:

Code: Select all

<?php
$domoticzurl='http://127.0.0.1:8080/';
$zwaveidx=9;

$devices=json_decode(file_get_contents($domoticzurl.'json.htm?type=openzwavenodes&idx='.$zwaveidx),true);
foreach($devices as $node=>$data)
{
echo $node;
}
?>
[code]

And the answer is always the same "status" and only "status". "Result" never appears as an answer.

Re: Device presumed dead

Posted: Friday 12 February 2016 9:36
by oliviers
Hello,
I have a "side" question .....
When a device in not "presumed", but really dead, is there a way to replace it by a new one without having to redo all the settings/parameters/.... of the dead one for the new one ? (I had the case)

I'm thinking of the following, but I would like the "blessing" of a Domoticz insider before doing this.... (Didn't dare to try it ...)

1. In the device list, note the IdX of the dead switch: xx
2. Add a new device in Domoticz, and note the index of the newly created switch: yy
3. Stop Domoticz
4. Update the DB (with SQLITE3)
4a: Delete the new switch (just created) in the DeviceStatus table

Code: Select all

Delete from Devicestatus where ID = yy
4b: Update the old, dead swith in the DeviceStatus table and replace its index (ID column) by the one of the new swith:

Code: Select all

Update DeviceStatus Set ID = yy where ID = xx
5. Restart Domoticz

Would this do the job ?
I could eventually write a WIKI page on this if it is confirmed that it is the right way to perform that kind of device substitution...

Oliviers

Re: Device presumed dead

Posted: Monday 29 February 2016 10:50
by valdoison
When the band goes to red, the parameter "haveTimeout" goes to 1.
So there definitely has a routine in Domoticz that periodically checks this parameter for each device.
Could we use the result of this routine, for example, to send an SMS or MAIL to the occurrence of a change in this parameter.

Re: Device presumed dead

Posted: Monday 29 February 2016 18:37
by gizmocuz
Correct, but i also hear that devices are working again and domoticz still says it is bad.

For ZWave this is done here:

COpenZWave.cpp

void COpenZWave::OnZWaveNotification(OpenZWave::Notification const* _notification)

case OpenZWave::Notification::Type_Notification:
-- case OpenZWave::Notification::Code_Dead:

when it is dead (or from dead to alive), this function is called:

void ZWaveBase::ForceUpdateForNodeDevices(const unsigned int homeID, const int nodeID)

This function could be extended with the new state (NSTATE_AWAKE, NSTATE_SLEEP, NSTATE_DEAD)

And then we could add a notification for this

But because there are reports that it seems to not work 100% (i dont have this experience), it might not (... yet....) be a good idea for a notification ?

Re: Device presumed dead

Posted: Thursday 03 March 2016 8:19
by valdoison
Does the changing of the parameter "haveTimeout" launch the script "script.device.xxx.lua"?

Re: Device presumed dead

Posted: Thursday 03 March 2016 8:50
by gizmocuz
no...

Re: Device presumed dead

Posted: Sunday 30 October 2016 12:12
by madrian
After how much time is marked device as dead? I am testing a notification script and I am waiting 30min, device is still not red (marked as dead).

Re: Device presumed dead

Posted: Sunday 30 October 2016 14:36
by gizmocuz
I dont know, i guess when openzwave does not get a response in 3 retries... best to ask this on the openzwave forum