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 Thursday June 9, 2022 at 23:11
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,999
Please don't take my answer here as a flame.

The example code you are using is worth 10000 of your words describing it. Please post the code.

Since you are using the Philips HTTP Library, then yes, everything is asynchronous. Calling the library will cause a socket to be opened which will process data asynchronously. To make things synchronous you'd need to mimic the code in the Philips library and when your HTTP Request return the final Ready State and a 200 OK, then you would want to start the next task or use scheduleAfter to schedule the next task after some time (a task queue).

How are you doing this delay of Wait 20 seconds or so?

If you are using System.delay, then you should really see this in the Dev Guide.

delay() Wait for a specific time. This blocks script execution during
the specified time.


If you are doing this, then the Pronto is waiting 20 seconds but while it is waiting, it is not doing any of the socket processing in the HttpLibrary.

Sytem.delay(20000) should be avoided at ALL COSTS.

Like I said, the code is worth 10000 words.

Lyndel
Lyndel McGee
Philips Pronto Addict/Beta Tester


Hosting Services by ipHouse