Video based on "Flesh paths" by Alessandro Amaducci
Remixed by Steffest
Mute Audio - Pause video - Clear screen
Steffest Digitale Pulptuur
Je bekijkt alle berichten met de tag: "Programming".
Bekijk terug alle berichten.

a picture called telenetdigicorderAPI.jpg (click to enlarge)

A few months ago, Telenet finally made the jump and opened up their digicorder devices to be controlled through their TV web portal TV.be.

Nice!!!
Finally you could schedule your TV recordings from anywhere using a web browser instead of a infrared remote and the dorky digicorder interface.

Controlling media devices through web interfaces happens to be one of my sweet spots so the first thing I did was firing up Firebug to see what kind of communication was going on between their various web applications.
They've done a really good job, as they created an internal API to talk to the digicorder.
Figuring out how the API works has the same attraction as seeing a crossword puzzle in a newspaper: it tickles your mind but at the same time it's not too hard and with some time and logic the puzzle is quickly solved.

So, let's get to work to create a more open API to control your TV recordings from any software package you want instead of only through the tv.be website.

First step: login
Telenet uses a single-sign-on system, providing a token that authorises you as "logged in" and that you can take with you to other sites.

It sends you on a redirect path towards multiple domains - telling each domain you have logged in.
The script just recreates that path and makes sure to collect and pass all cookies to the next step. (That's really easy in .net - just use the same cookiecontainer for each request)
After that you can use the Telenet remotePVR API from the script as an authenticated user.
One problem though: to schedule a new recording you need the eventID of the program you want to record.
That's where tv.be and some good old screenscraping comes in: a Channel listing for each day is requested on the tv.be website and the EventID codes get extracted and saved to a local cache (so we don't have to hammer the tv.be site more then we need to)
Technically that might be against Telenet's Terms of Use policy, but hey - we're all in favour of free and open data, aren't we?
That's it.
I created a more simple API as .net wrapper class with the following syntax

Dim tvbe as new tvbe
tvbe.login()
tvbe.logout()
tvbe.recordings()
tvbe.reminders()
tvbe.zenders()

In a webapp that translates to URLs as

/login
/logout
/boxes 'gets info on your digiboxes and digicorders
/recordings
'gets a list of your scheduled and completed recordings
/recordings/schedule/ID
' schedules a new recording, ID is an eventID provided by tv.be
/recordings/delete/ID
' deletes a recording, ID is an eventID provided by tvbe/recordings
/reminders/ 'gets a list of your scheduled reminders
/reminders/schedule/ID ' sets a new reminder, ID is an eventID provided by tv.be
/reminders/delete/ID
' deletes a reminder, ID is an eventID provided by tvbe/reminders
/zenders ' (short)list of available channels
/zenders/channelname ' program guide of the channel with name "channelname"
/zenders/channelname?date=dd-mm-yyyy ' program guide of the channel with name "channelname" of a given day 


The sourcecode can be found here.

Update:

After a (very friendly) request from Telenet I'm taking the sourcecode and the demo application offline.
However I do hope I can contribute following their open invitation to help unlock their digital services towards a more open communication (API?) in general and mobile devices in particular.
To be continued ...


As a demo I created a little frontend for the API for use on mobile devices.

http://tv.stef.be it is.

You can use the TV guide without login in, but if you want to manage your recorders you have to create an account at tv.be (and be a Telenet Digital TV customer of course) 
It's a bit of a trust-issue to enter your telenet credentials in a "rogue" app like this, but i can assure you it's safe: your credentials are not stored anywhere and are only used to pass through the Telenet login sequence.
If you're still hesitating to enter your login, you can grab the source and try it on your own machine.

Here are some screenshots.
image image image foto

 


The API still has some holes, mostly because not all tv.be content is easily available.
Most important i would love a simple system to convert EventID's to program names and vica versa, maybe if i ask the tv.be people nicely? :-)
Also it's not really suited if you have more then one digicorder.
A search function would be nice ... maybe I'll implement that.

Of course it works fine as long as Telenet doesn't change their internal API, which is always a risk, but well,  then the cat and mouse game can continue.
I was planning to build an Android app for it but actually http://tv.stef.be works very well on mobile devices and since you still would need a data connection to talk to your digicorder, why would you create a native app when a webapp will do?

Happy recording!

"Usenet indexer Newzbin has lost its MPA court case."
Maybe that doesn't ring a bell but anyone who's been digging into to "downloading stuff from the net" will soon find out that Usenet is the place where it's at: your one stop shop for all the movies, TV shows, music and apps you can chew.
The only problem: it's too much and as is the case with the torrent trackers - Usenet is also flooded with crap: virus infested apps, password protected files, DRM loaded pay-movies,... 
Not very easy to find the good stuff.

That's where Newzbin came in: their system of user-generated and verified reports made it a no-brainer to find clean and high quality releases - nicely packaged in so called nzb files,which are a list of all the binary chunks you need to download from a Usenet server in order to rebuild the files you want.
AND they have a very nice API for developers like me so they can script and automate their download flow.
Not anymore: starting from March 31, no new reports are being added. The service is not broken, but without updates it's pretty darn useless.
So there i was: sitting in my bathtub, sipping my red wine and hitting the play button, only to find the latest episode of Lost wasn't there.
No fun!
Especially since I was not in the position to jump up, run to the keyboard and quickly find another source.

As these things go, it's a classic case of  "the King is dead, long live the King".
NZB sites are not hard to find and I quickly updated my scripts to use NZBMAtrix as an alternate source.

One of those scripts is a mobile optimised search tool to quickly find a TV-show (or whatever it is you're looking for) and tell your homePC to download it.
The idea is that you use your mobile phone to initiate a download, your homePC downloads the file using a fast internet connection and streams it back to your mobile phone. Very easy and very fast: e.g. downloading a TV episode takes a minute or 2 after which you can use Relocally - or something like Air Video - to stream it to your device.

The script is called Usenet-o-matic.  It will be part of Relocally, but if you want you can use it yourself.

It's available  at http://usenetomatic.codeplex.com.
In this first release it supports Newzbin and NZBmatrix as index sources and SABnzbd as download server.

This means that in order to get it working, you need a Newzbin premium account or a NZBmatrix VIP account and a SABnzbd installation. (and a decent Usenet provider obviously - like Giganews)
I admit: those are a lot of things to set up (and are not free) so probably the target group of a script like this is pretty narrow, but once you get everything inline, download Walhalla is yours :-)

Sorry, no live demo but here are some screenshots: (Yeah yeah, I know: it looks like crap, I left the design part for you to add :-) )

image  image  imageimage

Het idee is grandioos gepikt van deze klok, maar toen ik hem zag was het liefde op het eerste zicht.
Dat wordt een mooi Arduino projectje om er zelf een in het Nederlands te maken in supergroot formaat.
Deze instructable zit er veel te complex uit - dat moet toch simpeler kunnen, uiteindelijk moet je maar 22 lichtgroepen kunnen aansturen.
Om de logica al wat uit te schrijven maakte ik snel deze flash-versie ('t is dus geen afbeelding - hij werkt echt)

Mocht er iemand geïnteresseerd zijn: hier is het .fla bronbestand.

Mooi! Nu alleen de uitvoering nog :-)

a picture called spotify-logo300x300.jpg (click to enlarge)

Over these recent weeks I have been busy lining up my media collection and media "consumption" into 1 consistent experience. Because I'm getting lazier every day I wanted to control everything from a single point that's always accessible (the web) and stream the same media collection to every web-connected device I have.
I thought I had everything nailed down until a new kid on the block arrived last week (new for me anyway)
Spotify!
Love at first sight - finally a service like Musicmatch, which was sadly choked-to-death by Yahoo, but faster, better looking, more intuitive and most important: more fun.
Only one thing missing: NO WEB-INTERFACE !
I'm going to say it one more time: "to all developers: Please build a TCP/IP interface into every piece of software or hardware you build! - It doesn't have to be http or spit out html, just let it connect to some port to listen for commands.
The internet of things is already here, so don't miss it and let your appliance connect to it!"

That being said, Tickled by this tweet I decided to build a little Spotify wrapper class so that other applications - mainly my webserver - can interact with it - aahhh ... back to laziness, now i can also control Spotify with my mobile phone from the couch.

The class can be found here. it's all win32 API calls so it's easily portable to whatever language your like.
it's completely free and comes with no warranties.
it's tested with Spotify version 0.3.18 - as this is completely unofficial it might break with newer spotify versions

Usage:

Dim Spotify As New Spotify()

Spotify.PlayPause()
Spotify.PlayPrev()
Spotify.PlayNext()
Spotify.Mute()
Spotify.VolumeUp()
Spotify.VolumeDown()
Spotify.Nowplaying() (Gets the name of the current playing track)
Spotify.Search("Artist",False) (Searches for "Artist")
Spotify.Search("Artist",True) (Searches for "Artist" and starts playing the results)

The Search_and_play command is my favourite - works like a charm.
I really hope Spotify can survive. It's certainly worth €9.99/month to me.

a picture called winamplogo.jpg (click to enlarge)

I'm releasing a little tool/code snippet today for those DIY-people like me that like to tinker with their custom made ultimate personalised home media experience. (that's CUPHoME !)
One of the key elements is easy access to your music collection.
If you're serious about managing your music collection - and if you're using windows, you really have only 2 options: use Mediamonkey, or use Winamp.
iTunes on Windows really is a slow piece of garbage and Windows Media Player is a bit lacking in management features.
This "Battle of the media players" is over a year old but still very valid and spot on.
Mediamonkey uses SQlite as database so it's easy to interface with, but Winamp uses some propriety database format called NDE (Nullsoft Database Engine)
Although the format is somewhat documented, I was surprised i found very little code samples to connect to the winamp database from an external program. the documentation also seems a bit outdated as the internal binary structure seems to have evolved a bit.
Delphi to the rescue - writing a decoder for some binary format is actually a very satisfying pastime :-)
After a few hours I had a program that reads out the entire database and dumps it into a grid control, optionally exporting it to excel.
The source is here - should be easy to port to other languages.
Sample program is here (also includes source)

It's tested with the latest Winamp version as of writing: version 5.56.
It has a good chance of staying up to date as interfacing with Winamp seems to be a recurring theme over the years for my own projects.
Anyway - it's free to use in any way you want and comes with absolutely NO support :-)
Happy coding!

a picture called mobipodcatcher.jpg (click to enlarge)

As the tv-season is on hold during the summer months, I had to switch to another type of "media" to consume during longish train/bus rides, so I picked up some podcasts again I like to listen to.
These days mobile devices are also more and more "connected" to the web and downloading music and/or podcasts to your mobile device seems so tiresomely old ... so: streaming audio for the win !
There are several really good streaming audio clients on the various mobile platforms, but heck, I found it was really frustrating to get the updates from your favourite podcast and get your device to play the darn thing.
Most annoying, especially as it was not a technical issue but an "ease of use" and "interface" issue.
Conduits Pocketplayer does a semi-decent job, but that thing is bloated and painfully slow to load as it tries to rescan your local music library AND your feeds at every move you make. (besides that, it's not free)

As always, the "If you want it done better, do it yourself!" mantra made me tinker to create a very simple and fast way to reach my favourite podcasts. no need to reinvent the weel and create a player; a small web application would do to fetch the latest mp3 url's and feed it to a player.

tadaaa!:  http://m.stef.be/pod (works in every browser but it's optimised for your mobile device)

Keeping track of various RSS feeds yourself in any application is a bit a pain in the behind: you have to scan, validate and cache each feed at regular intervals which can quickly cause some major strain on your server.
This time i took the smarter route and created a connection to a system that does RSS aggregation better then anyone else in the world: Google Reader.

in Google Reader I label the podcasts i want with a tag "mobilepodcast" , then my podcatcher script simply fetches the 20 latest items of all feeds with that label.
I'll post the code for the Google Reader connection later, it's really an easy way to get a feed and you still get to process them the way you want.

Depending on your mobile device and the software your prefer, the application presents the audio files as a PLS playlist, a ASX playlist or a direct link to the mp3 file.
You can modify this by clicking the "settings" button to choose your preference.
On my mobile, I've setup Coreplayer to open .pls files automatically. It's hands down the best media player for windows mobile.

Future improvements might be to connect this with my mp3 library at home, allowing for streaming audio from the home pc, or with this collection, but we'll see about that ...
In the mean time: http://m.stef.be/pod it is.

 

a picture called imate_momento.jpg (click to enlarge)

Last week I bought one of those digital I-mate Momento Pictures frames from iBood.
As with most of the stuff you find on iBood, this item is part of some left-over stock because i-mate has decided to discontinue their picture frames service, but for a price of 50 euros, what can go wrong, especially as the frame sports a cool feature like Wifi!
Yep, it claims to load your images right of your local network or from the web.

As some reviews al ready prove to be very negative, I didn't expect much but in the end it's quite alright except for one mayor flaw: the thing doesn't load standard RSS feeds but instead relies on their propriety Momentum Live service to feed the device online content.
I could have lived with that except .... that service is discontinued :-)
Bummer, there goes my intention of having a cheap Picture frame for my mum to automatically show the latest updates pics of the kids ...

There are some ways to get the thing to connect to the web, but it involves tinkering with DNS-servers and mimicking the Momento live service with your own scripts but that's way too much trouble to be useful.

Still, I was intrigued and when that happens I know myself good enough to just pursue the possibilities or else it will be haunting my head for some weeks. Better to just get rid of it :-)

I decided I wanted a picture frame that not only loads pictures from an arbitrary RSS feed but also could show other "sidebar gadget" like content like twitter updates, resource monitors, textual RSS items ...
The momento frame does support Windows Sideshow, which means you can push little info snippets from your (windows) PC to the device to be displayed. This is very easy to setup and is also very easy to develop for, but it's also very limited as you have no control of the layout, the rate of updates or the amount of text that gets displayed.

In fact, the only thing the device does well is displaying jpg images - it IS a picture frame after all !
Luckily, loading pictures over wifi from your network works really well and is very easy to setup.
It works with the "shared media" function of Windows Media player - actually a pretty cool feature.
I hit another snag when Windows Media Player turned out to be notoriously flaky to update its media library when new pictures are being added so new items sometimes took several hours to show up ; so much for fast twitter updates :-)
After some experiments I found the solution: the Momento frame does store some pictures in its cache, but when a network connection is present it always fetches a fresh copy from your pc. Thank god for that as it means that when you update or replace an image keeping the same filename, the new picture get instantly loaded on the frame (the next time the playlist reaches that image)

Great! Now if I had a program that would update the same set of pictures with new stuff coming from my picture library AND the web, I was all set.
I didn't want to spend too much time with rendering textual items to images, after all, that's what HTML is for no?
If a screenshot of a webpage could be feed to the device, that would allow everything we need. 
Witness the birth of a new project: the "PictureFrame-o-matic" !

After some fiddling in Visual Studio I now have a program that

  • Can read standard RSS feeds
  • Takes any image enclosure it finds in the RSS, resamples it to 800x600 and stores it a folder, numbered with the name of the feed.
  • Can retrieve a screenshot of a  webpage and stores it as a jpg
  • Can combine 2 images (a webpage and a picture) with some overlay options to render some (web)content on top of the image.

the images are not added to the folder, but the existing images simply get replaced with new ones
the Momento device points to that folder and essentially displays the same playlist over and over again, only with updated pictures.

It works really well !
The layout is completely open as it is just HTML and/or flash content being saved as an image, the content is completely customisable as you can take any webpage or RSS feed as your source (e.g. news items or  Poetry lines, ...) and the rate of updates is instantly.

I'll leave it be for now, but it's certainly a project I want to continue some day.
There still are some drawbacks:

  • Webpages that require a login don't work (twitter e.g. so I had to create a custom page that shows my tweets from the twitter API)
  • Updates only work when your PC is on and the PictureFrame-o-matic program is running.
    The momento does have a good fallback system: if the PC is off or otherwise not reachable, it displays the last 50 pictures from it's cache.
  • it's a bit resource hungry for the hosting PC
  • It would be cool to integrate the existing windows sidebar gadgets but I have no idea (yet) how to accomplish that. (apart from taking a screenshot of the desktop and cropping it around the gadget, but that's lame)

Thing to do in the next future

  • create some dedicated webpages to be displayed on the device
  • create a website to configure each picture frame, setting what content should be displayed (which would allow you to configure the picture frame using your phone) sounds a lot like the interface i did for Tweetshirt.
  • post some screenshots
  • clean up the source code and post it here.
  • Maybe demo it on some barcamp or something (after all - the same engine could be used to feed the tweetshirt)

It's still not a good solution for my mum (as a PC has to be running all the time) but it's a nice gadget and I think this setup really gives a lame half-ass picture frame as the i-mate Momento a huge makeover.

On a technical side, Maybe this is the tipping point that I start liking .net and Visual Studio more then Delphi ... (never though I would say that)
It's just that pulling webcontent into your program, working with xml and juggling images around is soooooo much easier in .net then it is in Delphi. (sure, you can write .net in Delphi too, but let's not go there :-) )
Oh well ...

There, that's out of my system.
On to the next project.

a picture called inca09.jpg (click to enlarge)

WOW - that where some insane last few hours monday night, but big fun!
monday at midnight was the deadline for the Inca award

The INCA (Innovative and Creative Application) Award is an open competition for developers, encouraging them to build applications which are both “cool and useful”.

 

I first heard about it at barcamp and immediately thought "Hey! that's my cup of tea"!
After all, creating small(-ish) fun web apps is something I do to ease my mind :-)
The competition was open for about a month and you had to build a new application.

I entered 3 apps (yes THREE - that's a bit insane ...)

  • Inca - the game (that was just for fun - not very useful in a social way but VERY cool :-) )
  • Lopend Vuur: an application to quickly reach the relevant group of people in case of a logistic emergency with your kids (together with Beate from e-zen who came up with the idea)
  • Wamm: which was an idea of Pieter Theuns. it's a fun way of nailing an "agreement" between two people for small favours (like borrowing a book etc...)

More on that later, I'm especially fond of my solution to handle the SMS traffic of both Lopend Vuur and Wamm: instead of setting up an expensive external 2-way sms gateway, everything is running from a small GSM modem that's sitting at my home: just plug in a SIM card with heaps of cheap (or even free) SMS credits and you're good to go.
The only drawback is that the throughput is rather small - it can only send 1 SMS each 4 seconds or something - but for most projects that's more then fast enough.

I really liked the Inca contest. Not for the contest itself, but it really created some vibes in the Belgian developers "scene" with lot's of people building stuff just for the fun of it - or to show of - or to build something useful ... but mainly, because they WANTED so, not because a big paying customer (or a big nasty boss) wanted them to.
That "bottom up" approach is exactly the type of thinking Inca was designed to stimulate, and I think they succeeded very nicely: 35 applications where submitted and amongst them some real gems.

My favorites (apart from my own of course):

  • Twoddler (cool!)
  • Verdwaald vuil (looks absolutely gorgeous)
  • TVtweets (good idea)
  • Mijn lucht (brilliant in its simplicity)
  • Hupskadee (excels in about everything: both design and technical implementation is fabulous: /me jealous!  I think they are heading for the number one spot in the competition)

Again - it's notable how ubiquitous Twitter is ... 7 applications have something to do with twitter in some way, that's 20% !

Anyway ... I'm also glad it's over :-) (back to more sane working hours)
I'm hoping to meet some of the teams at the iMinds conference, 12th of may 

 


My first submission to the inca-award contest is about ready.
Old scool gameplay for the win!

Woo the jury and collect als much good ideas as you can.
Show your clever tricks by solving the puzzles.

Create your own levels using the online leveleditor, So if you ever wanted to create a game starring Bnox, Dries Buytaert, Robin Wauters, Bart Becks or Luc Tayart, here's your change.
More info at http://www.stef.be/projects/inca

At Barcamp Antwerp I was interviewed by the nice people of the IBBT in the light of their Inca Awards.
They asked me what my vision was on the future of application developement.
A though question but my 2 main points seemed to be

  1. Make sure you can inject your passion into your project and don't forget to have fun
  2. Keep it simple but don't forget the WOW-effect and build something people can relate to

Hmmm, only 10 days left for the Inca-awards deadline ...
Am I going to participate?
Why offcourse !!!
The first project is almost finished and should be released next monday.
Then on the the next one! :-)

Twikilist
I'm launching a new little service today: Twikilist
Yes, of course it is twitter enabled, what did you expect ? :-)

Twikilist was created as a simple, open and public registration list for your events.
Why?
i love the open and public nature of community-editable systems like wiki's or blogcomments, but i noticed some drawbacks, especially when a lot of people are trying to get their name on the list at the same time.

Enter Twikilist: create a list, select the features you want, spread the word and don't worry about the rest.
Registration lists are easy to embed in your wiki, website or blogpost, or you can use the Twikilist website itself.

Did I mention I love Twitter? And so does Twikilist
By simply checking a box you allow people to register - or unregister - for your event by sending a tweet, giving extra visibility to your event.
For example, if your event is called "TwikiLaunch", sending a tweet @twikilist #TwikiLaunch I'll be there will get on the list (and @twikilist #TwikiLaunch cancel will remove you)

Twikilist was made because Topanga was looking for a nice and simple tool to take the hassle out of public registration lists (And she bribed me with the most delicious dinner I have tasted in the last few years, so how could I refuse?)
It was wipped up in a few evenings so if you find any bugs, let me know.
A big thanks to cubus for doing the CSS design

It's first use is for the Blogborrel, 30th of May in Antwerp - Feel free to join !

Goesting om (onder andere) de R en de S van de wereldberoemde RSA encryptie eens in levende lijve te ontmoeten?
Rep je dan snel naar het Codebreakers and Enigma’s event, misschien dat ze je nog net binnen laten.
Het wordt georganiseerd door LSEC, een Vlaamse vzw die – gesteund door het IWT – de kennis van computerbeveiliging bij bedrijven wil verhogen.
RSA was zowat de doorbraak van de encryptie met een publieke sleutel

Bruce Schneier, Adi Shamir, John Manferdelli en Ron Rivest ... amai - straffe gasten!


My first (very simple) Arduino project combines Tikitag to create some magical lamps that change color depending on the objects you put in front of them. (and then the magic is gone as the trick is explained)
The sourcecode of all scripts and programming can be downloaded here.
tikitag

Another demo of the LED-matrix screen.
This time I created a program that monitors the audio levels of your PC and renders a graphic equaliser or a simple VU meter on the LED-panel.
Of course the scrolling text is also still present.


Much to my surprise the hardest part was how to capture the audio information of your PC.
After some digging I ended up with the most excellent BASS audio library of Un4seen.
It's very well documented and very easy to integrate in your own projects.
Luckily some examples where included how a graphic equaliser works because that stuff gets pretty theoretical very fast ! (and I had no clue)

The idea is to build a large - but low-res - custom LED wall (or hey ... a T-shirt you know) to replace the current 8x8 LED matrix. I have something wandering my mind of a panel, 60cm width and 240 cm high, with 8x16 or even 16x32 RGB led-boxes.
We'll see what resolution I can achieve and what will run out first: my mind, my time or my budget :-)

As a small exercise in my progress towards to ultimate tweetshirt, I created an interface for a 8x8 LED matrix display.
It doesn't do much at this moment: a program runs on the PC, fetches your latest tweet and controls the USB attached LEDs to show it as scrolling text.

The hardware is from Byvac and is cheap and easy, but also a bit limited.
The software is by me and uses their IASI-2 protocol
The scrolling is in fact much smoother then appears in the video.
Maybe I'll rework the hardware interface to control a 4x4x4 LED cube.
I ordered an Arduino today, which will allow much more low level processing and control for these kind of things
a 8x8 RGB display seems a nice project to start with, hoping to scale up to a 16x16 grid if things are going well.

Read more