Send Commands Via XMPP Chat

Your Cellbot can now take commands from anywhere in the world via XMPP chat. In this example we’ve created a new Google Account just for the robot, and put the username and password in a brand new config file we’ve added to the platform. This config file also lets you set the default command method, which now includes telnet, voice recognition, or xmpp.

We started by using the SayChat script from the sample code in the Android Scripting Environment. It took a little bit of customization to incorporate it into our platform, but a rough prototype was up and running in about an hour. It really proved how powerful it is to have Python on Android, and how quickly we can iterate using it.

New config file

The config file is read wen we launch the program from ASE. We see the username being used on screen and then we know we’re ready to use chat to send commands.

Launching the code in ASE

There are now many more human readable commands to send thanks to the work we did when adding voice recognition. We still support all of the same single character commands that work well over telnet, but you can also check out the source code to see a list of full words that are available. The robot doesn’t reply back yet so hopefully someone out there can submit a patch, or we’ll get around to it soon.

All files in our scripts directory in ASE

The new config file should also make it easier for you to customize the settings for your robot and still update the main source code as new features are added. Over time we hope this develops into a nice API with multiple layers to support a wide range of devices. For now, enjoy the new XMPP capability and chatting with your robot from anywhere in the world!

This entry was posted in Android. Bookmark the permalink.

3 Responses to Send Commands Via XMPP Chat

  1. Wen says:

    Hi Sir
    I want to study this.
    Could you send “brand new config file” and “the source code” to me?
    Thanks
    Wen

  2. Amit Sharma says:

    Hi Guys,

    I want to do the same like Robot. I had done with XMPP. I am Android Developer.
    I saw video and i am glade to know for this kind of working. Please guide me.

  3. website says:

    Great goods from you, man. I’ve understand your stuff previous to and you are
    just extremely magnificent. I really like what you’ve acquired here, certainly like what you’re stating and the way in which you say
    it. You make it entertaining and you still take
    care of to keep it smart. I can’t wait to read much more from you.
    This is actually a tremendous web site.

Leave a Reply

Your email address will not be published. Required fields are marked *