Spinneret Web Sercer to Opening a door via text message
Tony11
Posts: 41
Source here http://bit.ly/hHUH5p
Opening a door via text message. On my iphone, under the text, what do I have to type in (To: ########)
to get the Spinneret Web Server to read the text, sent to it......... something like this (HTTP/1.1 200 OK)
I guess I don't know that's why I am asking people that know
Tony
Opening a door via text message. On my iphone, under the text, what do I have to type in (To: ########)
to get the Spinneret Web Server to read the text, sent to it......... something like this (HTTP/1.1 200 OK)
I guess I don't know that's why I am asking people that know
Tony
Comments
http://www.twilio.com/api/
You can get a free number from Google Voice and set it to automatically forward all text messages to an email address. You could the use Post Office Protocol to retrieve the emails.
David Carrier
Parallax Inc.
I was explaining a method "to get the Spinneret Web Server to read the text"; I was not saying that it would use HTTP. If he needs something that can occur over HTTP protocol, then he could set up a server that receives the Google Voice text messages and use something like WebDAV to communicate them to the Spinneret Web Server. In the end, it would take less work to program the Spinneret Web Server to fetch the email messages directly. IMAP would also work, and it lets you keep a socket open for an extended period of time for a push-type connection.
David Carrier
Parallax Inc.
Twilio has excellent documentation, APIs for just about every language, and detailed getting started tutorials with example source code. The door.py is very similar to Twilio's getting started code. I'm sure if you spent some time on in the Twilio tutorials you can copy and paste your project.
.
i can not get that to work...i dont know what to do with your code or his to make this operate..please help
Reading this tells me have not tried the Twilio tutorial. First read tutorial in my previous post. Follow the instructions and you should be able to send an SMS message to the Twilio service and receive a response on your cell phone. It's literally copy and paste. Once that's working, all you have to do is make an HTTP GET request to your Spinneret.
cURL is a library. IIRC, you did not have Python installed on your hosted server.
http://php.net/manual/en/book.curl.php
You'll have to consult your hosting provider to figure out if cURL is installed. Then write your PHP script and verify connectivity to the Spinneret.
Once you verify the SMS to PHP and PHP to Spinneret is working, all that's left is integrating the code.
This is the code snippet from the tutorial that you should have on your web server. It's looks a lot like door.py eh?
Anyway, right after $name = "Monkey"; is where you would place the HTTP GET to the Spinneret.
This is a modified version of your "copied code" but essentially the same logic. I removed the authenticated logic for testing purposes. I'll leave the Spinneret up for a while so you can see the results.
http://www.mikegebhard.com/spinneret/httpget.php
This is the entire web page I used to test the HTTP GET. You should have a similar page on your web server.
The return XML is what Twilio expects.
The rest is up to you.
this is the door.py code.