This is a question about creating sensors via the API. After cloning a Http Push Advanced sensor it is paused, so we then un-pause the sensor. The sensor is inactive for a time, so we poll the server until 'Matching Sensors=1', indicating the sensor is active and ready to receive data.
Sometimes, however, the newly created sensor is paused (probably the unpause command failed) and therefore the process fails.
The problem is that between the time the sensor is unpaused (which happens immediately after cloning) and the time the sensor becomes active (which is about 45 seconds) the code currently cannot tell whether the sensor is unpaused & inactive, or paused & inactive.
How can we check via the API if a newly cloned sensor that isn't yet active has successfully been unpaused? I.e. is there a status available via API for sensors that will indicate each of active status and paused status?
Hope all this makes sense, Paul
Add comment