joeyhage / homebridge-alexa-smarthome

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

Amazon Air Quality Monitors found but not added to HomeKit. #149

Open Jfrench-cdn opened 1 month ago

Jfrench-cdn commented 1 month ago

Describe Your Problem:

Unable to get Amazon Air Quality devices to show up in Apple Homekit. Other devices do, these are specifically left out. It worked once with an older version of the plugin, then stopped working.
Logs

[7/8/2024, 3:27:37 PM] [homebridge-alexa-smarthome] Discovered 2 devices. [7/8/2024, 3:27:37 PM] [homebridge-alexa-smarthome] Family Room AirQ Monitor ::: Attempting to add accessory(s) for device: { "endpointId": "amzn1.alexa.endpoint.e2728c4d-16be-4d6c-8a7e-37cf6ba6de0c", "id": "e2728c4d-16be-4d6c-8a7e-37cf6ba6de0c", "displayName": "Family Room AirQ Monitor", "supportedOperations": [ "turnOn", "turnOff" ], "enabled": true, "deviceType": "AIR_QUALITY_MONITOR", "serialNumber": "GAJ23005310500RH", "model": "Unknown", "manufacturer": "homebridge-alexa-smarthome" } [7/8/2024, 3:27:37 PM] [homebridge-alexa-smarthome] Family Room AirQ Monitor ::: Current state: [ { "featureName": "toggle", "name": "toggleState", "value": "ON" }, { "featureName": "range", "name": "rangeValue", "value": 43, "instance": "4", "rangeName": "Indoor humidity" }, { "featureName": "range", "name": "rangeValue", "value": 99, "instance": "9", "rangeName": "Indoor air quality" }, { "featureName": "range", "name": "rangeValue", "value": 1, "instance": "8", "rangeName": "Carbon monoxide" }, { "featureName": "range", "name": "rangeValue", "value": 1, "instance": "5", "rangeName": "Volatile organic compounds" }, { "featureName": "range", "name": "rangeValue", "value": 1, "instance": "6", "rangeName": "Particulate matter" } ] [7/8/2024, 3:27:37 PM] [homebridge-alexa-smarthome] Family Room AirQ Monitor ::: Range capabilities: {} [7/8/2024, 3:27:37 PM] [homebridge-alexa-smarthome] Bedroom AirQ Monitor ::: Attempting to add accessory(s) for device: { "endpointId": "amzn1.alexa.endpoint.eda2b606-f83c-4148-9df3-8d6b668dc149", "id": "eda2b606-f83c-4148-9df3-8d6b668dc149", "displayName": "Bedroom AirQ Monitor", "supportedOperations": [ "turnOn", "turnOff" ], "enabled": true, "deviceType": "AIR_QUALITY_MONITOR", "serialNumber": "GAJ23005338500G3", "model": "Unknown", "manufacturer": "homebridge-alexa-smarthome" } [7/8/2024, 3:27:37 PM] [homebridge-alexa-smarthome] Bedroom AirQ Monitor ::: Current state: [ { "featureName": "toggle", "name": "toggleState", "value": "OFF" }, { "featureName": "range", "name": "rangeValue", "value": 52, "instance": "4", "rangeName": "Indoor humidity" }, { "featureName": "range", "name": "rangeValue", "value": 97, "instance": "9", "rangeName": "Indoor air quality" }, { "featureName": "range", "name": "rangeValue", "value": 1, "instance": "8", "rangeName": "Carbon monoxide" }, { "featureName": "range", "name": "rangeValue", "value": 1, "instance": "5", "rangeName": "Volatile organic compounds" }, { "featureName": "range", "name": "rangeValue", "value": 2, "instance": "6", "rangeName": "Particulate matter" } ] [7/8/2024, 3:27:37 PM] [homebridge-alexa-smarthome] Bedroom AirQ Monitor ::: Range capabilities: {}

Plugin Config:

"devices": [ "Bedroom AirQ Monitor", "Family Room AirQ Monitor" ], "excludeDevices": [], "auth": { "refreshInterval": 4, "proxy": { "clientHost": "192.168.4.211", "port": 9000 } }, "amazonDomain": "amazon.ca", "language": "en-US", "performance": { "cacheTTL": 705 }, "debug": true, "_bridge": { "username": "", "port": 30334 }, "platform": "HomebridgeAlexaSmartHome" }

Environment:

joeyhage commented 1 month ago

Thanks for the report! This is very helpful since I do not own an Air Quality Monitor. I will let you know if I need more information but I believe this is enough for me to determine the issue.

joeyhage commented 1 month ago

Please try version 2.2.0-alpha.5 and let me know if that resolves the issue for you. Thanks!

Jfrench-cdn commented 1 month ago

Joey, It is now showing up and pulling information. The only info item it is not able to pull and display is Temperature.

When looking at the logs, it appears to be not looking for this value. Is it possible to add that one as well?

Thank you for looking into this. Much Appreciated.

Jeff French

On Jul 9, 2024, at 1:07 AM, Joey Hage @.***> wrote:

Please try version 2.2.0-alpha.5 and let me know if that resolves the issue for you. Thanks!

— Reply to this email directly, view it on GitHub https://github.com/joeyhage/homebridge-alexa-smarthome/issues/149#issuecomment-2216534703, or unsubscribe https://github.com/notifications/unsubscribe-auth/BJXSNZGDCTJTJXPZBOALQ5DZLNV2HAVCNFSM6AAAAABKROXIQKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMJWGUZTINZQGM. You are receiving this because you authored the thread.

joeyhage commented 1 month ago

@Jfrench-cdn please share a screenshot or snippet of the logs so I can better understand what you mean, thanks in advance!

Jfrench-cdn commented 1 month ago

[7/9/2024, 9:20:59 PM] [homebridge-alexa-smarthome] Bedroom AirQ Monitor ::: Raw device states: [ { "featureName": "range", "name": "rangeValue", "value": 52, "instance": "4", "rangeName": "Indoor humidity" }, { "featureName": "range", "name": "rangeValue", "value": 97, "instance": "9", "rangeName": "Indoor air quality" }, { "featureName": "range", "name": "rangeValue", "value": 1, "instance": "8", "rangeName": "Carbon monoxide" }, { "featureName": "range", "name": "rangeValue", "value": 1, "instance": "5", "rangeName": "Volatile organic compounds" }, { "featureName": "range", "name": "rangeValue", "value": 1, "instance": "6", "rangeName": "Particulate matter" } ]

On Jul 9, 2024, at 9:08 PM, Joey Hage @.***> wrote:

@Jfrench-cdn https://github.com/Jfrench-cdn please share a screenshot or snippet of the logs so I can better understand what you mean, thanks in advance!

— Reply to this email directly, view it on GitHub https://github.com/joeyhage/homebridge-alexa-smarthome/issues/149#issuecomment-2219282229, or unsubscribe https://github.com/notifications/unsubscribe-auth/BJXSNZHNUPQ4AWN2KSASAEDZLSCPVAVCNFSM6AAAAABKROXIQKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMJZGI4DEMRSHE. You are receiving this because you were mentioned.

joeyhage commented 1 month ago

@Jfrench-cdn the latest version, 2.2.0 prints additional useful information when debug logging is enabled. Search for Raw device features and you should see a list of features that are supported and enabled for your device.

If temperature is not in that list, it is either not supported or is not enabled for some reason, that would be why it's not working.

Jfrench-cdn commented 3 weeks ago

Joey, Please see below the list from the log of the RAW device features. temp is listed but is not being pulled by the plugin.

7/31/2024, 9:18:27 PM] [homebridge-alexa-smarthome] Bedroom AirQ Monitor ::: Raw device features: [ { "name": "temperatureSensor", "instance": null, "operations": null, "properties": [ { "name": "temperature", "value": null } ], "configuration": null }, { "name": "connectivity", "instance": null, "operations": null, "properties": [ { "name": "reachability" } ], "configuration": null }, { "name": "toggle", "instance": "11", "operations": [ { "name": "turnOn" }, { "name": "turnOff" } ], "properties": [ { "name": "toggleState", "toggleStateValue": "OFF" } ], "configuration": {} }, { "name": "range", "instance": "4", "operations": null, "properties": [ { "name": "rangeValue", "rangeValue": { "value": 54 } } ], "configuration": { "friendlyName": { "value": { "text": "Indoor humidity" } } } }, { "name": "range", "instance": "9", "operations": null, "properties": [ { "name": "rangeValue", "rangeValue": { "value": 74 } } ], "configuration": { "friendlyName": { "value": { "text": "Indoor air quality" } } } }, { "name": "range", "instance": "7", "operations": null, "properties": [ { "name": "rangeValue", "rangeValue": null } ], "configuration": { "friendlyName": { "value": { "text": "Particulate matter PM10" } } } }, { "name": "range", "instance": "8", "operations": null, "properties": [ { "name": "rangeValue", "rangeValue": { "value": 1 } } ], "configuration": { "friendlyName": { "value": { "text": "Carbon monoxide" } } } }, { "name": "range", "instance": "5", "operations": null, "properties": [ { "name": "rangeValue", "rangeValue": { "value": 6 } } ], "configuration": { "friendlyName": { "value": { "text": "Volatile organic compounds" } } } }, { "name": "range", "instance": "6", "operations": null, "properties": [ { "name": "rangeValue", "rangeValue": { "value": 24 } } ], "configuration": { "friendlyName": { "value": { "text": "Particulate matter" } } } } ]

joeyhage commented 1 week ago

@Jfrench-cdn based on what you sent, the devices are not reporting the temperature. All of the values for temperature were null (no value) in your message. Does the temperature show properly in the Alexa app?

{
  "name": "temperatureSensor",
  "instance": null,
  "operations": null,
  "properties": [
    {
      "name": "temperature",
      "value": null
    }
  ],
  "configuration": null
}
Jfrench-cdn commented 1 week ago

Yes it does show properly in the Alexa app

joeyhage commented 1 week ago

Based on what I am seeing, Temperature is not currently working via the GraphQL API. This plugin was converted to the Alexa GraphQL API as of 2.2.0 because of the timeout/rate limiting issues. Hopefully Amazon will fix it soon but there is nothing I can do unfortunately. This is the full response from the alexa API for an air quality monitor's temperature sensor.

                {
                    "name": "temperatureSensor",
                    "properties": [
                        {
                            "name": "temperature",
                            "timestamp": null,
                            "timeOfSample": null,
                            "timeOfLastChange": null,
                            "accuracy": null,
                            "type": "ERROR",
                            "value": null,
                            "error": {
                                "type": "NOT_FOUND",
                                "message": "NOT_FOUND"
                            }
                        }
                    ],
                    "configuration": null,
                    "featureOperations": null
                }