Connecting the TSU 9600

Forum about hardware/software for the Philips Pronto TSU9600 and other remotes.

Connecting the TSU 9600

Postby Digit » Fri Nov 09, 2007 11:57 pm

Hi,

I thought it would be better to start a new topic regarding the TSU 9600, since i've got nothing for sale; it seems i'm always on the buying side...[:)]
Since a couple of hours i've got a TSU 9600 here to give it a try. I already like it too much to bring it back [:D]

Main issue for me is figuring out a way to receive commands from the Pronto and get those into my own Home Automation software. So the first thing i did was enable RF, create a new button that sends data to a non-existing RS232 extender (yes, the prontonic approach) and look at what happened.
Using wireshark and prontonic, i figured out (a bit) what goes over the line and it looks like it should be possible to write a little program to receive the packets from the Pronto and fool the Pronto that the commands it sent were executed correctly.

Now, before i try to re-invent the wheel, i have some questions:

- Are there any other ways of receiving custom commands from the Pronto?
- Anyone already done something in this area?
- Does anyone have any info/documentation on the Pronto extender protocol?
- Links, tips, etc. etc. are also very welcome, since i can only use it for a short time (unless i buy it right away) and i don't want to spend all that time searching the net...

Regards,
Robert.
User avatar
Digit
Global Moderator
Global Moderator
 
Posts: 3388
Joined: March 2006
Location: Netherlands

Connecting the TSU 9600

Postby Snelvuur » Sat Nov 10, 2007 1:10 am

Check out http://www.the-gordons.net/homepage/DownLoad.html , he has examples and more information. Also www.remotecentral.com is also a good place to run around.

The pronto is javascript. It is able to "get" pages that you want, and reformat it so you can put it on the screen or other things. So basicly you could make a xml website which holds all the current values of your lights. Then you can read that with javascript, and create a bunch of buttons.. BUT you can show the buttons in there current state (on or off). So when you press the button it will send the correct command. This only uses 1 button and shows the current state too.

This is just an idea in my head. It is possible but dont ask me how to do it (yet) so far i'am just building all my remotes in the device so i can allready use it in normal mode (without any javascripts things)

The coolest for me would be to have a perl daemon, that fakes an extender with 2-way. But thats a bit beyond my skills at the moment.

Ow, and dont forget about the dns issue that sometimes pop-ups.
// Erik (binkey.nl)
User avatar
Snelvuur
Forum Moderator
Forum Moderator
 
Posts: 3155
Joined: April 2007
Location: Netherlands

Connecting the TSU 9600

Postby Digit » Sat Nov 10, 2007 11:19 pm

<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"><i>Originally posted by snelvuur</i>
<br />The pronto is javascript.
<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">Well, i should have started with upgrading the firmware yesterday, that would have gotten me on the right track a bit quicker... [B)]
Prontoscript makes the difference! This is just incredible, all the things you can do with this.
I started looking at some Prontoscript examples this afternoon (Meteo, TCPIPDemo for the insiders) and now i can control virtually everything with the Pronto! (I already had a TCP Server for sending commands to my HA app, so i had nothing to do on that side)

This is absolutely the most exciting device i've had since i'm into Domotica...and for once, the Philips software that comes with it doesn't s**k.... (based on 4 hours working with it).

This pronto isn't going to leave my house anymore... [8D]

Regards,
Robert.
User avatar
Digit
Global Moderator
Global Moderator
 
Posts: 3388
Joined: March 2006
Location: Netherlands

Connecting the TSU 9600

Postby Bwired » Sat Nov 10, 2007 11:38 pm

Hi Guys,
Very Interesting device and specially for a Philips :-)
I try to follow you there, do I understand it right that you receive the commands based on TCIP on your wireless router which are the received TCP server?
Where did you all buy the device?
Thanks
Pieter
User avatar
Bwired
Administrator
Administrator
 
Posts: 5304
Joined: March 2006
Location: Netherlands

Connecting the TSU 9600

Postby TANE » Sat Nov 10, 2007 11:52 pm

Domotica is getting a new dimension..:)
you can use as perfect remote...or Wall display for your domotica.

Pieter..look at Markplaats.nl. (Erik... He is away for few weeks)
User avatar
TANE
Forum Moderator
Forum Moderator
 
Posts: 4806
Joined: April 2007
Location: Netherlands

Connecting the TSU 9600

Postby Digit » Sun Nov 11, 2007 12:03 am

Pieter,

I didn't buy it yet, i lent it for a weekend from someone where it was only gathering dust.
But yes, you're right. The pronto has Wifi onboard (WEP), and nowadays it can do Prontoscript which is actually javascript.
You can create TCP connections with anything you want. For example, as Chak already mentioned in another topic, you can get weather info from the internet. Or, in my case, you can let the pronto 'talk' to your own HA application and control everything in your house that's controllable. And, not to forget, you can get rid of all your other IR RC's! Here are 2 pics of 2 pages i created this evening to control the lights in the livingroom. And yes, it really works...

Robert

Image

Image
User avatar
Digit
Global Moderator
Global Moderator
 
Posts: 3388
Joined: March 2006
Location: Netherlands

Connecting the TSU 9600

Postby TANE » Sun Nov 11, 2007 12:20 am

Some example pages on my TSU.
I use the pronto plugin for homeseer

Image

Image
User avatar
TANE
Forum Moderator
Forum Moderator
 
Posts: 4806
Joined: April 2007
Location: Netherlands

Connecting the TSU 9600

Postby Bwired » Sun Nov 11, 2007 12:42 am

Looks really good, can you post a sample script, no hurry!
Thanks
User avatar
Bwired
Administrator
Administrator
 
Posts: 5304
Joined: March 2006
Location: Netherlands

Connecting the TSU 9600

Postby TANE » Sun Nov 11, 2007 12:52 am

I don't use any scripts at the moment..
On my HS server there is a plugin running what is acting as a Extender for the TSU
plugin is receiving asci.

On the server i have some HS scripts that handle the single button press
Sub Main
if hs.ison("K10") then
hs.execx10 "K10","off",0
Else
hs.execx10 "K10","on",0
end if
End Sub



Image
User avatar
TANE
Forum Moderator
Forum Moderator
 
Posts: 4806
Joined: April 2007
Location: Netherlands

Connecting the TSU 9600

Postby Digit » Sun Nov 11, 2007 1:17 am

Code: Select all
function TCPSend(dvc,cmd) {

var socket = new TCPSocket(false);
var result = "";

socket.onConnect = function()
{
  System.print("Connected.");
  socket.write("DEVICE "+dvc+" "+cmd);
  socket.write("\r\n");
};

socket.onData = function()
{
// System.print("Ondata call");
  result = socket.read(5000,1000);

  System.print("Received:"+result);
};

socket.onClose = function()
{
  System.print("Disconnected.");
};

socket.onIOError = function(e)
{
System.print("IO Error.");
};

//
if(socket.connected == false)
{
  socket.connect('xxx.xxx.xxx.xxx', yy, 3000);

}

socket.Free;
};


That's all there is to it. Sort of...

From the 8 buttons i have, the TCPSend() is called like this: TCPSend("A13","ON"). This is triggered by the push of a button. Although this might look X10-ish, its not. It's just how you name your devices. "A13" could also be "GARDENLIGHTS" or whatever. Its up to your TCPserver to do something usefull with the commmand sent. In this example, the script results in "DEVICE A13 ON\r\n" being sent to a TCPServer listening on xxx.xxx.xxx.xxx:yy.

Remember: this is absolutely not thorougly tested yet, (i just have this thing for 24h yet) many things can go wrong in this script, unused variables, debug messages, etc. etc. but i think this will give you an idea.

Robert

Edit:typo
User avatar
Digit
Global Moderator
Global Moderator
 
Posts: 3388
Joined: March 2006
Location: Netherlands

Connecting the TSU 9600

Postby Snelvuur » Sun Nov 11, 2007 1:22 am

Still need more work. I'am busy trying to get the javascript with tcp/ip to work normally. I had it running once, but deleted it my accident :( and what i mean with that, like digit's example above. But i want to parse the output. Like the weather example. Could not find a javascript expressions howto on the index/result thingy.

Image

// Erik (binkey.nl)
User avatar
Snelvuur
Forum Moderator
Forum Moderator
 
Posts: 3155
Joined: April 2007
Location: Netherlands

Connecting the TSU 9600

Postby Digit » Sun Nov 11, 2007 2:43 am

Do you mean parsing results is what you're having problems with, as in using regular expressions? That would surprise me.

In the meteo example you'll find enough examples on how to parse the result (in that case, xml). Just have a good look at the IndexOf() calls. I'd use other ways of parsing xml, however i'm no javascript guy although i drink a lot of coffee, but if it works, why bother...

But beware, the meteo example parses data in the (IMO) wrong place. It does so in the Ondata event, which can occur multiple times on a single response. At least, that's what i found out while trying to fix an error i kept getting in this script every time. I think it would be better to parse response on closing the connection.

Robert.
User avatar
Digit
Global Moderator
Global Moderator
 
Posts: 3388
Joined: March 2006
Location: Netherlands

Connecting the TSU 9600

Postby Snelvuur » Sun Nov 11, 2007 3:02 am

You can grab the prontoscript developer pdf from philips (dont know if that was in the pro area or not though) i try to do simple connects, and check my webserver for any hits. I dont even get that far, while it did work yesterday. Its with ip address, so nu dns issues are here. O well.. my other part is sleeping .. so got time on my hands :)

// Erik (binkey.nl)
User avatar
Snelvuur
Forum Moderator
Forum Moderator
 
Posts: 3155
Joined: April 2007
Location: Netherlands

Connecting the TSU 9600

Postby Digit » Sun Nov 11, 2007 10:16 am

Can't find that PDF you're mentioning. Do you have a URL for me plz?

Robert.
User avatar
Digit
Global Moderator
Global Moderator
 
Posts: 3388
Joined: March 2006
Location: Netherlands

Connecting the TSU 9600

Postby Snelvuur » Sun Nov 11, 2007 4:38 pm

http://www.pronto.philips.com/library/p ... _guide.pdf

p.s. these modules are online if you get the level-1 certificate on the pronto site:

Lutron Lighting HomeWorks IP 1.0
26 Jun 07 TSU9600
Dynalite Lighting DNG100BT IP 1.0
26 Jun 07 TSU9600
Litetouch Lighting 5000LC RS232 1.0
26 Jun 07 TSU9600
iLight Lighting iCAN RS232 1.0
26 Jun 07 TSU9600
Marantz AV components SRx001 RS232 1.0
26 Jun 07 TSU9600
Denon AV components AVR3806 RS232 1.0
26 Jun 07 TSU9600
Onkyo AV components TX-SR804E RS232 1.0
26 Jun 07 TSU9600
Yamaha AV components RX-V2700 RS232 1.0
26 Jun 07 TSU9600
Aprilaire HVAC Thermostat 8870 RS232 1.0
26 Jun 07 TSU9600

// Erik (binkey.nl)
User avatar
Snelvuur
Forum Moderator
Forum Moderator
 
Posts: 3155
Joined: April 2007
Location: Netherlands

Next

Return to Philips Pronto (TSU9600), IRtrans and other remotes

Who is online

Users browsing this forum: No registered users and 1 guest