Ide sprobowac czy mi pujdzie esp7 z ta zmiana
String Klucz_dostepu_1 = "Authorization: Bearer eyJ0eXAiOiJKV1QiLC....to wywalic
String Klucz_dostepu_2 = "Authorization: Bearer eyJ0eXAiOiJKV1QiLC.... to tez
}
if (supla_mode == 1){
client.println(String("GET ") + url_1 + " HTTP/1.1\r\n" +
"Host: " + host + "\r\n" +
"User-Agent: SuplaButtonESP8266\r\n" +
Klucz_dostepu_1 + "\r\n" +<- wywalam to
"Connection: close\r\n\r\n");
}
if (supla_mode == 2){
client.println(String("GET ") + url_2 + " HTTP/1.1\r\n" +
"Host: " + host + "\r\n" +
"User-Agent: SuplaButtonESP8266\r\n" +
Klucz_dostepu_2 + "\r\n" <-wywalam to
"Connection: close\r\n\r\n");
}
}
podaje
const char* host = "svr9.supla.org/direct/"
String url_1 = "x/x/turn-off"; //Adres Link bezposredni bez
https://svr9.supla.org/direct/
String url_2 = "x/x/turn-off"; //Adres Link bezposredni bez
https://svr9.supla.org/direct/
i nici
w monitorze
8:59:14.278 -> scandone
18:59:14.794 -> Supla mode = 2
18:59:17.138 -> scandone
18:59:18.075 -> state: 0 -> 2 (b0)
18:59:18.075 -> state: 2 -> 3 (0)
18:59:18.075 -> state: 3 -> 5 (10)
18:59:18.075 -> add 0
18:59:18.075 -> aid 4
18:59:18.075 -> cnt
18:59:18.122 ->
18:59:18.122 -> connected with vodafoneE120, channel 1
18:59:18.122 -> dhcp client start...
18:59:18.309 -> ip:192.168.0.16,mask:255.255.255.0,gw:192.168.0.1
18:59:18.309 -> Polaczono z WIFI
18:59:18.309 -> MAC:84:0D:8E:8C:A9:D7 IP:192.168.0.16 M:255.255.255.0 GW:192.168.0.1
18:59:18.309 -> Koniec polaczenia
18:59:18.403 -> state: 5 -> 0 (0)
18:59:18.403 -> rm 0
18:59:18.403 -> Dobranocdel if0
18:59:18.403 -> bcn 0
18:59:18.403 -> del if1
18:59:18.403 -> usl
18:59:18.497 -> enter deep sleep⸮⸮