ESP82666 sending data to Domoticz
Posted: Wednesday 03 July 2019 11:18
Hello guys,
I tried to send data from ESP8266 to Domoticz, but I have perma error.
My sending function part is:
const char* host = "192.168.1.66";
const int port = 11280;
http.begin(host,port,url);
int httpCode = http.GET();
if (httpCode) {
if (httpCode == 200) {
String payload = http.getString();
Serial.println("Domoticz response ");
Serial.println(payload);
}
}
The error message is:
11:14:09.490 -> Send data to Domoticz
11:14:09.563 -> connecting to 192.168.1.66
11:14:09.563 -> Requesting URL: /json.htm?type=command¶m=udevice&idx=10&nvalue=0&svalue=30.90
11:14:09.669 -> Domoticz response
11:14:09.708 -> <html><head><title>Unauthorized</title></head><body><h1>401 Unauthorized</h1></body></html>
11:14:09.778 -> closing connection
When I try to open Domonicz from my browser http://192.168.1.66:11280 is working well.
Does anybody see what is the problem?
Thank you!
I tried to send data from ESP8266 to Domoticz, but I have perma error.
My sending function part is:
const char* host = "192.168.1.66";
const int port = 11280;
http.begin(host,port,url);
int httpCode = http.GET();
if (httpCode) {
if (httpCode == 200) {
String payload = http.getString();
Serial.println("Domoticz response ");
Serial.println(payload);
}
}
The error message is:
11:14:09.490 -> Send data to Domoticz
11:14:09.563 -> connecting to 192.168.1.66
11:14:09.563 -> Requesting URL: /json.htm?type=command¶m=udevice&idx=10&nvalue=0&svalue=30.90
11:14:09.669 -> Domoticz response
11:14:09.708 -> <html><head><title>Unauthorized</title></head><body><h1>401 Unauthorized</h1></body></html>
11:14:09.778 -> closing connection
When I try to open Domonicz from my browser http://192.168.1.66:11280 is working well.
Does anybody see what is the problem?
Thank you!