NorthernMan54 / homebridge-alexa

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

Smartmi air purifier not found #594

Closed MarcosD1993 closed 3 months ago

MarcosD1993 commented 5 months ago

Current Situation

Hi there, I’ve successfully installed your plugin and all of my HomeKit devices are now available in Alexa but weirdly my Smartmi air purifier is missing.

You have an idea why? Can you help me adding it somehow?

Best, Marcos

Logs

[14/01/2024, 20:31:30] [Alexa] Initializing Alexa platform...
[14/01/2024, 20:31:30] [Alexa] homebridge-alexa v0.6.8, node v20.10.0, homebridge v1.7.0
[14/01/2024, 20:31:30] Initializing platform accessory 'Alexa'...
[14/01/2024, 20:31:50] [Alexa] alexaDiscovery - returned 40 devices

Configuration

{
    "bridge": {
        "name": "Homebridge 9344",
        "username": "",
        "port": 51351,
        "pin": "",
        "advertiser": "avahi"
    },
    "accessories": [
        {
            "name": "Roborock S7",
            "ip": "",
            "token": "",
            "serviceType": "fan",
            "waterBox": true,
            "dustBin": false,
            "dustCollection": true,
            "disableCareServices": false,
            "silent": false,
            "pause": true,
            "pauseWord": "Pause",
            "findMe": true,
            "findMeWord": "Wo bin ich?",
            "goTo": false,
            "goToWord": "go to coordinates",
            "goToX": 25500,
            "goToY": 25500,
            "dock": true,
            "cleanword": "Reinigen",
            "roomTimeout": 0,
            "autoroom": true,
            "accessory": "XiaomiRoborockVacuum"
        },
        {
            "accessory": "AutomationCalendar",
            "name": "AutomationCalendar",
            "latitude": 53.551086,
            "longitude": 9.993682
        },
        {
            "name": "Ambilight Control",
            "interval": 15,
            "accessory": "Schedule"
        },
        {
            "name": "Abstellraum Timer",
            "delay": 1800000,
            "sensorType": "occupancy",
            "flipSensorState": false,
            "startOnReboot": false,
            "accessory": "DelaySwitch"
        },
        {
            "name": "Wohnungstür Timer",
            "delay": 300000,
            "sensorType": "occupancy",
            "flipSensorState": false,
            "startOnReboot": false,
            "accessory": "DelaySwitch"
        },
        {
            "name": "Heizperiode",
            "stateful": true,
            "dimmer": false,
            "reverse": false,
            "time": 1000,
            "random": false,
            "resettable": false,
            "brightness": 0,
            "disableLogging": false,
            "accessory": "DummySwitch"
        },
        {
            "name": "WalkingPad",
            "stateful": true,
            "reverse": false,
            "time": 1000,
            "random": false,
            "resettable": false,
            "disableLogging": false,
            "accessory": "DummySwitch"
        },
        {
            "name": "TV Dummy",
            "stateful": true,
            "dimmer": false,
            "reverse": false,
            "time": 1000,
            "random": false,
            "resettable": false,
            "brightness": 0,
            "disableLogging": false,
            "accessory": "DummySwitch"
        }
    ],
    "platforms": [
        {
            "name": "Config",
            "port": 8581,
            "platform": "config"
        },
        {
            "name": "SwitchBot",
            "credentials": {
                "token": "",
                "secret": "",
                "notice": "Keep your token a secret!"
            },
            "options": {
                "refreshRate": 60,
                "logging": "standard"
            },
            "platform": "SwitchBot"
        },
        {
            "platform": "TadoPlatform",
            "name": "TadoPlatform",
            "homes": [
                {
                    "id": 215785,
                    "name": "Zuhause",
                    "username": "",
                    "password": "",
                    "polling": 30,
                    "temperatureUnit": "CELSIUS",
                    "geolocation": {
                        "longitude": "10.063865",
                        "latitude": "53.579487"
                    },
                    "presence": {
                        "anyone": false,
                        "accTypeAnyone": "OCCUPANCY",
                        "user": [
                            {
                                "active": false,
                                "name": "iPad mini",
                                "accType": "OCCUPANCY"
                            },
                            {
                                "active": false,
                                "name": "iPhone",
                                "accType": "OCCUPANCY"
                            }
                        ]
                    },
                    "weather": {
                        "temperatureSensor": false,
                        "solarIntensity": false,
                        "accTypeSolarIntensity": "LIGHTBULB",
                        "airQuality": false
                    },
                    "extras": {
                        "centralSwitch": true,
                        "runningInformation": false,
                        "presenceLock": false,
                        "accTypePresenceLock": "ALARM",
                        "boostSwitch": false,
                        "sheduleSwitch": false,
                        "turnoffSwitch": true,
                        "dummySwitch": false,
                        "childLockSwitches": [
                        ]
                    },
                    "zones": [
                        {
                            "active": true,
                            "id": 13,
                            "name": "Badezimmer",
                            "delaySwitch": false,
                            "autoOffDelay": false,
                            "openWindowSensor": false,
                            "openWindowSwitch": false,
                            "airQuality": false,
                            "separateTemperature": false,
                            "separateHumidity": false,
                            "minStep": "0.5",
                            "minValue": 5,
                            "maxValue": 25,
                            "mode": "TIMER",
                            "modeTimer": 30,
                            "easyMode": false,
                            "noBattery": false,
                            "type": "HEATING",
                            "boilerTempSupport": false,
                            "accTypeBoiler": "SWITCH"
                        },
                        {
                            "active": true,
                            "id": 11,
                            "name": "Büro",
                            "delaySwitch": false,
                            "autoOffDelay": false,
                            "openWindowSensor": false,
                            "openWindowSwitch": false,
                            "airQuality": false,
                            "separateTemperature": false,
                            "separateHumidity": false,
                            "minStep": "0.1",
                            "minValue": 5,
                            "maxValue": 25,
                            "mode": "TIMER",
                            "modeTimer": 30,
                            "easyMode": false,
                            "noBattery": false,
                            "type": "HEATING",
                            "boilerTempSupport": false,
                            "accTypeBoiler": "SWITCH"
                        },
                        {
                            "active": true,
                            "id": 15,
                            "name": "Flur",
                            "delaySwitch": false,
                            "autoOffDelay": false,
                            "openWindowSensor": false,
                            "openWindowSwitch": false,
                            "airQuality": true,
                            "separateTemperature": false,
                            "separateHumidity": false,
                            "minStep": "0.5",
                            "minValue": 5,
                            "maxValue": 25,
                            "mode": "TIMER",
                            "modeTimer": 30,
                            "easyMode": false,
                            "noBattery": false,
                            "type": "HEATING",
                            "boilerTempSupport": false,
                            "accTypeBoiler": "SWITCH"
                        },
                        {
                            "active": true,
                            "id": 19,
                            "name": "Küche",
                            "delaySwitch": false,
                            "autoOffDelay": false,
                            "openWindowSensor": false,
                            "openWindowSwitch": false,
                            "airQuality": true,
                            "separateTemperature": false,
                            "separateHumidity": false,
                            "minStep": "0.5",
                            "minValue": 5,
                            "maxValue": 25,
                            "mode": "TIMER",
                            "modeTimer": 30,
                            "easyMode": false,
                            "noBattery": false,
                            "type": "HEATING",
                            "boilerTempSupport": false,
                            "accTypeBoiler": "SWITCH"
                        },
                        {
                            "active": true,
                            "id": 9,
                            "name": "Schlafzimmer",
                            "delaySwitch": false,
                            "autoOffDelay": false,
                            "openWindowSensor": false,
                            "openWindowSwitch": false,
                            "airQuality": false,
                            "separateTemperature": false,
                            "separateHumidity": false,
                            "minStep": "0.5",
                            "minValue": 5,
                            "maxValue": 25,
                            "mode": "TIMER",
                            "modeTimer": 30,
                            "easyMode": false,
                            "noBattery": false,
                            "type": "HEATING",
                            "boilerTempSupport": false,
                            "accTypeBoiler": "SWITCH"
                        },
                        {
                            "active": true,
                            "id": 12,
                            "name": "Wohnzimmer",
                            "delaySwitch": false,
                            "autoOffDelay": false,
                            "openWindowSensor": false,
                            "openWindowSwitch": false,
                            "airQuality": false,
                            "separateTemperature": false,
                            "separateHumidity": false,
                            "minStep": "0.1",
                            "minValue": 5,
                            "maxValue": 25,
                            "mode": "TIMER",
                            "modeTimer": 30,
                            "easyMode": false,
                            "noBattery": false,
                            "type": "HEATING",
                            "boilerTempSupport": false,
                            "accTypeBoiler": "SWITCH"
                        }
                    ],
                    "telegram": {
                        "active": false
                    }
                }
            ]
        },
        {
            "name": "Govee",
            "username": "",
            "password": "",
            "apiKey": "",
            "bleRefreshTime": 60,
            "lanDisable": true,
            "offlineAsOff": false,
            "lightDevices": [
                {
                    "label": "Fernseher Ambilight",
                    "deviceId": "",
                    "showAs": "default",
                    "customAddress": ""
                }
            ],
            "platform": "Govee"
        },
        {
            "devices": [
                {
                    "name": "Ventilator",
                    "ip": "192.168.178.51",
                    "token": "",
                    "pollingInterval": 5,
                    "buzzerControl": true,
                    "ledControl": true,
                    "naturalModeControl": true,
                    "sleepModeControl": true,
                    "moveControl": true,
                    "shutdownTimer": true,
                    "angleButtons": [
                        0
                    ],
                    "ioniserControl": true,
                    "fanLevelControl": true
                }
            ],
            "platform": "xiaomifan"
        },
        {
            "name": "Alexa",
            "username": "",
            "password": "",
            "pin": "",
            "routines": true,
            "refresh": 900,
            "keepalive": 5,
            "CloudTransport": "mqtts",
            "deviceListHandling": "none",
            "speakers": [
                {
                    "manufacturer": "Amazon",
                    "name": "Echo Dot"
                }
            ],
            "platform": "Alexa"
        },
        {
            "user": "",
            "password": "",
            "registeredApp": "MideaAir",
            "interval": 30,
            "devices": [
                {
                    "supportedSwingMode": "both",
                    "temperatureSteps": 1,
                    "minTemp": 17,
                    "maxTemp": 30,
                    "fanOnlyMode": false,
                    "OutdoorTemperature": false,
                    "useFahrenheit": false,
                    "audibleFeedback": false
                }
            ],
            "platform": "midea-air"
        }
    ],
    "disabledPlugins": [
        "homebridge-weather-plus",
        "homebridge-playstation",
        "homebridge-xbox-tv"
    ]
}

Environment

Process Supervisor

hb-service

Additional Context

No response

NorthernMan54 commented 5 months ago

Could you share a homebridge accessory dump ? I want to see how the the purifier is controlled and why the plugin does not support it.

details are here https://github.com/NorthernMan54/homebridge-alexa#homebridge-accessory-dump

MarcosD1993 commented 5 months ago

Thanks for your quick reply!

I've tried the command you recommend and adjusted it so it matches my environment but I get this error:

{"statusCode":400,"message":"Body cannot be empty when content-type is set to 'application/json'"}

Is there any other way to get Homebridge's accessory dump?

NorthernMan54 commented 5 months ago

The command is correct, just the port number is incorrect

To find the port number you need to watch the logs during the start up of Homebridge

If you are not using child bridges, then look for a line similar to this in your log file

[2024-01-16, 5:29:16 p.m.] Homebridge v1.7.0 (HAP v0.11.1) (Homebridge 43B1) is running on port 51366.

If you are using child bridges, then look for a line similar to this with the plugin name included. This is the Alexa plugin running in a child bridge

[2024-01-16, 5:29:17 p.m.] Homebridge v1.7.0 (HAP v0.11.1) (Alexa) is running on port 59740

Sample Log

Or enter this code with your HomeKit app on your iOS device to pair with Homebridge:

    ┌────────────┐     
    │ 656-73-130 │     
    └────────────┘     

[2024-01-16, 5:29:16 p.m.] Homebridge v1.7.0 (HAP v0.11.1) (Homebridge 43B1) is running on port 51366.
[2024-01-16, 5:29:17 p.m.] [Alexa] Launched child bridge with PID 8805
[2024-01-16, 5:29:17 p.m.] Registering platform 'homebridge-alexa.Alexa'
[2024-01-16, 5:29:17 p.m.] [Alexa] Loaded homebridge-alexa v0.6.8 child bridge successfully
[2024-01-16, 5:29:17 p.m.] Loaded 0 cached accessories from cachedAccessories.0E853905AC11.
[2024-01-16, 5:29:17 p.m.] [Alexa] homebridge-alexa v0.6.8, node v20.10.0, homebridge v1.7.0
[2024-01-16, 5:29:17 p.m.] Initializing platform accessory 'Alexa'...
[2024-01-16, 5:29:17 p.m.] Homebridge v1.7.0 (HAP v0.11.1) (Alexa) is running on port 59740.
[2024-01-16, 5:29:23 p.m.] [Homebridge UI] Homebridge UI v4.55.1 is listening on :: port 8581
MarcosD1993 commented 5 months ago

Yes, I used the wrong port. Thanks for your help on this!

I've attached the dump: Homebridge Accessory Dump.json

NorthernMan54 commented 5 months ago

Hopefully last question, what is the name of your air purifier ?

MarcosD1993 commented 5 months ago

I named it "Luftreiniger" (German for air purifier) in the Home app but the device itself is called "Smartmi Air Purifier P1"

NorthernMan54 commented 5 months ago

I looked in the accessory dump, and I can’t seem to find a device named ‘Luftreiniger’. Is it using a Homebridge plugin or native integration? If its using native integration, you would need to use a plugin like https://github.com/minamoanes/homebridge-homekit-control to expose the device to Homebridge, before the Alexa plugin can find it.

On Jan 18, 2024, at 2:58 PM, MarcosD1993 @.***> wrote:

I named it "Luftreiniger" (German for air purifier) in the Home app but the device itself is called "Smartmi Air Purifier P1"

— Reply to this email directly, view it on GitHub https://github.com/NorthernMan54/homebridge-alexa/issues/594#issuecomment-1897976894, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEXEFGB3YDZBK7D2K72Z4R3YPDI4FAVCNFSM6AAAAABB2KECMCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOJXHE3TMOBZGQ. You are receiving this because you commented.

MarcosD1993 commented 5 months ago

It's a native integration. I've tried the recommended plugin but I'm getting this error:

Error: M2: Accessory LTPK not yet set

Looks like it hasn't been fixed yet.

I guess there is no way right now to make the air purifier accessible for Alexa but many thanks for your help!

NorthernMan54 commented 5 months ago

When I googled the device I thought it mentioned Alexa and HomeKit integration? Did I read that wrong ?

MarcosD1993 commented 5 months ago

No, you are right but Smartmi's Alexa skill is not available anymore so I’m not able to control the purifier via Alexa. HomeKit works like a charm.

Am 22.01.2024 um 15:00 schrieb Northern Man @.***>:

When I googled the device I thought it mentioned Alexa and HomeKit integration? Did I read that wrong ?

— Reply to this email directly, view it on GitHub https://github.com/NorthernMan54/homebridge-alexa/issues/594#issuecomment-1904064829, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQT5EDMB3MQ7WRXKJBVYUS3YPZWJLAVCNFSM6AAAAABB2KECMCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBUGA3DIOBSHE. You are receiving this because you authored the thread.

NorthernMan54 commented 5 months ago

Okay, for the HomeKit-control issue have you tried looking at their issues or raising one?On Jan 26, 2024, at 3:16 PM, MarcosD1993 @.***> wrote: No, you are right but Smartmi's Alexa skill is not available anymore so I’m not able to control the purifier via Alexa. HomeKit works like a charm.

Am 22.01.2024 um 15:00 schrieb Northern Man @.***>:

When I googled the device I thought it mentioned Alexa and HomeKit integration? Did I read that wrong ?

Reply to this email directly, view it on GitHub https://github.com/NorthernMan54/homebridge-alexa/issues/594#issuecomment-1904064829, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQT5EDMB3MQ7WRXKJBVYUS3YPZWJLAVCNFSM6AAAAABB2KECMCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBUGA3DIOBSHE.

You are receiving this because you authored the thread.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>