Hi. I have a sensor of type "REST Custom BETA". It has multiple channels. For one of them I defined the "Value Lookup and Limits" to "Enable based on limits". Via the API I set the Upper Error Limit (limitmaxerror attribute) to a value lower than the current value. So it will generate an alert. Ok. In the UI the status of the sensor changes to Down. Message in the upper part of the sensor details window becomes red and it says "78 # (regulationTemperature) is above the error limit of 50 # in regulationTemperature." In the UI, all is good, I can tell why the sensor is failing. But how can I do the same using the API?
I have tried the standard call of getting the status of a sensor: /api/getobjectstatus.htm?id=sensorId&name=status I correctly get back status 5(Down). But still no clue as to why it is failing.
1 have retrieved all channels in the sensor via a call like: /api/table.json?noraw=1&content=channels&sortby=name&columns=name=textraw,minimum,maximum,condition,lastvalue,objid&id=sensorId I indeed get back the channels list but still no fields tells me which channes gived the error in the sensor.
I even tried with the sensortree call: /api/table.xml?content=sensortree This time fr the sensor I get a tag <statusmessage>78 # (regulationTemperature) is above the error limit of 50 # in regulationTemperature.</statusmessage> Still nothing else related to the cause of failure.
Pls advise on how I should retrieve which channel gives the error in the sensor and why. I would basically like to be able to say "My sensor fails because its channel id=4 has a bigger current value than the limitmaxerror one which has been set".