I’m within Docker environments, on an Ubuntu base OS. No hassIO involved. I have discovered the object is a HA Websocket object, not an error object. No idea why reconnect-error
is even getting called (added a console.trace into ha-websocket.js
):
1 Jan 13:23:10 - [debug] [server:Home Assistant] config server event listener connecting
Trace: o {
options:
{ setupRetry: 0,
createSocket: [Function: createSocket],
self:
HaWebsocket {
_events: [Object],
_eventsCount: 13,
_maxListeners: 0,
config: [Object],
connectionState: 0,
states: [Object],
services: [Object],
statesLoaded: false,
client: [Circular],
subscribedEvents: [Set],
unsubCallback: [Object],
integrationVersion: 0,
servicesLoaded: false } },
commandId: 11,
commands:
Map {
2 => { resolve: [Function],
reject: [Function],
callback: [Function],
subscribe: [Function: subscribe],
unsubscribe: [Function: unsubscribe] },
3 => { resolve: [Function],
reject: [Function],
callback: [Function],
subscribe: [Function: subscribe],
unsubscribe: [Function: unsubscribe] },
5 => { resolve: [Function],
reject: [Function],
callback: [Function],
subscribe: [Function: subscribe],
unsubscribe: [Function: unsubscribe] },
6 => { resolve: [Function],
reject: [Function],
callback: [Function],
subscribe: [Function: subscribe],
unsubscribe: [Function: unsubscribe] },
8 => { resolve: [Function],
reject: [Function],
callback: [Function],
subscribe: [Function: subscribe],
unsubscribe: [Function: unsubscribe] },
9 => { resolve: [Function],
reject: [Function],
callback: [Function],
subscribe: [Function: subscribe],
unsubscribe: [Function: unsubscribe] },
11 => { resolve: [Function],
reject: [Function],
callback: [Function],
subscribe: [Function: subscribe],
unsubscribe: [Function: unsubscribe] } },
eventListeners:
Map {
'ready' => [ [Function: bound onClientOpen],
[Function: u],
[Function: u],
[Function: u] ],
'disconnected' => [ [Function: bound onClientClose] ],
'reconnect-error' => [ [Function: bound onClientError] ] },
closeRequested: false,
socket:
WebSocket {
_events:
[Object: null prototype] { message: [Function], close: [Function] },
_eventsCount: 2,
_maxListeners: undefined,
readyState: 3,
protocol: '',
_binaryType: 'nodebuffer',
_closeFrameReceived: true,
_closeFrameSent: true,
_closeMessage: '',
_closeTimer:
Timeout {
_called: false,
_idleTimeout: -1,
_idlePrev: null,
_idleNext: null,
_idleStart: 74563,
_onTimeout: null,
_timerArgs: undefined,
_repeat: null,
_destroyed: false,
[Symbol(unrefed)]: false,
[Symbol(asyncId)]: 1783,
[Symbol(triggerId)]: 1358 },
_closeCode: 1000,
_extensions: { 'permessage-deflate': [PerMessageDeflate] },
_receiver:
Receiver {
_writableState: [WritableState],
writable: false,
_events: [Object: null prototype] {},
_eventsCount: 0,
_maxListeners: undefined,
_binaryType: 'nodebuffer',
_extensions: [Object],
_maxPayload: 104857600,
_bufferedBytes: 0,
_buffers: [],
_compressed: true,
_payloadLength: 2,
_mask: undefined,
_fragmented: 0,
_masked: false,
_fin: true,
_opcode: 8,
_totalPayloadLength: 0,
_messageLength: 0,
_fragments: [],
_state: 0,
_loop: false,
[Symbol(websocket)]: [Circular] },
_sender:
Sender {
_extensions: [Object],
_socket: [Socket],
_firstFragment: true,
_compress: false,
_bufferedBytes: 0,
_deflating: false,
_queue: [] },
_socket:
Socket {
connecting: false,
_hadError: false,
_handle: null,
_parent: null,
_host: 'hassio',
_readableState: [ReadableState],
readable: false,
_events: [Object],
_eventsCount: 2,
_maxListeners: undefined,
_writableState: [WritableState],
writable: false,
allowHalfOpen: false,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: null,
_server: null,
parser: null,
_httpMessage: null,
timeout: 0,
write: [Function: writeAfterFIN],
[Symbol(asyncId)]: 1358,
[Symbol(lastWriteQueueSize)]: 0,
[Symbol(timeout)]: null,
[Symbol(kBytesRead)]: 40143,
[Symbol(kBytesWritten)]: 1010,
[Symbol(websocket)]: undefined },
_bufferedAmount: 0,
_isServer: false,
_redirects: 0,
url: 'ws://hassio/homeassistant/websocket',
_req: null },
_ent:
{ state: [Getter],
refresh: [Function: c],
subscribe: [Function: subscribe] },
_srv:
{ state: [Getter],
refresh: [Function: c],
subscribe: [Function: subscribe] },
_cnf:
{ state: [Getter],
refresh: [Function: c],
subscribe: [Function: subscribe] } }
at HaWebsocket.callback [as onClientError] (/opt/node_modules/node-red-contrib-home-assistant-websocket/lib/ha-websocket.js:266:10)
at forEach (/opt/node_modules/home-assistant-js-websocket/lib/connection.ts:153:7)
at Array.forEach (<anonymous>)
at o.fireEvent (/opt/node_modules/home-assistant-js-websocket/lib/connection.ts:152:48)
at /opt/node_modules/home-assistant-js-websocket/lib/connection.ts:327:18
at process._tickCallback (internal/process/next_tick.js:68:7)