ISY-99i Series INSTEON:Networking:Network Resources:Nabaztag

From Universal Devices, Inc. Wiki

Interface ISY-99i with Nabaztag ("Internet Rabbit")

Nabaztag (Armenian for "rabbit") is a Wi-Fi enabled ambient electronic device in the shape of a rabbit that can provide information about the weather, read email and play audio content, among other things.

There are some fun and useful ways that Nabaztag can be integrated with a home automation system. Nabaztag has programmable colored lights, motorized ears, sounds, and text-to-speech capabilities that can be utilized by ISY to notify the user of device/scene status or events. The latest generation of devices, Nabaztag/tag and Mir:ror, also have the ability to recognize RFID-enabled objects and notify ISY when these objects are detected.

Sending commands from ISY to Nabaztag

You will need:

  1. A Nabaztag or Nabaztag/tag "rabbit"
  2. An ISY-99i series device with firmware 2.7.3 or later
  3. The Networking add-on module for your ISY-99i

Every Nabaztag has a unique serial number (a.k.a. mac address). To send commands to your Nabaztag, you will also need to establish a "token" for the device. Go to http://my.violet.net/object_ecosystem and activate the "Violet Ecosystem". After entering your Nabaztag's serial number, the site will issue a token string.

The Nabaztag API allows you to control the rabbit via HTTP GETs. The full API documentation is at http://doc.nabaztag.com/api/home.html.

For each action that you would like Nabaztag to perform, you'll need to create a Network Resource on ISY. Go to the Configuration->Networking->Network Resources tab on the ISY Admin Console. Click the Add button to add a new resource and select "http GET" as the protocol. Enter "api.nabaztag.com" in the Host field and set the path according to the examples below.

Playing A Sound

To tell Nabaztag to play a sound, use the following format for the path, substituting [myserial] and [mytoken] for those specific to your rabbit. The urlList can refer to any MP3 audio file, but for best results the audio sample should be short, and ideally hosted on an internal web server. For testing, you can also send these commands from any web browser, prefacing the path with http://api.nabaztag.com.

/vl/FR/api_stream.jsp?sn=[myserial]&token=[mytoken]&urlList=http://www.a1sounddownload.com/freesounds5/buzzer.mp3

Nabaztag's ears and lights can also be controlled through the API

Example - moving Nabaztag's ears and flashing its lights:

/vl/FR/api.jsp?sn=[myserial]&token=[mytoken]&chor=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


One way we're using this capability is to have Nabaztag make an audible announcement whenever a vehicle enters or exits our driveway.

Sending commands from Nabaztag to ISY

You will need:

  1. A Nabaztag/tag "rabbit" or Mir:ror RFID reader
  2. One or more RFID tags ("Ztamps")
  3. An ISY-99i series device with firmware 2.7.3 or later
  4. In internal web server and public IP address

The latest generation of Nabaztag rabbits (as well as a dedicated RFID reader called "Mir:ror") can perform various actions when an RFID tag is recognized. Since each tag has a unique identifier, the set of actions performed can be specific to each tag.

Because of limitations in Nabaztag's API (no support for authentication or self-signed certificates), it's necessary to set up a proxy server to enable secure communication between it and ISY. This can be accomplished using any common web server. If you have a Windows computer, you can install an ASP script here and configure it according to the comments contained therein. If you're running some other web server, you can probably figure out how to set up an equivalent program by inspecting the sample script.

RFID Tags

To set up a new tag, you'll need to wave it across Nabaztag's "nose" and then configure it at the http://my.violet.net website. Select the new object and give it a meaningful name. Then select the Application(s) that you want to associate with this object. You can select multiple applications for each object. The one that allows Nabaztag to interact with ISY is the App called "Send data to an URL (Call URL)" in the /dev section.

Go to the Define Application Settings pane and enter a URL in the following format:

http://[myPublicIP]/[pathToScript]/nabazlink.asp?cmd=/rest/[any REST command]&object_name=${object.name}&ztamp_name=${ztamp.name}&ztamp_serial=${ztamp.serial}


Example to run an ISY program

http://mywebserver.somewhere.net/nabazlink/nabazlink.asp?cmd=/rest/programs/0017/runThen&object_name=${object.name}&ztamp_name=${ztamp.name}&ztamp_serial=${ztamp.serial}

You can issue any valid ISY REST command, but for maintainability, I find that it's easiest to call a program on the ISY.

We stuck one Ztamp to my wife's car keys and another to mine. When she leaves the house, she swipes her keys on Nabaztag's "nose" and the rabbit reads the weather forecast to her and tells ISY to open the garage door for her car. I always leave for work last, so when I swipe my keys, Nabaztag opens my garage door, plus shuts off all the lights in the house and runs the "house unoccupied" program on the ISY.

Nabaztag FAQs

FYI, there are some open source projects that allow Nabaztag to be operated independently of the manufacturer's backend--see OpenNab and Nabaztools, for example--but I haven't tried any of these.

Regarding performance, I haven't seen any command from ISY to Nabaztag or vice versa take longer than a second or two to execute. For audio alerts, I like to keep the clips as short as possible to minimize lag.

Enjoy your Bunny!

Jim (RatRanch)

Forum Topic For the latest updates.



ISY-99i Series INSTEON : Networking : Network Resources

User Guide