こんにちは、Java でホーム コントロール システムを開発しています。照明、AC、アラームを制御する方法を理解しましたが、ホーム シアターで音楽を再生できるようにしたいと考えています。プログラムは次のように構築されています: Arduino と通信する Java サーバーを取得し、インターフェイスとして機能する Java プログラムを実行するクライアントとして Raspberry Pi を取得しました。Raspberry Pi に音楽ライブラリを表示して、曲を選択すると、Raspberrypi ではなく、サーバー コンピューターで音楽が再生されます。Sonosのような何か。これは可能ですか?
1 に答える
1
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.
于 2013-10-15T21:02:33.290 に答える