kovapatrik / homebridge-midea-platform

Homebridge plugin for Midea devices
https://www.npmjs.com/package/homebridge-midea-platform
Apache License 2.0
28 stars 2 forks source link

Plugin is exposing AC as a Heater-AC #68

Closed rogersjc42 closed 7 months ago

rogersjc42 commented 8 months ago

Describe The Bug:

AC Is exposed as a Heater-AC in the Home app. There are no logs for this error, as the information is presented inside the Home app.

To Reproduce:

  1. Configure an AC
  2. Inspect device in the Apple Home app

Expected behavior: Device is properly presented to the Home app with the correct functionality

Plugin Config:

{
    "devices": [
        {
            "type": "Air Conditioner",
            "name": "Office AC",
            "id": 30786326306583,
            "advanced_options": {
                "token": "",
                "key": ""
            },
            "AC_options": {
                "swingMode": "Vertical",
                "audioFeedback": true,
                "fahrenheit": true
            }
        }
    ],
    "_bridge": {
        "username": "",
        "port": 
    },
    "platform": "midea-platform"
}

Screenshots:

image

Environment:

kovapatrik commented 8 months ago

So your problem is that your AC can't heat and the option is still there?

rogersjc42 commented 8 months ago

Correct, the portable AC model that I have has no heater function yet the option still shows in the Home app. I assume this is from how it is exposed to the Home app from the Homebridge plugin

kovapatrik commented 8 months ago

Yes, the plugin currently assumes it can heat as well. I will add an option to hide heating in the next update.

kovapatrik commented 8 months ago

So if your AC is not heating capable, the only options you would need in the app is Off and Cool?

kovapatrik commented 8 months ago

And what do you think: should the plugin assume that the AC is heating capable by default? So in this case you would need to see through the config and turn it off. Or it can work in a reverse way, I don't know which one is more user friendly.

rogersjc42 commented 8 months ago

I would be curious if the device reports back the capabilities? I don't know much about what the device is sending.

I think, in lieu of that, I think defaulting as AC only is probably best. The Consumer Safety Product Commission (as well as most state and municipal fire codes afaik) in the United States have regulations against selling devices that allow the remote control (read: different location) of heaters due to concerns about fires. For all portable heaters (such as Dyson Cool+Hot fans), the heating controls are disabled both in the Dyson app as well as the Dyson Homebridge plugin.

I do think the option should be configurable if only to prevent you from being asked for the feature in the future, lol.

kovapatrik commented 8 months ago

Ah okay, I wasn't aware of the regulations in the USA, so I'll set it to false as a default.

By the way, if I understand correctly, it's not possible then to have an AC in the USA which can also heat?

(and sadly the device doesn't send anything about it's capabilities)

rogersjc42 commented 8 months ago

It is possible to have a portable AC/Heater in the US, it is just not very common. It is about how the device is controlled. Basically, for a device that heats, the control mechanism must be affixed to the housing of the heater itself. It's a really weird regulation, imo, but such as it is.

kovapatrik commented 7 months ago

Thanks for the explanation!

So if an AC doesn't have heating capability, what would you expect the interface for the AC in the Home app to look like? Should it only have a Heat and an Off option?

kovapatrik commented 7 months ago

I've released the version which has the capability to config if your AC can do heating or not.