Accessing other devices

#1

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?

0 Likes

#2

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”.

0 Likes

#3

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?

0 Likes

#4

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.

0 Likes