# Is there a URI to return the online/offline status of SKY/AIR?

**URL:** <https://community.tempest.earth/t/is-there-a-uri-to-return-the-online-offline-status-of-sky-air/10979>\
**Category:** General\
**Created:** [December 14, 2020, 7:44am UTC](https://community.tempest.earth/t/is-there-a-uri-to-return-the-online-offline-status-of-sky-air/10979 "2020-12-14T07:44:12Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![erholp](https://avatars.discourse-cdn.com/v4/letter/e/7ba0ec/32.png) [@erholp](https://community.tempest.earth/u/erholp)\
**Post date:** [December 14, 2020, 7:44am UTC](https://community.tempest.earth/t/is-there-a-uri-to-return-the-online-offline-status-of-sky-air/10979/1 "2020-12-14T07:44:12Z")

</div>

Is there a api URI to return the online/offline status of SKY? (and also AIR) I have not seen it… if so, what is it?

Thank you!!!

---

<div class="post-metadata">

**Author:** ![erholp](https://avatars.discourse-cdn.com/v4/letter/e/7ba0ec/32.png) [@erholp](https://community.tempest.earth/u/erholp)\
**Post date:** [December 14, 2020, 7:47am UTC](https://community.tempest.earth/t/is-there-a-uri-to-return-the-online-offline-status-of-sky-air/10979/2 "2020-12-14T07:47:37Z")

</div>

BTW, I do see the status under

[https://swd.weatherflow.com/swd/rest/observations/device/$DEVICEID?token=$TOKEN](https://swd.weatherflow.com/swd/rest/observations/device/%24DEVICEID?token=%24TOKEN)

but my sky device is currently offline and the data is:

```
"status":
{
    "status_code":0,
    "status_message":"SUCCESS"
},

```

which I assume means that all is well…?

---

<div class="post-metadata">

**Author:** ![eric](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tempest.earth/eric/32/13553_2.png) [@eric](https://community.tempest.earth/u/eric)\
**Post date:** [December 14, 2020, 8:14am UTC](https://community.tempest.earth/t/is-there-a-uri-to-return-the-online-offline-status-of-sky-air/10979/3 "2020-12-14T08:14:38Z")

</div>

I’m not using the api but my feeling is, that part is just to say your request was seen by the server, it is well formatted and it sends back data (depending what you asked) The rest of the info is in the arrays following this.

In you case the batteries of your Sky are empty

---

<div class="post-metadata">

**Author:** ![peter](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tempest.earth/peter/32/1365_2.png) [@peter](https://community.tempest.earth/u/peter)\
**Post date:** [December 14, 2020, 9:12am UTC](https://community.tempest.earth/t/is-there-a-uri-to-return-the-online-offline-status-of-sky-air/10979/4 "2020-12-14T09:12:53Z")

</div>

As @eric said, that status message just lets you know that the API request was successful. Unfortunately there is no API endpoint that I know of that gives the device status. I tend to look at the last observation time and assume that if it was greater than 5 minutes ago, then the device is offline. I _think_ WeatherFlow assume a station is offline if the servers haven’t heard from it for 30 minutes

---

<div class="post-metadata">

**Author:** ![erholp](https://avatars.discourse-cdn.com/v4/letter/e/7ba0ec/32.png) [@erholp](https://community.tempest.earth/u/erholp)\
**Post date:** [December 14, 2020, 1:00pm UTC](https://community.tempest.earth/t/is-there-a-uri-to-return-the-online-offline-status-of-sky-air/10979/5 "2020-12-14T13:00:23Z")

</div>

Thanks @peter !! Good info. Good idea. I can subtract the current epoch time from the epoch time returned from Sky/Air and check if it’s more than a 5 minute difference.
