joeyhage / homebridge-alexa-smarthome

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

Air Conditioner Behaving as a Switch #148

Closed roomonthethird closed 1 week ago

roomonthethird commented 1 month ago

Describe The Bug:

In previous versions of this plugin, I was able to get and control the temperature of the air conditioner connected via Alexa. Now I only have the ability to turn the air conditioner on and off.

To Reproduce:

Updated plugin to latest version (v2.2.0-alpha.2) Readded air conditioner Added to Homekit. Added as switch.

Expected behavior:

Ability to change temperature of air conditioner from Homekit.

Plugin Config:

   {
            "devices": [
                "Air Conditioner"
            ],
            "excludeDevices": [],
            "auth": {
                "refreshInterval": 4,
                "proxy": {
                    "clientHost": "192.168.xx.xx",
                    "port": 9690
                }
            },
            "amazonDomain": "amazon.com",
            "language": "en-US",
            "performance": {
                "cacheTTL": 60
            },
            "debug": false,
            "_bridge": {
                "username": "0E:52:1A:A1:10:CF",
                "port": 57907
            },
            "platform": "HomebridgeAlexaSmartHome"
        }
    ],

Environment:

joeyhage commented 1 month ago

Thanks for the report! Since I don't have a smart air conditioner, it's difficult to test it. Can you turn on debug logging and share some of the outputs between the BEGIN and END sections? Thanks!

roomonthethird commented 1 month ago

Screenshot 2024-07-08 132408 Screenshot 2024-07-08 132244 Screenshot 2024-07-08 132156 Screenshot 2024-07-08 132136

There were a lot of devices connected to Alexa so I just showed the first few. A lot of them old random things, not even sure how to delete them lol. Thank you for your help!

lgp1985 commented 1 month ago

I've faced the same issue. here's a snippet

[08/07/2024, 17:25:49] [homebridge-alexa-smarthome] BEGIN devices connected to Alexa account

 [
  {
    "endpointId": "amzn1.alexa.endpoint.33944317-0737-4555-a1bc-438e40928402",
    "id": "33944317-0737-4555-a1bc-438e40928402",
    "displayName": "Forno",
    "supportedOperations": [
      "turnOn",
      "turnOff",
      "setRangeValue",
      "adjustRangeValue"
    ],
    "enabled": true,
    "deviceType": "OVEN",
    "serialNumber": "Unknown",
    "model": "OE8EW",
    "manufacturer": "homebridge-alexa-smarthome"
  },
  {
    "endpointId": "amzn1.alexa.endpoint.7b63199f-f0ab-4b11-998f-9a207103ae9e",
    "id": "7b63199f-f0ab-4b11-998f-9a207103ae9e",
    "displayName": "Xbox",
    "supportedOperations": [
      "turnOn",
      "turnOff"
    ],
    "enabled": true,
    "deviceType": "GAME_CONSOLE",
    "serialNumber": "F4000E6DF1D77D4A",
    "model": "XboxSeriesX",
    "manufacturer": "homebridge-alexa-smarthome"
  },
  {
    "endpointId": "amzn1.alexa.endpoint.08c24d31-0efb-4121-bf94-ebe50311d064",
    "id": "08c24d31-0efb-4121-bf94-ebe50311d064",
    "displayName": "TV",
    "supportedOperations": [
      "turnOn",
      "turnOff"
    ],
    "enabled": true,
    "deviceType": "TV",
    "serialNumber": "Unknown",
    "model": "OLED55CXPSA",
    "manufacturer": "homebridge-alexa-smarthome"
  },
  {
    "endpointId": "amzn1.alexa.endpoint.85ffac5f-e4e4-42c2-bc09-1d7c8829e900",
    "id": "85ffac5f-e4e4-42c2-bc09-1d7c8829e900",
    "displayName": "TV",
    "supportedOperations": [],
    "enabled": true,
    "deviceType": "ALEXA_VOICE_ENABLED",
    "serialNumber": "7273daaed8a342748d75499bdb7cc3a9",
    "model": "Alexa Voice Search",
    "manufacturer": "homebridge-alexa-smarthome"
  },
  {
    "endpointId": "amzn1.alexa.endpoint.04f2381d-13d9-432a-aafb-4aecba94a401",
    "id": "04f2381d-13d9-432a-aafb-4aecba94a401",
    "displayName": "Ar da Suíte",
    "supportedOperations": [
      "turnOn",
      "turnOff",
      "setTargetSetpoint",
      "adjustTargetSetpoint",
      "setThermostatMode"
    ],
    "enabled": true,
    "deviceType": "THERMOSTAT",
    "serialNumber": "Unknown",
    "model": "Unknown",
    "manufacturer": "homebridge-alexa-smarthome"
  },
  {
    "endpointId": "amzn1.alexa.endpoint.27134196-6e6a-4f53-8494-57513fa8f7a2",
    "id": "27134196-6e6a-4f53-8494-57513fa8f7a2",
    "displayName": "Luis's  D000X",
    "supportedOperations": [],
    "enabled": true,
    "deviceType": "ALEXA_VOICE_ENABLED",
    "serialNumber": "8dac23b03baf599c876a9c60dc8a842e",
    "model": "Amazon Video for Roku",
    "manufacturer": "homebridge-alexa-smarthome"
  },
  {
    "endpointId": "amzn1.alexa.endpoint.dd21cef1-b1b5-49c2-9dc1-ad506797b26f",
    "id": "dd21cef1-b1b5-49c2-9dc1-ad506797b26f",
    "displayName": "Luis's 4th iOS Device",
    "supportedOperations": [],
    "enabled": true,
    "deviceType": "ALEXA_VOICE_ENABLED",
    "serialNumber": "C2DEF5C4B4544093A14189065B9521F5",
    "model": "Amazon Shopping App for iOS",
    "manufacturer": "homebridge-alexa-smarthome"
  },
  {
    "endpointId": "amzn1.alexa.endpoint.c831761e-3db3-4a64-85ce-74f0fc53cb0d",
    "id": "c831761e-3db3-4a64-85ce-74f0fc53cb0d",
    "displayName": "Luis's 8th iOS Device",
    "supportedOperations": [],
    "enabled": true,
    "deviceType": "ALEXA_VOICE_ENABLED",
    "serialNumber": "52A6DF158E7543BBA1EECB3205A21420",
    "model": "Amazon Shopping App for iOS",
    "manufacturer": "homebridge-alexa-smarthome"
  },
  {
    "endpointId": "amzn1.alexa.endpoint.24ae4148-bb5d-48ab-99d6-9c807b8918a3",
    "id": "24ae4148-bb5d-48ab-99d6-9c807b8918a3",
    "displayName": "Alexa App on Mobile",
    "supportedOperations": [],
    "enabled": true,
    "deviceType": "ALEXA_VOICE_ENABLED",
    "serialNumber": "833D3C959C724F04AF865C48778743A7",
    "model": "Alexa Mobile for iOS",
    "manufacturer": "homebridge-alexa-smarthome"
  },
  {
    "endpointId": "amzn1.alexa.endpoint.96f6b80e-e522-47d1-88bb-9cb7c01e4b35",
    "id": "96f6b80e-e522-47d1-88bb-9cb7c01e4b35",
    "displayName": "Alexa App on Mobile",
    "supportedOperations": [],
    "enabled": true,
    "deviceType": "ALEXA_VOICE_ENABLED",
    "serialNumber": "a5dd478b7ea5f89c0e02935570970bce",
    "model": "Alexa Mobile for iOS",
    "manufacturer": "homebridge-alexa-smarthome"
  },
  {
    "endpointId": "amzn1.alexa.endpoint.14d1bb05-4be4-4c6b-8754-5474101e110f",
    "id": "14d1bb05-4be4-4c6b-8754-5474101e110f",
    "displayName": "Alexa App on Mobile",
    "supportedOperations": [],
    "enabled": true,
    "deviceType": "ALEXA_VOICE_ENABLED",
    "serialNumber": "BAD675E587FF4865872C4136CCFA42E6",
    "model": "Alexa Mobile for iOS",
    "manufacturer": "homebridge-alexa-smarthome"
  },
  {
    "endpointId": "amzn1.alexa.endpoint.63b246b8-a06c-4150-8274-88a5f530999a",
    "id": "63b246b8-a06c-4150-8274-88a5f530999a",
    "displayName": "Ar do Gustavo",
    "supportedOperations": [
      "turnOn",
      "turnOff",
      "setTargetSetpoint",
      "adjustTargetSetpoint",
      "setThermostatMode"
    ],
    "enabled": true,
    "deviceType": "THERMOSTAT",
    "serialNumber": "Unknown",
    "model": "Unknown",
    "manufacturer": "homebridge-alexa-smarthome"
  },
  {
    "endpointId": "amzn1.alexa.endpoint.73b4eae8-a194-488b-958a-c6cf6f362b68",
    "id": "73b4eae8-a194-488b-958a-c6cf6f362b68",
    "displayName": "Ar do Jota",
    "supportedOperations": [
      "turnOn",
      "turnOff",
      "setTargetSetpoint",
      "adjustTargetSetpoint",
      "setThermostatMode"
    ],
    "enabled": true,
    "deviceType": "THERMOSTAT",
    "serialNumber": "Unknown",
    "model": "Unknown",
    "manufacturer": "homebridge-alexa-smarthome"
  },
  {
    "endpointId": "amzn1.alexa.endpoint.f789f980-2898-4b91-8ee3-d79bddc6a053",
    "id": "f789f980-2898-4b91-8ee3-d79bddc6a053",
    "displayName": "Lavadora",
    "supportedOperations": [
      "turnOn",
      "turnOff"
    ],
    "enabled": true,
    "deviceType": "WASHER",
    "serialNumber": "Unknown",
    "model": "DA_WM_TP1_21_COMMON|20334241|20010002011711664AA3025700000000",
    "manufacturer": "homebridge-alexa-smarthome"
  },
  {
    "endpointId": "amzn1.alexa.endpoint.2e6a640c-44bf-4359-9a08-d2da8beb66a0",
    "id": "2e6a640c-44bf-4359-9a08-d2da8beb66a0",
    "displayName": "Refrigerador",
    "supportedOperations": [
      "turnOn",
      "turnOff"
    ],
    "enabled": true,
    "deviceType": "OTHER",
    "serialNumber": "Unknown",
    "model": "2RES1VE61PFA2",
    "manufacturer": "homebridge-alexa-smarthome"
  },
  {
    "endpointId": "amzn1.alexa.endpoint.54ee675d-8b24-4954-985a-d2b20ffc4b6b",
    "id": "54ee675d-8b24-4954-985a-d2b20ffc4b6b",
    "displayName": "Luis's  OLED55CXPSA",
    "supportedOperations": [],
    "enabled": true,
    "deviceType": "ALEXA_VOICE_ENABLED",
    "serialNumber": "81bf53af38523ed19b0a82d7a198cf0d49f8df34",
    "model": "Amazon Video for LG TV",
    "manufacturer": "homebridge-alexa-smarthome"
  }
]

END devices connected to Alexa account
joeyhage commented 1 month ago

I just published v2.2.0-alpha.3. Please let me know if this addresses the issues. Thanks!

roomonthethird commented 1 month ago

It seems to be working great. Thank you so much for the update, I truly appreciate it!

roomonthethird commented 1 month ago

I think I closed this presumptively! The only funny thing I notice now that the On/Off function and the temp control are two separate functions. Before they were integrated as one, and when I shut it off via temp control, it fully powered off. Any ideas?

joeyhage commented 1 month ago

@roomonthethird Can you share a picture or video of what you mean?

lgp1985 commented 1 month ago

I see it works now, but it's not accepting Celsius

[09/07/2024, 10:07:03] [homebridge-alexa-smarthome] Ar da Suíte ::: Raw device states: [
  {
    "featureName": "thermostat",
    "name": "thermostatMode",
    "value": "OFF"
  },
  {
    "featureName": "thermostat",
    "name": "targetSetpoint",
    "value": {
      "value": 22,
      "scale": "CELSIUS"
    }
  }
]
[09/07/2024, 10:07:03] [homebridge-alexa-smarthome] Ar da Suíte - Get target temperature result: 22 Celsius
[09/07/2024, 10:07:03] [homebridge-alexa-smarthome] Ar da Suíte - Get temperature units - InvalidResponse(State not available)

image

roomonthethird commented 1 month ago

https://github.com/joeyhage/homebridge-alexa-smarthome/assets/118706194/e8d728a0-3339-4301-bf81-1b7945798506

Screenshot 2024-07-09 101807

joeyhage commented 1 week ago

Hi @roomonthethird, I'm sorry the air conditioner stopped working. ACs are not officially supported by this plugin but they did work as a happy coincidence because they were similar to thermostats. It seems that the changes made to Alexa in the last few months mean they no longer work similar to thermostats.

I do not have access to a smart AC so I am unable to support it unfortunately. If you would like to contribute to the project, I am happy to review any code.