I use an XML Custom EXE/Script Sensor. In my sensor, I have a lot of channel. There is a way to "rebuild" the list of channel ?
I want to clear the list of channel on every run of my Custom Script.
Thanks !
Article Comments
If I can not rebuilt the channel, what I need to do ? I need to clone my sensor on every script run ?
Jan, 2012 - Permalink
You can clone an existing sensor via the API but that will also clone the current channels on that sensor.
Jan, 2012 - Permalink
Hi Sebastien
Create a new instance of your custom sensor and set it to pause before it runs. This way it will not create any channels. Next use the API to clone this sensor:
/api/duplicateobject.htm?id=id_of_sensor_to_clone&name=new_name&targetid=id_of_target_device
and use the API again to change settings for this cloned sensor.
Keep the original sensor paused and use it again the next time.
Regards,
Jan, 2012 - Permalink
Hello,
once a channel exists it cannot be removed. The channels of a sensors can't be rebuilt in that sense.
best regards.
Jan, 2012 - Permalink