rszimm / sprinklers_pi

Sprinkling System Control Program for the Raspberry Pi
GNU General Public License v2.0
310 stars 100 forks source link

Document API #16

Open danfinlay opened 10 years ago

danfinlay commented 10 years ago

If you document the API methods your web interface is using, it would be easy for people to build new front-end interfaces for it...

I love that it compiles from C++, allowing compiling on various hardwares, really clean back-end, but frankly I think some innovation on the front end would be beneficial.

mikedevita commented 8 years ago

:+1: I would be down to build out a modern UI using react/redux with bootstrap if the API wasn't such a pain to determine out. The front-end could theoretically be built out on react/redux in a weekend. You'd then just need to serve up the static files.

A simple API that accepts json and returns json would be awesome.

nhorvath commented 8 years ago

@mikedevita Yes, it would be nice to have a json api, but since one of the goals is for it to continue to build for use on AVR hardware I'm not sure what a good, small, json library is.

mikedevita commented 8 years ago

@nhorvath yeah thats the limiting factor unfortunately. I know absolutely nothing about the C++ side of this repo and thats where I get lost. I am a php/javascript/html5/css3 developer... not a C++ developer.

I have stubbed out a nodejs powered sprinkler system similar to this but quit working on it when i found your repo as it solved what i was looking for albeit the UI is a bit clunkier than preferred.

nhorvath commented 8 years ago

@mikedevita I'm also more comfortable in those, and quite frankly thought about doing a raspberry pi only rewrite in PHP / Bootstrap (and possibly with angular). Just haven't had the time to invest.

mikedevita commented 8 years ago

@nhorvath :+1: let me know when you're ready to chomp at the bit for that, I've been thinking about picking it back up but going the direction of a separated backend/frontend setup. Using node/express as the backend and react/redux as the frontend.

marksev1 commented 7 years ago

So nhorwath I think most important to know would be how to manually turn on and off the irrigation. Can you tell how both url's should look like? And which protocol should I be using to connect to it?

nhorvath commented 7 years ago

@marksev1 I forgot about this thread... I put an answer to someone else with some basics on the API in this issue: https://github.com/rszimm/sprinklers_pi/issues/76

If someone wants to write it up and put it in the wiki that would be helpful.

marksev1 commented 7 years ago

http://[your sprinklers pi install]/bin/manual?zone=zf&state=on ...shouldnt f be zone 6 in this example? if with a starts with 0?

nhorvath commented 7 years ago

@marksev1 a=0 b=1 c=2 d=3 e=4 f=5

marksev1 commented 7 years ago

Oh right lol, sorry about that :).