ESPEasy don't send data to Domoticz

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
xhunter
New user
Posts: 3
Joined: 23 Feb 2023, 19:27

ESPEasy don't send data to Domoticz

#1 Post by xhunter » 23 Feb 2023, 19:45

Hello, I have a problem sending data from espeasy to domoticz (ver. 20231). Esp has version "Build: ESP_Easy_mega_20221224_normal_ESP8266_4M1M Dec 24 202"

In the esp log I get the message:

Code: Select all

EVENT: http#myweb.ddns.net=401
4132864: HTTP : C001 myweb.ddns.net GET... failed HTTP code: 401
When I manually want to enter data into the sensor via www, it's ok:

Code: Select all

http://myweb.ddns.net:8080/json.htm?username=admin=&password=***encodedpassword**&type=command&param=udevice&idx=44&nvalue=0&svalue=4
Here is screenshot from ESP

Image

Where could be the problem?

User avatar
Ath
Normal user
Posts: 3415
Joined: 10 Jun 2018, 12:06
Location: NL

Re: ESPEasy don't send data to Domoticz

#2 Post by Ath » 23 Feb 2023, 19:57

Your dns configuration is most likely not correct, what do you have set on the Config page in the WiFi IP Settings section?
/Ton (PayPal.me)

xhunter
New user
Posts: 3
Joined: 23 Feb 2023, 19:27

Re: ESPEasy don't send data to Domoticz

#3 Post by xhunter » 23 Feb 2023, 20:07

Here is my config Image

When I enter the domoticz ip address in the hostname it doesn't work either

User avatar
Ath
Normal user
Posts: 3415
Joined: 10 Jun 2018, 12:06
Location: NL

Re: ESPEasy don't send data to Domoticz

#4 Post by Ath » 23 Feb 2023, 20:53

Doesn't your router provide a local dns? That's most likely quicker to respond than the external 8.8.8.8 Google dns.
Is the Domoticz server in a different lan segment? Or even external from your network? The 401 error code indicates it's not allowed to be accessed from the ESP, so it's a networking issue, probably not an ESPEasy issue.
/Ton (PayPal.me)

xhunter
New user
Posts: 3
Joined: 23 Feb 2023, 19:27

Re: ESPEasy don't send data to Domoticz

#5 Post by xhunter » 23 Feb 2023, 21:04

I changed the dns address to the default gateway ip. Domoticz is on the same network as ESP. I set the domoticz address as ip address and not hostname and it still doesn't work.

User avatar
Ath
Normal user
Posts: 3415
Joined: 10 Jun 2018, 12:06
Location: NL

Re: ESPEasy don't send data to Domoticz

#6 Post by Ath » 23 Feb 2023, 21:21

Have you re-checked the password for the Domoticz admin account? It needs the actual password in the Controller settings. After saving it will be replaced by a dummy in the page, to avoid it being scraped from the browser.
Does it contain some specific special characters?, as that could cause issues, though I haven't seen any reports of that recently.

You can also test the url you sent from the browser using the SendToHTTP command from the Tools page, but it probably needs to be split in 3 parts for that: The IP-address (no http:// prefix!), the port and the rest of the url, like:

Code: Select all

SendToHTTP,192.168.100.???,8080,/json.htm?username=admin=&password=***encodedpassword**&type=command&param=udevice&idx=44&nvalue=0&svalue=4
Fill in the 4th byte of the Domoticz IP address instead of the ???
/Ton (PayPal.me)

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESPEasy don't send data to Domoticz

#7 Post by TD-er » 23 Feb 2023, 21:43

When possible, do not address internal devices via your public address.
By making it public, you need to add port forwarding and makes your network vulnarable for attacks.

Also not all routers accept forwarding from internal nodes.
Thus when possible, use internal IP, like Ton already suggested.

Another thing that might go wrong here is the authentication.
Does the URL you try to reach work when you open it from your own browser? (assuming it is in the same subnet)
If so, please check whether the browser does redirect to https:// instead of http://

Maybe the authentication needs a syntax like http://username:password@hostname:portname/....

Post Reply

Who is online

Users browsing this forum: No registered users and 18 guests