Esp to Domoticz, connection errors

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
r_afaello
New user
Posts: 2
Joined: 15 Feb 2021, 20:29

Esp to Domoticz, connection errors

#1 Post by r_afaello » 16 Feb 2021, 16:42

Hello.
I am writing because I need help.
I'm starting my adventure with ESP and as an amateur I have a problem that I can't solve.
On the Wemos D1 mini pro I did a temperature monitoring (boiler room).
I used 12 pieces of DS18b20 connected to 2 different GPIOs.
Reading is OK (every 600 seconds). The problem is with sending them to Domoticz (http).
I use mobile internet.
Sometimes half a day I do not have readings in Domoticz, then it works, but only part of it.
Esp has firmware: ESPEasy_ESP82xx_mega-20201016
The logs contain the following entry: c001 connection failed.
I added an additional domoticz server (different hardware and address) to rule out a problem on the server side. It did nothing. Same symptom and same errors.
Today I put a PC there and installed the domoticz server (windows 7). I have set up a third server in Esp to send data. Connected to the same WFI network (local area network).
If esp only sends data to domoticz on PC, everything is fine.
If it sends to the server on the PC (local wifi) and to the destination via the Internet then both domoticz have incomplete data (e.g. 5 out of 12 sensors have been sent). Of course, there are many connection errors in ESP logs.
I have tried setting the reading with a 5 second time shift (600,605,610 ....) in the hope that it will have time to send one reading before trying the next one.
I also tried with the "SendToHTTP wait for ack" option enabled - it did not work
How can I fix the problem?
I think it should be set in the controllers parameters somehow
but unfortunately I can't, and I've tried so many different variants that I don't remember what the defaults are.
I will be grateful for your response.

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

Re: Esp to Domoticz, connection errors

#2 Post by TD-er » 16 Feb 2021, 19:43

Have you tried to set a (much) longer timeout?
For local LAN 100 msec is probably fine, but for somewhere online it probably isn't, especially if you are using some kind of 4G modem.
Please try it with 1000 msec timeout.

N.B. this is the timeout in the controller settings.
See: https://espeasy.readthedocs.io/en/lates ... parameters

r_afaello
New user
Posts: 2
Joined: 15 Feb 2021, 20:29

Re: Esp to Domoticz, connection errors

#3 Post by r_afaello » 19 Feb 2021, 05:47

Thanks for the hint.
I set the forwarding to the domoticz server in the Lan network timeout = 1000 and to the server via the Internet even 1500.
I turned off some sensors ( physically disconnected 2 pieces from ESP, turned them off by software and 3 pieces only by software).
So it reads and sends 7 sensors.
I downloaded the latest firmware (ESP_Easy_mega_20210114_normal_ESP8266_4M1M),
I did not select the SendToHTTP wait for ack option
I turned on Periodical send Gratuitous ARP.
Unfortunately, this did not solve the problem. On both servers, one of the sensors had a break of more than 3 hours in the middle of tonight.

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

Re: Esp to Domoticz, connection errors

#4 Post by TD-er » 19 Feb 2021, 11:02

Does the task itself keep producing data?
Maybe you can also check with an extra sysinfo task, which should always send as there is no connection that can get loose.
Maybe wise to log uptime and free memory, to see if one of those may be causing issues.

kimot
Normal user
Posts: 190
Joined: 12 Oct 2017, 20:46

Re: Esp to Domoticz, connection errors

#5 Post by kimot » 28 Feb 2021, 22:10

And what about sending temperatures using Domoticz JSON api and ESPeasys SendToHTTP?

/json.htm?type=command&param=udevice&idx=IDX&nvalue=0&svalue=TEMP

IDX = id of your device (This number can be found in the devices tab in the column "IDX")
TEMP = Temperature

Maybe some pause between sensors?

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

Re: Esp to Domoticz, connection errors

#6 Post by TD-er » 01 Mar 2021, 09:20

Why still trying to send to Domoticz using HTTP?
Why not using MQTT?

kimot
Normal user
Posts: 190
Joined: 12 Oct 2017, 20:46

Re: Esp to Domoticz, connection errors

#7 Post by kimot » 04 Mar 2021, 21:20

Because no mqtt broker is needed?
Another possible weak link in the information chain?

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 26 guests