Power to the People of Iran



Hello...
..and welcome to eeeGadgets! This blog is dedicated to everything associated with the wide (and interesting) field of mobile computing. The main focus is on presenting all the various hardware modifications I made to my eeePC, but I will also give short reviews of other interesting Mobile Internet Devices I come across. Further I want to share some tips and tricks I found out to be helpful in getting the most performance out of Ubuntu linux...
On the right side under "LABELS" you can navigate between various assorted article categories. Also, on the very bottom of the site you will find some useful weblinks, as well as a small broadband connection speed test (which can be very useful sometimes).
If you want to, you can subscribe to my RSS news feed too, to be always up to date about my latest articles - simply click on "subscribe now!" in the little box on the right side. Alternatively, you can subscribe to my simple email newsletter by clicking here.
For questions, feedback, suggestions, criticism and everything else, don't hesitate to contact me:
emailfuerdennis@web.de

....have fun reading!

If you like my site and want to support me , you can always donate to my personal "coffee funds" using the PayPal "donate" button further down on the right! :)
Dennis

Wednesday, June 3, 2009

dBird-notifier checks for twitter, ICQ, email

I refined the software part of my last project a bit. Now the thing consists of one main python script calling various subprocedures as separate threads, it has a nice colorful "parrot" tray icon (for closing the "application"), it listens on the dBus interface for alerts from various other software and shows three different types of incoming messages with

a) respective system alerts (indicating message content and type),
b) with a pop-up tray icon showing type of message by icon, and
c) with some RGB LED wired to a RS232toUSB-adapter via a small picaxe08m microcontroller, which lights up in the corresponding color (twitter is turquoise, pidgin is purple, email is red).

When the pop-up tray icon is clicked the LED is switched off, receiving numerous messages at the same time will cause several pop-up tray icons to appear.

It took me a while to get familiar with the python-twitter API interface, especially since I'm totally new to writing python code at all! Therefore the code is most definitely not the smartest, experienced python programmers feel free to improve this (you can also contact me to join the sourceforge project as a developer, help is always welcome!).

But at least it works. Without errors and with all features I wanted it to have.
And I've also learned to like twitter during writing the code..

Everyone interested can download my "dBird-notifier" python scripts v1.0 (packed as a .tar.gz archive including installation instructions) from here:
http://sourceforge.net/projects/dbirdnotifier/

some screenshots will maybe follow soon.

UPDATE
i just figured out that you can assign each device a unique symbolic link in /dev by writing a custom "udev" rule for it. I wrote a udev rule for the RS232 converter I'm using that causes the LED notifier device to be always visible as "/dev/LEDnotifer" when plugged in. I have edited all my ".py" scripts to point to this device node for ease and consistency (before the notifier device was sometimes /dev/ttyUSB0 and sometimes /dev/ttyUSB3 which was quite annoying since required me to edit three files by hand each time the system booted. Now thats not necessary anymore).
Here's my udev rule (store as "/etc/udev/rules.d/70-persistent-aserial.rules"):

BUS=="usb", KERNEL=="ttyUSB?", SYSFS{idProduct}=="2303", SYSFS{idVendor}=="067b", SYMLINK+="LEDnotifier"
(yep it's just one single line)
If you are using a different serial->USB adapter cable you might need to adjust the {idProduct} and {idVendor} tags with the values shown by "lsusb" for your device, i.e. open a terminal, type "lsusb" with and without adapter cable inserted, then indentify the product and vendor id of your adapter, then place these in your udev rule. Restart the udev service by running "sudo /etc/init.d/udev reload" inside a terminal.
Then, finally, edit your ".py" script files to point to the new "/dev/LEDnotifier" symlink, and start "BirdNotify_TrayVersion.py" as usual. Voilá.

The second prototype in action. Note system notification alert on upper right of screen,
as well as pop-up "twitter" tray icon (here, clicking this icon would
turn off the LED again for example)
The batteries will be replaced with direct wiring to
the USB power lines at a later point in time!


No comments:


Broadband Connection Test:

Just click on "Speedtest starten" to evaluate your actual downlink in MBit/sec (takes 10 seconds approx.)


(c) dsl-speed-messung.de - DSL Speed Test