Open carlosriosg opened 4 years ago
Hi, First of all thanks for your work. It´s amazing.
I have the same problem, in max 24 hours dont recieve data, and have to manual reset the board.
It´s possible to implement a board reset every 12 hours (for example)?
Thanks in advance
Same here, after setup, following super clear instructions it lasted about 18 hours before I needed to restart the board. ESP32 DEVKIT. Other than that, it works great, awesome job!
Please can you all try the versions now uploaded and let me know how you get on. Thanks
Hi Anthony, I congratulate you on the work you have done yesterday I reloaded the files to ESP32, and it was working correctly for 14 hours, then I stopped sending information, While it was working I found that the information sending was more constant than the previous configuration, but something happens that the system crashes after a few hours
If you need more proof, here we are Thank you
Are you able to copy information from the REPL that shows any errors after the crash?
I think that I will not be able to do it, since it is connected only in a 5v connector.
There is a way to see your device in the ESP Home of HA, It would be great, so you could see the LOG
Anthony, leave running esp32 from the raspberry, now to wait for it to mark an error and send the report
regards
I had it working for 48 hours before the need to reset, it is back now. Before the update, it never lasted more than 24 hours.
Hi Anthony, it worked perfect for more than 48 hours connected directly to the Raspberry, but connected to a normal cell phone charging socket only reached 14 hours. What will be the ideal power source for an ESP32?
In some parts of the script I frame some errors like this:
What can be?
thanks for your work
Trying to connect to a4:c1:38:50:6e:17 GAP procedure initiated: connect; peer_addr_type=0 peer_addr=a4:c1:38:50:6e:17 scan_itvl=16 scan_window=16 itvl_min=24 itvl_max=40 latency=0 supervision_timeout=256 min_ce_len=16 max_ce_len=768 own_addr_type=0 self.connected False Trying to connect to a4:c1:38:50:6e:17 Error: Connect [Errno 114] EALREADY self.connected False connected peripheral has disconnected. 65535 255 00:00:00:00:00:00 Trying to connect to a4:c1:38:50:6e:17 GAP procedure initiated: connect; peer_addr_type=0 peer_addr=a4:c1:38:50:6e:17 scan_itvl=16 scan_window=16 itvl_min=24 itvl_max=40 latency=0 supervision_timeout=256 min_ce_len=16 max_ce_len=768 own_addr_type=0 self.connected False Trying to connect to a4:c1:38:50:6e:17 Error: Connect [Errno 114] EALREADY self.connected False connected peripheral has disconnected. 65535 255 00:00:00:00:00:00
Hi Anthony I have been testing your programming for several days with the integration of Xiaomi thermometers in an ESP32, As a conclusion, the device behaves correctly connected directly to the Raspberry but if the ESP32 connected it directly to the same power source of the 2 amp Raspberry, for some reason it loses connection and stops sending data to the mqtt after 24 hours of functioning, It's very strange I wonder if an automatic restart can be integrated into the programming after 20 hours of operation, for example
is this possible to do? The same thing happens to the rest of the chat? stay tuned
Thank you very much for your work
I can say since the last update, it is working better, I had it working for 2 weeks with no need to restart but then it stops publishing and I need to power cycle to get it going again. I see in the code there is a machine.reset() if it fails to connect to MQTT. While it stops publishing the information (I have 4 Xiaomi) it doesn't seem to restart so I presume it is still connected to MQTT. My question is, without any modification of the existing code on the ESP32, is it possible to launch a command to mimic a lost connection from home assistant? This way I could force a restart when it stops publishing. My other solution would be to setup a D1 Mini with a relay that will power cycle the ESP32 when needed but I think this is overkill.
If you can show me what comes up in the REPL then maybe I can understand what is causing the disconnect.
I have a small problem, my esp32 is connected to an AC power and my only computer is a laptop that I need to take to work every day. At this time it stays connected for more than 24-48 hours. Unless I have a way to connect to the ESP without disconnecting it from the AC or is there a saved log that is available?
EDIT: I now have the ESP32 connected to a computer, I expect it will run fine for a number of days, will post back when it fails.
I'm having similar issue with my thingy. My wireless network is currently a bit flimsy and I don't know is it causing the issue or something else. I just got the logs from the esp and here is what I'm seeing from one full days log:
2020-08-22 00:04:23 Error: ntptime [Errno 110] ETIMEDOUT
2020-08-22 00:11:10 Time set from server
2020-08-22 02:01:04 Error: Write [Errno 107] ENOTCONN
2020-08-22 02:25:08 Error: Write [Errno 107] ENOTCONN
2020-08-22 02:36:13 Error: Write [Errno 107] ENOTCONN
2020-08-22 03:16:47 Error: Write [Errno 107] ENOTCONN
2020-08-22 04:08:48 Error: Write [Errno 107] ENOTCONN
2020-08-22 07:02:31 Initialising
2020-08-22 07:04:53 Time set from server
2020-08-22 07:58:09 Error: Connect [Errno 5] EIO
2020-08-22 08:02:40 Initialising
2020-08-22 08:04:34 Time set from server
2020-08-22 08:54:50 Error: Write [Errno 107] ENOTCONN
2020-08-22 09:00:19 Error: Connect [Errno 5] EIO
2020-08-22 09:10:27 Error: Connect [Errno 5] EIO
2020-08-22 09:37:42 Error: Connect [Errno 5] EIO
2020-08-22 09:59:55 Error: Write [Errno 107] ENOTCONN
2020-08-22 10:19:55 Error: Connect [Errno 5] EIO
2020-08-22 10:25:02 Error: Write [Errno 107] ENOTCONN
2020-08-22 10:29:21 Error: Connect [Errno 5] EIO
2020-08-22 10:44:42 Initialising
2020-08-22 10:46:34 Time set from server
2020-08-22 11:11:23 Initialising
2020-08-22 11:13:03 Error: Read [Errno 107] ENOTCONN
2020-08-22 11:14:16 Time set from server
2020-08-22 11:16:01 Error: Connect [Errno 5] EIO
2020-08-22 12:23:41 Error: Connect [Errno 5] EIO
2020-08-22 12:23:43 Error: Connect [Errno 5] EIO
2020-08-22 12:23:44 Error: Connect [Errno 5] EIO
2020-08-22 12:23:45 Error: Connect [Errno 5] EIO
2020-08-22 12:23:46 Error: Connect [Errno 5] EIO
2020-08-22 12:23:48 Error: Connect [Errno 5] EIO
2020-08-22 12:23:49 Error: Connect [Errno 5] EIO
2020-08-22 12:23:50 Error: Connect [Errno 5] EIO
2020-08-22 12:32:29 Error: Write [Errno 107] ENOTCONN
2020-08-22 13:11:49 Error: Write [Errno 107] ENOTCONN
2020-08-22 13:23:22 Error: Connect [Errno 5] EIO
2020-08-22 13:34:30 Error: Connect [Errno 5] EIO
2020-08-22 13:45:10 Error: Connect [Errno 5] EIO
2020-08-22 15:04:35 Error: Connect [Errno 5] EIO
2020-08-22 15:14:29 Error: Connect [Errno 5] EIO
2020-08-22 16:09:53 Error: Write [Errno 107] ENOTCONN
2020-08-22 16:58:38 Error: Write [Errno 107] ENOTCONN
2020-08-22 18:45:11 Error: Write [Errno 107] ENOTCONN
2020-08-22 19:16:32 Error: Connect [Errno 5] EIO
2020-08-22 20:05:58 Error: Write [Errno 107] ENOTCONN
2020-08-22 20:25:07 Error: Connect [Errno 5] EIO
2020-08-22 23:40:29 Error: Write [Errno 107] ENOTCONN
I've attached the whole log here for you. 20200822ble.zip
Unfortunately I don't have exact "stuck" time for you but probably it has been somewhere between 02:00 and 10:00
From my previous posts, I was under the impression that I had to restart the ESP32 after a day and then I found it worked for over a week or two but now I realized, the ESP stops publishing the Xiaomi values and then after a while it starts again without power cycling the ESP. However, out of the four devices I have, one stopped publishing and it's been a few days now. The Xiaomi is about 10 feet away from the ESP32 in the next room. The other 3 are in same room, one floor down and two floors down. Connecting to the ESP via Putty, this is what come out of the one that I am not getting data from: ` Trying to connect to a4:c1:38:6e:19:6b GAP procedure initiated: connect; peer_addr_type=0 peer_addr=a4:c1:38:6e:19:6b scan_itvl=16 scan_window=16 itvl_min=24 itvl_max=40 latency=0 supervision_timeout=256 min_ce_len=16 max_ce_len=768 own_addr_type=0 self.connected False Trying to connect to a4:c1:38:6e:19:6b Error: Connect [Errno 114] EALREADY self.connected False connected peripheral has disconnected. 65535 255 00:00:00:00:00:00 Trying to connect to a4:c1:38:6e:19:6b GAP procedure initiated: connect; peer_addr_type=0 peer_addr=a4:c1:38:6e:19:6b scan_itvl=16 scan_window=16 itvl_min=24 itvl_max=40 latency=0 supervision_timeout=256 min_ce_len=16 max_ce_len=768 own_addr_type=0 self.connected False Trying to connect to a4:c1:38:6e:19:6b Error: Connect [Errno 114] EALREADY self.connected False connected peripheral has disconnected. 65535 255 00:00:00:00:00:00 Trying to connect to a4:c1:38:6e:19:6b GAP procedure initiated: connect; peer_addr_type=0 peer_addr=a4:c1:38:6e:19:6b scan_itvl=16 scan_window=16 itvl_min=24 itvl_max=40 latency=0 supervision_timeout=256 min_ce_len=16 max_ce_len=768 own_addr_type=0 self.connected False Trying to connect to a4:c1:38:6e:19:6b Error: Connect [Errno 114] EALREADY self.connected False IRQ peripheral connect A peripheral has sent a notify request. 0 54 b'\x86\t3\xbc\x0b' GAP procedure initiated: connection parameter update; conn_handle=0 itvl_min=12 itvl_max=24 latency=0 supervision_timeout=90 min_ce_len=16 max_ce_len=768 Reading Data GATT procedure initiated: read; att_handle=3 .False A gattc_read() has completed. 0 3 b'LYWSD03MMC\x00' self.name LYWSD03MMC length 10 Got LYWSD03MMC GAP procedure initiated: terminate connection; conn_handle=0 hci_reason=19 .connected peripheral has disconnected. 0 0 a4:c1:38:6e:19:6b Name: LYWSD03MMC
` EDIT: Moments after posting above, the Xiaomi started publishing its data, it is like connecting to the ESP via Putty triggered something.
I have been testing the board for a few days and I have realized that at least once a day I have to restart the board because it is not sending a signal, … if you find a solution to that, tell me
regards