NorthernMan54 / homebridge-alexa

Expose your homebridge controlled devices to Amazon Alexa.
https://www.homebridge.ca
446 stars 77 forks source link

Can't see status of the devices after homebridge update form 1.2.5 to 1.3.1 #431

Closed AlexKusnezov closed 3 years ago

AlexKusnezov commented 3 years ago

Hey guys,

haveing the same issue with the plugin as with this one: https://github.com/oznu/homebridge-gsh/issues/103

NorthernMan54 commented 3 years ago

I'm running homebridge 1.3.3 and don't have an issue.....

More details are needed than just saying it isn't working.

roundaboutluke commented 3 years ago

I’m experiencing this also, happy to provide whatever info I can. There’s nothing really in the logs, all commands work fine but the status just doesn’t show on any devices in app.

I’ve tried removing/readding the plug-in and discovering devices again to no avail.

https://user-images.githubusercontent.com/10819615/110863719-020e8a00-82b9-11eb-8434-bcaeb7a2d3de.png

I’ve only just started using the plugin so thought this might have just been how it worked until I saw this. As I only use the plugin for voice commands really it doesn’t affect my usage.

Images for reference showing the devices responding in Home app and via the GSH plugin. https://user-images.githubusercontent.com/10819615/110864088-895bfd80-82b9-11eb-8a66-123db5e243f6.png https://user-images.githubusercontent.com/10819615/110864103-8d881b00-82b9-11eb-84e7-fc3550f41fd2.png https://user-images.githubusercontent.com/10819615/110864105-8e20b180-82b9-11eb-9fbe-19e25a60a93c.png

NorthernMan54 commented 3 years ago

Closing as needed more info to troubleshoot

AlexKusnezov commented 3 years ago

@NorthernMan54 not sure how to report this, but the issue is still present with the latest version this is what I get when I try to control a light from Alexa app:

[3/18/2021, 7:19:52 PM] [Alexa] PowerController TurnOn 0E:22:A1:8E:3A:6D undefined Error: ERROR: HB Instance not found
    at /homebridge/node_modules/homebridge-alexa/node_modules/hap-node-client/HAPNodeJSClient.js:131:18
    at _populateCache (/homebridge/node_modules/homebridge-alexa/node_modules/hap-node-client/HAPNodeJSClient.js:193:5)
    at _mdnsLookup (/homebridge/node_modules/homebridge-alexa/node_modules/hap-node-client/HAPNodeJSClient.js:126:5)
    at HAPNodeJSClient.HAPcontrolByDeviceID (/homebridge/node_modules/homebridge-alexa/node_modules/hap-node-client/HAPNodeJSClient.js:222:3)
    at alexaHome.alexaPowerController (/homebridge/node_modules/homebridge-alexa/lib/alexaActions.js:334:14)
    at EventEmitter.emit (events.js:315:20)
    at MqttClient.<anonymous> (/homebridge/node_modules/homebridge-alexa/lib/alexaLocal.js:71:26)
    at MqttClient.emit (events.js:315:20)
    at MqttClient._handlePublish (/homebridge/node_modules/homebridge-alexa/node_modules/mqtt/lib/client.js:1277:12)
    at MqttClient._handlePacket (/homebridge/node_modules/homebridge-alexa/node_modules/mqtt/lib/client.js:410:12)
[3/18/2021, 7:19:59 PM] [Alexa] PowerController TurnOn 0E:22:A1:8E:3A:6D undefined null
[3/18/2021, 7:20:03 PM] [Alexa] PowerController TurnOff 0E:22:A1:8E:3A:6D undefined null

I'm on latest docker image, which has v1.3.3

last working version of the plugin is still v0.5.32

NorthernMan54 commented 3 years ago

@AlexKusnezov as your running on docker I can't supply a lot of support if it is triggering the issue as I'm not a user.

The plugin assumes that the network configuration is static and if changes it will trigger this. Also the homebridge config changing could trigger something similar.

When you ask Alexa to discover devices, the plugin takes a current snapshot of your homebridge config ( including network details ) and uses that information to connect to your devices. This 'not found' is being triggered when it has lost track of a homebridge instance.

https://github.com/NorthernMan54/Hap-Node-Client/blob/919f288af0ffb7910c2a65168af0dc67e2f92ffd/HAPNodeJSClient.js#L131

The error is occurring when it refreshes the local cache and can't find this instance of homebridge '0E:22:A1:8E:3A:6D'

AlexKusnezov commented 3 years ago

@NorthernMan54 ok thanks, so sticking to homebridge v1.2.5 for now.