Page 1 of 1

Bogus left-over dummy device

Posted: 01 Oct 2020 22:29
by xurg
I have a device which I think was previously created as a dummy device instance. It is assigned to a room. When I click the little gear icon on the room's dashboard, the devices config pages is shown. But in "Generated by App:" there is only the gear icon, and when I click it I get the "The page you're looking for could not be found." page.

Quite clearly this is a left-over. How to get rid of it?

Re: Bogus left-over dummy device

Posted: 02 Oct 2020 02:34
by PoltoS
Looks like the field Generate (creatorId) is not filled for this device. Check in the API (/ZAutomation/api/v1/devices/<deviceID> to see the exact data

Re: Bogus left-over dummy device

Posted: 02 Oct 2020 16:37
by xurg
I had found it already in this list, but what to do with this information? The entry is indeed lacking the creatorId key, and the id is ZWayVDev_zway_Remote_29-0-0-B.

Re: Bogus left-over dummy device

Posted: 02 Oct 2020 21:58
by micky1500
Have a look at piet66's tool.
It has options to clean-up rogue data.

https://forum.z-wave.me/viewtopic.php?f ... nfo#p83597

Re: Bogus left-over dummy device

Posted: 02 Oct 2020 23:10
by piet66
No, this problem unfortunately not.

If a restart of z-way-server doesn't help, this could help:
- stop z-way-sever
- take a text editor and open config.json
- remove the waste device (maybe occur more than once)
- start z-way-sever again

!!!! Of course, you should know what you are doing. A backup of the file could be useful. !!!!

Re: Bogus left-over dummy device

Posted: 03 Oct 2020 00:29
by PoltoS
This should help. We will include it in next release:

Code: Select all

diff --git a/modules/SwitchControlGenerator/index.js b/modules/SwitchControlGenerator/index.js
index 0377d616..e6db6910 100644
--- a/modules/SwitchControlGenerator/index.js
+++ b/modules/SwitchControlGenerator/index.js
@@ -105,7 +105,7 @@ SwitchControlGenerator.prototype.init = function (config) {
                                                } 
                                        },
                                        handler: self.widgetHandler,
-                                       moduleId: this.id
+                                       moduleId: self.id
                                });
                        }
                });

Re: Bogus left-over dummy device

Posted: 03 Oct 2020 10:22
by piet66
Is it really a big problem? What about simply setting the orphaned device invisible?

Re: Bogus left-over dummy device

Posted: 10 Oct 2020 21:23
by xurg
Thanks for all the replies - I was on the road so I couldn't keep up here. No it's not a big issue and in fact I had already hidden that device so it only appears in the low-level device table. It's more a house-keeping thing - databases should be clean and only contain relevant data I suppose.

Re: Bogus left-over dummy device

Posted: 13 Oct 2020 11:02
by xurg
Thanks again for hinting to MxInfo, it help me identify a whole bunch of zombie devices in the config db. It seems most of them came from past partial-then-failed inclusions, but also a number of dummy devices and condition switches from old automation setups of mine. Not really sure how they kept lingering there, as a proper deletion should really get rid of them. Anyway, my configuration is now clean again.