Jump to content

How To: Interface ISY-99i with Nabaztag ("Internet Rabb


RatRanch

Recommended Posts

How To: 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.

 

================================================================================

Part One: 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'>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.

 

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".

 

Example - playing a sound:

 

/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.

 

================================================================================

Part Two: 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.

 

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.

 

Enjoy your Bunny!

 

-Jim

Link to comment

Hi Jim,

 

This is great, I was looking for ways of communicating alerts such as car approaching etc and this seems a great solutions.

 

A couple of questions:

1) How reliable has it been? I remember when they first came out there were lots of complaints about the servers.

2) What sort of delays do you see with the communications given that they all go via violet.net

 

I'm going to add the proxy code to my BDLCAM program so I don't need another webserver. Using the ISY network module I already have the code working to move the cameras to point at the drive and capturing stills when cars approach so this would be a great addition.

 

Best regards,

Brian

Link to comment
Hi Jim,

 

This is great, I was looking for ways of communicating alerts such as car approaching etc and this seems a great solutions.

 

A couple of questions:

1) How reliable has it been? I remember when they first came out there were lots of complaints about the servers.

2) What sort of delays do you see with the communications given that they all go via violet.net

 

I'm going to add the proxy code to my BDLCAM program so I don't need another webserver. Using the ISY network module I already have the code working to move the cameras to point at the drive and capturing stills when cars approach so this would be a great addition.

 

Best regards,

Brian

 

Hi Brian,

 

You raised a couple of good questions. There were indeed a lot of complaints about Violet's servers. When we first installed a Nabaztag/tag in December, 2007, the server reliability was terrible. There were often complete outages lasting several hours. This situation has improved a whole lot since then, especially during the past six months (which may have something to do with assumed capacity upgrades made in connection with the North American rollout of RFID support).

 

Nowadays, aside from the occasional unavailability of specific data feeds, like weather forecasts, Violet seems to have addressed the reliability issues.

 

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.

 

Please post details if you can get the proxy function running on the ISY. I had considered that option but couldn't figure out a workable approach. But I don't think you even need to bother with that since your BDLCAM application would be sending alert messages to Nabaztag, not the other way around. The message proxying would only be a concern if you need to receive events from Nabaztag.

 

Look forward to hearing how your project progresses!

 

Cheers,

-Jim

Link to comment

OK. I’m ordering one now :)

 

On the BDLCAM piece, I liked the idea of using the RFIDs to send message to the ISY and because BDLCAM is already a basic webserver with a public address I thought I would add some code there to avoid needing another webserver.

 

Thanks again,

Brian

Link to comment
I ordered one too, the Nabaztag, but did I make a mistake?

 

Should have I ordered the Nabaztag:tag

 

Other than the $50 what exactly is the difference?

 

Dave

 

I had the same concern, I ordered from J&R (via Amazon) and it was $99 for Nabaztagtag, I was concerned after I ordered because I saw another one for $149.

 

Mine arrived yesterday morning and it is the Nabaztag:tag and I think the difference is the Nabaztag:tag has the RFID reader. On the Violet site they only list the Nabaztagtag and they are $99.

 

So mine is part number NA-TRL-002 and is listed as Nabaztag:tag and does have the RFID reader and micophone on it's belly.

Link to comment
How To: Interface ISY-99i with Nabaztag ("Internet Rabbit")

 

Example - playing a sound:

 

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

 

 

Hi Jim,

 

So I was having lots of fun playing outside the ISY network module getting the bunny to do all sorts of things, but when I try using the network module I get the following error.

 

[-140008]HTTP Client request failed[Net Module Rule: 2:404]

 

I noticed the ? is translated to %3F in actual window but couldn't see any other problems or difference to my other network resources (My other network resources to move my cameras are still working fine).

 

Any ideas?

Link to comment

Hi Jim,

 

So I was having lots of fun playing outside the ISY network module getting the bunny to do all sorts of things, but when I try using the network module I get the following error.

 

[-140008]HTTP Client request failed[Net Module Rule: 2:404]

 

I noticed the ? is translated to %3F in actual window but couldn't see any other problems or difference to my other network resources (My other network resources to move my cameras are still working fine).

 

Any ideas?

 

Hi Brian,

 

Glad to hear your "bunny" is received and getting a workout!

 

Yes, there is a bug in the way firmware 2.7.3 encodes URLs (to be fixed in the next beta release). UDI has a hotfix available for this specific issue (a checkbox was added that allows you to turn off URL encoding). See http://forum.universal-devices.com/viewtopic.php?t=2684

 

-Jim

Link to comment

Now running 2.7.4 Alpha with the the option not to encode URL and the bunny is working well.

 

I've starting with fairly basic stuff and it is proving very effective. The bunny now announces when the garage door is open which was so easy to do with the Jim's instructions and the Network Module. What I like is that the bunny is always there.

 

Looking forward to getting some RFID stamps to allow me to use the bunny as an input device as well as an output device.

Link to comment

Update: I'm mainly using the Bunny to announce things (garage door open, you have mail, car approaching etc) and response time has been very good with 1-2 seconds being typical.

 

I was playing with using the the lights and ear position to communicate things but have stuck to the audio announcements for now. My latest addition is adding "Bunny Sleep" and "Wake Bunny" programs which are triggered by IR comments using the Harmony remote. This is useful to easily turn off the announcements if you don't want to be disturbed. The Bunny already has the option to program weekday and weekend wake and sleep time but these programs give me an easy way of overriding those.

 

Anyone else with any Bunny experiences?

 

I have to say the Network module has given my ISY99 a new lease of life and it was already one of my best/favorite home automation purchases.

Link to comment

Here's one that still has my wife scratching her head. I plugged a spare I/OLinc into an inconspicuous but easily accessible outlet. When I click the set button, it fires a program that waits a few seconds and then tells the bunny to announce "Seems like Jim's drink could use a refill".

 

The delay gives me enough time to inconspicuously click the button, walk to the bunny's vicinity and "show" the rabbit my empty glass. :lol:

 

Oh, and a tip to pass on. This text-to-speech demo allows you to create very high quality spoken prompts. The audio clips are delivered in WAV format though, so you'll need to convert them to MP3 format for compatibility with the rabbit. One free tool that I like is Audacity.

 

Cheers,

-Jim

Link to comment

That's funny I might have to try that

 

Oh, and a tip to pass on. This text-to-speech demo allows you to create very high quality spoken prompts. The audio clips are delivered in WAV format though, so you'll need to convert them to MP3 format for compatibility with the rabbit.

Cheers,

-Jim

 

That is exactly what I am using, I used the site years ago with some early home automation and was pleased to see the site was still available. As you said the results are very good.

Link to comment
Here's one that still has my wife scratching her head. I plugged a spare I/OLinc into an inconspicuous but easily accessible outlet. When I click the set button, it fires a program that waits a few seconds and then tells the bunny to announce "Seems like Jim's drink could use a refill".

 

The delay gives me enough time to inconspicuously click the button, walk to the bunny's vicinity and "show" the rabbit my empty glass. :lol:

 

That is so funny!

I am definitely going to have to get a rabbit.

 

Rand

Link to comment

Our rabbits arrived yesterday!

 

I've been having a great time setting one up. I have one playing sounds and dancing to ISY commands, but I couldn't wake it up this morning when I got up early.

 

I entered this but it only shows an error:

 

/vl/FR/api_stream.jsp?sn=0013xxxxxxxx&token=xxxxxxxx&action=14

 

What am I missing?

 

I was going to set up the first one for my wife but I have decided this one is mine, she can set up her own! Not to be mean, but once initial install is complete (Wi-Fi security) using the site to make the rabbit do what you want is quick and easy.

 

I'm hoping she can get it installed at her office so I can wiggle her ears ;)

 

Thanks,

Rand

 

Update: I'm mainly using the Bunny to announce things (garage door open, you have mail, car approaching etc) and response time has been very good with 1-2 seconds being typical.

 

I was playing with using the the lights and ear position to communicate things but have stuck to the audio announcements for now. My latest addition is adding "Bunny Sleep" and "Wake Bunny" programs which are triggered by IR comments using the Harmony remote. This is useful to easily turn off the announcements if you don't want to be disturbed. The Bunny already has the option to program weekday and weekend wake and sleep time but these programs give me an easy way of overriding those.

 

Anyone else with any Bunny experiences?

 

I have to say the Network module has given my ISY99 a new lease of life and it was already one of my best/favorite home automation purchases.

Link to comment
Our rabbits arrived yesterday!

 

I've been having a great time setting one up. I have one playing sounds and dancing to ISY commands, but I couldn't wake it up this morning when I got up early.

 

I entered this but it only shows an error:

 

/vl/FR/api_stream.jsp?sn=0013xxxxxxxx&token=xxxxxxxx&action=14

 

What am I missing?

 

 

The command I'm using is:

 

/vl/FR/api.jsp?sn=0013xxxxxxxx&token=xxxxxxxx&action=14

 

I think I need a second bunny too, it's just a shame they don't breed like real rabbits :)

Link to comment

Thanks, I had the _stream in the command. Works like a Champ now!

 

Our rabbits arrived yesterday!

 

I've been having a great time setting one up. I have one playing sounds and dancing to ISY commands, but I couldn't wake it up this morning when I got up early.

 

I entered this but it only shows an error:

 

/vl/FR/api_stream.jsp?sn=0013xxxxxxxx&token=xxxxxxxx&action=14

 

What am I missing?

 

 

The command I'm using is:

 

/vl/FR/api.jsp?sn=0013xxxxxxxx&token=xxxxxxxx&action=14

 

I think I need a second bunny too, it's just a shame they don't breed like real rabbits :)

 

Well, you need at least two before that will happen ;)

 

Rand

Link to comment
  • 2 months later...

Do you guys think this is worthwhile strictly for voice announcements? I really see the benefit of one of these guys in my bedroom who could say the garage door is open if its open after 10pm.

 

I can see some other benefits as well, but how bad is the lag on the rabbits?

Link to comment

I mainly use them for announcing, I am playing with the RFIDs but still looking for the killer application there. I purchased when they were on sale for ~$80 and at that price they seem worth it, if only as an announcing unit.

 

I've not seen any problem with the lag, typically it is no more than a second or two. For example when the garage door is opened the announcement happens way before the door has finished opening (normally in the first 12-18in of travel).

Link to comment

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...