KingOfTheJungle
Posts: 16
Joined: Wed Nov 22, 2017 7:09 pm

Java App to Remote Control RPI.

Wed Jan 03, 2018 6:28 pm

Hi everyone, I'm working on a university project which involves remotely controlling a motor attached to a RPi. I was wondering what is the best way to go about this. My java app (on a PC) needs to send instructions to the RPi over the internet.
Any help would be much appreciated.

User avatar
DougieLawson
Posts: 34556
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Java App to Remote Control RPI.

Thu Jan 04, 2018 8:49 am

Use the IoT command and control protocol MQTT.

https://www.hivemq.com/mqtt-essentials/
Note: Having anything remotely humorous in your signature is completely banned on this forum.

Any DMs sent on Twitter will be answered next month.

This is a hippy & doctor free zone.

mattlewis
Posts: 112
Joined: Sat Jan 12, 2013 3:05 pm
Location: UK
Contact: Website

Re: Java App to Remote Control RPI.

Fri Jan 05, 2018 7:19 pm

I’ve been working on adding native remote control to my diozero library (http://www.diozero.com/) & have been investigating various protocols including MQTT as well as HTTP WebSockets.
Remote control via pigpio sockets is also supported.
See: http://www.diozero.com/en/latest/RemoteControl/

Matt
http://www.diozero.com/

User avatar
DougieLawson
Posts: 34556
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Java App to Remote Control RPI.

Fri Jan 05, 2018 9:16 pm

Mosquitto 1.4.14 does MQTT over HTTP web sockets.
http://jpmens.net/2014/07/03/the-mosqui ... s-support/
Note: Having anything remotely humorous in your signature is completely banned on this forum.

Any DMs sent on Twitter will be answered next month.

This is a hippy & doctor free zone.

Return to “Java”