After a bit of advice if i may.
I’ve got around 10 or so Sonoff Tasmota switches in and around the house. I’ve got my HA installed on a Pi3 connected to my router via Ethernet. I’ve also got my Texecom Smart Connect connected to router via Ethernet.
In all, i have around 20 WiFi devices (laptops, smart switches, nest, phones, tablet, TVs etc.) and i’ve just configured two new Sonoffs (S26 and TH10) using bin file and then added some base level config via termite and after that i went and added custom names and configured the switch type and i’ve not had a problem with this approach before now.
The two new switches will connect to the router, connect to the mosquito broker and i can toggle them in HA front end but they both keep dropping WiFi connection. Do you think this is a broker issue or a WiFi issue? I don’t think it’s a configuration issue, but happy to hear ideas.
This is the log out of Mosquito;
Log
1543932537: New connection from 192.168.1.27 on port 1883. [INFO] found MQTT-USER on local database 1543932537: Client DVES_43AA68 already connected, closing old connection. 1543932537: Client DVES_43AA68 disconnected. 1543932537: New client connected from 192.168.1.27 as DVES_43AA68 (c1, k15, u’MQTT-USER’). 1543932568: New connection from 192.168.1.27 on port 1883. [INFO] found MQTT-USER on local database 1543932568: Client DVES_43AA68 already connected, closing old connection. 1543932568: Client DVES_43AA68 disconnected. 1543932568: New client connected from 192.168.1.27 as DVES_43AA68 (c1, k15, u’MQTT-USER’). 1543932687: New connection from 94.197.121.220 on port 1883. [INFO] found Rosie on Home Assistant 1543932689: Client rosierosiephone already connected, closing old connection. 1543932689: Client rosierosiephone disconnected. 1543932689: New client connected from 94.197.121.220 as rosierosiephone (c0, k3600, u’Rosie’). 1543932710: Client DVES_43AA68 has exceeded timeout, disconnecting. 1543932710: Socket error on client DVES_43AA68, disconnecting. 1543933163: Client 7ee32dbb-9121-4d96-b877-bba0b6e69d5a disconnected. 1543933827: New connection from 192.168.1.27 on port 1883. [INFO] found MQTT-USER on local database 1543933827: New client connected from 192.168.1.27 as DVES_43AA68 (c1, k15, u’MQTT-USER’). 1543933837: New connection from 192.168.1.30 on port 1883. [INFO] found MQTT-USER on local database 1543933837: New client connected from 192.168.1.30 as DVES_31A136 (c1, k15, u’MQTT-USER’). 1543933924: Client DVES_43AA68 has exceeded timeout, disconnecting. 1543933924: Socket error on client DVES_43AA68, disconnecting. 1543934024: Client DVES_31A136 has exceeded timeout, disconnecting. 1543934024: Socket error on client DVES_31A136, disconnecting. 1543934103: New connection from 192.168.1.27 on port 1883. [INFO] found MQTT-USER on local database 1543934103: New client connected from 192.168.1.27 as DVES_43AA68 (c1, k15, u’MQTT-USER’). 1543934170: Client DVES_43AA68 has exceeded timeout, disconnecting. 1543934170: Socket error on client DVES_43AA68, disconnecting. 1543934196: New connection from 192.168.1.27 on port 1883. [INFO] found MQTT-USER on local database 1543934196: New client connected from 192.168.1.27 as DVES_43AA68 (c1, k15, u’MQTT-USER’). 1543934248: Client DVES_43AA68 has exceeded timeout, disconnecting. 1543934248: Socket error on client DVES_43AA68, disconnecting. 1543934290: New connection from 192.168.1.30 on port 1883. [INFO] found MQTT-USER on local database 1543934290: New client connected from 192.168.1.30 as DVES_31A136 (c1, k15, u’MQTT-USER’). 1543934312: Saving in-memory database to /data/mosquitto.db. 1543934314: New connection from 192.168.1.30 on port 1883. [INFO] found MQTT-USER on local database 1543934314: Client DVES_31A136 already connected, closing old connection. 1543934314: Client DVES_31A136 disconnected. 1543934314: New client connected from 192.168.1.30 as DVES_31A136 (c1, k15, u’MQTT-USER’). 1543934340: New connection from 192.168.1.27 on port 1883. [INFO] found MQTT-USER on local database 1543934340: New client connected from 192.168.1.27 as DVES_43AA68 (c1, k15, u’MQTT-USER’). 1543934387: New connection from 192.168.1.27 on port 1883. [INFO] found MQTT-USER on local database 1543934387: Client DVES_43AA68 already connected, closing old connection. 1543934387: Client DVES_43AA68 disconnected. 1543934387: New client connected from 192.168.1.27 as DVES_43AA68 (c1, k15, u’MQTT-USER’). 1543934396: Client DVES_31A136 has exceeded timeout, disconnecting. 1543934396: Socket error on client DVES_31A136, disconnecting. 1543934427: Client DVES_43AA68 has exceeded timeout, disconnecting. 1543934427: Socket error on client DVES_43AA68, disconnecting. 1543934487: New connection from 192.168.1.27 on port 1883. [INFO] found MQTT-USER on local database 1543934487: New client connected from 192.168.1.27 as DVES_43AA68 (c1, k15, u’MQTT-USER’). 1543934509: Client DVES_43AA68 has exceeded timeout, disconnecting. 1543934509: Socket error on client DVES_43AA68, disconnecting. 1543934530: New connection from 192.168.1.27 on port 1883. [INFO] found MQTT-USER on local database 1543934530: New client connected from 192.168.1.27 as DVES_43AA68 (c1, k15, u’MQTT-USER’). 1543934553: Client DVES_43AA68 has exceeded timeout, disconnecting. 1543934553: Socket error on client DVES_43AA68, disconnecting. 1543934656: New connection from 192.168.1.27 on port 1883. [INFO] found MQTT-USER on local database 1543934656: New client connected from 192.168.1.27 as DVES_43AA68 (c1, k15, u’MQTT-USER’). 1543934679: Client DVES_43AA68 has exceeded timeout, disconnecting. 1543934679: Socket error on client DVES_43AA68, disconnecting. 1543934942: New connection from 192.168.1.27 on port 1883. [INFO] found MQTT-USER on local database 1543934942: New client connected from 192.168.1.27 as DVES_43AA68 (c1, k15, u’MQTT-USER’). 1543934979: Client DVES_43AA68 has exceeded timeout, disconnecting. 1543934979: Socket error on client DVES_43AA68, disconnecting. 1543935263: New connection from 192.168.1.27 on port 1883. [INFO] found MQTT-USER on local database 1543935263: New client connected from 192.168.1.27 as DVES_43AA68 (c1, k15, u’MQTT-USER’). 1543935286: Client DVES_43AA68 has exceeded timeout, disconnecting. 1543935286: Socket error on client DVES_43AA68, disconnecting. 1543935327: New connection from 192.168.1.27 on port 1883. [INFO] found MQTT-USER on local database 1543935327: New client connected from 192.168.1.27 as DVES_43AA68 (c1, k15, u’MQTT-USER’). 1543935347: New connection from 192.168.1.27 on port 1883. [INFO] found MQTT-USER on local database 1543935348: Client DVES_43AA68 already connected, closing old connection. 1543935348: Client DVES_43AA68 disconnected. 1543935348: New client connected from 192.168.1.27 as DVES_43AA68 (c1, k15, u’MQTT-USER’). 1543935371: Client DVES_43AA68 has exceeded timeout, disconnecting. 1543935371: Socket error on client DVES_43AA68, disconnecting. 1543935446: New connection from 192.168.1.27 on port 1883. [INFO] found MQTT-USER on local database 1543935446: New client connected from 192.168.1.27 as DVES_43AA68 (c1, k15, u’MQTT-USER’). 1543935498: Client DVES_43AA68 has exceeded timeout, disconnecting. 1543935498: Socket error on client DVES_43AA68, disconnecting.
Is the error just caused by the switch losing connection to WiFi is the socket error causing the WiFi issue. I can’t ping either switch after the socket error. Seems like they both connect and disconnect a lot, which may also be causing the issue?
S26 configured as S20 in Tasmota
TH11 configured as TH10 in Tasmota
termite script add SSID, password, mqtt host ip, mqttuser, mqtt password, as well as switchretain off, powerretain off, poweronstate 3