Blog Forum Wiki Links Contact Us NetbookUser
RunCore Pro IV SSD Transforms your ASUS EEE PC by increasing 
performance 5-40X. Your satistfaction guaranteed RunCore Pro 70mm SATA Mini PCI-e SSD
RunCore Pro IV 70mm SATA II Mini PCI-e SSD
RunCore Pro IV 2.5 Inch SATA II SSD

You are not logged in.

#1 2009-06-05 12:22:39 pm

AlphaCentauri
Senior Member
Registered: 2008-12-23
Posts: 814
Website

LED message notifier checks twitter, pidgin, email

Hi all,

I'm currently working on a project that does something useful with those cheap RGB LEDs I like so much. smile
Its a small circuit based on a picaxe 08m that is listening to signals on the serial port of a USB->serial adapter, a rather dumb device that switches output 1 high when a "1" is received, "2" switches output 2 high, "4" means outputs 1 and 2 are high etc. Basically it takes the last (or first? forgot)  three bits of the incoming ascii sign and uses it to encode its outputs accordingly..
The software part is a bit more complex and consists of a bunch of python and zenity scripts that listens on the dBus system bus for message alerts issued by pidgin and thunderbird (the latter thanks to" dbus notifications" extensions for thunderbird).
The scripts also check my twitter account for new tweets every minute.

When a new message is received the magic begins: The LED lights up in the corresponding color (see below) and a system notification showing corresponding icon and either the full message (pidgin/twitter) or the message header (for email) is shown for a few seconds in the upper right screen area. Further a system tray icon appears (again showing the type of new message through icon type).
When I have seen the LED, read my mail/messages and have the feeling of being totally connected in and out :-) I can cllick on the tray icon and the LED goes off again.

The whole can be started by clicking on a small "parrot" icon, which causes a "parrot" tray icon to appear. Clicking this icon again closes the whole bunch of scripts (sadly also all other python scripts are closed then too, so this "exit" feature is not implemented very well if you have other python scripts running too)

Anyway I'm lucky since I can see my email inbox from several meters away with eepc lid closed. ha.  wink

Of course I would welcome it if any experienced python wizard would have the pity to write a small GUI using gtk2 or something for this. Thus I've opened a sourceforge account to enable several developers to work on this project at once. Note that this was my first try in python at all(!) so almost everyone with some experience will probably help alot here.
Devs are welcome!


Plans are to etch a very tiny PCB and fit this thingie into my eee1000h. I feel the message notifier makes more sense than this ambilight adventure I once started a while ago.. wink


You can have a look at some pics and read more about the details on my blog, btw.
The sourcecode in form of a tarball can be accessed here: http://sourceforge.net/projects/dbirdnotifier
(you can also extract inside your home dir, then navigate to the newly created subfolder "/LEDnotifier" and read HowTo.txt
for further instructions on how to make this run - some minor adjustments are probably necessary)

this is how it looks in action (new tweet was just received as I took this pic)
http://img36.imageshack.us/img36/5703/img2222x.jpg
due to problems with BBcode "img" tag here is the same picture as url:
http://4.bp.blogspot.com/_Ik8POSoGDNY/S … G_2222.JPG

cheers

Last edited by AlphaCentauri (2009-06-05 5:50:46 pm)


eeePC 1000H Mods: stripped down again to: 3G HSDPA / R-SMA antenna connector / flashlight LED (back to basics!)
O/S: removed all in favor of Windows 7 Ultimate (RTM + language pack)
check out my Blog!

Offline

 

#2 2009-06-05 12:36:46 pm

m.klinge
Senior Member
Registered: 2008-06-03
Posts: 185

Re: LED message notifier checks twitter, pidgin, email

I love the idea smile

If you would be able to fit it nicely inside the screen bezel it would be cool smile

Perhaps even two - one on each side - so that you can see it when the computer is on but the lid is closed smile

//M

Offline

 

#3 2009-06-05 1:21:50 pm

gtisingh
EEEmazing User
From: UK
Registered: 2008-03-01
Posts: 5673

Re: LED message notifier checks twitter, pidgin, email

Wow ... this sounds clever !
Will we be able to change what we want to be notified about ?
e.g. Just Twitter and Hotmail
      Just Twitter


-(2G Surf-450mb Nlited XP Pro SP2-571mhz-512mb RAM-7'' Touchscreen)-|
         |Mods : Internal Hub\Touchscreen\4GB Class6 Flash Drive\Bluetooth|
       -Gti-                Cheap LED's with FREE Resistors - £2.49
      -Singh-

Offline

 

#4 2009-06-05 1:34:35 pm

RandyLude92
EEEmazing User
Registered: 2008-02-26
Posts: 5107

Re: LED message notifier checks twitter, pidgin, email

what's up with the three AA batteries?

shouldn't the USB port have enough juice to power the RS-232 adapter and the LED?
maybe just split the power lead from the cable you're using and bypass the RS-232 with one?

looks really neat though. good work smile


"modding is for fun and learning, i've learned to have lots of fun"
Parts for sale!

Offline

 

#5 2009-06-05 2:51:20 pm

AlphaCentauri
Senior Member
Registered: 2008-12-23
Posts: 814
Website

Re: LED message notifier checks twitter, pidgin, email

m.klinge wrote:

so that you can see it when the computer is on but the lid is closed

exactly thats the intention - being able to see new mails arrive even with lid closed. I'd go for something positioned at the edge. Or maybe I'll use my bottom LEDs for this (they reflect the light indirectly, so the eee 'almost' glows from below..) Basically you can place the LED wherever you'd like it to be..
The LED itself will fit into the screen area definitely. The LED controller and RS232/USB adapter not sure. I would place them inside, below the MoBo, and have some thin stranded wire connect to the LED, that's doable.

gtisingh wrote:

Will we be able to change what we want to be notified about ?

Sure. Only twitter cannot be turned off without changing the code, its part of the script, the basic application so to speak. Instant messaging via Pidgin and email/RSS feeds are checked not by the script itself but by pidgin or thunderbird, respectively.
So yes, if you don't start thunderbird you won't be notified about email and if you don't have pidgin running you get no updates on ICQ- or other instant messages.

OTOH if you don't have a twitter account the script polls the public timeline (all twitter posts from everyone registered with their service, worlwide!) and displays that. You can be SURE you'll get "new tweet" notifications every minute then! In other words, twitter cannot be turned off. You can register with twitter and leave your homepage there blank if you don't like to be informed about twitter.(?)

For different email accounts, you can configure thunderbird to forward only certain account's incoming/new mail to your local inbox, same goes for RSS feeds. If you're behind a restrictive proxy with only http://port80 enabled you could also have thunderbird read an atom feed of your gmail account's inbox every few minutes and forward that to your local inbox. This way your local inbox will only receive the new mails you get (and your RSS feed updates maybe). If you change the filter/forwarding settings you can adjust which account's email to notify about...

pff that was longg-winded. sorry

For pidgin, you can edit the script and insert your own buddie's ICQ/AIM numbers (and maybe a certain "from:" domain if you desire) and then your buddies will be shown as green notification light and the domain member's messages will cause  a red(or blue?) light notifiication.

Lastly, you can configure it to check different twitter timelines on a regular basis (if you like to do that).

Hope I could clear at least some unclearliness.

Last edited by AlphaCentauri (2009-06-05 5:36:30 pm)


eeePC 1000H Mods: stripped down again to: 3G HSDPA / R-SMA antenna connector / flashlight LED (back to basics!)
O/S: removed all in favor of Windows 7 Ultimate (RTM + language pack)
check out my Blog!

Offline

 

#6 2009-06-05 2:53:53 pm

AlphaCentauri
Senior Member
Registered: 2008-12-23
Posts: 814
Website

Re: LED message notifier checks twitter, pidgin, email

RandyLude92: yes in the meantime I've hardwired the thing and the batteries are gone. Also added a much nicer light diffusor made from sand-brushed glass (salvaged from an old 12V halogen desk lamp). Picture to follow ASAI have rechaged my camera's battery...


eeePC 1000H Mods: stripped down again to: 3G HSDPA / R-SMA antenna connector / flashlight LED (back to basics!)
O/S: removed all in favor of Windows 7 Ultimate (RTM + language pack)
check out my Blog!

Offline

 

#7 2009-06-05 3:58:23 pm

AlphaCentauri
Senior Member
Registered: 2008-12-23
Posts: 814
Website

Re: LED message notifier checks twitter, pidgin, email

http://yfrog.com/b8img2225oj
The new external version with milky glass light diffuser, today's fashion color: green!  big_smile

http://yfrog.com/20img2232j
closeup (hardware part IS simple as you can see here)

http://yfrog.com/0dimg2234xj
doesn't it look nice when a message arrives?


eeePC 1000H Mods: stripped down again to: 3G HSDPA / R-SMA antenna connector / flashlight LED (back to basics!)
O/S: removed all in favor of Windows 7 Ultimate (RTM + language pack)
check out my Blog!

Offline

 

#8 2009-06-05 3:59:53 pm

AlphaCentauri
Senior Member
Registered: 2008-12-23
Posts: 814
Website

Re: LED message notifier checks twitter, pidgin, email

Hey! What am I doin wrong? (img)url.of.picture(/img)


eeePC 1000H Mods: stripped down again to: 3G HSDPA / R-SMA antenna connector / flashlight LED (back to basics!)
O/S: removed all in favor of Windows 7 Ultimate (RTM + language pack)
check out my Blog!

Offline

 

#9 2009-06-05 4:27:29 pm

Engineer
Senior Member
From: Germany
Registered: 2007-10-18
Posts: 817

Re: LED message notifier checks twitter, pidgin, email

AlphaCentauri, you could do without the USB_Serial converter and connect an
IO expander to the SMBus on the eeePCs mainboard.

That has enough pins for your LEDs, and the software already exists, see:
http://forum.eeeuser.com/viewtopic.php?id=3735


The three most dangerous things in the world are a programmer with a soldering iron,
a hardware type with a program patch and a user with an idea    --computer saying / R. Cook

Offline

 

#10 2009-06-05 4:41:09 pm

RandyLude92
EEEmazing User
Registered: 2008-02-26
Posts: 5107

Re: LED message notifier checks twitter, pidgin, email

not to speak out of turn or put words in the OPs mouth but i would think doing it via USB makes it more of a universal tool that would portable/applicable from one system to another with the supporting apps in tow. and this way it doesn't require "hard" modding.


"modding is for fun and learning, i've learned to have lots of fun"
Parts for sale!

Offline

 

#11 2009-06-05 5:00:16 pm

RandyLude92
EEEmazing User
Registered: 2008-02-26
Posts: 5107

Re: LED message notifier checks twitter, pidgin, email

AlphaCentauri wrote:

Hey! What am I doin wrong? (img)url.of.picture(/img)

it seems that the hosting service you've chosen doesn't like external linking unless it's with one of the "endorsed" forms they give you in the "share" option.

i played around with it a bit and got this:
http://img404.imageshack.us/img404/2742/img2225o.jpg


"modding is for fun and learning, i've learned to have lots of fun"
Parts for sale!

Offline

 

#12 2009-06-05 5:22:00 pm

AlphaCentauri
Senior Member
Registered: 2008-12-23
Posts: 814
Website

Re: LED message notifier checks twitter, pidgin, email

Hm, i'd love to tap into my eee's SMBus but since Asus doesn't like to see me overclocking things like mad, this dang smb lus is "hidden" on my system. Whatever this means actually, at least all software that relies on tweaking i2c or smbus parameters has so far failed on my eee.

And RandyLude is right USB is just so versatile, and makes it a *real* device not just an add-on hack to an existing electronic machinery. Well, erhm -sorta at least.

ok it is an add-on hack.

@RandyL92 could you maybe do that with the other two pictures too, pleeeese? wink

Last edited by AlphaCentauri (2009-06-05 5:23:41 pm)


eeePC 1000H Mods: stripped down again to: 3G HSDPA / R-SMA antenna connector / flashlight LED (back to basics!)
O/S: removed all in favor of Windows 7 Ultimate (RTM + language pack)
check out my Blog!

Offline

 

#13 2009-06-05 5:31:45 pm

RandyLude92
EEEmazing User
Registered: 2008-02-26
Posts: 5107

Re: LED message notifier checks twitter, pidgin, email

lol sure... give me a sec and i'll track em' down.


"modding is for fun and learning, i've learned to have lots of fun"
Parts for sale!

Offline

 

#14 2009-06-05 5:33:32 pm

RandyLude92
EEEmazing User
Registered: 2008-02-26
Posts: 5107

Re: LED message notifier checks twitter, pidgin, email

http://img72.imageshack.us/img72/2209/img2232.jpg
http://img13.imageshack.us/img13/1919/img2234x.jpg


"modding is for fun and learning, i've learned to have lots of fun"
Parts for sale!

Offline

 

#15 2009-06-05 5:39:36 pm

AlphaCentauri
Senior Member
Registered: 2008-12-23
Posts: 814
Website

Re: LED message notifier checks twitter, pidgin, email

Big Thx!


eeePC 1000H Mods: stripped down again to: 3G HSDPA / R-SMA antenna connector / flashlight LED (back to basics!)
O/S: removed all in favor of Windows 7 Ultimate (RTM + language pack)
check out my Blog!

Offline

 

#16 2009-06-05 5:40:29 pm

m.klinge
Senior Member
Registered: 2008-06-03
Posts: 185

Re: LED message notifier checks twitter, pidgin, email

AlphaCentauri wrote:

m.klinge wrote:

so that you can see it when the computer is on but the lid is closed

exactly thats the intention - being able to see new mails arrive even with lid closed. I'd go for something positioned at the edge. Or maybe I'll use my bottom LEDs for this (they reflect the light indirectly, so the eee 'almost' glows from below..) Basically you can place the LED wherever you'd like it to be..
The LED itself will fit into the screen area definitely. The LED controller and RS232/USB adapter not sure. I would place them inside, below the MoBo, and have some thin stranded wire connect to the LED, that's doable.

Well keep us posted smile

I like the pictures - though i think its kinda too flashe for my taste with all the white going on big_smile

//M

Offline

 

#17 2009-06-05 5:52:48 pm

Engineer
Senior Member
From: Germany
Registered: 2007-10-18
Posts: 817

Re: LED message notifier checks twitter, pidgin, email

AlphaCentauri wrote:

Hm, i'd love to tap into my eee's SMBus but since Asus doesn't like to see me overclocking things like mad, this dang smb lus is "hidden" on my system. Whatever this means actually, at least all software that relies on tweaking i2c or smbus parameters has so far failed on my eee.

And RandyLude is right USB is just so versatile, and makes it a *real* device not just an add-on hack to an existing electronic machinery. Well, erhm -sorta at least.

ok it is an add-on hack.

Of course, with USB connection, you can connect it anywhere. But the SMBus variant could be fitted inside the EEE.

Tristand got access to the SMBus using the original Xandros OS:

tristand wrote:

. . .
I compiled the PCF8574 module from the ASUS source tree and installed it. I needed these modules:

Code:

modprobe i2c-dev
modprobe i2c_i801
modprobe pcf8574

Now, to control the LED I wrote this script:

/usr/bin/kblighttoggle:

Code:

#!/bin/sh
LIGHTSTATE=`cat /sys/bus/i2c/drivers/pcf8574/0-0027/read`

if [ $LIGHTSTATE = "255" ]; then
echo 239 > /sys/bus/i2c/drivers/pcf8574/0-0027/write
else
echo 255 > /sys/bus/i2c/drivers/pcf8574/0-0027/write
fi

Each time it is run it toggles the state of the LED.

I have bound it the the key combination Ctrl-Alt-L by adding this to my ~/.icewm/keys file:

Code:

key "Alt+Ctrl+l"                sudo kblighttoggle

So now when I hit ctrl-alt-L the light comes on or goes off.

Done!


The three most dangerous things in the world are a programmer with a soldering iron,
a hardware type with a program patch and a user with an idea    --computer saying / R. Cook

Offline

 

#18 2009-06-05 5:53:26 pm

RandyLude92
EEEmazing User
Registered: 2008-02-26
Posts: 5107

Re: LED message notifier checks twitter, pidgin, email

AlphaCentauri wrote:

Big Thx!

when you view the pic after you upload it just click the "full size" link and copy the URL from the address bar.
that should do the trick from now on wink


"modding is for fun and learning, i've learned to have lots of fun"
Parts for sale!

Offline

 

#19 2009-06-05 5:56:20 pm

AlphaCentauri
Senior Member
Registered: 2008-12-23
Posts: 814
Website

Re: LED message notifier checks twitter, pidgin, email

I like the pictures - though i think its kinda too flashe for my taste with all the white going on big_smile

thats just the camera. In real life you can easily look directly at it no prob. With the first prototype shown in my 1st post above, this was different, now with the milky glass its ok. (I also stuffed some opaque plastic foil into the milky glass tube, around the LED. Gives nice effect and makes for evener(?) light distribution)

With bare LED it was really bad!


eeePC 1000H Mods: stripped down again to: 3G HSDPA / R-SMA antenna connector / flashlight LED (back to basics!)
O/S: removed all in favor of Windows 7 Ultimate (RTM + language pack)
check out my Blog!

Offline

 

#20 2009-06-05 6:04:22 pm

AlphaCentauri
Senior Member
Registered: 2008-12-23
Posts: 814
Website

Re: LED message notifier checks twitter, pidgin, email

module i2c_801 cannot be loaded at boot time on my eeepc. Its something encountered with only part of all eeepc1000H AFAIK. I've been unlucky and got such a model. I must admit that the 1line instruction for sending via i2c is shorter than the three lines I need for sending via serial. But with python three lines more or less don't improve your situation..  wink

Still, nice code. Thanks, I'll keep it in memory (or bookmarked?) and might well use it for smth else someday!

@RandyLude: Again big thankx!! In the meantime I figured I could copy the "url for forums(1)" and then remove the ".th." part from the filename manually. smile


Doesn't anyone want to write some nice gtk2.0 additions for the  script, by any chance? wink


eeePC 1000H Mods: stripped down again to: 3G HSDPA / R-SMA antenna connector / flashlight LED (back to basics!)
O/S: removed all in favor of Windows 7 Ultimate (RTM + language pack)
check out my Blog!

Offline

 

#21 2009-06-05 6:29:11 pm

AlphaCentauri
Senior Member
Registered: 2008-12-23
Posts: 814
Website

Re: LED message notifier checks twitter, pidgin, email

Oh wat a horror - I've just found this...
http://www.twitpocalypse.com/

to put it short, the overall number of tweets worlwide nears a critical buffer overflow value, specifically the value "status_id" (handled and given back by the twitter API) was normally started as integer until now but will need unsingned int. when the threshold is overshoot, since then the "status_id" of each new tweet will have a negative value.

Looks like it will maybe soon be time for releasing my first bug fix in life.  smile


eeePC 1000H Mods: stripped down again to: 3G HSDPA / R-SMA antenna connector / flashlight LED (back to basics!)
O/S: removed all in favor of Windows 7 Ultimate (RTM + language pack)
check out my Blog!

Offline

 

#22 2009-06-05 9:43:35 pm

j.pocalypse
Senior Member
From: San Leandro, CA
Registered: 2008-07-13
Posts: 917

Re: LED message notifier checks twitter, pidgin, email

All very cool... I'd love to see someone make a duplicate of the LEDs on the right (power, battery, HDD, WiFi), but on the left INSIDE the Eee.

I dig cemetery.


BLK - 701_4G [ Jolicloud 1.0 - 2GB RAM ] // SLVR - 1201N [ 4GB RAM & SSD coming.. eventually ]

Offline

 

#23 2009-06-07 8:19:50 am

AlphaCentauri
Senior Member
Registered: 2008-12-23
Posts: 814
Website

Re: LED message notifier checks twitter, pidgin, email

@j.pocalypse: INSIDE?? that wouldn't even be one tenth as useful as a LED message notifier, imo.... you can't see it except you open up your eee!  smile

I'm a bit tired since II spent the night with coding. hmm

But I managed to stuff all relevant user settings into a "config.conf" file, also ventured into python-compiling - both for ease of installation. Further changed Pidgin message identifier routine, now the Buddy list is contained in the .conf file and can probably be extended indefinitely now (in case someone needs that). Lastly, the type of status_id variable was changed to unsigned to prevent buffer overflow problems with twitter in the next days, and some general code cleanup was done.

New version 1.1 download here:
http://sourceforge.net/projects/dbirdnotifier/

By the way, I'd be happy if someone could confirm that this works on his machine too. Beta-tester anyone?

I'll get some sleep now.

Last edited by AlphaCentauri (2009-06-07 8:21:32 am)


eeePC 1000H Mods: stripped down again to: 3G HSDPA / R-SMA antenna connector / flashlight LED (back to basics!)
O/S: removed all in favor of Windows 7 Ultimate (RTM + language pack)
check out my Blog!

Offline

 

#24 2009-06-07 12:09:09 pm

j.pocalypse
Senior Member
From: San Leandro, CA
Registered: 2008-07-13
Posts: 917

Re: LED message notifier checks twitter, pidgin, email

AlphaCentauri wrote:

@j.pocalypse: INSIDE?? that wouldn't even be one tenth as useful as a LED message notifier, imo....

Sorry. On my 701, where the LEDs are, is on a little bevel, and they are still visible when the screen is closed. I didn't know that Asus changed this small styling que with other models.


BLK - 701_4G [ Jolicloud 1.0 - 2GB RAM ] // SLVR - 1201N [ 4GB RAM & SSD coming.. eventually ]

Offline

 

#25 2009-06-07 12:46:05 pm

AlphaCentauri
Senior Member
Registered: 2008-12-23
Posts: 814
Website

Re: LED message notifier checks twitter, pidgin, email

Hm, I'd still say that outside is the better choice for visual interfacing devices like signal lamps/leds. Or for anything since I'm not very often inside my eee....
wink big_smile

btw on mine (eee) the leds are on a 45° "flattened corner" and so they're visible from above and from the front. The notifier is more for when you yre doing things across the room and still want to be up to date about your latest incoming messages. wink

BTW 2:  YOu don't wanna beta-test by any chance?


eeePC 1000H Mods: stripped down again to: 3G HSDPA / R-SMA antenna connector / flashlight LED (back to basics!)
O/S: removed all in favor of Windows 7 Ultimate (RTM + language pack)
check out my Blog!

Offline

 

Board footer

Powered by PunBB 1.2.15
© Copyright 2002–2005 Rickard Andersson