Http get commands and buttons

Hi I am quite new to all this and just finding my feet, apologies if this information is covered somewhere. I want to create a simple remote for my Hue and Wemo devices, I have a great little system for controlling them with a Ninja Block. What I would like to do is simple HTTP get requests from the Spark core, I plan on rigging up some buttons which will make the http request which the ninja bock rules engine will receive. Any ideas, pointers or guides on how to do the programming side should be really useful, some thing like IF A1 = High then http get “http://ip/totallywickedaction”.

Thanks again

@richardhobbs, you mean the Spark core will have buttons, and when you press them, it will send the respective HTTP get requests to the ninja block?

There’s not really an example to do this but i can write up a simple sample for you to get started

The Doorbell-to-SMS project that I posted does just that, actually. When a button is pressed, it makes an HTTP GET request to a remote server that then fires off the script to handle the SMS side of things. The source code is in this gist.

1 Like

Ah nice! I was searching for examples at 7am and missed your project :stuck_out_tongue:

7 AM is never a good time to search for examples. It’s a better time for drinking coffee or taking a shower (or both). :wink:

2 Likes

Thanks looks just like what I was looking for, thanks so much.

1 Like