# Accessing other devices

**URL:** https://forums.losant.com/t/accessing-other-devices/502
**Category:** Help
**Created:** [May 23, 2017, 2:07pm UTC](https://forums.losant.com/t/accessing-other-devices/502 "2017-05-23T14:07:12Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![hsierkstra](https://avatars.discourse-cdn.com/v4/letter/h/3bc359/32.png) [@hsierkstra](https://forums.losant.com/u/hsierkstra)
#### Post date: [May 23, 2017, 2:07pm UTC](https://forums.losant.com/t/accessing-other-devices/502/1 "2017-05-23T14:07:12Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![Dylan\_Schuster](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/dylan_schuster/32/2850_2.png) [@Dylan\_Schuster](https://forums.losant.com/u/Dylan_Schuster)
#### Post date: [May 23, 2017, 2:13pm UTC](https://forums.losant.com/t/accessing-other-devices/502/2 "2017-05-23T14:13:08Z")

</div>

You can use a [Gauge Query](https://docs.losant.com/workflows/data/gauge-query/) node to accomplish this. In the configuration, select the device and attribute in question and request its “Last received data point”.

---

<div class="post-metadata">

### Author: ![hsierkstra](https://avatars.discourse-cdn.com/v4/letter/h/3bc359/32.png) [@hsierkstra](https://forums.losant.com/u/hsierkstra)
#### Post date: [May 24, 2017, 11:36am UTC](https://forums.losant.com/t/accessing-other-devices/502/3 "2017-05-24T11:36:23Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![Dylan\_Schuster](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/dylan_schuster/32/2850_2.png) [@Dylan\_Schuster](https://forums.losant.com/u/Dylan_Schuster)
#### Post date: [May 24, 2017, 5:23pm UTC](https://forums.losant.com/t/accessing-other-devices/502/4 "2017-05-24T17:23:49Z")

</div>

The best way to do this would be to use the [Losant API node](https://docs.losant.com/workflows/data/losant-api/) with the “Devices: Get” action. This will return an array of devices with their [connection status](https://docs.losant.com/rest-api/schemas/#devices).
