Page 1 of 1

ESPeasy on esp32 data send to domoticz on pi 3

Posted: Saturday 17 June 2023 23:22
by stoorhobbit
I am trying to setup DHT22 temperature and humidity sensor on an esp32 running espeasy. My issue appears to be sending the data to domoticz.

I am pretty green in this field, I did use it a number of years ago using an esp8266 nodemcu, but this one is evading me.

I will try to provide as much info as possible in the hope someone can help me resolve my issue.
(i had a number of issues trying to send better detail values, so trimmed to permit submission)

I have installed latest stable domoticz on raspberry pi 3B
I created a user "viewer"
I can access domoticz using my web browser via the pi IP address:8080

I have created a hardware device "dummy" with a sensor device with idx 1
Temp + Humidity THGN122/123/132, THGR122/228/238/268
user viewer has full admin access to this device

I flashed the esp32 with "20230508_normal_ESP32 factory"
The dht22 is displaying temp and humid values in the devices tab via GPIO-4

I have setup a controller domoticz http, using ip address with controller port 8080.
the user and password are correct as setup in domoticz
It is successfully connecting to my wifi, same network as the pi

I check the log and it shows the following

926704: DHT : Temperature: value
926707: DHT : Humidity: value
926721: Domoticz: Sensortype: 2 idx: 1 values: temp; humid; 3
926763: HTTP : C001 ip address:8080 GET... failed HTTP code: 401
.
.
.
.
927193: HTTP : C001 ip address:8080 GET... failed HTTP code: 401

As a test I tried using my chrome browser
a json command with values
and domoticz received the data and updated the temperature values accordingly.

So i'm currently at a loss as to why domoticz doesn't accept data from espeasy, all help appreciated

Re: ESPeasy on esp32 data send to domoticz on pi 3

Posted: Sunday 18 June 2023 10:47
by Kedi
Did you try with the IP-address added to the "Trusted Networks" in Domoticz?

Re: ESPeasy on esp32 data send to domoticz on pi 3

Posted: Sunday 18 June 2023 11:02
by waltervl
And also switch on "Allow Basic Authentication over plain HTTP" if you use http. Menu setup settings tab security.

Re: ESPeasy on esp32 data send to domoticz on pi 3

Posted: Sunday 18 June 2023 11:08
by stoorhobbit
Cheers Kedi worked a treat - thank you

I added the esp32 ip address to the trusted networks but it continued with the same error. I changed the address to add a * instead of the specific address and it worked straight away. Log file showed the foillowing.

126921: Domoticz: Sensortype: 2 idx: 1 values:;3
126975: HTTP : C001 ip address :8080 GET... HTTP code: 200
128693: WD : Uptime 2 ConnectFailures 0 FreeMem 217392 WiFiStatus WL_CONNECTED 3 ESPeasy internal wifi status: Conn. IP Init

Now it's working I need to find out why it will only work by adding the range to trusted networks.

Re: ESPeasy on esp32 data send to domoticz on pi 3

Posted: Sunday 18 June 2023 11:11
by waltervl
waltervl wrote: Sunday 18 June 2023 11:02 And also switch on "Allow Basic Authentication over plain HTTP" if you use http. Menu setup settings tab security.

Re: ESPeasy on esp32 data send to domoticz on pi 3

Posted: Sunday 18 June 2023 11:11
by stoorhobbit
waltervl wrote: Sunday 18 June 2023 11:02 And also switch on "Allow Basic Authentication over plain HTTP" if you use http. Menu setup security.
After reading this post I went back and removed the range from trusted network and enabled basic authentication. it's working.

I thought I had checked every tab in the domoticz panels, couldn't believe I hadnt spotted the secury under settings :shock:

Thank you both for your help, very much appreciated