Domanda

Hi i'm developing a home control system in Java. I've figured out how to control light, AC and alarm, but now i want it to be able to play music on my home theater. The program is built up like this: I got a Java server that talks to an Arduino, and then a Raspberry Pi as a client that runs a Java program that works as an Interface. So I want my Raspberry Pi to show my music library, so i can choose a song, and then the music plays on the server computer, and not the Raspberrypi. Something like Sonos does. Is this possible?

È stato utile?

Soluzione

Certainly possible. Perhaps build a list of song titles on the server, to send back to the client. When the client selects a title, send it back to the server and have the server run an OS command to play the song on the server. Something like this

A word of caution however, be sure to sanitize and verify that the string of text you are passing to the java server's OS doesn't contain malicious content. If your java service is accessible from the Internet, chances are good someone will try and crack into it.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top