Once again, random browsing on Taobao brought the need for me to shop for random crap^Hstuff.
This time, I bought a USB eBuddy (for a grand total of 60RMB including shipping)
The eBuddy is a small MSN / QQ physical avatar that performs certain actions based on its software – e.g. flashing lights, moving its wings, shaking left or right etc.
It looks like a little white angel with MSN color wings.
For a cheap toy, its actually quite cool. Cute too, but cool also.
Out of the box, its aimed squarely at Windows users. As I don’t actually run the devil’s OS, I hooked it up to a Debian box instead.
I was hoping for a little bit of fun integrating it with things, but that was not to be.
There is already a perfectly fine library written in Python that works beautifully to make it dance and sing* here
*Dancing and singing void where prohibited.
The python library is already set to run as a daemon on port 8888, and sits waiting for action out of the box.
The settings below snarfed from the code give an idea of what actions can be given:
Commands:
# GLADNESS = 00 # FEAR = 01 # FIZZ = 02 # PLEASANTSURPRISE =03 # GRIEF = 04 # FURY = 05 # QUELL = 06 # REDHEAD = 07 # GREENHEAD = 08 # BLUEHEAD = 09 # YELLOWHEAD = 10 # BLAME = 11 # BLUEGREENHEAD = 12 # WHITEHEAD = 13 # HEART = 14 # WINGS = 15 # BODY = 16 # NOEFFECT = 17 # ONLINE = 18 # BUSY = 19 # DAZE = 20 # BACKSOON = 21 # AWAY = 22 # PHONE = 23 # LUNCH = 24 # OFFLINE = 25
Mostly they consist of flashing various LED’s within the eBuddy on/off and optionally moving the wings or shaking the eBuddy left right.
Simple, but effective.
I use Zoneminder in the office on my Debian based ZFS NAS (HP Proliant Microserver), so thought one fun way would be to integrate the eBuddy to Zoneminder. This also proved to be too easy sadly.
Zoneminder has a wiki entry which gives 99% of whats needed here
I literally had to write 1 line of code to integrate the eBuddy with Zoneminder.
#!/usr/bin/perl -w
use strict;
use ZoneMinder;
$| = 1;
zmDbgInit( "myscript", level=>0, to_log=>0, to_syslog=>0, to_term=>1 );
my $dbh = DBI->connect( "DBI:mysql:database=".ZM_DB_NAME.";host=".ZM_DB_HOST, ZM_DB_USER, ZM_DB_PASS );
my $sql = "select M.*, max(E.Id) as LastEventId from Monitors as M left join Events as E on M.Id = E.MonitorId where M.Function != 'None' group by (M.Id)";
my $sth = $dbh->prepare_cached( $sql ) or die( "Can't prepare '$sql': ".$dbh->errstr() );
my $res = $sth->execute() or die( "Can't execute '$sql': ".$sth->errstr() );
my @monitors;
while ( my $monitor = $sth->fetchrow_hashref() )
{
push( @monitors, $monitor );
}
while( 1 )
{
foreach my $monitor ( @monitors )
{
next if ( !zmMemVerify( $monitor ) );
if ( my $last_event_id = zmHasAlarmed( $monitor, $monitor->{LastEventId} ) )
{
$monitor->{LastEventId} = $last_event_id;
print( "Monitor ".$monitor->{Name}." has alarmed\n" );
#The Single Line of Code - it sends a flash green signal to the Python Daemon
system ("echo 8 | nc -q0 -u localhost 8888");
#
# Do your stuff here
#
}
}
sleep( 1 );
}
I think I’ll be getting a couple more of these, as the integration is easy.
Next up, server load monitoring – I can have a couple of these on the top of my desk for each server, and hopefully address each one separately for load purposes – e.g. flash yellow, red on load average, and shake if queue’s are large.
Gimmicky, but useful.
Here are a couple of shots of the current incumbent in situ -
…and one of it actually working.
(It flashes green if someone comes up the stairs and zone minder triggers.)
I’m quite happy I spent the 60rmb, although I would have enjoyed more hacking. I literally spent 5 minutes getting things running.
Thats not a bad thing, but I was hoping for something a little deeper!
Going to order a few more now.
I got mine here – http://item.taobao.com/item.htm?id=1799393549
Recommended.
Post comment
Archives
- December 2011
- November 2011
- October 2011
- September 2011
- July 2011
- May 2011
- April 2011
- March 2011
- February 2011
- January 2011
- December 2010
- November 2010
- October 2010
- September 2010
- August 2010
- July 2010
- June 2010
- May 2010
- April 2010
- March 2010
- February 2010
- January 2010
- December 2009
- November 2009
- October 2009
- May 2009
- April 2009
- March 2009
- February 2009
- January 2009
- December 2008
- November 2008
- October 2008
- September 2008
Categories
- Apple
- Badges
- BMW
- China Related
- Cool Hunting
- Exploits
- Firmware
- Food
- General Talk
- government
- IP Cam
- iPhone
- Lasers
- legislation
- MODx
- MySQL
- requirements
- Service Issues
- Tao Bao
- Technical Mumbo Jumbo
- Things that will get me censored
- Travel
- Uncategorized
- Useful Info
Most Popular Posts
- Samsung N310 (Samsung Go) Hackintosh Installation on Snow Leopard (10091)
- eFrontWPI - Wordpress integration Plugin for eFront (7775)
- BMW Keys and Transponders E36 E38 E46 etc (EWS2) (7765)
- IPCam Hacking - pt#2 (7059)
- IP Cam Hacking – pt#5 (5316)
Tags
Recent Comments
-
Sam: Hi .. I had the same problem with dnscache not listening on all interfaces. The fix is to put 0.0.0.0 in the...
-
Dm: It will be helpful, if you do same with Lion
-
abdul: Hi, i would like to change pen camera and like fix ipod touch front facing camera but need some hardware...
-
Hasse: Hi, I visited Shanghai and was so surprised to see all electric scooters. Now my friend is leaving Shanghai...
-
tryphon: It helped me to fix mine. I used a pair of pliers like you did and it worked fine. I drink a coffee typing...
Recent Trackbacks
- SISTEMAS O.R.P: Recuperar una cámara Zaapa CIP-RW después de un fallo de actualización
- Blog - DO Bots: Brookstone Rover AC13
- How can I stop Pop3 Brute Force attacks: need to create a regex, and add it to fail2ban Here is a guide....
- shanghailoz is our latest member! -:
- Probleem bij installatie op Samsung N310:



ICP Permit
Webmail
Newsletters
Support




