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: 91
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: 34544
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

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.
Note: Having anything remotely humorous in your signature is completely banned on this forum.

Any DMs sent on Twitter will be answered next month.

This is a hippy & doctor free zone.

Return to “General programming discussion”