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

Login:
Pass:
 
 

Original thread:
Post 2 made on Tuesday March 5, 2024 at 16:03
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
13,003
Before saying it does not work, please tell us what you have done to rule things out and provide a bit more details.

Have you used the Postman utility from a desktop to make the requests as you are doing here?

Does your label have a url like this, for example:
http[colon][slash][slash]myhost.net//api/Y1Vpd5qwJVnjsRIdxFThJR0jsdcdaEvrQVe0NYM/lights

or one that is simply the host name, for example:
myhost.net

Please also note that an http request's response comes with multiple lines with CRLF (\r\n) separators , not just the json markup. Your use of 'split' worries me and is very 'fragile' to say the least.

Have you debugged using try/catch to confirm the socekt is working? Also I don't see a socket.close call except in the 'catch' block. There also needs to be one after reading all data, otherwise you will run out of sockets.
Again, have you debugged and review the Diagnostics log for errors such as out of sockets?

Have you done System.print on the variable named 'info' as things come back?

Thanks,
L.
Lyndel McGee
Philips Pronto Addict/Beta Tester


Hosting Services by ipHouse