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.

A Hacking
  • 21
  • 3
  • "I looked around and the last similar post I found was from 2012" -> Completely ridiculous: http://raspberrypi.stackexchange.com/search?tab=newest&q=python%20gpio%20%22web%20interface%22%20is%3aquestion 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." -> https://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
  • If you were hoping someone was going to write you a short book explaining all of this together, please see "What types of questions should I avoid asking?". Since you do research for a living, I don't think all this should be hard for you to understand (you break a problem down into constituent parts as far as possible, etc.). If it seems unfair and it is not clear why we have restrictions about scope, this may provide some enlightening background: http://meta.raspberrypi.stackexchange.com/q/794/5538 – goldilocks Jul 24 '16 at 14:13
  • Perhaps I've missed the point of this forum, but I thought it was to ask a question, which I did. My question was.

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

    – A Hacking Jul 25 '16 at 15:19
  • I'm just looking for some feedback, not a book. I did provide background on what I was doing and why so I would avoid the anticipated response provided - that this was like controlling an LED and there are tons of examples out there. If this is the ways things go here I'll stop using stack exchange and try a more friendly forum. Best regards. – A Hacking Jul 25 '16 at 15:21
  • As per the answer in the last linked question, "the zero dollars you pay for service here does not equate to you needing to make zero effort in order to be satisfied". Whether or not someone pays you to do research, I honestly do not see a serious effort being made here. I have given you a number of hints and suggestions that might as well be straight out of a CS 101 text book. If you cannot follow those, then perhaps you need to find someone else you can pay to do it for you. Good luck. – goldilocks Jul 25 '16 at 15:24
  • I was also not looking for help from you, but by misappropriately flagging this as a duplicate you basically stopped anyone else from reading it. – A Hacking Jul 25 '16 at 18:36
  • Yes, for the reasons posted in the link I gave you. I think you have failed to understand this is not a discussion forum and you need to break your problem down into discrete elements, and move from the general to the specific. What you have right now is the exact opposite of that; it is a pile of tangentially related issues bound together, targeting the most specific aspect -- the brand of hardware you are using. That is why I have referred you to S.O., and told you to break it down along the lines I've already described. – goldilocks Jul 25 '16 at 18:53

0 Answers0