Posts Tagged ‘API’

NabRSS updated to version 0.2

Saturday, July 14th, 2007

NabRSS has been updated from the version posted here.

NabRSS is a set of PHP scripts meant to assist anyone with a PHP/MySQL/Apache server available to gather feeds from RSS sources and send them via Nabaztag API to his/her Nabaztag.

Available here: nabrss-0.2.tar.gz

Quoting from the changelog:

NabRSS Version 0.2 Jul 14th 07:
– get.php: Fixed an incorrect condition in function debug_set
– get.php: Added function set_ear_pos to randomize ear position on every post
– get.php: Added function set_voice to randomize each RSS post voice
– list.php: Added a “Reset” button to allow reseting the last post saved in the date field inside the DB

Todo (short range):
– DB: Extend the scheme and move voices into DB as a seperated table
– add_url.php: Select a voice for each RSS feed. Possiblity to select “random”
– list.php: Show selected voice for each RSS feed
– get.php: Insert a function to deal with voices per post

NabRSS initial release (0.1)

Friday, July 13th, 2007

I have written an RSS to Nabaztag (using API) php scripts. Special thanks to magpierss, for doing the complicated work of converting RSS feeds to PHP-usable arrays.

This system requires MySQL server, Apache server and PHP version 5 (haven’t tested it on PHP version 4).

The scripts are supplied under GPL license, and are free for use and distribution. Please keep the header information containing my details on every distribution of the scripts. Also, please help me make the scripts better, by leaving feedback and sending me fixes.

You can find the archive here: nabrss-0.1.tar.gz

Enjoy!

More on the Nabaztag/tag

Wednesday, June 13th, 2007

Actually, this post has become less of the non-technical type and more of the technical type, however, for the sake of the cute little Nabaztag (you can send me messages too! Go here and send a message to “fatutchi”!), I keep it still in this category as well.

Today is a busy day, so I’ll have several posts.

This one will deal with the Nabaztag/tag. I have extended the PHP form/script offered in my previous post to allow for multiple Nabaztags selection. Also, added reading the ears status, and parsing the XML returned by the Nabaztag API site.

This is an ugly script, but it works. As said before – if you see fit to extend it or add features, please do so. Attached here: nabiV2.php.txt

I have noticed Violet had several issues with their site. I must confess that I have expected more from their site. As I’ve been involved as a consultant in several large-scale setups which sustained several tenth of thousands (and more) of connections per second, I know that, usually, the main performance hog is caused by an inefficient application design. It could be that Violet’s problems might just point at a low quality server-side software. Pity. I hope it will get better.

I have a Nabaztag/tag

Tuesday, June 12th, 2007

I have received my Nabaztag/tag just a day ago, and it is a cute little thingie.

At-ten-tion!

What can it do?

Actually, not much. It is a wireless device (client) which access Violet’s Nabaztag servers to get its commands. You, theoretically, cannot hijack the session and use it directly over LAN, but you must go through the Internet. This leads to delays in assigning commands.

It can move its ears (surprisingly, very quietly), it can play sound, either by text-to-voice (probably happens on the server-side) or streaming MP3 (cannot, as far as I’ve noticed, play MMS directly). It can also report its ears positions.

I can fly!

As you probably know, the more important thing is not about what it can do, but about how we can utilize it. Violet has added a list of RSS sources for the Nabaztag to read aloud. Through server-side sub processes, it can tell the time (usually at full hours), it can act as a wakeup clock (doesn’t do its job for me – not enough to wake me up), etc. It can probably take part in games based on the location of the ears (for example, if you agree, move the right ear down, etc).

You can check wikipedia for its entry. They cover most of it, maybe except for how cute it is, and it is.

If it were to end at this, I would have been quite frustrated, especially with the device’s price. However, Violet has exported an API which allows me (and you, and him, and everyone!) to send commands (unlimited by the number, as it seems) to the Nabaztag – Say this, move your ears to this position, etc. It allows me to send a choreography, aka a dance, to the device, and it will perform it based on the timing set by the sender.

I have wasted some of my day yesterday to write down a simple (and quite ugly, if you ask me) form which will use the API for simple commands. In my TODO list there is to implement the whole choreography thing, and make it easy. I would like to build this interface as a base for possible other utilizations, such as community games, etc.

I have uploaded my API using PHP form here which is free for use (of course) and everyone is encouraged to use it and/or modify it, as long as you give me my credits :-). I’m not sure about its security yet… nabi.php.txt

It’s a raw thing, but it works. Don’t forget to:

1. Activate your API interface in http://my.nabaztag.com

2. Change the parameters of your SN and your TOKEN

3. Place the script on PHP enabled site.

Enjoy!