# Is there a spark.xxx function that detects if wifi is within reach?

**URL:** <https://community.particle.io/t/is-there-a-spark-xxx-function-that-detects-if-wifi-is-within-reach/2944>\
**Category:** Getting Started\
**Created:** [February 18, 2014, 9:36am UTC](https://community.particle.io/t/is-there-a-spark-xxx-function-that-detects-if-wifi-is-within-reach/2944 "2014-02-18T09:36:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![PeterV](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/peterv/32/20934_2.png) [@PeterV](https://community.particle.io/u/PeterV)\
**Post date:** [February 18, 2014, 9:36am UTC](https://community.particle.io/t/is-there-a-spark-xxx-function-that-detects-if-wifi-is-within-reach/2944/1 "2014-02-18T09:36:45Z")

</div>

Hi,  
I would like to use my Spark Core device to detect if my car is home. The idea is to only enable my dash camera’s while driving and also parking. The latter is done through an auxiliary battery. In both situations a relay in this aux circuitry needs to be switched on or off pending WIFI connect. Obviously I’m adding more function to this later 8-). Peter

---

<div class="post-metadata">

**Author:** ![hansamann](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/hansamann/32/20715_2.png) [@hansamann](https://community.particle.io/u/hansamann)\
**Post date:** [February 18, 2014, 10:03am UTC](https://community.particle.io/t/is-there-a-spark-xxx-function-that-detects-if-wifi-is-within-reach/2944/2 "2014-02-18T10:03:10Z")

</div>

You mighth simply check for spark.connected() - it returns true if the spark is connected, e…g if you are in reach of your home network.

[http://docs.spark.io/#/firmware/cloud-spark-connected](http://docs.spark.io/#/firmware/cloud-spark-connected)

---

<div class="post-metadata">

**Author:** ![Dave](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/dave/32/181_2.png) [@Dave](https://community.particle.io/u/Dave)\
**Post date:** [February 18, 2014, 6:26pm UTC](https://community.particle.io/t/is-there-a-spark-xxx-function-that-detects-if-wifi-is-within-reach/2944/3 "2014-02-18T18:26:28Z")

</div>

There was a great discussion on using the Core to scan for wifi networks in range, you could also use that to detect when you are home:

> **[Bug bounty: Kill the 'Cyan flash of death'](https://community.particle.io/t/bug-bounty-kill-the-cyan-flash-of-death/1322/144)**
>
> @BDub Hmm, here we go… Scan Started 30001000151591084105109111116104121323832831169711400000000000000000096517523224171 || SSID: Timothy & Star || RSSI: 0x97/-53dB || Loop: 0 ...

Thanks,  
David
