joeyhage / homebridge-alexa-smarthome

Connect Alexa devices to HomeKit
MIT License
81 stars 20 forks source link

No response when attempting to control fan #95

Closed GreyAsteroid closed 8 months ago

GreyAsteroid commented 9 months ago

Describe The Bug:

While I'm able to use this plugin to add my Vornado Transom AE to my homekit devices and it properly reflects the current state of the device, when trying to control it using any method other than through the Alexa app I'm given the error "no response"

To Reproduce:

  1. Install plugin
  2. Configure plugin
  3. Attempt to control fan in Home app

Expected behavior:

I expect the fan to turn off or on when controlled via homekit

Logs:

[1/5/2024, 3:43:45 PM] [HB Supervisor] Restarting Homebridge...
[1/5/2024, 3:43:45 PM] [HB Supervisor] Starting Homebridge with extra flags: -I -P /var/lib/homebridge/node_modules --strict-plugin-resolution
[1/5/2024, 3:43:45 PM] [HB Supervisor] Started Homebridge v1.7.0 with PID: 10335
[1/5/2024, 3:43:46 PM] Loaded config.json with 0 accessories and 2 platforms.
[1/5/2024, 3:43:46 PM] Loaded 1 cached accessories from cachedAccessories.
[1/5/2024, 3:43:46 PM] ---
[1/5/2024, 3:43:46 PM] Loaded plugin: homebridge-alexa-smarthome@2.1.0
[1/5/2024, 3:43:46 PM] Registering platform 'homebridge-alexa-smarthome.HomebridgeAlexaSmartHome'
[1/5/2024, 3:43:46 PM] ---
[1/5/2024, 3:43:46 PM] Loading 2 platforms...
[1/5/2024, 3:43:46 PM] [HomebridgeAlexaSmartHome] Initializing HomebridgeAlexaSmartHome platform...
[1/5/2024, 3:43:46 PM] [HomebridgeAlexaSmartHome] Loading accessory from cache: Window Fan
[1/5/2024, 3:43:46 PM] [HomebridgeAlexaSmartHome] Alexa-Remote: cookie was provided
Setup Payload:
X-HM://00249W1XCUBFR
Enter this code with your HomeKit app on your iOS device to pair with Homebridge:

    ┌────────────┐     
    │ 486-38-656 │     
    └────────────┘     

[1/5/2024, 3:43:46 PM] Homebridge v1.7.0 (HAP v0.11.1) (Homebridge AE59) is running on port 51248.
[1/5/2024, 3:43:46 PM] [HomebridgeAlexaSmartHome] Alexa-Remote: Authentication checked: true
[1/5/2024, 3:43:46 PM] [HomebridgeAlexaSmartHome] Alexa-Remote: Change Base URL for API calls to na-api-alexa.amazon.com
[1/5/2024, 3:43:47 PM] [HomebridgeAlexaSmartHome] Successfully authenticated Alexa account.
[1/5/2024, 3:43:47 PM] [HomebridgeAlexaSmartHome] Found 1 devices connected to the current Alexa account.
[1/5/2024, 3:43:47 PM] [HomebridgeAlexaSmartHome] BEGIN devices connected to Alexa account

 [
  {
    "displayName": "Window Fan",
    "deviceType": "FAN"
  }
]

END devices connected to Alexa account
[1/5/2024, 3:43:47 PM] [HomebridgeAlexaSmartHome] Found all 1 devices in plugin settings.
[1/5/2024, 3:43:47 PM] [HomebridgeAlexaSmartHome] Updating device states
[1/5/2024, 3:43:48 PM] [HomebridgeAlexaSmartHome] BEGIN capabilities for all devices: {
  "locationDetails": {
    "Default_Location": {
      "locationId": "Default_Location",
      "amazonBridgeDetails": {
        "amazonBridgeDetails": {
          "LambdaBridge_SKILL/eyJza2lsbElkIjoiYW16bjEuYXNrLnNraWxsLjY4NjRlNjEzLWFiZDctNGVhYy05NWMxLWJkZTQyNTM5MjE2ZSIsInN0YWdlIjoibGl2ZSJ9": {
            "amazonBridgeIdentifier": {
              "amazonBridgeDSN": "SKILL/eyJza2lsbElkIjoiYW16bjEuYXNrLnNraWxsLjY4NjRlNjEzLWFiZDctNGVhYy05NWMxLWJkZTQyNTM5MjE2ZSIsInN0YWdlIjoibGl2ZSJ9",
              "amazonBridgeType": "LambdaBridge",
              "lambdaBridge": true,
              "amazonBridgeSource": "SKILL"
            },
            "applianceDetails": {
              "applianceDetails": {
                "SKILL_eyJza2lsbElkIjoiYW16bjEuYXNrLnNraWxsLjY4NjRlNjEzLWFiZDctNGVhYy05NWMxLWJkZTQyNTM5MjE2ZSIsInN0YWdlIjoibGl2ZSJ9_AF23Y8VR63FXG_44B01EBAB2F548F39C7762E927D3541D": {
                  "applianceId": "SKILL_eyJza2lsbElkIjoiYW16bjEuYXNrLnNraWxsLjY4NjRlNjEzLWFiZDctNGVhYy05NWMxLWJkZTQyNTM5MjE2ZSIsInN0YWdlIjoibGl2ZSJ9_AF23Y8VR63FXG_44B01EBAB2F548F39C7762E927D3541D",
                  "endpointTypeId": "",
                  "driverIdentity": {
                    "namespace": "SKILL",
                    "identifier": "eyJza2lsbElkIjoiYW16bjEuYXNrLnNraWxsLjY4NjRlNjEzLWFiZDctNGVhYy05NWMxLWJkZTQyNTM5MjE2ZSIsInN0YWdlIjoibGl2ZSJ9"
                  },
                  "manufacturerName": "Amazon",
                  "friendlyDescription": "Alexa App on Mobile",
                  "modelName": "",
                  "deviceType": "CLOUD_DISCOVERED_DEVICE",
                  "version": "0",
                  "friendlyName": "Alexa App on Mobile",
                  "friendlyNameModifiedAt": 1704484364193,
                  "capabilitiesModifiedAt": 1704484364193,
                  "ipAddress": "",
                  "port": "",
                  "entityId": "955a3c40-d2f6-4394-8d4c-b21a78ec31f7",
                  "applianceNetworkState": {
                    "reachability": "REACHABLE",
                    "lastSeenAt": 1704487428113,
                    "createdAt": 1704484364193,
                    "lastSeenDiscoverySessionId": {
                      "value": "40c0edde-b83c-433c-8272-e4f5936f030c"
                    }
                  },
                  "tags": {
                    "tagNameToValueSetMap": {}
                  },
                  "additionalApplianceDetails": {
                    "additionalApplianceDetails": {}
                  },
                  "firmwareVersion": "0",
                  "actions": [],
                  "capabilities": [
                    {
                      "type": "AlexaInterface",
                      "version": "3.1",
                      "interfaceName": "Alexa.RemoteVideoPlayer",
                      "configurations": {
                        "catalogs": [
                          {
                            "type": "VIDEO_INGESTION_IDENTIFIER",
                            "sourceId": "combee"
                          }
                        ],
                        "operations": [
                          "SearchAndPlay",
                          "SearchAndDisplayResults"
                        ]
                      },
                      "capabilityType": "AlexaEndpointCapabilityInstance"
                    }
                  ],
                  "applianceTypes": [
                    "ALEXA_VOICE_ENABLED"
                  ],
                  "isEnabled": true,
                  "aliases": [],
                  "connectedVia": "",
                  "alexaDeviceIdentifierList": [
                    {
                      "dmsDeviceSerialNumber": "**removed**",
                      "dmsDeviceTypeId": "A2IVLV5VM2W81"
                    }
                  ],
                  "applianceKey": "**removed**",
                  "identifiers": {
                    "networkInterfaceIdentifiers": []
                  },
                  "applianceDriverIdentity": {
                    "namespace": "SKILL",
                    "identifier": "eyJza2lsbElkIjoiYW16bjEuYXNrLnNraWxsLjY4NjRlNjEzLWFiZDctNGVhYy05NWMxLWJkZTQyNTM5MjE2ZSIsInN0YWdlIjoibGl2ZSJ9"
                  },
                  "ipaddress": "",
                  "applianceLambdaControlled": true,
                  "mergedApplianceIds": [
                    "SKILL_eyJza2lsbElkIjoiYW16bjEuYXNrLnNraWxsLjY4NjRlNjEzLWFiZDctNGVhYy05NWMxLWJkZTQyNTM5MjE2ZSIsInN0YWdlIjoibGl2ZSJ9_AF23Y8VR63FXG_44B01EBAB2F548F39C7762E927D3541D"
                  ]
                },
                "SKILL_eyJza2lsbElkIjoiYW16bjEuYXNrLnNraWxsLjY4NjRlNjEzLWFiZDctNGVhYy05NWMxLWJkZTQyNTM5MjE2ZSIsInN0YWdlIjoibGl2ZSJ9_AF23Y8VR63FXG_78cddfc0afde6f8c001ad2b8b0d1b0c6": {
                  "applianceId": "SKILL_eyJza2lsbElkIjoiYW16bjEuYXNrLnNraWxsLjY4NjRlNjEzLWFiZDctNGVhYy05NWMxLWJkZTQyNTM5MjE2ZSIsInN0YWdlIjoibGl2ZSJ9_AF23Y8VR63FXG_78cddfc0afde6f8c001ad2b8b0d1b0c6",
                  "endpointTypeId": "",
                  "driverIdentity": {
                    "namespace": "SKILL",
                    "identifier": "eyJza2lsbElkIjoiYW16bjEuYXNrLnNraWxsLjY4NjRlNjEzLWFiZDctNGVhYy05NWMxLWJkZTQyNTM5MjE2ZSIsInN0YWdlIjoibGl2ZSJ9"
                  },
                  "manufacturerName": "Amazon",
                  "friendlyDescription": "Alexa App on Mobile",
                  "modelName": "",
                  "deviceType": "CLOUD_DISCOVERED_DEVICE",
                  "version": "0",
                  "friendlyName": "Alexa App on Mobile",
                  "friendlyNameModifiedAt": 1704486682743,
                  "capabilitiesModifiedAt": 1704486682743,
                  "ipAddress": "",
                  "port": "",
                  "entityId": "d8ab7999-097e-4bfd-a742-fe7296164c7b",
                  "applianceNetworkState": {
                    "reachability": "REACHABLE",
                    "lastSeenAt": 1704487428113,
                    "createdAt": 1704486682743,
                    "lastSeenDiscoverySessionId": {
                      "value": "6e7761de-d638-4015-afdc-bb40ca8cfbc9"
                    }
                  },
                  "tags": {
                    "tagNameToValueSetMap": {}
                  },
                  "additionalApplianceDetails": {
                    "additionalApplianceDetails": {}
                  },
                  "firmwareVersion": "0",
                  "actions": [],
                  "capabilities": [
                    {
                      "type": "AlexaInterface",
                      "version": "3.1",
                      "interfaceName": "Alexa.RemoteVideoPlayer",
                      "configurations": {
                        "catalogs": [
                          {
                            "type": "VIDEO_INGESTION_IDENTIFIER",
                            "sourceId": "combee"
                          }
                        ],
                        "operations": [
                          "SearchAndPlay",
                          "SearchAndDisplayResults"
                        ]
                      },
                      "capabilityType": "AlexaEndpointCapabilityInstance"
                    }
                  ],
                  "applianceTypes": [
                    "ALEXA_VOICE_ENABLED"
                  ],
                  "isEnabled": true,
                  "aliases": [],
                  "connectedVia": "",
                  "alexaDeviceIdentifierList": [
                    {
                      "dmsDeviceSerialNumber": "**removed**",
                      "dmsDeviceTypeId": "A2IVLV5VM2W81"
                    }
                  ],
                  "applianceKey": "**removed**",
                  "identifiers": {
                    "networkInterfaceIdentifiers": []
                  },
                  "applianceDriverIdentity": {
                    "namespace": "SKILL",
                    "identifier": "eyJza2lsbElkIjoiYW16bjEuYXNrLnNraWxsLjY4NjRlNjEzLWFiZDctNGVhYy05NWMxLWJkZTQyNTM5MjE2ZSIsInN0YWdlIjoibGl2ZSJ9"
                  },
                  "ipaddress": "",
                  "applianceLambdaControlled": true,
                  "mergedApplianceIds": [
                    "SKILL_eyJza2lsbElkIjoiYW16bjEuYXNrLnNraWxsLjY4NjRlNjEzLWFiZDctNGVhYy05NWMxLWJkZTQyNTM5MjE2ZSIsInN0YWdlIjoibGl2ZSJ9_AF23Y8VR63FXG_78cddfc0afde6f8c001ad2b8b0d1b0c6"
                  ]
                }
              }
            }
          },
          "LambdaBridge_AAA/SonarCloudService": {
            "amazonBridgeIdentifier": {
              "amazonBridgeDSN": "AAA/SonarCloudService",
              "amazonBridgeType": "LambdaBridge",
              "lambdaBridge": true,
              "amazonBridgeSource": "SONAR"
            },
            "applianceDetails": {
              "applianceDetails": {
                "AAA_SonarCloudService_00Pw6gPSjiCwQkPOjdSKyg7_smmbxvqmdOsako3-GMrhbOWl96u0u6G8NMfofgIcITYNxJNh_NlVfwQP79o": {
                  "applianceId": "AAA_SonarCloudService_00Pw6gPSjiCwQkPOjdSKyg7_smmbxvqmdOsako3-GMrhbOWl96u0u6G8NMfofgIcITYNxJNh_NlVfwQP79o",
                  "endpointTypeId": "A1AZ0VKGUB06NH",
                  "driverIdentity": {
                    "namespace": "AAA",
                    "identifier": "SonarCloudService"
                  },
                  "manufacturerName": "Vornado",
                  "friendlyDescription": "Vornado Transom",
                  "modelName": "",
                  "deviceType": "",
                  "version": "0",
                  "friendlyName": "First fan",
                  "friendlyNameModifiedAt": 1704485259656,
                  "capabilitiesModifiedAt": 1704485259656,
                  "ipAddress": "",
                  "port": "",
                  "entityId": "5c103758-8fe4-4fce-bc8c-a99acb5532b7",
                  "applianceNetworkState": {
                    "reachability": "REACHABLE",
                    "lastSeenAt": 1704487428113,
                    "createdAt": 1704485259656,
                    "lastSeenDiscoverySessionId": {
                      "value": "e8a2de52-847b-4520-ac2b-f002acc45bb3"
                    }
                  },
                  "tags": {
                    "tagNameToValueSetMap": {}
                  },
                  "additionalApplianceDetails": {
                    "additionalApplianceDetails": {
                      "deviceType": "A1AZ0VKGUB06NH",
                      "configurationVersion": "1",
                      "swVersion": "307002820",
                      "regionIdentifier": "00.ATVPDKIKX0DER",
                      "deviceSerialNumber": "**removed**"
                    }
                  },
                  "firmwareVersion": "0",
                  "actions": [],
                  "capabilities": [
                    {
                      "capabilityType": "AVSInterfaceCapability",
                      "type": "AlexaInterface",
                      "version": "3",
                      "properties": {
                        "supported": [
                          {
                            "name": "powerState"
                          }
                        ],
                        "proactivelyReported": true,
                        "retrievable": true,
                        "readOnly": false
                      },
                      "interfaceName": "Alexa.PowerController"
                    },
                    {
                      "capabilityType": "AVSInterfaceCapability",
                      "type": "AlexaInterface",
                      "version": "3",
                      "properties": {
                        "supported": [
                          {
                            "name": "mode"
                          }
                        ],
                        "proactivelyReported": true,
                        "retrievable": true,
                        "readOnly": false
                      },
                      "configuration": {
                        "ordered": true,
                        "supportedModes": [
                          {
                            "value": "1",
                            "modeResources": {
                              "friendlyNames": [
                                {
                                  "value": {
                                    "text": "Exhaust",
                                    "locale": "en-US"
                                  },
                                  "@type": "text"
                                },
                                {
                                  "value": {
                                    "text": "Outlet",
                                    "locale": "en-US"
                                  },
                                  "@type": "text"
                                }
                              ]
                            }
                          },
                          {
                            "value": "2",
                            "modeResources": {
                              "friendlyNames": [
                                {
                                  "value": {
                                    "text": "Direct",
                                    "locale": "en-US"
                                  },
                                  "@type": "text"
                                },
                                {
                                  "value": {
                                    "text": "inlet",
                                    "locale": "en-US"
                                  },
                                  "@type": "text"
                                }
                              ]
                            }
                          }
                        ]
                      },
                      "resources": {
                        "friendlyNames": [
                          {
                            "value": {
                              "text": "Direction",
                              "locale": "en-US"
                            },
                            "@type": "text"
                          },
                          {
                            "value": {
                              "text": "Wind",
                              "locale": "en-US"
                            },
                            "@type": "text"
                          }
                        ]
                      },
                      "instance": "2",
                      "interfaceName": "Alexa.ModeController"
                    },
                    {
                      "capabilityType": "AVSInterfaceCapability",
                      "type": "AlexaInterface",
                      "version": "3",
                      "properties": {
                        "supported": [
                          {
                            "name": "rangeValue"
                          }
                        ],
                        "proactivelyReported": true,
                        "retrievable": true,
                        "readOnly": false
                      },
                      "configuration": {
                        "supportedRange": {
                          "minimumValue": 60,
                          "maximumValue": 90,
                          "precision": 1
                        },
                        "unitOfMeasure": "Alexa.Unit.Temperature.Degrees",
                        "presets": [
                          {
                            "rangeValue": 60,
                            "presetResources": {
                              "friendlyNames": [
                                {
                                  "value": {
                                    "text": "Low",
                                    "locale": "en-US"
                                  },
                                  "@type": "text"
                                },
                                {
                                  "value": {
                                    "text": "Minimum",
                                    "locale": "en-US"
                                  },
                                  "@type": "text"
                                },
                                {
                                  "value": {
                                    "text": "Min",
                                    "locale": "en-US"
                                  },
                                  "@type": "text"
                                }
                              ]
                            }
                          },
                          {
                            "rangeValue": 70,
                            "presetResources": {
                              "friendlyNames": [
                                {
                                  "value": {
                                    "text": "Medium",
                                    "locale": "en-US"
                                  },
                                  "@type": "text"
                                }
                              ]
                            }
                          },
                          {
                            "rangeValue": 80,
                            "presetResources": {
                              "friendlyNames": [
                                {
                                  "value": {
                                    "text": "High",
                                    "locale": "en-US"
                                  },
                                  "@type": "text"
                                }
                              ]
                            }
                          },
                          {
                            "rangeValue": 90,
                            "presetResources": {
                              "friendlyNames": [
                                {
                                  "value": {
                                    "text": "Maximum",
                                    "locale": "en-US"
                                  },
                                  "@type": "text"
                                },
                                {
                                  "value": {
                                    "text": "Max",
                                    "locale": "en-US"
                                  },
                                  "@type": "text"
                                }
                              ]
                            }
                          }
                        ],
                        "unitOfMeasureLabel": {
                          "value": {
                            "assetId": "Alexa.Unit.Temperature.Degrees"
                          },
                          "@type": "asset"
                        }
                      },
                      "resources": {
                        "friendlyNames": [
                          {
                            "value": {
                              "text": "Set Temperature",
                              "locale": "en-US"
                            },
                            "@type": "text"
                          },
                          {
                            "value": {
                              "text": "Temperature",
                              "locale": "en-US"
                            },
                            "@type": "text"
                          }
                        ]
                      },
                      "instance": "3",
                      "interfaceName": "Alexa.RangeController"
                    },
                    {
                      "capabilityType": "AVSInterfaceCapability",
                      "type": "AlexaInterface",
                      "version": "3",
                      "properties": {
                        "supported": [
                          {
                            "name": "rangeValue"
                          }
                        ],
                        "proactivelyReported": true,
                        "retrievable": true,
                        "readOnly": true
                      },
                      "configuration": {
                        "supportedRange": {
                          "minimumValue": 0,
                          "maximumValue": 100,
                          "precision": 1
                        },
                        "unitOfMeasure": "Alexa.Unit.Temperature.Degrees",
                        "presets": [],
                        "unitOfMeasureLabel": {
                          "value": {
                            "assetId": "Alexa.Unit.Temperature.Degrees"
                          },
                          "@type": "asset"
                        }
                      },
                      "resources": {
                        "friendlyNames": [
                          {
                            "value": {
                              "text": "Air Temperature",
                              "locale": "en-US"
                            },
                            "@type": "text"
                          }
                        ]
                      },
                      "instance": "5",
                      "interfaceName": "Alexa.RangeController"
                    },
                    {
                      "capabilityType": "AVSInterfaceCapability",
                      "type": "AlexaInterface",
                      "version": "3",
                      "properties": {
                        "supported": [
                          {
                            "name": "connectivity"
                          }
                        ],
                        "proactivelyReported": true,
                        "retrievable": true,
                        "readOnly": false
                      },
                      "interfaceName": "Alexa.EndpointHealth"
                    },
                    {
                      "capabilityType": "AVSInterfaceCapability",
                      "type": "AlexaInterface",
                      "version": "3",
                      "properties": {
                        "supported": [
                          {
                            "name": "mode"
                          }
                        ],
                        "proactivelyReported": true,
                        "retrievable": true,
                        "readOnly": false
                      },
                      "configuration": {
                        "ordered": true,
                        "supportedModes": [
                          {
                            "value": "1",
                            "modeResources": {
                              "friendlyNames": [
                                {
                                  "value": {
                                    "text": "Low",
                                    "locale": "en-US"
                                  },
                                  "@type": "text"
                                },
                                {
                                  "value": {
                                    "text": "Minimum",
                                    "locale": "en-US"
                                  },
                                  "@type": "text"
                                },
                                {
                                  "value": {
                                    "text": "Min",
                                    "locale": "en-US"
                                  },
                                  "@type": "text"
                                },
                                {
                                  "value": {
                                    "text": "Level One",
                                    "locale": "en-US"
                                  },
                                  "@type": "text"
                                }
                              ]
                            }
                          },
                          {
                            "value": "2",
                            "modeResources": {
                              "friendlyNames": [
                                {
                                  "value": {
                                    "text": "Medium",
                                    "locale": "en-US"
                                  },
                                  "@type": "text"
                                },
                                {
                                  "value": {
                                    "text": "Level Two",
                                    "locale": "en-US"
                                  },
                                  "@type": "text"
                                }
                              ]
                            }
                          },
                          {
                            "value": "3",
                            "modeResources": {
                              "friendlyNames": [
                                {
                                  "value": {
                                    "text": "High",
                                    "locale": "en-US"
                                  },
                                  "@type": "text"
                                },
                                {
                                  "value": {
                                    "text": "Level Three",
                                    "locale": "en-US"
                                  },
                                  "@type": "text"
                                }
                              ]
                            }
                          },
                          {
                            "value": "4",
                            "modeResources": {
                              "friendlyNames": [
                                {
                                  "value": {
                                    "text": "Turbo",
                                    "locale": "en-US"
                                  },
                                  "@type": "text"
                                },
                                {
                                  "value": {
                                    "text": "Level Four",
                                    "locale": "en-US"
                                  },
                                  "@type": "text"
                                },
                                {
                                  "value": {
                                    "text": "Maximum",
                                    "locale": "en-US"
                                  },
                                  "@type": "text"
                                },
                                {
                                  "value": {
                                    "text": "Max",
                                    "locale": "en-US"
                                  },
                                  "@type": "text"
                                }
                              ]
                            }
                          }
                        ]
                      },
                      "resources": {
                        "friendlyNames": [
                          {
                            "value": {
                              "text": "Fan Speed",
                              "locale": "en-US"
                            },
                            "@type": "text"
                          },
                          {
                            "value": {
                              "text": "Speed",
                              "locale": "en-US"
                            },
                            "@type": "text"
                          }
                        ]
                      },
                      "instance": "1",
                      "interfaceName": "Alexa.ModeController"
                    },
                    {
                      "capabilityType": "AVSInterfaceCapability",
                      "type": "AlexaInterface",
                      "version": "3",
                      "properties": {
                        "supported": [
                          {
                            "name": "toggleState"
                          }
                        ],
                        "proactivelyReported": true,
                        "retrievable": true,
                        "readOnly": false
                      },
                      "resources": {
                        "friendlyNames": [
                          {
                            "value": {
                              "text": "Auto",
                              "locale": "en-US"
                            },
                            "@type": "text"
                          },
                          {
                            "value": {
                              "text": "Automatic",
                              "locale": "en-US"
                            },
                            "@type": "text"
                          },
                          {
                            "value": {
                              "text": "Autoclimate",
                              "locale": "en-US"
                            },
                            "@type": "text"
                          }
                        ]
                      },
                      "instance": "4",
                      "interfaceName": "Alexa.ToggleController"
                    }
                  ],
                  "applianceTypes": [
                    "FAN"
                  ],
                  "isEnabled": true,
                  "aliases": [
                    {
                      "friendlyName": "Window Fan",
                      "id": {
                        "uuid": "cccf8d22-9627-4133-a490-07700999ae3a",
                        "type": "ALIAS"
                      },
                      "enabled": true
                    }
                  ],
                  "connectedVia": "Wi-Fi",
                  "alexaDeviceIdentifierList": [
                    {
                      "dmsDeviceSerialNumber": "**removed**",
                      "dmsDeviceTypeId": "A1AZ0VKGUB06NH"
                    }
                  ],
                  "applianceKey": "**removed**",
                  "identifiers": {},
                  "applianceDriverIdentity": {
                    "namespace": "AAA",
                    "identifier": "SonarCloudService"
                  },
                  "ipaddress": "",
                  "applianceLambdaControlled": true,
                  "mergedApplianceIds": [
                    "AAA_SonarCloudService_00Pw6gPSjiCwQkPOjdSKyg7_smmbxvqmdOsako3-GMrhbOWl96u0u6G8NMfofgIcITYNxJNh_NlVfwQP79o"
                  ]
                }
              }
            }
          }
        }
      },
      "applianceGroups": {
        "applianceGroups": {}
      }
    }
  }
} END capabilities for all devices
[1/5/2024, 3:43:48 PM] [HomebridgeAlexaSmartHome] Window Fan ::: Attempting to add accessory(s) for device: {
  "id": "5c103758-8fe4-4fce-bc8c-a99acb5532b7",
  "displayName": "Window Fan",
  "description": "Vornado Transom",
  "supportedProperties": [
    "turnOff",
    "setModeValue@5c103758-8fe4-4fce-bc8c-a99acb5532b7_1",
    "setModeValue@5c103758-8fe4-4fce-bc8c-a99acb5532b7_2",
    "turnOn",
    "turnOn@5c103758-8fe4-4fce-bc8c-a99acb5532b7_4",
    "turnOff@5c103758-8fe4-4fce-bc8c-a99acb5532b7_4",
    "setRangeValue@5c103758-8fe4-4fce-bc8c-a99acb5532b7_3"
  ],
  "supportedTriggers": [],
  "supportedOperations": [
    "turnOff",
    "setModeValue@5c103758-8fe4-4fce-bc8c-a99acb5532b7_1",
    "setModeValue@5c103758-8fe4-4fce-bc8c-a99acb5532b7_2",
    "turnOn",
    "turnOn@5c103758-8fe4-4fce-bc8c-a99acb5532b7_4",
    "turnOff@5c103758-8fe4-4fce-bc8c-a99acb5532b7_4",
    "setRangeValue@5c103758-8fe4-4fce-bc8c-a99acb5532b7_3"
  ],
  "availability": "AVAILABLE",
  "icon": {
    "@iconType": "SmartHomeApplianceType",
    "value": "FAN"
  },
  "providerData": {
    "enabled": true,
    "relationships": [],
    "categoryType": "APPLIANCE",
    "deviceType": "FAN",
    "dmsDeviceIdentifiers": [
      {
        "deviceSerialNumber": "**removed**",
        "deviceType": "A1AZ0VKGUB06NH"
      }
    ]
  }
}
[1/5/2024, 3:43:48 PM] [HomebridgeAlexaSmartHome] Window Fan ::: Current state: [
  {
    "namespace": "Alexa.ToggleController",
    "name": "toggleState",
    "value": "OFF",
    "instance": "4"
  },
  {
    "namespace": "Alexa.ModeController",
    "name": "mode",
    "value": "1",
    "instance": "2"
  },
  {
    "namespace": "Alexa.ModeController",
    "name": "mode",
    "value": "4",
    "instance": "1"
  },
  {
    "namespace": "Alexa.EndpointHealth",
    "name": "connectivity",
    "value": {
      "value": "OK"
    }
  },
  {
    "namespace": "Alexa.RangeController",
    "name": "rangeValue",
    "value": 73,
    "instance": "5"
  },
  {
    "namespace": "Alexa.PowerController",
    "name": "powerState",
    "value": "ON"
  },
  {
    "namespace": "Alexa.RangeController",
    "name": "rangeValue",
    "value": 77,
    "instance": "3"
  }
]
[1/5/2024, 3:43:48 PM] [HomebridgeAlexaSmartHome] Window Fan ::: Range capabilities: {}
[1/5/2024, 3:43:48 PM] [HomebridgeAlexaSmartHome] Restored existing accessory from cache: Window Fan
[1/5/2024, 3:44:27 PM] [HomebridgeAlexaSmartHome] Updating device states
[1/5/2024, 3:44:27 PM] [HomebridgeAlexaSmartHome] Window Fan - Device state updated successfully using Alexa API
[1/5/2024, 3:44:27 PM] [HomebridgeAlexaSmartHome] Window Fan - Get power result: true
[1/5/2024, 3:44:29 PM] [HomebridgeAlexaSmartHome] Window Fan - Triggered set power: 0
[1/5/2024, 3:44:29 PM] [HomebridgeAlexaSmartHome] Obtained device states from cache
[1/5/2024, 3:44:29 PM] [HomebridgeAlexaSmartHome] Window Fan - Get power result: true
[1/5/2024, 3:44:29 PM] [HomebridgeAlexaSmartHome] Window Fan - Triggered set power: 0

Plugin Config:

{
    "devices": [
        "Window Fan"
    ],
    "auth": {
        "refreshInterval": 4,
        "proxy": {
            "clientHost": "192.168.1.10",
            "port": 9000
        }
    },
    "amazonDomain": "amazon.com",
    "language": "en-US",
    "performance": {
        "cacheTTL": 30,
        "backgroundRefresh": false
    },
    "debug": true,
    "platform": "HomebridgeAlexaSmartHome"
}

Screenshots:

SCR-20240105-obkj

Environment:

GreyAsteroid commented 8 months ago

Updated Node.js to v20.11.0, issue still persists.

joeyhage commented 8 months ago

Do you have any other devices (not fans) you can test with to make sure the plugin is working? Fans were recently added to this plugin and I don’t own a smart fan myself so I’ve had to rely on input from others.

GreyAsteroid commented 8 months ago

Do you have any other devices (not fans) you can test with to make sure the plugin is working? Fans were recently added to this plugin and I don’t own a smart fan myself so I’ve had to rely on input from others.

Just the fan unfortunately. Gone through setup a couple times with no change but no real way to check if the other functionality is working.

joeyhage commented 8 months ago

Ah I think I found the issue. I will make a change in the next release in the next couple days. Would you be willing to test and let me know if it is resolved?

GreyAsteroid commented 8 months ago

Ah I think I found the issue. I will make a change in the next release in the next couple days. Would you be willing to test and let me know if it is resolved?

Sure thing, glad to help however I can.

joeyhage commented 8 months ago

This should be fixed. Please test by updating to v2.1.1. Thanks!

GreyAsteroid commented 8 months ago

This should be fixed. Please test by updating to v2.1.1. Thanks!

Thanks for the quick update. I did go ahead and try out v2.1.1 but it seems I'm still experiencing the issue. I compared the debug logs between the two versions and found no difference though that might be expected. When reinstalling I did take the opportunity to also test homebridge-alexa-smarthome-lazyfan (https://github.com/joeyhage/homebridge-alexa-smarthome/pull/59) and found that it does toggle on/off properly though masquerading as an outlet.

joeyhage commented 8 months ago

Ok, discovered another small issue and I have an idea for improving the debug logging here. Thanks for getting back to me so quickly!

joeyhage commented 8 months ago

Confident it should be resolved now. Thanks for your patience 🙏

GreyAsteroid commented 8 months ago

Confident it should be resolved now. Thanks for your patience 🙏

Can confirm, cheers 🎉