RESTaPI - REST API server using PI4J library

229 views
Skip to first unread message

Jean-Paul Laberge

unread,
Jan 10, 2015, 12:34:01 PM1/10/15
to pi...@googlegroups.com
I played with Raspberry PIs for the past year.  Since I’m more Java than any other language, I rapidly discover the PI4J project. 
Thanks for this nice project!

For my 1st project, I developed a REST API server.  
My current version exposes many WiringPi functions and the PI4J System and Network functions. 
Even the GPIO interrupts are available remotely.

The goal is to control remotely the Raspberry Pi GPIO by simply using HTTP GET requests.
For example, using any browser from any machine (even another Raspberry Pi) and do the following HTTP GETs in order will
Turn ON and OFF a LED connected to RaspiPin.GPIO_01:

Turn ON 
Turn OFF 

Where raspberrypi is the IP address of your Raspberry Pi (set as required)

For complete details, see the readme in my github project

This project is a complete Maven project ready to import in Eclipse

Robert Savage

unread,
Feb 11, 2015, 9:15:27 AM2/11/15
to pi...@googlegroups.com
Wow, I need to find some free time to play with your project!  Thanks for letting us know about it!
Robert

Oliver Pfau

unread,
Feb 11, 2015, 3:57:28 PM2/11/15
to pi...@googlegroups.com
I am using spring for restful services controlling garage doors and switching radio controlled electrical sockets. With spring you can annotate a method which is invoked on a restful path you specified. This is quite easy. Pack it in a war file and deploy it on tomcat (plus some security). I use an android app to control it.My pi also logs the values of electric meters each half of a hour (also spring annotation with cron expression).

Jens Schmidt

unread,
Aug 16, 2015, 3:27:15 AM8/16/15
to Pi4J
nice work!
Reply all
Reply to author
Forward
0 new messages