I’m having trouble accessing device states. In a workflow following some trigger, I often want to check conditionally against the state of some other device. When this device’s state is not in the payload, how do I access this data?
You can use a Gauge Query node to accomplish this. In the configuration, select the device and attribute in question and request its “Last received data point”.
Yeah, thanks. Probably could have found that in the docs if I’d searched a bit better…
What I can’t seem to find there is how to check whether a device is currently connected, or how many (and which) are. Is there a way to do this?
The best way to do this would be to use the Losant API node with the “Devices: Get” action. This will return an array of devices with their connection status.