---| Nabaztag//Pandorabots integration |---

Version 1.0 created by Johnny Baillargeaux ([email protected])

Page 1 of 17 1. Introduction

1.1 General

Since my youngest age, I am fascinated by the robots and mainly by the interactions between humans and robots.

To illustrate that, I’ve created a script which allows you to talk (and not only…) to your nabaztag via pandorabot, by using /Ubiquity.

No worry, if you didn't understood this sentence! I will start this documentation, by explaining each pieces of this puzzle.

------

Some connected things: Nabaztag, Chumby, Arduino board and Tikitag

Page 2 of 17

1.2 Nabaztag

Nabaztag (Armenian for "rabbit") is a WIFI enabled ambient electronic device in the shape of a rabbit, manufactured by Violet. Nabaztag is a "smart object"; it can connect to the Internet (for example to download weather forecasts, read its owner's email, etc).

There is an API, with bindings for multiple programming languages available to program the Nabaztag.

Links: http://my.violet.net/ http://en.wikipedia.org/wiki/Nabaztag

1.3 Ubiquity

Firefox only: Labs unveils the first prototype of a natural language web service connector called Ubiquity, a Firefox extension that adds a command panel to any web page. Ubiquity will look familiar to Quicksilver, Launchy, or Enso users: you invoke Ubiquity with a key combination and the text field drops down command suggestions as you type.

Links: http://labs.mozilla.com/2008/08/introducing-ubiquity/ http://en.wikipedia.org/wiki/Ubiquity_(Firefox)

1.4 Pandorabots

Pandorabots is the place where you can create and unleash virtual personalities. Pandorabots is an experimental software robot hosting service based on the work of Dr. Richard Wallace and the A.L.I.C.E./AIML free software community.

Links: http://www.pandorabots.com/botmaster/en/home http://alicebot.blogspot.com/ http://en.wikipedia.org/wiki/AIML

Page 3 of 17 2. Installation

Assuming that Firefox and Ubiquity are both correctly installed, the next step is to install my script which allows the interactions between Ubiquity, Nabaztag and Pandorabots.

To do that, go to http://gist.github.com/43355 and as shown below, you should see a button which indicate that you can subscribe to my command:

You have to confirm the installation by clicking on:

Page 4 of 17

Once installed, you have to configure this script.

Open Ubiquity by pressing ctrl-space and put the following command: nabz- setup then press enter:

Page 5 of 17

Step 1:

Step 2 : You can retrieve the serial number of your Nabaztag by going to the parameters of your rabbit (violet web site).

Step 3: You can retrieve the token number of your Nabaztag by going to the parameters of your rabbit (violet web site).

Page 6 of 17

Step 4: Put a voice supported by the Nabaztag (cf http://doc.nabaztag.com/api/home.html )

Step 5: Put the name of your Nabaztag.

Step 6: If you ask this kind of question to a bot : nabz-ia what is your name ? (cf. section 3), the name of the bot is automatically replaced by the name of your Nabaztag filled step 5.

Step 7: 4 French bots are automatically configured. Later on, you could add your own and remove those ones (cf. commands nabz-setup-add-bot and command nabz-setup-remove-bot in section 3):

Page 7 of 17

Step 8: 4 French radios are automatically configured. Later on, you could add your own and remove those ones (cf. commands nabz-setup-add-radio and command nabz-setup-remove-radio in section 3):

Step 9:

Everything is now installed/configured. As indicated in the popup above, at any time you can reconfigure everything by restarting this wizard or by changing manually the settings into the “about:config” (cf. section 4. Advanced mode).

Otherwise, you can play with the script by using the following commands.

Page 8 of 17 3. Commands

nabz-ia

- Input: Text/question.

- Preview: Name of the current bot (cf. command “nabz-switch-bot” if you want to change the current bot)

- Output: You question/text is sent to Pandorabots and the answer is sent to your Nabaztag.

nabz-repeat

- Input: Text message

- Preview:

- Output: The text is repeated by your Nabaztag.

Page 9 of 17

nabz-switch-bot

- Input: Existing/registered bot name

- Preview:

- Output: The bot by default is changed.

nabz-quote

- Input: Name of the company

- Preview:

- Output: The current quotation value is sent to your Nabaztag (the entire sentence is in French).

Page 10 of 17

nabz-sleep

- Input: N/A

- Preview:

- Output: Your nabaztag will go to bed ☺.

nabz-wakeup

- Input: N/A

- Preview:

- Output: Will wakeup you Nabaztag.

Page 11 of 17

nabz-setup-add-radio

- Input: a popup will appear where you have to put the url of the radio.

- Preview:

- Output: The radio is added to your list.

nabz-setup-add-bot

- Input: a popup will appear where you have to put the botid of the bot to be added. Botid's can be retrieved in the Pandorabots web site.

- Preview:

- Output: The bot is added to your list.

Page 12 of 17

nabz-setup-remove-radio

- Input: Name of the radio.

- Preview:

- Output: The radio is removed from your list.

nabz-setup-remove-bot

- Input: Name of the bot.

- Preview:

- Output: The bot is removed from your list.

Page 13 of 17 3. Advanced Mode

3.1 Configuration

The command nabz-setup used in section 2, saves your parameters into firefox, such as any other standard parameters available in firefox. You can change the values by going to “about:config” :

As you can see, you can manually add a new radio, add a new bot, etc... but it is preferable to use the appropriate commands created for that.

But there is 3 hidden parameters not explicitly shown, when you run the setup:

- Extensions.nabaztag.timeout: 20000 (=20 sec) Number of seconds before that a “time out” is triggered during a call to a web api such as Nabaztag or Pandorabots. 20000 is enough in many cases.

- Extensions.nabaztag.replace.url: true/false If set to true, the url embedded into is automatically replaced by the content of the url. Cf next section for more details.

Page 14 of 17 - Extensions.nabaztag.script.debug: 0, 1 or 2 Depending on the level of this parameter (0,1,2), you can trace the exchanges between this script and the messages sent by Pandorabots (cf. command nabz- ia ). ( http://getfirebug.com /) is required.

If set to 0, no warnings are sent to firebug and the messages are sent to your nabaztag. If set to 1, the warnings are sent to firebug and the messages are not sent to your nabaztag. If set to 2, the warnings are sent to firebug and the messages are sent to your nabaztag (This is the default value).

3.2 AIML / New tag

I will not explain here how you can create your own bot because once again, you can refer to all the existing documentation available in the web. As you already understood, you can connect this script with the existing bots hosted by Pandorabots. You can also create your own and in order to add more interactivity, I’ve created a new tag which will be handled by the script.

Imagine for example that you create the following category:

GIVE ME A NUMBER BETWEEN * AND *

If your question is “give me a number between 1 and 6”, the url will become http://random.org/cgi-bin/randnum?num=1&min1max=6&col=1 and If you go to this url, you will see a number between 1 and 6 which will appear. In this case, your Nabaztag will tell you “I would say” ( + a number between 1 and 6).

As you can see, …. is replaced by the message sent by the given url. Using this, you can retrieve data from internet. (cf. Yahoo Pipes for example).

Page 15 of 17 Other example:

GIVE ME THE QUOTATION FOR COCA COLA

This example is a bit more complicated to understand…and I will let you the pleasure to try to understand it by yourself ;-)….good luck. Remember that you can check the trace sent by firebug (cf. section 3.1).

Page 16 of 17 4. Conclusion

I hope that this short documentation is understandable (sorry I am French with a wrong English level…) and will give you the opportunity to play with my script.

For any remarks/concerns, you can contact me at [email protected] .

Now enjoy!!

Page 17 of 17