Tagarchief: upnp

So, a quick little overview of my home audio setup 🙂

All UPnP/DLNA based…

Suggestions to improve, questions and comments are always welcome! 😎

Currently still not looking at Spotify actually… Most of the music I play are either podcasts or online sources (stubru 🙂 )


So, model 2013 revealed some more secrets!

using Newtonsoft.Json;
using ManagedUPnP;

Finding all upnp services on the current network

Services lsServices = Discovery.FindServices(null,timeout, 0,out lbCompleted,AddressFamilyFlags.IPvBoth);

And filter out the ones being Sony.

foreach (Service IndividuallsService in lsServices)
if (IndividuallsService.Description().Actions.ContainsKey("X_SendIRCC"))
sony bravia television found! :-)

Register to the device by calling webservice (json) twice! Once without basic auth and once with basic auth and password the number shown on the television itself! Catch the cookie, because it contains the authentication key! (With expiration date 00-00-0000).
Using the same library, you can easily serialize the cookiecontainer for later use.

string hostname = System.Windows.Forms.SystemInformation.ComputerName;
string jsontosend = "{\"id\":13,\"method\":\"actRegister\",\"version\":\"1.0\",\"params\":[{\"clientid\":\"" + hostname + ":11c43119-af3d-40e7-b1b2-743311375322c\",\"nickname\":\"" + hostname + " (Mendel's APP)\"},[{\"clientid\":\"" + hostname + ":11c43119-af3d-40e7-b1b2-743311375322c\",\"value\":\"yes\",\"nickname\":\"" + hostname + " (Mendel's APP)\",\"function\":\"WOL\"}]]}";

var httpWebRequest = (HttpWebRequest)WebRequest.Create("http://"+theipadres+"/sony/accessControl");
httpWebRequest.ContentType = "application/json";
httpWebRequest.Method = "POST";
httpWebRequest.AllowAutoRedirect = true;
httpWebRequest.CookieContainer = allcookies;

string authInfo = "" + ":" + pincode; #pincode shown on television
authInfo = Convert.ToBase64String(Encoding.Default.GetBytes(authInfo));
httpWebRequest.Headers["Authorization"] = "Basic " + authInfo;

And you can send any command using upnp. The list of commands can be found grabbing the response from the correct request (click here for known requests)

sonytv.InvokeAction("X_SendIRCC", "AAAAAQAAAAEAAABgAw==");

Or the special commands using json

string jsontosend = "{\"id\":78,\"method\":\"setTextForm\",\"version\":\"1.0\",\"params\":[\"\"]}";


I’m getting used of it.  😎

I’ve bought myself a Crucial M4 two weeks ago, and took the opportunity to install a fresh copy of windows 8 on it. Installation itself took about 15 minutes, and is running ever since.

So anyway, the screenshot above gives a rough look how I use Windows 8.

Microsoft tries to push metro, but I’m just not using it :mrgreen:

I reinstalled most of my regular desktop application: firefox, itunes, windows media player (with ccc), picasa, …
And I’ve changed almost all of the file associations to use these applications instead of their metro counter parts

Metro never shows up, only when I want to start a new application (and even then, my favourite apps are pinned to the taskbar 😀 )

So, after these couple of weeks, I surely can recommend W8 to all of you!

It has build in dlna/upnp (which actually works pretty good), a beautiful task manager, superb copy handler, and overall performance even got a little bit better then W7!

Just uninstall/replace the metro apps, and you’ll be fine 🙂


Only the most annoying things persist: run as admin is a disaster, getting to the start menu is a big issue (fixed it with this), shutting your computer down is a hassle, and searching in settings and apps should be the same action.
So you actually have to move your mouse a lot!

And I hate AMD for dropping support for my (not toooo old) 4870 graphics card… 👿