ESP82666 sending data to Domoticz

On various Hardware and OS systems: pi / windows / routers / nas, etc

Moderator: leecollings

Post Reply
mrzax
Posts: 3
Joined: Wednesday 03 July 2019 11:11
Target OS: -
Domoticz version:
Contact:

ESP82666 sending data to Domoticz

Post 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!
freijn
Posts: 536
Joined: Friday 23 December 2016 16:40
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: Netherlands Purmerend
Contact:

Re: ESP82666 sending data to Domoticz

Post by freijn »

Enable users on the same network to access without a login/password (settings in Domoticz)
mrzax
Posts: 3
Joined: Wednesday 03 July 2019 11:11
Target OS: -
Domoticz version:
Contact:

Re: ESP82666 sending data to Domoticz

Post by mrzax »

I found settings for web-based users, but not for users as device.... :(
freijn
Posts: 536
Joined: Friday 23 December 2016 16:40
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: Netherlands Purmerend
Contact:

Re: ESP82666 sending data to Domoticz

Post by freijn »

Did you found the setting were you "tust" devices/users on the same network. THats the one you are looking for.
mrzax
Posts: 3
Joined: Wednesday 03 July 2019 11:11
Target OS: -
Domoticz version:
Contact:

Re: ESP82666 sending data to Domoticz

Post 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!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest