Family, Work, Life

Pachube

January 9th, 2009 Ansi

Moin

Thanks to Oli (@EOLUS) I am now Beta Tester of Pachube. Cool Web 2.0 Service for Real Time Data exchange. People are streaming their measurement data with geographical informations in CSV or EEML XML format and can exchange their data.

I am now streaming my server temperature just for testing. Check out

http://www.pachube.com/api/1287.xml

Hope more will follow soon.

Its very easy to send your data from linux. For example with curl and csv:

/usr/bin/curl -X PUT -H “X-PachubeApiKey: abc123″ -d “`/bin/cat  /proc/acpi/thermal_zone/THRM/temperature | /usr/bin/cut -c 26-27`,” http://www.pachube.com/api/1287.csv

Important is your Pachube key in the header of the PUT request. And your feed ID. With this example I am catching the acpi CPU temp and send them to Pachube.

  • Share/Bookmark

RSS Torrent List from Onlinetvrecorder.com

January 5th, 2009 Ansi

Moin

Onlinetvrecorder disabled the good old RSS where I can get the list of my torrents of recorded movies. Unfortunatelly the new RSS link requires a session cookie what is not so easy with a bash script. Here is a small solution how to enable the automatic download of the RSS stream in order to download the feeds automatically.

First get an session cookie for www.onlinetvrecorder.com and store it into a local file.

wget \
    --save-cookies ~/.cookies/onlinetvrecorder \
    --keep-session-cookies \
    --post-data "email=name%40provider.com&pass=whatever&checkbox_remember=checkbox_remember&btn_login=Login&do=login" \
    -O - \
    http://www.onlinetvrecorder.com/index.php \
    > /dev/null

With this command you store the onlinetvrecorder session key to a file what you can use later on to download the RSS feed. “keep-session-cookies” are important because the key is only valid in the session. Replace “name”, “provider.com”  and “whatever” with your personal data. the “%40″ is url code for @.

wget -o /dev/null -O - --load-cookies ~/.cookies/onlinetvrecorder "http://www.onlinetvrecorder.com/rss/rss.php?hash=hashcode&userid=id"

Also replace “hashcode” and “id” with your personal data. You can see it in the browser when you check the RSS feed in your browser. Thats all. I think the uTorrent or other trackers can deal with a local file to parse. So just use a cronjob to store this file from time to time to local disc and let uTorrent do the rest. :-)

  • Share/Bookmark

Using usbprog to build a PowerSwitch with USB connection

January 2nd, 2009 Ansi

Moin

Today I found a lot of time working on my Atmel project. My colleague Angel pointed me to the AVR USB lib project (link). Really great and makes the use of USB as easy as the good old RS232. In fact I found it even easier to deal now with USB then RS232. And hey you get 5V for free. :-)

I started with the PowerSwitch project. Nice little USB interface to control 8 digital outputs (for switching on or off whatever you like). Its a nice Project to get started with the lib.

For programming the Atmel I used my USBProg programmer from Embedded Project. With the SPI its really great to plash the Atmel inside your circuit. Be aware that the Pins are a little bit different than in the description. In order to flash the code to my atmega8 I used avrdude:

avrdude -c avrispv2 -P usb -p  atmega8 -B8 -U flash:w:main.hex:i

The B8 parameter is very important otherwise the Atmega8 is not recognized. When you use the Atmega8 instead of the micro controller mentioned in the documentation you have to take care to use the right pins on the Atmel (it costs me 1 hour of searching for a wire error before I thought of that. :-) )

The changes for the ISP Connector are:

  • Pin 10 from the ISP connection is not connected as described to TXD instead its connected to PIN 8 and 22 as beeing the GND.
  • Pin 4,6 and 8 from the ISP connection are not connected at all

The changes on the Atmel itself are:

  • XTAL
    • 4->9
    • 5->10
  • GND
    • 10 ->8,22
  • PB0 and PB1
    • 12->14
    • 13->15

The fuses can me flashed with:

or checked with

sudo avrdude -c avrispv2 -P usb -p atmega8 -B8 -U hfuse:r:hfuse.hex:b
sudo avrdude -c avrispv2 -P usb -p atmega8 -B8 -U lfuse:r:lfuse.hex:b

After that the PowerSwitch worked great!

./powerSwitch on 0 2
  • Share/Bookmark

Visiting Wilhelma

January 1st, 2009 Ansi

Moin

Today we went to the beautiful zoo in Stuttgart called Wilhelma. Was great to see guys and specially the Aquariums. If you ever visit Stuttgart the Wilhelma is a must! Here are some impressions. More are on my flickr account.

01.01.2009

01.01.2009 01.01.2009 01.01.2009 01.01.2009

  • Share/Bookmark