NorthernMan54 / homebridge-alexa

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

Battery service support #554

Closed talonrenaud closed 1 year ago

talonrenaud commented 1 year ago

Hi ! First thank you for the great plugin, I'm using it religiously for my home automation. I recently installed Tesla Powerwalls at home and I was able to add support for them in a homebridge-http-webhooks (plugin) fork I created. The only issue I'm having is that homebridge-alexa doesn't support the HomeBridge's Battery Service yet. I was able to get it to work using a TemperatureSensor object instead for now but this is far from ideal. Any hope we could get Battery objects added to the list of supported devices ? I would love to contribute but sadly the nature of the Homebridge-alexa infrastructure makes this difficult to do. Thanks.

NorthernMan54 commented 1 year ago

The battery service is tricky, as I don’t think there is a similar offering on the Alexa side.

quickly looking at the Alexa side, https://developer.amazon.com/en-US/docs/alexa/device-apis/smart-home-general-apis.html, I didn’t see something similar.

talonrenaud commented 1 year ago

Hi thank you for your quick reply. I understand some of the problematic. Can a mix of different Skill types be used for a single service. For example can a Battery service be composed of:

I'm not sure if these are the best skill types to use but do you think that's something that would be feasible ?

NorthernMan54 commented 1 year ago

Combing of multiple devices in to a single Alexa device / accessory is feasible and something I have already done in support of my TV and Stereo setup.

But what is the use case your thinking about ?

talonrenaud commented 1 year ago

The use case would be fairly simple. What's my battery level ? What's my battery status ? There isn't a lot more to a battery device by itself. A much more interesting data set would be to get more information regarding a full solar, battery, grid setup but this would be a broader scope than just a battery device by itself.

NorthernMan54 commented 1 year ago

Unless Alexa supports a battery service, that wording will not work, so that use case is not currently feasible.

Asking her for a temperature, but she tells you the battery level instead is likely do-able. ie 'Alexa, what's the car temperature' and the temperature is battery level

talonrenaud commented 1 year ago

I see, it already works as a Thermostat so there wouldn't be any gain from making a Battery service at this point. I'm not familiar with Alexa's skills APIs, I thought there was more flexibility in terms of what questions a user is able to ask. I you think this isn't something that can be done I fully understand and feel free to close this issue. I appreciate you taking the time to discuss this.

NorthernMan54 commented 1 year ago

You understanding is correct. For smart home skills, developers have no control for the wording, only the device name. So we need to fit into the wording / device model supplied by Amazon