Thanks for a nice working repo.
Everything is working fine but look like after the
Token expires I start getting errors.. it’s not refreshing the token, look like for me..
Get these after token expires
`Temperature to 21.1
[12:38:18.281] INFO (147): [WS] Updating state for Temperature to 24.9
[12:38:59.439] INFO (147): [WS] Updating state for Motion to true
[12:39:17.562] INFO (147): [WS] Updating state for Contact to true
[12:39:19.372] INFO (147): [WS] Updating state for Motion to false
[12:39:20.893] INFO (147): [WS] Updating state for Contact to false
/app/dist/homely/api.js:59
throw new Error(err);
^
Error: {"statusCode":401,"message":"Unauthorized"}
at /app/dist/homely/api.js:59:19
at Generator.next ()
at fulfilled (/app/dist/homely/api.js:5:58)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
Emitted 'error' event on Job instance at:
at /app/node_modules/node-schedule/lib/Invocation.js:277:17
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
Node.js v22.11.0
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
[12:40:10] INFO: MQTT_HOST: core-mosquitto
[12:40:10] INFO: MQTT_PORT: 1883
[12:40:10] INFO: Starting Homely MQTT Bridge...
homely@1.0.0 prestart
npm run build
homely@1.0.0 build
tsc -p tsconfig.json
homely@1.0.0 start
node dist/index.js
(node:147) [DEP0044] DeprecationWarning: The util.isArray API is deprecated. Please use Array.isArray() instead.
(Use node --trace-deprecation ... to show where the warning was created)
(node:147) [DEP0055] DeprecationWarning: The util.isRegExp API is deprecated. Please use arg instanceof RegExp instead.
(node:147) [DEP0047] DeprecationWarning: The util.isDate API is deprecated. Please use arg instanceof Date instead.
(node:147) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead.
`
Thanks for a nice working repo.
Everything is working fine but look like after the
Token expires I start getting errors.. it’s not refreshing the token, look like for me..
Get these after token expires
`Temperature to 21.1
[12:38:18.281] INFO (147): [WS] Updating state for Temperature to 24.9
[12:38:59.439] INFO (147): [WS] Updating state for Motion to true
[12:39:17.562] INFO (147): [WS] Updating state for Contact to true
[12:39:19.372] INFO (147): [WS] Updating state for Motion to false
[12:39:20.893] INFO (147): [WS] Updating state for Contact to false
/app/dist/homely/api.js:59
throw new Error(err);
^
Error: {"statusCode":401,"message":"Unauthorized"}
at /app/dist/homely/api.js:59:19
at Generator.next ()
at fulfilled (/app/dist/homely/api.js:5:58)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
Emitted 'error' event on Job instance at:
at /app/node_modules/node-schedule/lib/Invocation.js:277:17
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
Node.js v22.11.0
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
[12:40:10] INFO: MQTT_HOST: core-mosquitto
[12:40:10] INFO: MQTT_PORT: 1883
[12:40:10] INFO: Starting Homely MQTT Bridge...