AMoo-Miki / homebridge-switchmate-ble

Homebridge plugin for Switchmate light switches and power outlets (still testing)
6 stars 2 forks source link

"Hmm. I'm having trouble reaching NULL" #23

Open famewolf opened 2 years ago

famewolf commented 2 years ago

I have a few devices that are slow to respond. Homebridge still manages to turn them on/off eventually but I'll typically get the error message "Hmm. I'm having trouble reaching NULL". I want to say in the past it correctly said the name of the light in the error message. Has something changed? Is there a way I can tell it to extend the timeout since many times it's having to try to pair with the switch multiple times before finally doing so and performaing the action. Is the error message coming from this plugin or the homebridge-alexa one? I can't really tell because it shows null in the console as well.

Example:

[10/05/2022, 10:30:52] [Living Room Set A] Setting power state to on [10/05/2022, 10:30:52] [Living Room Set B] Setting power state to on [10/05/2022, 10:30:53] [Living Room Set A] HTTP set power function succeeded! [10/05/2022, 10:30:53] [Alexa] PowerController TurnOn B8:27:EB:FD:D7:xx undefined null [10/05/2022, 10:30:53] [Living Room Set B] HTTP set power function succeeded! [10/05/2022, 10:30:53] [Alexa] PowerController TurnOn B8:27:EB:FD:D7:xx undefined null [10/05/2022, 10:32:39] [Living Room Set B] Setting power state to on [10/05/2022, 10:32:39] [Living Room Set A] Setting power state to on [10/05/2022, 10:32:40] [Living Room Set A] HTTP set power function succeeded! [10/05/2022, 10:32:40] [Alexa] PowerController TurnOn B8:27:EB:FD:D7:xx undefined null [10/05/2022, 10:32:41] [Living Room Set B] HTTP set power function succeeded! [10/05/2022, 10:32:41] [Alexa] PowerController TurnOn B8:27:EB:FD:D7:xx undefined null [10/05/2022, 10:43:54] [Alexa] PowerController TurnOn B8:27:EB:FD:D7:xx undefined null [10/05/2022, 10:45:04] [Alexa] PowerController TurnOff B8:27:EB:FD:D7:xx undefined Error: ESOCKETTIMEDOUT at ClientRequest. (/usr/lib/node_modules/homebridge-alexa/node_modules/request/request.js:816:19) at Object.onceWrapper (events.js:519:28) at ClientRequest.emit (events.js:400:28) at Socket.emitRequestTimeout (_http_client.js:790:9) at Object.onceWrapper (events.js:519:28) at Socket.emit (events.js:412:35) at Socket._onTimeout (net.js:495:8) at listOnTimeout (internal/timers.js:557:17) at processTimers (internal/timers.js:500:7) { code: 'ESOCKETTIMEDOUT', connect: false, attempts: 5 }

The device in question is defined as:

"name": "Bathroom Vaniety", "id": "c99ef4e37xxx", "authCode": "xxxxxx=="