Switching between TVs displaying OSMC on Raspberry Pi via Mobile Apllication

Description: I am trying to make a remote control for an OSMC (Kodi) media player installed on a Raspberry pi. The Rpi will connect to the mobile app via Wi-Fi. On the other hand, the Rpi connects to the breakout board using RS232. Let me post an image here for an accurate understanding of connectivity.enter image description here

OSMC now provides APIS to control operations such as menu left, right, enter, volume up, etc. Which is via a static Rpi IP that we can execute from a mobile app.

Our main board will now have 4 zones that will be connected to 4 displays, among which the OSMC media player will be displayed. I am trying to switch between display to show osmc media player.

I am using the http://pyserial.sourceforge.net/ library to send a command from the Rpi to the breakout board to establish connections between the breakout board and displays.

Now the question is: How to send commands from Mobile App to Rpi (for example, tell Rpi to this command that you should call on Rs232), via web service? A mobile developer suggested that I use some socket programming. But I have very little knowledge about this. I know if we have a static IP of the Rpi, there can be communication between the Mobile App and the Rpi, but I'm still confused as to what media is used to communicate. Any suggestions would be appreciated.

+3


source to share


1 answer


Consider WebIOPi ( https://code.google.com/p/webiopi/ ). You will have a web interface, so there is no need to write an application on the phone side - just use a browser. Click the button on the web interface to send the corresponding command from UART to RPi to OSMC. WebIOPi helps you create a web interface and bind controls to appropriate UART actions. WebIOPi has tutorials to get you started. You might, perhaps, just start by modifying one of these to suit your needs.



0


source







All Articles