Nabaztag's API

Take full control of your Nabaztag

API Overview

Using our API allows you to activate, from an exterior application, an event on your Nabaztag.  For example: controlling the movement of the ears, commanding the LEDs, sending messages in TTS or with a Nabcast

Check the updated documentation at : http://api.nabaztag.com

Do not hesitate to contact us if you wish to implement additional functionalities (idee@nabaztag.com).

How do I send an event ?

You simply have to call the URL http://api.nabaztag.com/vl/FR/api.jsp with the following parameters :

sn

Serial number of the Nabaztag that will receive events

idmessage

The number of the message to send. This number can refer to a message in the Library or a personal MP3 file that you have downloaded. You find this identification number under the title of the track you are listening to

posright

Position of the right ear between 0 and 16 (0 = ear horizontal)

posleft

Position of the left ear

token

The token is a series of digits given when you activate the Nabaztag receiver. This extra identification limits the risks of spam, since, in order to send a message, you need to know both the serial number and the token

idapp

This is your application ID. It will allow you to authenticate the event's transmitter. This parameter is not yet in service

tts

Allows you to send a text configured for speech synthesis

chor

Sending a choreography to your Nabaztag

chortitle

The name of the choreography

ears=ok

Send the position of the ears to your Nabaztag

nabcast

Allows you to send a message as a Nabcast

ttlive

Allows you to define the length of time you want a message to remain on the site (in seconds). By default, the message will be stocked for a period of two months

voice

Allows you to choose the voice that will read the message

For example :

http://api.nabaztag.com/vl/FR/api.jsp?sn=00039D4022DE&token=112231049046144&posleft=0&posright=0&idmessage=10333&idapp=10

How do you send a message in text-to-speech (TTS) within a Nabcast that has the ID 52 with the title :  myttsinmynabcast ? http://api.nabaztag.com/vl/FR/api.jsp?.......nabcast=52&nabcasttitle=myttsinmynabcast&tts=the+nabcast

How do you send the message 10333 within the Nabcast with the ID 52 and a sound title of : mymp3inmynabcast ?
http://api.nabaztag.com/vl/FR/api.jsp? ....nabcast=52&nabcasttitle=mymp3inmynabcast&idmessage=10333

 

Activate reception of events on a Nabaztag

1. Go to the 'Tools' section of your account in the API tab

2. Check "Authorize exterior events", then OK.

3. The token is displayed.
Please write down and save your token, as you must use it to send messages from your application.

Note : If you deactivate and reactivate events, a new token will be sent to you.

 

Choregraphy Language

A choreography is a series of actions that you command the LEDs and ears to perform.
The choreography's main parameter is an adjustable tempo.
Once the tempo is set, actions will be sequenced to that rhythm. Each action is run at a precise moment, called "l'heure" (time) of the action : This time is expressed by the number of beats that have elapsed from the beginning of the choreography to the desired event.

For example, with a tenth of a second tempo, the action associated with "l'heure" (time) '10' will happen a second after the beginning of the choreography. The action associated with "l'heure" '25' will happen 2.5 seconds after the beginning of the choreography...

The choreography's syntax is a series of words or numbers, separated by commas.
The numbers are always positive integers, expressed on a basis of 1 to 10. Words are one of two key words : "motor" or "led".

This series begins with the tempo value, and then continues on with a succession of motor or led actions.

Each action (motor or led) begins with "l'heure" (time) (expressed by the number of beats that have elapsed from the beginning of the choreography to the desired event), followed by the command (motor or led), and a set of variables which describe the action.

If two actions are commanded at the same time they will be carried out at the same time.

 

1. Tempo command

The tempo is expressed in Hz."10" represents a tempo of a tenth of a second.

 

2. Ear commands

This is a series of values separated by commas.
The command is as follows :

1. First value : Action time (l'heure)

("0" if it is the first command.)

2. Second value : 'motor', to move an ear

3. Third value : Ears command
1 to command left ear
0 to command right ear

4. Fourth value : Angle of ear
Possible value from 0 to 180

5. Fifth value : Unused, set at "0"    

6. Sixth value : Rotation of the ears directions
1 : high->back->low->front->high...
0 : high->front->low->back->high...

Example of a command that makes the left ear turn counter clockwise with a 20° angle, at « l'heure » (time) "0" =  0,motor,1,20,0,0

 

3. LED commands

It is a series of values separated by commas.

1. First value : action time (' l'heure ')
("0" if it is the first command).

2. Second value : 'led' , which gives a color to the LED.

3. Third value : To define which LED you want to illuminate.
0 : bottom LED
1 : rabbit's left LED
2 : middle LED
3 : rabbit's right LED
4 : high LED

4. Fourth, Fifth, Sixth value : the color in RGB.
Value from 0 to 255

Example : to make the middle LED go green, then the left one go red then the middle one turn off  =  0,led,2,0,238,0,2,led,1,250,0,0,3,led,2,0,0,0

 

4. Combination of ear and LED commands

To combine the three actions, with the initial tempo parameters :
10,0,motor,1,20,0,0, 0,led,2,0,238,0,2,led,1,250,0,0,3,led,2,0,0,0


5. Choose the voice for the TTS

You can choose the voice that will read your messages.

French voices :
  • julie22k
  • claire22s
  • caroline22k
  • bruno22k
English voices :
  • graham22s
  • lucy22s
  • heather22k
  • ryan22k
  • aaron22s
  • laura22s

By default, we will use claire22's voice for french and heather22k's for english.


6. Sending an URL to a Nabaztag/tag to get streaming audio

The API has gotten a boost in functionality and may now send URLs of MP3 files or feeds to a tag/tag.


This new feature allows you to integrate your applications with MP3, podcast and webradio players. Now you can create application for your exceptionally talented rabbit with streaming audio !

 

How does it work ?

If you have a tag/tag, you can use the API to send him MP3 hyperlinks to make him play podcasts or webradio.

All you have to do is call or include your application in the URL  

http://api.nabaztag.com/vl/FR/api_stream.jsp with the following settings :

token : The token is a series of digits given when you activate Nabaztag's reception of external events. This identification limits the risk of spam since you must know the serial number and the token to send a message.

sn : Serial number of the Nabaztag/tag that's going to receive the URLs
urlList : URL address of the MP3 file that you want your Nabaztag/tag to read.
If you wish to play several MP3 files in a row, you can can seperate them with this character « | ».

 

Example- play a webradio station :

http://api.nabaztag.com/vl/FR/api_stream.jsp?token=1267440739&sn=
0013D380FD3C&urlList=http://213.205.96.91:9915

If the MP3 feed is available, your tag/tag will play it.


To play several mp3 streams, you must separate each URL with the character « | ».

http://api.nabaztag.com/vl/FR/api_stream.jsp?token=1267440739&sn=
0013D380FD3C&urlList=http://monServer.org/archive/MP3/Creative.mp3|
http://myServer.mp3.net/myFav_mp3.mp3

Search