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: 33400
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

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/
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

2012-18: 1B*5, 2B*2, B+, A+, Z, ZW, 3Bs*3, 3B+

Any DMs sent on Twitter will be answered next month.

mattlewis
Posts: 111
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: 33400
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

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/
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

2012-18: 1B*5, 2B*2, B+, A+, Z, ZW, 3Bs*3, 3B+

Any DMs sent on Twitter will be answered next month.

Return to “Java”

Who is online

Users browsing this forum: No registered users and 4 guests