Device presumed dead
Moderators: leecollings, remb0
-
- Posts: 21
- Joined: Monday 03 March 2014 18:33
- Target OS: Linux
- Domoticz version: beta
- Contact:
Device presumed dead
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?
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?
- gizmocuz
- Posts: 2499
- Joined: Thursday 11 July 2013 18:59
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Top of the world
- Contact:
Re: Device presumed dead
Not a solution, but you can also disable and enable the openzwave hardware i suppose ?
Quality outlives Quantity!
-
- Posts: 21
- Joined: Monday 03 March 2014 18:33
- Target OS: Linux
- Domoticz version: beta
- Contact:
Re: Device presumed dead
Thank you for your answer.
However, before putting it into production, I made the following little test with several peripherals:
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.
-
- Posts: 73
- Joined: Wednesday 16 September 2015 22:10
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: Paris area, France
- Contact:
Re: Device presumed dead
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
4b: Update the old, dead swith in the DeviceStatus table and replace its index (ID column) by the one of the new swith:
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
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
Code: Select all
Update DeviceStatus Set ID = yy where ID = xx
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
Paris area
Raspberry Pi 4 - RFXComm 433 - IrTrans - Zwave
Raspberry Pi 4 - RFXComm 433 - IrTrans - Zwave
-
- Posts: 21
- Joined: Monday 03 March 2014 18:33
- Target OS: Linux
- Domoticz version: beta
- Contact:
Re: Device presumed dead
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.
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.
- gizmocuz
- Posts: 2499
- Joined: Thursday 11 July 2013 18:59
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Top of the world
- Contact:
Re: Device presumed dead
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 ?
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 ?
Quality outlives Quantity!
-
- Posts: 21
- Joined: Monday 03 March 2014 18:33
- Target OS: Linux
- Domoticz version: beta
- Contact:
Re: Device presumed dead
Does the changing of the parameter "haveTimeout" launch the script "script.device.xxx.lua"?
Re: Device presumed dead
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).
- gizmocuz
- Posts: 2499
- Joined: Thursday 11 July 2013 18:59
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Top of the world
- Contact:
Re: Device presumed dead
I dont know, i guess when openzwave does not get a response in 3 retries... best to ask this on the openzwave forum
Quality outlives Quantity!
Who is online
Users browsing this forum: No registered users and 1 guest