# How do I access my Spark Core from another or external network

**URL:** <https://community.particle.io/t/how-do-i-access-my-spark-core-from-another-or-external-network/4954>\
**Category:** General\
**Created:** [June 8, 2014, 10:23pm UTC](https://community.particle.io/t/how-do-i-access-my-spark-core-from-another-or-external-network/4954 "2014-06-08T22:23:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kevinold](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/kevinold/32/1920_2.png) [@kevinold](https://community.particle.io/u/kevinold)\
**Post date:** [June 8, 2014, 10:23pm UTC](https://community.particle.io/t/how-do-i-access-my-spark-core-from-another-or-external-network/4954/1 "2014-06-08T22:23:14Z")

</div>

Hi,

I would like to use my spark core to monitor a room at remote location for darkness (using a photo resistor) but I am not certain how I am to communicate with my Spark when it is not on the same network.

By monitoring, I would like to be able to query the spark core via the spark cloud api to check variables which would be assigned to it like how the LED is called here [http://docs.spark.io/examples/#control-leds-over-the-net](http://docs.spark.io/examples/#control-leds-over-the-net)

Have others done this? Can you point me to documentation or an example?

Thanks,  
Kevin

---

<div class="post-metadata">

**Author:** ![kennethlimcp](https://avatars.discourse-cdn.com/v4/letter/k/c0e974/32.png) [@kennethlimcp](https://community.particle.io/u/kennethlimcp)\
**Post date:** [June 8, 2014, 10:24pm UTC](https://community.particle.io/t/how-do-i-access-my-spark-core-from-another-or-external-network/4954/2 "2014-06-08T22:24:23Z")

</div>

You can make use of `Spark.variable ()` which posts the value to the :spark: cloud and you can retrieve it via Internet using Api 🙂

---

<div class="post-metadata">

**Author:** ![bko](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/bko/32/20704_2.png) [@bko](https://community.particle.io/u/bko)\
**Post date:** [June 8, 2014, 11:34pm UTC](https://community.particle.io/t/how-do-i-access-my-spark-core-from-another-or-external-network/4954/3 "2014-06-08T23:34:14Z")

</div>

Have you read this tutorial yet?

> **[Reading Spark Variables with Your Own HTML File](https://community.particle.io/t/reading-spark-variables-with-your-own-html-file/4148)**
>
> If you have seen my Spark.publish() tutorials, you know that I like to have private web pages (since if it was public, your access token would be exposed) that read and even graph data from my Spark core. Well, you can do similar things with...

---

<div class="post-metadata">

**Author:** ![wgbartley](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/wgbartley/32/1910_2.png) [@wgbartley](https://community.particle.io/u/wgbartley)\
**Post date:** [June 9, 2014, 3:20am UTC](https://community.particle.io/t/how-do-i-access-my-spark-core-from-another-or-external-network/4954/4 "2014-06-09T03:20:54Z")

</div>

It can be done easily as the other guys pointed out. By default, the Spark Core talks to the Spark Cloud as long as it has access to the internet. That way, you can monitor or control or do whatever you want anywhere you have internet access. As an example, I was demo’ing one of my projects at Maker Faire. The catch is my project was still at home in Tennessee (~2800 miles away), but I was still able to turn my deck lights on and off from my cell phone web browser!

---

<div class="post-metadata">

**Author:** ![kevinold](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/kevinold/32/1920_2.png) [@kevinold](https://community.particle.io/u/kevinold)\
**Post date:** [June 14, 2014, 4:29am UTC](https://community.particle.io/t/how-do-i-access-my-spark-core-from-another-or-external-network/4954/5 "2014-06-14T04:29:58Z")

</div>

Thanks everyone! This is exactly what I was looking for. I wasn’t clear from the docs that setting Spark.variable would actually push to the Spark API for me – seemed (and IS) too good to be true!
