Skip to content

steady message: WebSocket Connection Closed! and unavailable in HA for a few seconds #237

@TorainX

Description

@TorainX

This is the error message I receive in the logs. And it therfore is not available every few seconds in HA gui.
I really like the device and especially the integration. But one device got already broken. So now I'm afraid if there is a relation about this beahviour and the dead of the other device..

Flashed with WThermostat v1.23.beta1-fas

just a sample from the MQTT log:

2025-08-05 10:29:47: New connection from 192.168.1.39:51096 on port 1883.
2025-08-05 10:29:47: New client connected from 192.168.1.39:51096 as wthermostat-6048727 (p2, c1, k15, u'mqtt').
2025-08-05 10:31:18: Client wthermostat-6048727 closed its connection.
2025-08-05 10:31:48: New connection from 192.168.1.39:65266 on port 1883.
2025-08-05 10:31:48: New client connected from 192.168.1.39:65266 as wthermostat-6048727 (p2, c1, k15, u'mqtt').
2025-08-05 10:33:19: Client wthermostat-6048727 closed its connection.
2025-08-05 10:33:49: New connection from 192.168.1.39:62048 on port 1883.
2025-08-05 10:33:49: New client connected from 192.168.1.39:62048 as wthermostat-6048727 (p2, c1, k15, u'mqtt').
2025-08-05 10:35:20: Client wthermostat-6048727 closed its connection.
2025-08-05 10:35:51: New connection from 192.168.1.39:53075 on port 1883.
2025-08-05 10:35:51: New client connected from 192.168.1.39:53075 as wthermostat-6048727 (p2, c1, k15, u'mqtt').
2025-08-05 10:39:37: Client wthermostat-6048727 closed its connection.
2025-08-05 10:40:07: New connection from 192.168.1.39:59091 on port 1883.
2025-08-05 10:40:07: New client connected from 192.168.1.39:59091 as wthermostat-6048727 (p2, c1, k15, u'mqtt').
2025-08-05 10:41:38: Client wthermostat-6048727 closed its connection.
2025-08-05 10:42:08: New connection from 192.168.1.39:54670 on port 1883.
2025-08-05 10:42:08: New client connected from 192.168.1.39:54670 as wthermostat-6048727 (p2, c1, k15, u'mqtt').
2025-08-05 10:43:39: Client wthermostat-6048727 closed its connection.
2025-08-05 10:44:09: New connection from 192.168.1.39:59289 on port 1883.
2025-08-05 10:44:09: New client connected from 192.168.1.39:59289 as wthermostat-6048727 (p2, c1, k15, u'mqtt').
2025-08-05 10:49:59: Client wthermostat-6048727 closed its connection.

from the weblog:
Connecting to ws://192.168.1.39/wslog
Connected
Hello WebSocket Client #2

Now you see all logs for logSeverity trace (or more important)

notice: Notify interval is up -> Device state changed...
notice: Device state changed -> send device state... home/bad/stat/things/network/properties
notice: Send actual device state via MQTT home/bad/stat/things/network/properties
trace: sending heartBeatCommand
trace: Heap Info HeartBeat: MaxFree: 19216, Uptime: 1079
trace: commandCharsToSerial: 55 aa 00 00 00 00, ChckSum 0xff
notice: Notify interval is up -> Device state changed...
notice: Device state changed -> send device state... home/bad/stat/things/thermostat/properties
notice: Send actual device state via MQTT home/bad/stat/things/thermostat/properties
trace: sending heartBeatCommand
trace: Heap Info HeartBeat: MaxFree: 19216, Uptime: 1089
trace: commandCharsToSerial: 55 aa 00 00 00 00, ChckSum 0xff
trace: sending heartBeatCommand
trace: Heap Info HeartBeat: MaxFree: 19216, Uptime: 1099
trace: commandCharsToSerial: 55 aa 00 00 00 00, ChckSum 0xff
notice: Notify interval is up -> Device state changed...
notice: Device state changed -> send device state... home/bad/stat/things/network/properties
notice: Send actual device state via MQTT home/bad/stat/things/network/properties
trace: sending heartBeatCommand
trace: Heap Info HeartBeat: MaxFree: 19216, Uptime: 1109
trace: commandCharsToSerial: 55 aa 00 00 00 00, ChckSum 0xff
trace: sending heartBeatCommand
trace: Heap Info HeartBeat: MaxFree: 19216, Uptime: 1119
trace: commandCharsToSerial: 55 aa 00 00 00 00, ChckSum 0xff
trace: sending heartBeatCommand
trace: Heap Info HeartBeat: MaxFree: 19216, Uptime: 1129
trace: commandCharsToSerial: 55 aa 00 00 00 00, ChckSum 0xff
notice: Notify interval is up -> Device state changed...
notice: Device state changed -> send device state... home/bad/stat/things/network/properties
notice: Send actual device state via MQTT home/bad/stat/things/network/properties
trace: sending heartBeatCommand
trace: Heap Info HeartBeat: MaxFree: 19216, Uptime: 1139
trace: commandCharsToSerial: 55 aa 00 00 00 00, ChckSum 0xff
notice: Notify interval is up -> Device state changed...
notice: Device state changed -> send device state... home/bad/stat/things/thermostat/properties
notice: Send actual device state via MQTT home/bad/stat/things/thermostat/properties
trace: sending heartBeatCommand
trace: Heap Info HeartBeat: MaxFree: 19216, Uptime: 1149
trace: commandCharsToSerial: 55 aa 00 00 00 00, ChckSum 0xff
trace: sending heartBeatCommand
WebSocket Connection Closed!

Connecting to ws://192.168.1.39/wslog
Connected
Hello WebSocket Client #3

Now you see all logs for logSeverity trace (or more important)

notice: Connected to MQTT server.
trace: Heap Info MQTT Connected: MaxFree: 17240, Uptime: 1183
trace: Heap Info MQTT publish: MaxFree: 17240, Uptime: 1183
trace: Heap Info subscribed: MaxFree: 17240, Uptime: 1183
trace: Heap Info devices: MaxFree: 17240, Uptime: 1183
notice: Subscribing to Topic home/bad/cmnd/#
trace: Heap Info topicSubscribe: MaxFree: 16592, Uptime: 1183
trace: Heap Info sending networkMode to MCU: MaxFree: 16592, Uptime: 1183
trace: MCU wifi state response
trace: Received MQTT callback: 'devices/network'->'{"url":"http://192.168.1.39/things/network","ip":"192.168.1.39","topic":"home/bad/stat/things/network"}'
notice: Ignoring, starts not with our topic 'home/bad'
trace: Received MQTT callback: 'devices/clock'->'{"url":"http://192.168.1.39/things/clock","ip":"192.168.1.39","topic":"home/bad/stat/things/clock"}'
notice: Ignoring, starts not with our topic 'home/bad'
trace: Received MQTT callback: 'devices/thermostat'->'{"url":"http://192.168.1.39/things/thermostat","ip":"192.168.1.39","topic":"home/bad/stat/things/thermostat"}'
notice: Ignoring, starts not with our topic 'home/bad'
trace: Received MQTT callback: 'devices/logging'->'{"url":"http://192.168.1.39/things/logging","ip":"192.168.1.39","topic":"home/bad/stat/things/logging"}'
notice: Ignoring, starts not with our topic 'home/bad'
trace: sending heartBeatCommand
trace: Heap Info HeartBeat: MaxFree: 17240, Uptime: 1189
trace: commandCharsToSerial: 55 aa 00 00 00 00, ChckSum 0xff
trace: sending heartBeatCommand
trace: Heap Info HeartBeat: MaxFree: 17240, Uptime: 1199
trace: commandCharsToSerial: 55 aa 00 00 00 00, ChckSum 0xff
notice: Notify interval is up -> Device state changed...
notice: Device state changed -> send device state... home/bad/stat/things/thermostat/properties
notice: Send actual device state via MQTT home/bad/stat/things/thermostat/properties
trace: sending heartBeatCommand
trace: Heap Info HeartBeat: MaxFree: 17240, Uptime: 1209
trace: commandCharsToSerial: 55 aa 00 00 00 00, ChckSum 0xff
notice: Notify interval is up -> Device state changed...
notice: Device state changed -> send device state... home/bad/stat/things/network/properties
notice: Send actual device state via MQTT home/bad/stat/things/network/properties
trace: sending heartBeatCommand
trace: Heap Info HeartBeat: MaxFree: 17240, Uptime: 1219
trace: commandCharsToSerial: 55 aa 00 00 00 00, ChckSum 0xff
trace: sending heartBeatCommand
trace: Heap Info HeartBeat: MaxFree: 17240, Uptime: 1229
trace: commandCharsToSerial: 55 aa 00 00 00 00, ChckSum 0xff
trace: sending heartBeatCommand
trace: Heap Info HeartBeat: MaxFree: 17240, Uptime: 1239
trace: commandCharsToSerial: 55 aa 00 00 00 00, ChckSum 0xff
notice: Notify interval is up -> Device state changed...
notice: Device state changed -> send device state... home/bad/stat/things/network/properties
notice: Send actual device state via MQTT home/bad/stat/things/network/properties
trace: Time via NTP server 'pool.ntp.org'
trace: Heap Info NTP Start: MaxFree: 17240, Uptime: 1244
trace: Heap Info NTP GotTime: MaxFree: 17240, Uptime: 1244
notice: NTP time synced: (2025-08-05 11:14:58, Weekday: 3, Epoch: 1754392498, Dst: 1743300000, Std: 1761447600, OldUTC: 1754392498, ntpTime: 1754392498, Diff: 0, Uptime: 1244)
trace: Clock Recalc Timezone 1754399698
trace: This year switch to DST/STD: 1761447600 / 1743300000 (Northern)
notice: NotifyNewDateTime
trace: sending heartBeatCommand
trace: Heap Info HeartBeat: MaxFree: 17240, Uptime: 1249
trace: commandCharsToSerial: 55 aa 00 00 00 00, ChckSum 0xff
notice: Notify interval is up -> Device state changed...
notice: Device state changed -> send device state... home/bad/stat/things/clock/properties
notice: Send actual device state via MQTT home/bad/stat/things/clock/properties
trace: sending heartBeatCommand
trace: Heap Info HeartBeat: MaxFree: 17240, Uptime: 1259
trace: commandCharsToSerial: 55 aa 00 00 00 00, ChckSum 0xff
notice: Notify interval is up -> Device state changed...
notice: Device state changed -> send device state... home/bad/stat/things/thermostat/properties
notice: Send actual device state via MQTT home/bad/stat/things/thermostat/properties
trace: sending heartBeatCommand
trace: Heap Info HeartBeat: MaxFree: 17240, Uptime: 1269
trace: commandCharsToSerial: 55 aa 00 00 00 00, ChckSum 0xff
notice: Notify interval is up -> Device state changed...
WebSocket Connection Closed!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions