phpSparkDashboard - Your own Spark dashboard in 5 minutes!

So, I went really really overboard this time. Need some sleep! Enjoy everyone. Would love some feedback!

See phpSpark - interacting with the Spark Cloud (spark.io) using PHP for reference

phpSpark Example Dashboard

A dashboard example using the phpSpark class

GitHub Repo

Repo can be found here

Installation

  • GIT clone or download a zip of the repo and unzip into your project director
  • Upload to your web server and visit using a web browser

Demo

Feel free to play around with the demo

Preview

Login Page

Simply login with your access token (get it from http://spark.io/build)

Device List Page

On the devices page you can see all Spark devices associated with your access token

Device Info Page

On the device info page you can look at a particular device. Available information include known Spark Variables (values update if you refresh the page) and Spark Functions. Send parameters to those functions by filling in the parameter text box and pressing the “Submit” button

Successful Function Call

When you successfully submit a function call to the Spark Cloud you get a alert with the return value.

9 Likes

Nice. The demo worked just as you’d expect. I already have a use for this too. :smile:

1 Like

Awesome. I’d love to hear what you planning on using it for. I think my next attempt will be to combine a PHP Proxy (http://community.spark.io/t/simple-spark-php-proxy/4073) withh the dashboard so you can generate core specific and function/variable specific access_tokens (ie, make an access token read only and then you can embed it in public facing html pages without worry)

My immediate need was simply to have a way to check some variables on my half-finished house monitoring project if I receive any alerts while out of town this weekend. Didn’t have any time for code changes before the trip, so this works nicely in case of an emergency.

I will have to think about how else it could fit in with my projects on my own server during the flight. :relaxed:

1 Like

Alright please do. I’m glad I could provide something useful!