Notification When A New Device Is Added?

Hi

Since adding a Visonic door sensor, it was fine for a while but I’ve just noticed 5 new door sensors added to my to my device list and I have no idea why they were added.

Once you have enabled a protocol on the RFX plugin, it will automatically add any devices it finds, therefore has anyone come up with a way to set a trigger that can be used to notify you when a new device has been added to Vera?

If one, does not exist, please can someone help me create one?

Using code, I assume it would be something like a luup_watch call, but i would appreciate some assistance on the next bit. - thanks

I think it will require a new event managed by the plugin. I keep the idea.

When I add a new device, lua is automatically and immediately reloaded. If I trigger an event at this instant, it will probably be lost…

I could set a new variable with the number of child devices managed by the plugin and update it at lua startup. Then you could “spy” the change of this variable ?

[quote=“lolodomo, post:3, topic:174572”]When I add a new device, lua is automatically and immediately reloaded. If I trigger an event at this instant, it will probably be lost…

I could set a new variable with the number of child devices managed by the plugin and update it at lua startup. Then you could “spy” the change of this variable ?[/quote]

That sounds like a good idea, thanks lolodomo, since adding the Visonic Door Sensor I keep seeing more door sensors being added at random intervals, so having something tell me when a new device has been added I might be able to work out what’s causing it.

[quote=“parkerc, post:4, topic:174572”][quote=“lolodomo, post:3, topic:174572”]When I add a new device, lua is automatically and immediately reloaded. If I trigger an event at this instant, it will probably be lost…

I could set a new variable with the number of child devices managed by the plugin and update it at lua startup. Then you could “spy” the change of this variable ?[/quote]

That sounds like a good idea, thanks lolodomo, since adding the Visonic Door Sensor I keep seeing more door sensors being added at random intervals, so having something tell me when a new device has been added I might be able to work out what’s causing it.[/quote]

Maybe a bug in RFXtrx ? What are the value of the attribute altid for all these devices ?

Here’s a snapshot of the device lost I took the other day.
(These have since been removed, but it gives you an idea of what can just pop up :-))

Try to explain your problem to Bert (RFXCOM).
There might be a bug in the RFXtrx firmware relative to the remote sensor id decoding for Visonic dor/windows sensor ?

[quote=“parkerc, post:4, topic:174572”][quote=“lolodomo, post:3, topic:174572”]When I add a new device, lua is automatically and immediately reloaded. If I trigger an event at this instant, it will probably be lost…

I could set a new variable with the number of child devices managed by the plugin and update it at lua startup. Then you could “spy” the change of this variable ?[/quote]

That sounds like a good idea, thanks lolodomo, since adding the Visonic Door Sensor I keep seeing more door sensors being added at random intervals, so having something tell me when a new device has been added I might be able to work out what’s causing it.[/quote]

Variable NbrDevices added that counts at lua startuo the number of child devices managed by the plugin.
Change is committed in the trunk (working version).