 |
 |
|
|
Philips Pronto Professional Forum - View Post
|
|
 |
|
10/10/25 - It’s been so long since we’ve last seen you!
10/24/22 - In searching for the perfect day, Timmy discovers something unexpected!
9/04/22 - That childhood favorite is back in a new Timmy video.
7/31/22 - It’s time for my second new Just Like Timmy video!
7/12/22 - Why not check out my new YouTube animation channel, Just Like Timmy!
|
|
 |
|
The following page was printed from RemoteCentral.com:
| Topic: | KODI Script This thread has 4 replies. Displaying all posts. |
|
| Post 1 made on November 7, 2025 at 03:08 |
|
Joined: Posts: RC XP: | June 2020 159 63⭐︎ |
|
|
Been working on KODI again, this script works but only if I reload the page, meaning jump to another page then jump back as long as KODI is running on my shield, I don't know why, any ideas? System.setDebugMask(9); var url = CF.widget("Kodi_aURL","Kodi_PARAMETERS").label; var buffer = ""; var CR = "\x0d"; var rdata, socket; function onSocketConnect() { }; function onSocketData() { var temp,first; buffer+=socket.read(); first = buffer.indexOf(CR); while (first >= 0) { temp = buffer.substring(0, first); buffer = buffer.substring(first + 1); notifyMessageReceived(temp); first = buffer.indexOf(CR); }; }; function onSocketIOError(e) { System.print("sock IO Error error:" + e); }; function notifyMessageReceived(message) { System.print("Received:"); System.print(message); }; function closeSocket() { if (socket) { if (socket.connected) socket.close; socket = null; }; }; function resetSocket() { closeSocket(); socket = new TCPSocket(false); buffer = ""; socket.onConnect = onSocketConnect; socket.onData = onSocketData; socket.onIOError = onSocketIOError; }; function kodi(command) { if (socket) socket.write("jsonrpc?" + command + CR); }; resetSocket(); socket.connect(url,9090, 500);
|
|
| Post 2 made on November 9, 2025 at 01:37 |
|
Joined: Posts: RC XP: | August 2001 13,125 389⭐︎ |
|
|
I suggest to debug it. Use System.print and try/catch to better understand the behavior. I'd also consider adding a callback for socket.onClose as I bet that the server is closing the socket remotely. If that is the case, then you will need to call resetSocket() and connectSocket() after some time when this occurs.
Last edited by Lyndel McGee on November 11, 2025 17:06.
|
Lyndel McGee Philips Pronto Addict/Beta Tester
|
|
| Post 3 made on November 9, 2025 at 14:02 |
|
Joined: Posts: RC XP: | August 2001 13,125 389⭐︎ |
|
|
|
Lyndel McGee Philips Pronto Addict/Beta Tester
|
|
| Post 4 made on November 17, 2025 at 16:12 |
|
Joined: Posts: RC XP: | August 2001 13,125 389⭐︎ |
|
|
@OP - Did you solve your issues?
|
Lyndel McGee Philips Pronto Addict/Beta Tester
|
|
| OP | Post 5 made on December 9, 2025 at 17:38 |
|
Joined: Posts: RC XP: | June 2020 159 63⭐︎ |
|
|
Sorry, been busy with other things. I have not gotten to it yet..... I'm close to throwing in the towel with these, now that I can program Control4 and URL, I got my hands on an old Control4 NEO remote, that's been my go-to remote for now.
Last edited by mpg7321 on December 9, 2025 17:46.
|
|
 |
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.
|
|
|
|
|