You may not have the correct board setting in the App… Also, D5 doesn’t mean the silkscreened D5 on the ESP, rather the GPIO/Arduino reference - Digital Pin 5 (which is probably the silkscreened D1)
And of course the V5 is a totally different reference… with which you could be triggering any pin via code from your V5 Function.
PS the red “Issues and Errors” topic category is for bugs and stuff… this is just a case of using improper syntax.
With the API… D is for Digital, A is for Analog and V is for Virtual… But the number in both the Digital and Analog are using the GPIO(Arduino) designation NOT the silkscreened (NodeMCU) one.
I am testing on my Mega based testbench, and getting the same error… and with the Mega there is no discrepancies… the button on D12 is digital pin 12, AKA GPIO12, AKA API D12…
OK, while I can toggle pins, I can NOT read them, on Arduino or NodeMCU…
On the NodeMCU while entering different pins from D1 and up, I get the rare “1” or “128” but mostly the “Requested pin not exists in app.”, and when I can get a value, it doesnt change when the supposed pin state changes…
I have tried Generic board, ESP8266 and NodeMCU… all same results.
I am starting to see how this supposedly RESTful API is causing some to lose sleep
OK, back to the RED Issues and Errors category… something appears quirky with this API
@noersaleh All Right!.. Preliminary tests with a clean Project point out what I guess is obvious, after the fact … but not documented that I am aware of (as far as the API is concerned).
If you don’t have a widget assigned to a digital pin, it will register as “Requested pin doesn’t exist in the app.”… or possibly a random, unchangeable, state.
But if you then assign a widget/reading rate to a digital pin, then the API GET command will read the corresponding pin state [“0”] or [“1”].
The key is that you MUST have an pin assigned widget!.. vPin for Vpin reading, GPIO assigned for Dpin (or Apin) reading.
Toggling a digital pin however WILL work without a widget assigned to the pin… at least with the Write pin value via GET method… go figure.