preload
Sep 25
Pronto Media Player Activity

Pronto Media Player Activity

I got some complaints lately, from “the people in the livingroom”…

For me, the excitement is in being able to control everything, but not in actually using it in the most convenient way… so sometimes I just don’t finish what I should, just because it’s not that exciting anymore – it works, right? So on to the next job! But this week I was remembered to the fact that I have to keep that WAF in mind a bit more. OK.. lets see how I can keep everybody happy again.

A new media player and a new A/V receiver make watching TV or listening to the radio a bit more complex, and I still hadn’t updated my Pronto to deal with those 2 new devices. So in June this year, when we started using the new A/V Receiver and media player, the number of remotes went up from 1 to 3 again; that’s a lot of new buttons to remember and too much for some; cause we’re all used to using just one remote for all A/V equipment – our Pronto TSU9600! A great remote, which can be totally customized to your own taste and needs. The complaints forced me to do something about the fact that the usefulness of the Pronto had dropped a lot (or slightly, in Onkyo terms…). Listening to the radio and using the media player were the 2 activities that had to be added to the Pronto and some other activities needed some adjustments.

I created a Prontoscript library some time ago which makes it very easy to communicate with my Domotica system. It’s based on XML-RPC and with some wrapper routines a single line of Prontoscript code ‘under a button’ can do just about anything I want: lights, A/V, viewing webcams, opening doors, whatever; as long as my Domotica system can do it, I can control it from my Pronto. As an example, here’s the script that will do all that’s necessary to listen to the radio (the last selected radio station, that is):

XMLRPC_SetDevice('NR709','POWERON;SEL_FM;VOL=26');

With just a single touch of a button on the touchscreen of the the Pronto, this script takes care of turning on the A/V receiver, selecting FM radio and setting the master volume to a preset value.

Was it hard to do this? No, it took me less than an hour.  But the result is, that now everybody considers this (home) automation project finished..

 

Tagged with:
Jan 02
Philips Pronto TSU9600

Philips Pronto TSU9600

Today i spent some time on my most expensive User Interface, the Philips Pronto TSU9600.

New firmware was released in December 2009 and also a new version of ProntoEdit Professional (PEP). The previous  major firmware update with a lot of new features was somewhere in July 2009, but due to lack of time i didn’t come very much further than updating the firm- and software and that was it. Now it was time to have a really good look at what this latest firmware and PEP version would bring. I must say, i’m impressed. It’s very clear that Philips has done a lot for making life of those who have to work with PEP a lot more pleasant :-)

For example the use of PS (ProntoScript) Libraries. Where my old configuration had a lot of the same code on each activity page, it can now be put into 1 PS Library and added to the configuration at system level; no more redundant code!

The HTTP library is also a big improvement. The code i had to interface with my Domotica system was based on a TCPSocket, but when i went through the HTTP Library, i knew i was only 1 step away from implementing XML-RPC on the Pronto. One thing i missed was a way to do a HTTP POST, but that wasn’t that hard to create myself:

  // Convenience method to send text to an HTTP server
  //
  // Parameters:
  //   aUrl      HTTP URL
  //   aBody     the body
  //   aCallback Callback to invoke with text data upon success
  function postHTTP(aUrl, aBody, aCallback)
  {
    var req = new HttpRequest();
    req.postBody = aBody;
    req.open('POST', aUrl, true);
    req.setRequestHeader("Connection", "close");
    req.setRequestHeader("Accept-Charset",
                         "*; q=0.2, ISO-8859-15; q=0.9, ISO-8859-1,utf-8");
    req.onreadystatechange = function (aEvt) {
      if (req.readyState === READYSTATE.COMPLETED) {
        if (req.status === 200) {
          if (aCallback) {
            aCallback(req.responseText);
          }
        } else {
          System.print("HTTP status: " + req.status);
        }
      }
    };
    req.send(aBody);
  }

Next i created an additional Javascript library and some wrapper routines, which make it possible to have the Pronto ‘talk’ to the XML-RPC interface of my Domotica system:

  var httpLib = com.philips.HttpLibrary;
  var msg = new xmlrpc.XMLRPCMessage("SetDevice"); 

  msg.addParameter(Addr);
  msg.addParameter(aValue);
  httpLib.postHTTP('http://xx.xx.xx.xx', msg.xml(), aCallBack);

Now all my User Interfaces (website, ASUS TOP, Pronto) are using the same interface to my system. That really makes me very happy!

After some testing, today i did a complete remake of 2 of the most used activities. And this time it was fun!; i can assure you, it hasn’t always been that way in the past… Now all i have to do is add a ProntoScript one-liner to the Button Action:

XMLRPC_SetDevice("XELOS","MUTE");

This is the script for muting my TV; with no additional code except for the PS Libraries.

I’m very satisfied with my Pronto and how Philips keeps developing new features for it; and i haven’t even come to the features of the latest release yet; there’s still a whole lot more to explore!

Tagged with: