Page 1 of 1

ESP82666 sending data to Domoticz

Posted: Wednesday 03 July 2019 11:18
by mrzax
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&param=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!

Re: ESP82666 sending data to Domoticz

Posted: Wednesday 03 July 2019 11:57
by freijn
Enable users on the same network to access without a login/password (settings in Domoticz)

Re: ESP82666 sending data to Domoticz

Posted: Wednesday 03 July 2019 13:30
by mrzax
I found settings for web-based users, but not for users as device.... :(

Re: ESP82666 sending data to Domoticz

Posted: Wednesday 03 July 2019 16:42
by freijn
Did you found the setting were you "tust" devices/users on the same network. THats the one you are looking for.

Re: ESP82666 sending data to Domoticz

Posted: Wednesday 03 July 2019 17:00
by mrzax
Problem solved!

Setup -> Settings -> System setup -> local networks (NO USERNAME/PASSWORD) field filled with "127.0.0.*;192.168.1.*"

Thank you for your help!