trying to develop a remote monitor for openlp

I've been looking at using a Raspberry Pi with Wifi to drive our projector. On powering up it fires up a browser displaying a welcome message. When OpenLP starts up, it detects this by scanning over all LAN-connected systems for one with port=4316. This works fine. However, I'd like it to revert to the welcome message if OpenLP closes down, but this doesn't as the port remains open while the browser is looking at it. If I kill the browser then these close down. Has anyone any ideas for how to get around this.

My monitor program sits in a loop and at intervals attempt to set up a TCP socket to each of the currently connected systems, specifying the port number.
When it gets a 'success' return, it switches the browser to point to it, and then changes to just polling that address. If that fails, then it assumes OpenLP has closed down and reverts to polling all systems. In practice, the polling always succeeds. I don't know enough about the browser/OpenLP protocols to understand what is going on.


  • Finally solved this myself - instead of simply trying to open the port, I now send a HTTP request for a non-existing page which produces a response. Trying to read the response gives an error if OpenLP has gone away, so that provokes the program to switch the browser back to a 'Welcome' page.

    Problem solved.
Sign In or Register to comment.