Switching between TV's displaying OSMC on Raspberry Pi through Mobile Apllication

546 views Asked by At

Description : I am trying to make a remote controller for OSMC(Kodi) media player installed on Raspberry pi. Rpi will connected to mobile app through wifi. On the other hand Rpi is connected to switch board using RS232. Let me post a picture here to get an exact idea of connectivity..enter image description here

Now OSMC provides its APIS to control operations like menu left , right , enter , volume up etc. That through Rpi's static IP we can perform from mobile App.

Now our Main Board will have 4 zones which will be connected to 4 display among one of them will display OSMC media player. What I am trying to do is to switch between display to show osmc media player.

I am using http://pyserial.sourceforge.net/ library to send command from from Rpi to switch board to arrange connections between switch board and displays.

Now the question : How to Send commands from Mobile App to Rpi(like telling Rpi this command you have to call on Rs232), through Web Service? Mobile Developer Suggested me to use some socket programming. But I have very little knowledge about the same. I know if we have static IP of Rpi there can be some data exchange done between Mobile App and Rpi, But I am still confused regarding what medium to use for communication. Any suggestions would be appreciated.

1

There are 1 answers

0
Chad Kennedy On

Consider WebIOPi (https://code.google.com/p/webiopi/). You'll have a web interface, so no need to write a phone side app - just use the browser. Click a button on the web interface to send the corresponding command out of the UART on the RPi over to the OSMC. WebIOPi will help you to create the web interface and tie the controls to the corresponding UART actions. WebIOPi has tutorials to get you started. You could probably just start by modifying one of those to suit your needs..