Closed rfiorentino1 closed 8 months ago
Interestingly, I changed the device state cash lifetime to 15 and also played with enabling/disabling the refresh in background option, and it seems to control the physical lock now, but the state still does not update accurately.
Anytime I close and re-open the Home app, the state seems to be updated correctly. But while in the home app, if I lock/unlock the door, it successfully completes but doesn't change the state until I restart the home app. This doesn't seem to matter whether or not I have background refresh on or off, or the amount of time specified for device cache state.
This is the current debug log, which looks normal to me so I'm not sure where to start digging.
[37m[10/30/2023, 10:30:10 PM] [39mRegistering platform 'homebridge-alexa-smarthome.HomebridgeAlexaSmartHome'
[37m[10/30/2023, 10:30:16 PM] [39m[36m[HomebridgeAlexaSmartHome][39m Initializing HomebridgeAlexaSmartHome platform...
[37m[10/30/2023, 10:30:16 PM] [39m[36m[HomebridgeAlexaSmartHome][39m Loading accessory from cache: Front Door
[37m[10/30/2023, 10:30:17 PM] [39m[36m[HomebridgeAlexaSmartHome][39m Alexa-Remote: cookie was provided
[37m[10/30/2023, 10:30:19 PM] [39m[36m[HomebridgeAlexaSmartHome][39m Alexa-Remote: Authentication checked: true
[37m[10/30/2023, 10:30:20 PM] [39m[36m[HomebridgeAlexaSmartHome][39m Alexa-Remote: Change Base URL for API calls to na-api-alexa.amazon.com
[37m[10/30/2023, 10:30:24 PM] [39m[36m[HomebridgeAlexaSmartHome][39m Successfully authenticated Alexa account.
[37m[10/30/2023, 10:30:25 PM] [39m[36m[HomebridgeAlexaSmartHome][39m Found 158 devices connected to the current Alexa account.
[37m[10/30/2023, 10:30:25 PM] [39m[36m[HomebridgeAlexaSmartHome][39m BEGIN devices connected to Alexa account
[37m[10/30/2023, 10:30:25 PM] [39m[36m[HomebridgeAlexaSmartHome][39m Found all 1 devices in plugin settings.
[37m[10/30/2023, 10:30:25 PM] [39m[36m[HomebridgeAlexaSmartHome][39m Updating device states
[37m[10/30/2023, 10:30:25 PM] [39m[36m[HomebridgeAlexaSmartHome][39m Front Door ::: Attempting to add accessory(s) for device: {
[37m[10/30/2023, 10:30:25 PM] [39m[36m[HomebridgeAlexaSmartHome][39m Front Door ::: Current state: [
[37m[10/30/2023, 10:30:25 PM] [39m[36m[HomebridgeAlexaSmartHome][39m Front Door ::: Range capabilities: {}
[37m[10/30/2023, 10:30:25 PM] [39m[36m[HomebridgeAlexaSmartHome][39m Restored existing accessory from cache: Front Door
[37m[10/30/2023, 10:30:31 PM] [39m[36m[HomebridgeAlexaSmartHome][39m Obtained device states from cache
[37m[10/30/2023, 10:30:31 PM] [39m[36m[HomebridgeAlexaSmartHome][39m Front Door - Get lock state result: 1
[37m[10/30/2023, 10:30:31 PM] [39m[36m[HomebridgeAlexaSmartHome][39m Obtained device states from cache
[37m[10/30/2023, 10:30:31 PM] [39m[36m[HomebridgeAlexaSmartHome][39m Front Door - Get lock target state result: 1
[37m[10/30/2023, 10:30:42 PM] [39m[36m[HomebridgeAlexaSmartHome][39m Front Door - Triggered set target lock state: 0
[37m[10/30/2023, 10:31:09 PM] [39m[36m[HomebridgeAlexaSmartHome][39m Front Door - Triggered set target lock state: 1
[37m[10/30/2023, 10:31:25 PM] [39m[36m[HomebridgeAlexaSmartHome][39m Updating device states
[37m[10/30/2023, 10:32:25 PM] [39m[36m[HomebridgeAlexaSmartHome][39m Updating device states
[37m[10/30/2023, 10:33:26 PM] [39m[36m[HomebridgeAlexaSmartHome][39m Updating device states
[37m[10/30/2023, 10:34:26 PM] [39m[36m[HomebridgeAlexaSmartHome][39m Updating device states
[37m[10/30/2023, 10:35:27 PM] [39m[36m[HomebridgeAlexaSmartHome][39m Updating device states
Seems I missed this issue awhile ago, apologies. The plugin only updates at most every 60 seconds so that may be why you needed to close and reopen the home app to see the change. I'm going to close this issue because that is expected but I will take this into consideration if there are ways to improve that. Thanks!
Describe The Bug:
I've installed/configured this plugin according to the ReadMe, and unlike the other recent issues I've seen, everything seems to be fine for me, cookie successful and devices appearing. :) However, when I try to control my door lock through HomeKit, it says no response and produces the log below. If I control it from Alexa, or manually, the state updates in the home app.
To Reproduce: Add a door lock to Alexa through a compatible manufacturer. (Mine is Level.) Turn on unlock by app and unlock by voice in the Alexa app. Lock/unlock the door through Alexa, and through HomeKit via this plugin.
Expected behavior:
The door should lock/unlock regardless of method, and report it's state to both Alexa and HomeKit.
Logs:
[37m[10/30/2023, 2:55:29 PM] [39m[36m[HomebridgeAlexaSmartHome][39m [31mFront Door - Set target lock state - HttpError(Error setting smart home device state. Reason: Timeout)[39m [37m[10/30/2023, 2:55:30 PM] [39m[36m[HomebridgeAlexaSmartHome][39m [31mFront Door - Set target lock state - RequestUnsuccessful(Error setting smart home device state. Response: {[39m [31m "controlResponses": [],[39m [31m "errors": [[39m [31m {[39m [31m "entity": {[39m [31m "entityId": "68964737-3c2c-406b-b944-e2aeca9002c6",[39m [31m "entityType": "APPLIANCE"[39m [31m },[39m [31m "code": "IotaServiceException",[39m [31m "message": "ALREADY_IN_OPERATION",[39m [31m "data": null[39m [31m }[39m [31m ][39m [31m}. Error code: IotaServiceException)[39m [37m[10/30/2023, 2:55:33 PM] [39m[36m[HomebridgeAlexaSmartHome][39m [31mFront Door - Set target lock state - RequestUnsuccessful(Error setting smart home device state. Response: {[39m [31m "controlResponses": [],[39m [31m "errors": [[39m [31m {[39m [31m "entity": {[39m [31m "entityId": "68964737-3c2c-406b-b944-e2aeca9002c6",[39m [31m "entityType": "APPLIANCE"[39m [31m },[39m [31m "code": "IotaServiceException",[39m [31m "message": "ALREADY_IN_OPERATION",[39m [31m "data": null[39m [31m }[39m [31m ][39m [31m}. Error code: IotaServiceException)[39m
Plugin Config:
Environment: