Door lock project web browser command

hi i have implemented a Door Lock project and can open the relay by typing this in my terminal windows
curl https://api.spark.io/v1/devices/xxxxxxxx/openDoor -d access_token=xxxxxxxxxxxxxxxxxxxxxx
i want to use this command to control the relay from a web browser.
please help

Thanks

Raj

1 Like

For a zero-programming solution, you can use http://jflasher.github.io/spark-helper/

1 Like

Hi @rajbadri,

To run the same command from a browser, you can use any networkable programming language to send what’s called a “POST request” to our API. There are a bunch of great resources that can help here (including jflasher’s app) :slight_smile:

https://www.spark.io/resources

Thanks,
David

You should probably take a look at the tutorial section over here: https://community.spark.io/category/project-share/tutorials
There are many helpful examples there which can be used to create a web solution. (@dave, is there any way we can promote the tutorial section a bit more, it’s rather hidden now?)

This project is virtually the same, opening and closing a garage door using a relay. They just use an additional reed switch to sense whether or not the door is closed. If you take that out, you should have the same functionality. https://community.spark.io/t/completed-garage-door-and-web-interface-schematic-and-code-included/4121/11

1 Like

Ooh, that’s a great idea, I’ll open an issue / suggestion for that here:

Thanks,
David

1 Like