2

I am building an automated piece of lab equipment. Overall the system works as follows:

Python -> Rpi GPIO -> relays -> Actuators (on delay-> off delay, repeat)

This loop runs for about 48 hours.

I would like a web interface to control and monitor the process. It would be helpful to check in on the script w/o interrupting it (how many cycles left etc). I would also like this script to run independently of the web page being open.

I looked around and the last similar post I found was from 2012 so I'm checking in to see if anyone is aware of any newer developments.

I've looked at the examples to control LEDs but mine seems to be a different approach (LED state change per form button click, vs monitoring and running a program in the background).

My questions.

Is there an overall approach to this that would be simplest? Can anyone recommend any solutions / frameworks etc that are applicable for this task?

Thanks

Adam

Thanks for reviewing this post, but perhaps I need to clarify. It is NOT a simple control the LED for which I agree that there are tons of examples out there. This is more complex. I am also not asking for code but a general approach to solve the problem. The wikipedia link does not provide much info, but it does provide a broad overview. I did look quite extensively,but I am new to this and without knowing where to focus, the search may not be as effective. I not am asking for much, just for someone to just point me in the right direction. For example - "try Flask. It is a good approach to explore." I also asked since I expect technology has advanced from 2012 and newer more elegant solutions likely exist. I am asking to see if there is a preferred solution from the one provided in this post. Execute Python Scripts Via Web interface Thanks again for your patience and understanding.

  • "I looked around and the last similar post I found was from 2012" -> Completely ridiculous: raspberrypi.stackexchange.com/… Which is not to say the answers to the duplicate (or those other questions) are the best solution, but there is oodles of information online involving this topic; you need to make an effort to do some research and ask a more specific question, because this one has been asked and answered enough already. – goldilocks Jul 21 '16 at 17:17
  • "I would like a web interface to control and monitor the process. It would be helpful to check in on the script w/o interrupting it (how many cycles left etc). I would also like this script to run independently of the web page being open." -> en.wikipedia.org/wiki/Inter-process_communication#Approaches – goldilocks Jul 21 '16 at 17:50
  • Thanks for reviewing this post, but perhaps I need to clarify. It is not a simple control the LED for which I agree that there are tons of examples out there. This is more complex. I am also not asking for code but a general approach to solve the problem. The wikipedia link does not provide much info. I did look quite extensively, and BTW - I do research for a living. I not am asking for much, just for someone to just point me in the right direction. I also asked since I expect technology has advanced from 2012 and newer more elegant solutions likely exist. The post from 2012 – A Hacking Jul 22 '16 at 18:23
  • Fair enough. It's implied in the question though that you already have the "Python -> Rpi GPIO -> relays -> Actuators" part done, so you aren't asking for help with that; you're asking A) How to control it from a web interface, B) How to control it more generally while running. The answer to B is some form of IPC (from the link in my second comment, but you will find many many many things about this conceptually if you search around online). Python IPC questions are general programming and as such belong on our larger parent site, Stack Overflow... – goldilocks Jul 24 '16 at 14:09
  • ...However, since this is a topic with many extensive existing sources of information, you will likely be expected to have done some research first, made an effort to apply it, and demonstrate this effort in the form of a specific question if there is some finer point you are confused about. With regard to A, this will fall into place once you understand B better in relation to the duplicate questions/"general approach" about server back-end interfaces. – goldilocks Jul 24 '16 at 14:10