richard238
Posts: 108
Joined: Sun Mar 31, 2013 1:36 pm
Location: Crawley, UK

View GPIO status in Browser

Wed Feb 17, 2016 11:46 am

I'd like to create a simple door op/door closed alert in a browser.
I've got the door sensor and a couple of LED indicators working.

The Pi also hosts basic Wordpress install.

I'd like a page on the Wordpress which shows a simple 'Door Open' / 'Door closed' message.
Needs to dynamically update too.

Does not need to be IoT / externally viewable, Intranet only will be just fine.

What's the best way to achieve this?

Thank you.

richard238
Posts: 108
Joined: Sun Mar 31, 2013 1:36 pm
Location: Crawley, UK

Re: View GPIO status in Browser

Sat Apr 16, 2016 9:34 pm

Bump!

Anyone?

Ta.

User avatar
electronicsguy
Posts: 156
Joined: Wed Jan 21, 2015 11:20 pm
Contact: Website

Re: View GPIO status in Browser

Sun Apr 17, 2016 1:12 am

blog: https://electronicsguy.wordpress.com
github: https://github.com/electronicsguy

User avatar
DougieLawson
Posts: 35540
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: View GPIO status in Browser

Sun Apr 17, 2016 12:55 pm

Does WebIOPi run on a RPI3? Or is it still the ugly mess it was a couple of years ago?
Note: Having anything remotely humorous in your signature is completely banned on this forum. Wear a tinfoil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

darkbibble
Posts: 602
Joined: Mon Mar 09, 2015 5:20 pm
Location: corby, england

Re: View GPIO status in Browser

Sun Apr 17, 2016 1:01 pm

you need something like a magnetic switch and a small circuit to attach it to an input pin on the pi.
then you need to write some code to listen on the pin for it to go low/high for door open/closed,
Q; How many Windows users does it take to fix a Linux problem??
A; Whats a Linux problem

richard238
Posts: 108
Joined: Sun Mar 31, 2013 1:36 pm
Location: Crawley, UK

Re: View GPIO status in Browser

Tue Apr 19, 2016 2:26 pm

I've got the reed switch working, it's reporting "Door Open/Closed" on the Pi, and scrolling on Unicorn HAT.

I've no idea, well not much, on how to code this to show a message in a browser.
But, I'm sure it's probably very simple.

Once it's working in a bit of PHP/HTML, Unicorn HAT will be retired and used on another project.

This only needs to be at home, no need for WWW access.
I've seen 1001 projects to automate US style garage doors. This isn't what I want, I just need an internal browser page which updates perhaps by the minute, with some text showing door open / door closed.

I can tinker with CSS to make it look pretty some other day.

Thank You.

Return to “Beginners”