This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
hbar's profile picture

Mote - A website you can use to remote control your Turtles with a smartphone

Started by hbar, 26 March 2014 - 11:21 AM
hbar #1
Posted 26 March 2014 - 12:21 PM
I made this website last weekend to teach myself some HTML, CSS, Javascript and server side infrastructure. You can use it to remote control your Turtles from any browser (made primarily with smartphones in mind). Just download this client on the Turtle and and run it with the same session ID you get for the controller.

Now, the original idea was just to remote control turtles (inspired by this post on the FTB subreddit), hence the game pad form factor on the controller, but while working on this I realized that the same system can easily be used to do much more. As the data relayed by the server is just the name of the button pressed, you can write your own client to map the commands however you want. Want to control your base force field with a phone? Easy. Locked doors openable only by sending the correct button presses with a specific session ID? Done. Pretty sure you can come up with even more interesting applications.

The client should be documented enough to make writing your own fairly straightforward. EDIT: I wrote some API documentation.

Criticism, suggestions and feedback appreciated.

Quick links:
website: http://hbar.kapsi.fi/ccserver/mote
client: pastebin get MmrwLcxS mote
API: http://pastebin.com/rK86KrvL
Edited on 26 March 2014 - 10:45 PM
RoD #2
Posted 30 March 2014 - 11:40 AM
Thats awesome :D/> i can be at shool and controlling my turtle. It would be nice if you add a console to the website so we could program with our smartphone, idk if it would work but pretty good job :)/>
TheOddByte #3
Posted 30 March 2014 - 12:35 PM
Wow, That's completly amazing!
Like the website, Simple and beautiful! :D/>
hbar #4
Posted 30 March 2014 - 02:08 PM
It would be nice if you add a console to the website so we could program with our smartphone, idk if it would work but pretty good job

I'm afraid I don't have the time to write and maintain any remote code execution capabilities, but using the API I provide it shouldn't be too difficult to do your own. Write a simple HTML form that sends it's contents to the server, host it on Dropbox and have the client execute the code it receives from the server. The only problem I see is that currently the data you can send is limited to 50 characters, but I might change that if need be. Or you could split the data into parts.

Thanks for the kind words :)/>
RoD #5
Posted 30 March 2014 - 02:21 PM
It would be nice if you add a console to the website so we could program with our smartphone, idk if it would work but pretty good job

I'm afraid I don't have the time to write and maintain any remote code execution capabilities, but using the API I provide it shouldn't be too difficult to do your own. Write a simple HTML form that sends it's contents to the server, host it on Dropbox and have the client execute the code it receives from the server. The only problem I see is that currently the data you can send is limited to 50 characters, but I might change that if need be. Or you could split the data into parts.

Thanks for the kind words :)/>
Thanx for the tip, you are wellcome :D/>
Yarillo #6
Posted 17 July 2015 - 08:05 PM
Pretty sad that so little people have seen that. It deserves more views. I've used it quite regularly. Works perfect on a smartphone.
SpencerBeige #7
Posted 18 July 2015 - 04:48 AM
mote 79: could not connect with server
negamartin #8
Posted 23 July 2015 - 07:41 PM
This is truly awesome. Why does it have so little posts?
Great job, this is gonna be VERY useful in the future. Thanks :)/>
Octogames #9
Posted 24 July 2015 - 08:34 PM
All mine says is mote :73: Domain not permitted
Cranium #10
Posted 24 July 2015 - 09:28 PM
All mine says is mote :73: Domain not permitted
You would need to change your computercraft config to allow that address then.