I have a wifi Rest+ and able to get this working when first installed, but after about a couple days, it stops working. I have to remove the plugin and re-add it for it to work again. Looking at the logs, I get the following error:
@jbryan83 sorry to hear you are having issues. This is actually a duplicate of #8, which is definitely a real issue, but i haven't had time to address it. Hopefully I can get to it in the next few weeks.
I have a wifi Rest+ and able to get this working when first installed, but after about a couple days, it stops working. I have to remove the plugin and re-add it for it to work again. Looking at the logs, I get the following error:
[5/2/2020, 9:21:23 PM] [HatchBabyRest] AWS Iot Error [5/2/2020, 9:21:23 PM] [HatchBabyRest] Error: unexpected server response (403) at ClientRequest. (/usr/lib/node_modules/homebridge-hatch-baby-rest/node_modules/ws/lib/WebSocket.js:653:21)
at ClientRequest.emit (events.js:210:5)
at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:583:27)
at HTTPParser.parserOnHeadersComplete (_http_common.js:115:17)
at TLSSocket.socketOnData (_http_client.js:456:22)
at TLSSocket.emit (events.js:210:5)
at addChunk (_stream_readable.js:309:12)
at readableAddChunk (_stream_readable.js:290:11)
at TLSSocket.Readable.push (_stream_readable.js:224:10)
at TLSWrap.onStreamRead (internal/stream_base_commons.js:182:23) {
type: 'error',
target: WebSocket {
_events: [Object: null prototype] {},
_eventsCount: 0,
_maxListeners: undefined,
readyState: 3,
bytesReceived: 0,
extensions: null,
protocol: '',
_binaryType: 'arraybuffer',
_finalize: [Function: bound finalize],
_closeFrameReceived: false,
_closeFrameSent: false,
_closeMessage: '',
_closeTimer: null,
_finalized: true,
_closeCode: 1006,
_receiver: null,
_sender: null,
_socket: null,
_ultron: null,
protocolVersion: 13,
_isServer: false,
url: 'wss://aacsjje0gbbcc-ats.iot.us-west-2.amazonaws.com/mqtt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA6CHTNMDRBER6EUNJ%2F20200503%2Fus-west-2%2Fiotdevicegateway%2Faws4_request&X-Amz-Date=20200503T022123Z&X-Amz-SignedHeaders=host&X-Amz-Signature=25199f56d7db433e4dcea7eb2a8a7d1be868442f4747ce31f5e5d33b99487541&X-Amz-Security-Token='[OMITTED]',
_req: ClientRequest {
_events: [Object: null prototype],
_eventsCount: 4,
_maxListeners: undefined,
outputData: [],
outputSize: 0,
writable: true,
_last: true,
chunkedEncoding: false,
shouldKeepAlive: true,
useChunkedEncodingByDefault: false,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
_contentLength: 0,
_hasBody: true,
_trailer: '',
finished: true,
_headerSent: true,
socket: [TLSSocket],
connection: [TLSSocket],
_header: 'GET /mqtt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=[OMITTED]us-west-2%2Fiotdevicegateway%2Faws4_request&X-Amz-Date=20200503T022123Z&X-Amz-SignedHeaders=host&X-Amz-Signature=25199f56d7db433e4dcea7eb2a8a7d1be868442f4747ce31f5e5d33b99487541&X-Amz-Security-Token=[OMITTED]
'Sec-WebSocket-Version: 13\r\n' +
'Sec-WebSocket-Key: 2R9F4Ja3MZsy0shSz8p8/g==\r\n' +
'Connection: Upgrade\r\n' +
'Upgrade: websocket\r\n' +
'Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits\r\n' +
'Sec-WebSocket-Protocol: mqttv3.1\r\n' +
'Host: aacsjje0gbbcc-ats.iot.us-west-2.amazonaws.com\r\n' +
'\r\n',
_onPendingData: [Function: noopPendingOutput],
agent: [Agent],
socketPath: undefined,
method: 'GET',
path: '/mqtt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=[OMITTED]us-west-2%2Fiotdevicegateway%2Faws4_request&X-Amz-Date=20200503T022123Z&X-Amz-SignedHeaders=host&X-Amz-Signature=25199f56d7db433e4dcea7eb2a8a7d1be868442f4747ce31f5e5d33b99487541&X-Amz-Security-Token=[OMITTED],
_ended: false,
res: [IncomingMessage],
aborted: true,
timeoutCb: null,
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
} }