Posts: 2
Joined: Thu Jan 04, 2018 6:47 am

remotely read the GPIO input status

Thu Jan 04, 2018 6:54 am

I want to remotely read the GPIO input status.
The idea is: an android widget that changes color when the input state changes (shows the status of the alarm system at home).
I have no idea how to do it.
Now I used the browser and using WebIOPi I saw the status of the input, but you have to open the browser, log in, do not want to, I want it to be simple and fast.
Changing the exit status is not a problem - a simple page in PHP, and URL cancellations from the Android application, but I do not know how to read the state? Do you have any idea?

Sorry for my English ;-)

Posts: 65
Joined: Mon Aug 24, 2015 6:06 am

Re: remotely read the GPIO input status

Sun Jan 21, 2018 3:54 pm

I have done this previously with a socket program on the android side calling a socket program on the alarm machine whose GPIO data you require.

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

Re: remotely read the GPIO input status

Sun Jan 21, 2018 8:06 pm

I've done this with an MQTT publisher on one machine and an MQTT subscriber on another. No socket programming needed, the MQTT API is easier and there's MQTT libraries for all kinds of programming languages and all sorts of IoT devices.

Do it with the Node-Red Javascript framework and you'll find it exceedingly easy.
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

Since 2012: 1B*5, 2B*2, B+, A+, Zero*2, 3B*3

Please post ALL technical questions on the forum. Do not send private messages.

Return to “General programming discussion”

Who is online

Users browsing this forum: No registered users and 3 guests