Your Universal Remote Control Center
RemoteCentral.com
Philips Pronto Professional Forum - View Post
Previous section Next section Previous page Next page Up level
Up level
The following page was printed from RemoteCentral.com:

Login:
Pass:
 
 

Page 2 of 2
Topic:
Pronto Script for tcp socket
This thread has 21 replies. Displaying posts 16 through 22.
Post 16 made on Saturday September 11, 2010 at 05:56
Guy Palmer
Active Member
Joined:
Posts:
June 2008
648
mon,

Your two messages don't fit any of the formats that my CBus implementation uses. The first one appears to be an MMI message about light status (the "07" in characters 3-4 mean that it is an MMI message and the "38" in characters 5-6 mean that it relates to lights) but the first two characters in it ("73") are not what I would have expected (they imply that a negative number of light statuses are being reported). The second one also appears to be an MMI message but is not the length that I would have expected (it is too short).

But all is not lost: just switch your light on and off and see how your two messages change. If they change, then you can simply hard code your Prontoscript accordingly. If they don't change, then you are not actually receiving feedback.

ps. You are much more likely to get replies to your questions if you a) show appreciation for previous replies and b) react to the various suggestions that people make.
Post 17 made on Saturday September 11, 2010 at 16:27
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,994
Hey Guy,

Thanks and appreciation are something I've grown not to expect. He just wants it to work and may not appreciate the effort that goes into making it work.
Lyndel McGee
Philips Pronto Addict/Beta Tester
Post 18 made on Saturday September 11, 2010 at 19:59
Guy Palmer
Active Member
Joined:
Posts:
June 2008
648
On September 11, 2010 at 16:27, Lyndel McGee said...
Thanks and appreciation are something I've grown not to expect. He just wants it to work and may not appreciate the effort that goes into making it work.

But surely showing some appreciation etc aids getting it to work. For example, if I spend enough time, I could obviously solve this bloke's problem but why should I be motivated to do so?

My experience of this forum is that there is often a correlation between a) not showing appreciation and b) not putting in any effort oneself to solve the problem. For example, this bloke clearly hasn't read the CBus messaging documentation, even though that is the obvious thing for him to do.
OP | Post 19 made on Monday September 13, 2010 at 00:18
mon
Long Time Member
Joined:
Posts:
June 2010
11
Since I am quite anxious over getting feedback from C-Bus
I'd forgotten to show the appreciation
Thanks for all your suggestions to Lyndel and Guy Palmer

The result that I mentioned above is being responded from the CBus PCI when
i use this button script just for checking the Feedback messages purpose.

var socket = new TCPSocket(true);
socket.connect("192.168.10.25",8005,3000);
socket.write("\\05FF0073073800\r");
label = socket.read(100, 3000);
socket.close();

Then the reply is the same when the light is either on or off ( Means I'm not getting back the correct Feedback)

I admit that I do have to learn more on How CBus PCI works on my own first

Do let me apologize U guys for messing Up with stupid Questions.


Thanks for above Replies
Post 20 made on Monday September 13, 2010 at 01:48
Barry Gordon
Founding Member
Joined:
Posts:
August 2001
2,157
As I said earlier:

Every man has the wit to know and the will to learn, but the key to knowledge is the open book; or to put it in text messaging terms - RTFM.

Lyndel, Will you be at Cedia? I will be there on Thursday.
Post 21 made on Monday September 13, 2010 at 02:10
Guy Palmer
Active Member
Joined:
Posts:
June 2008
648
When receiving data, you have to make sure that you receive it all, split the messages, handle carriage returns, etc. This means that the code should be more complicated than your version. Try the following and report back what System.print messages are generated in the debug panel.

function Feedback()
{
Response = "";
Socket = new TCPSocket();
Socket.onConnect = function () {Socket.write("\\05FF0073073800\r");};
Socket.onData = function ()
{
if (Socket.connected === true)
{
Response += Socket.read();
while(Response.indexOf("\r") != -1)
{
StringLen = Response.indexOf("\r");
ReceiveString = Response.substring(0,StringLen);
if(ReceiveString.substring(0,1) == "\n")
{ReceiveString = ReceiveString.substring(1);}
if(Response.indexOf("\r\n") != -1)
{Response = Response.substring(StringLen+1);}
else {Response = Response.substring(StringLen+2);}
System.print("received string: " + ReceiveString);
}
}
};
Socket.onClose = function () {};
Socket.onIOError = function(e) {};
Socket.connect("192.168.10.25", 8005, 30000);
}
Post 22 made on Monday September 13, 2010 at 17:05
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,994
On September 13, 2010 at 01:48, Barry Gordon said...
As I said earlier:

Every man has the wit to know and the will to learn, but the key to knowledge is the open book; or to put it in text messaging terms - RTFM.

Lyndel, Will you be at Cedia? I will be there on Thursday.

No, I won't be there. Taking vacation the following week.
Lyndel McGee
Philips Pronto Addict/Beta Tester
Page 2 of 2


Jump to


Protected Feature Before you can reply to a message...
You must first register for a Remote Central user account - it's fast and free! Or, if you already have an account, please login now.

Please read the following: Unsolicited commercial advertisements are absolutely not permitted on this forum. Other private buy & sell messages should be posted to our Marketplace. For information on how to advertise your service or product click here. Remote Central reserves the right to remove or modify any post that is deemed inappropriate.

Hosting Services by ipHouse