This seems like something simple but I can't find the right command to do it and searching the forum hasn't resulted in the right clue.
Is it possible to read the value of a task+variable via a http command? My guess would be somehing like http://ESPEasy/control?cmd=status,task1,variableName but that doesn't work.
I know that http://ESPEasy/json returns all the values but it would be nice to just the one specific value instead of having the parse the json string.
Get variable value via http?
Moderators: grovkillen, Stuntteam, TD-er
Re: Get variable value via http?
-----------
IOTPLAY. Tinkerer, my projects are @ http://GitHub.com/IoTPlay, and blog https://iotplay.org. Using RPi, Node-Red, ESP8266 to prove Industry 4.0 concepts.
IOTPLAY. Tinkerer, my projects are @ http://GitHub.com/IoTPlay, and blog https://iotplay.org. Using RPi, Node-Red, ESP8266 to prove Industry 4.0 concepts.
Re: Get variable value via http?
Thanks this helps! But is it possible to narrow this even further down? Something like http://host/json?tasknr=2,variable1 ?JR01 wrote:http://host/json?tasknr=2
If you want the areay of info for 2nd task, then navigate the areay info
-
- New user
- Posts: 4
- Joined: 03 Nov 2016, 23:13
Re: Get variable value via http?
I also want to know how to do this.
I have a Sonoff and want to switch my light.
To see whats the status of the light is have a button in the Android App created with MIT App Inventor.
If the status of GPIO is "1" the button should tourn green and if "0" it should tourn grey.
But i don't know how to read the GPIO to the app
I have a Sonoff and want to switch my light.
To see whats the status of the light is have a button in the Android App created with MIT App Inventor.
If the status of GPIO is "1" the button should tourn green and if "0" it should tourn grey.
But i don't know how to read the GPIO to the app

Re: Get variable value via http?
This should do the trick http://yourip/control?cmd=status,gpio,1
Re: Get variable value via http?
Is this documented on the Wiki?
Who is online
Users browsing this forum: No registered users and 9 guests