/settings and /pins doesn't work properly
radanliska opened this issue · comments
Please, could you write (after testing it) how to set pins 8,9, 11 and 12 for output and how to set logical 0 and logical 1 to pins 8,9, 11 and 12?
I have tried curl --request GET --header "Content-Type: application/json" server/pins/11 and it returns 0. When I try:
curl --request PUT --header "Content-Type: application/json" server/pins/11 -d '"HIGH"' and
curl --request GET --header "Content-Type: application/json" server/pins/11 I see again 0.
I also tried /settings to set output_pins, but it doesn't work.
Could you please show full example how to work with your restfull server?
Thank you.
Sorry, the README is outdated. Here's the handler code:
https://github.com/sidoh/esp8266_pin_server/blob/master/lib/PinHandler/PinHandler.cpp#L34-L62
It should be:
curl -X PUT -H 'Content-Type: application/json' -d '{"action":"set","value":1}' server/pins/11
I updated the README. Let me know if something's missing. Thanks!