Working (GET):
sudo curl -X GET "http://192.168.1.1/cgi-bin/io_state?username=XXX&password=XXX&pin=relay0&state=open"
Respons: OK
Not working (POST):
sudo curl -X POST "http://192.168.1.1/cgi-bin/io_state?username=XXX&password=XXX&pin=relay0&state=open"
Response: Bad username or password
I want to be able to POST the relay to OPEN in 30 sec. The reason for it is that the relay control the power to my computer, and I want to shutdown my computer correctly before the power went out. So I can not have a GET, because then I have to wait.
Regards Terje
Replya minute ago