Mobile Switch

I would like to use my iPhone as a switch for my IMP project.

Is there a generic app or webApp that I can use that would simply be a toggle switch?

If not, what is the best (or easiest) way to make my web enabled switch?



Yes, there is.
I made my own small app, but its android.
you need to send a post request with the syntax value={ "a": x, "b": y } and in the imp you’ll read them by value.a, value.b
you can see in the wiki page an html example
you can make it more complex with more things to send, or make your own app
since its an iphone, not an android, i assume it will be easier to just have the html page

I’m told that jQuery mobile can facilitate the construction of such an ‘app’ that uses local file storage and thus doesn’t require submitting the app to the store for approval. You would build a html button/control and then javascript to sent the GET or POST. Again, this is my understanding of the possibility, I’ve not done it.

If you have a web server somewhere you could build a page with a button and then visit the page, and behind the button would javascript to do the GET/POST.

It would be nice if someone somewhere has an app store app that has generic controls for developers to tie into somehow. There is a need for such a toolkit for simple projects where you don’t want to fire up a webserver. If anyone knows of such a thing, please advise.

I built mine using the sample listed and it works great. The only issue is that after I click either button, I get a new screen in my browser with an “ok” confirmation.

Any idea how to stop this confirmation and just have the on/off buttons?

I have attched my html.