NorthernMan54 / homebridge-alexa

Expose your homebridge controlled devices to Amazon Alexa.

Home Page:https://www.homebridge.ca

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Battery service support

talonrenaud opened this issue · comments

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.

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.

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:

  • an Alexa.PercentageController, using "State reporting" to retrieve the Battery's charge percentage. HomeBridge equivalent:

    1. Characteristic.BatteryLevel:
      • int 0-100 (percentage)
        
  • an Alexa.ModeController, to report the Battery's state. Homebridge equivalent:

    1. Characteristic.ChargingState:
      • Characteristic.ChargingState.NOT_CHARGING 0
      • Characteristic.ChargingState.CHARGING 1
      • Characteristic.ChargingState.NOT_CHARGEABLE 2

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

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 ?

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.

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

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.

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