Newbie Getting Started

Hi All,

I posted here a few weeks back, but my pi crashed and I'm starting over. My project is fairly simple, at least for someone who knows programming. I will run an Apache2/php webserver on the pi and allow users (clients?) to access it through a webpage. This is to open and close a driveway gate, the page will have one button to cycle the gate (input), two LEDs for open & close verification, and a progressbar (outputs) to show it's position while traversing. I had a thread here a couple weeks ago about it, but it turned into a security issue thread. This is what my finished html index file looks like:

I tried the NR Dashboard (couldn't make things line up right) but ended with with HTML, some CSS and Javascript. No php yet...

Being a complete newbie, I need to admit I "stole" a lot of code from tutorials and "tips" pages but still need a lot of help with the "communications" part. BTW, I don't even know how to get info moving beween the pi | N-R | and Apache2's index page!

  • How to get my index.php page to listen for commands to/from pi?

  • What protocols to use for this?

  • How to get the button (Bootstrap), ver. lights (SVG), pg bar (JS) to work?

  • How to allow only one user at a time and have that user time-out after xx seconds?

  • How to get UN/PW info from the client to the server?

And most of all - I've been all over Google for days and it seems there's no way to utilise my close (X) button to kill the tab - unless - that process created it and you have the window handle to work with. Since that is the case, can my index page be a "redirect" to another page where I can intercept it's handle?

I know this is a lot to ask in one Q, but anything to get me started will be appreciated!


Did you ask for help here?

Maybe, I don't remember. My pi dumped and I lost everything. Anyhow, I know I'm in the wrong place. I'll try and find an HTML forum and post back when I get my UI finished and start on the N-R programming...


You’re making life very complicated for yourself!

Personally I would start by getting the functionality working just in Node-RED, does it really matter if it doesn’t lineup right?
Consider it a prototype, once you have a working solution you could then think of finesseing your solution by developing an alternative web front next

Well, I'm frustrated for sure. :unamused: With old age comes lack of ability to multi-task (and failing eyesight as well). I spent yesterday afternoon trying to find out how to get my windows to have visible borders around them so I can tell what's what when they overlap. :clock5: Sucks that I don't know squat about linux, all that time wasted and zero results. Maybe I should "back burner" the front-end for awhile and work on the fun stuff. Give my mind and eyes a break...


If you’re doing it for fun or as a proof of concept it seems like an interesting project, but for real life application I would do a research first.
I’m as a user is not ready to trade a physical remote control with push button for an app on smart phone. I usually push button before I get to the gate, so it’s open when I’m there, looking for a phone and than app, then look at the status bar doesn’t sound very convenient, unless there’s something you’re not telling us.
Even though my gate opener is connected to securty alarm panel through zwave gateway and there is a way to activate a gate based on my geo location. I’m not using it and questioning my original intentions.
In my opinion, main purpose of the gate is security, less features and gadgets attached to it, more chances it will maintain its integrity.

Don’t mean to discourage you, just a thought