shelly-homekit icon indicating copy to clipboard operation
shelly-homekit copied to clipboard

HomeKit AND Alexa

Open Alwiz79 opened this issue 4 years ago • 37 comments

Is it somehow possible to have the Shelly 1 listed in HomeKit AND Amazon Alexa. I'd like to crontrol with the Apple Home App, but also have the possibility to tell Alexa what to turn it on/off

Alwiz79 avatar Mar 31 '20 21:03 Alwiz79

I also search for the same solution for the shelly 2.5 but till now without success

ghost avatar Apr 01 '20 12:04 ghost

this is possible in principle, mongoose os has the aws iot cloud library already but currently having both AWS and HomeKit enabled means firmware won't fit in the limited amount of flash we have available. we need to increase available space.

rojer avatar Apr 01 '20 12:04 rojer

You have to use the Shelly skill and Homebridge for HomeKit access

consoleman avatar Apr 01 '20 12:04 consoleman

try this https://github.com/RavenSystem/esp-homekit-devices, not sure if it has Alexa though

andyblac avatar Apr 01 '20 13:04 andyblac

if we bring in the library, you will be able to use skill with the device directly.

rojer avatar Apr 01 '20 13:04 rojer

https://github.com/RavenSystem/esp-homekit-devices

No, doesn't work with Alexa, just with HomeKit

bulgaro80 avatar Apr 05 '20 14:04 bulgaro80

Is it somehow possible to have the Shelly 1 listed in HomeKit AND Amazon Alexa. I'd like to crontrol with the Apple Home App, but also have the possibility to tell Alexa what to turn it on/off

me too... I tried with Homebridge but it's too complex to manage and keep it running. I would have something already embedded natively in the firmware

bulgaro80 avatar Apr 05 '20 14:04 bulgaro80

Just checking in to leave my opinion here. Could we please leave the HomeKit firmware as simple as possible and reduce the bloat added to it. I personally would hate the idea to open any other communication channel besides the HomeKit protocol. At least introduce a build flag which to enable or disable inclusion of code designed for such a feature.

Supereg avatar Apr 13 '20 15:04 Supereg

I think a lot of us use Alexa rather Siri. An integration would be very nice. 👍🏼

macomic avatar Jun 19 '20 06:06 macomic

Also other products (Netatmo, eufy, tado etc.) are able to communicate paralell with Homekit/Google/Alexa. This would be a nice feature. The Homebridge solution is working, but unfortunately it causes issues in case of some mesh routers (coap problem), this firmware however works nice, this could be a good improvement.

ursusHU avatar Sep 21 '20 12:09 ursusHU

TBH, having Alexa and google added to this firmware would turn me off it, I would probably never update again. for me that is a big NO, NO.

andyblac avatar Sep 21 '20 12:09 andyblac

@andyblac hm, interesting. can you elaborate why? i quite like the idea of supporting multiple ecosystems.

rojer avatar Sep 21 '20 12:09 rojer

plus I like that fact the HomeKit does not require ANY WAN access.

andyblac avatar Sep 21 '20 12:09 andyblac

The issue about multiplatforms compatibility with Shelly is the EPROM size, too small to install a firmware that is supported by Alexa and HomeKit. Currently the olny option is to install one or the other. On my side I installed 2 Shelly 1 (for some specific cases) to be able to manage with both (Alexa & HomeKit)

bulgaro80 avatar Sep 21 '20 12:09 bulgaro80

The issue about multiplatform compatibility with Shelly is the EPROM size, too small to install a firmware that is supported by Alexa and Home Kit

that too, would just limit even more what we could add to HomeKit side of it, RAM is limited already.

andyblac avatar Sep 21 '20 12:09 andyblac

The issue about multiplatform compatibility with Shelly is the EPROM size, too small to install a firmware that is supported by Alexa and Home Kit

not necessarily the case, i believe we can support both with some optimizations.

rojer avatar Sep 21 '20 12:09 rojer

The issue about multiplatform compatibility with Shelly is the EPROM size, too small to install a firmware that is supported by Alexa and Home Kit

Maybe not after it was new Coded from scratch. What happened last.

macomic avatar Sep 21 '20 12:09 macomic

space concerns aside, what are other disadvantages? needless to say, it would be off by default, so no wan access by default.

rojer avatar Sep 21 '20 12:09 rojer

space concerns aside, what are other disadvantages? needless to say, it would be off by default, so no wan access by default.

yes, but anything you add to the firmware would have to be compatible with both enabled, this would reduce available RAM to HomeKit side. and limit what we could do in the future surely ?

andyblac avatar Sep 21 '20 12:09 andyblac

If you have the decision ether on or off. Then you can't have any disadvantages.

macomic avatar Sep 21 '20 12:09 macomic

If you have the decision ether on or off. Then you can't have any disadvantages.

of course it is read above.

andyblac avatar Sep 21 '20 12:09 andyblac

@rojer how does the Alexa sdk look like on the shelly side? Is this provided by Amazon or a custom implementation?

Supereg avatar Sep 21 '20 12:09 Supereg

hah, interesting glitch there: looks like another comment got mixed up with mine, i take it that this part

I don't trust Google / Amazon in a any way shape or form, I try to stay clear of any IoT thats supports those.

is yours, @andyblac ?

@Supereg i've had a brief look and it looks looks like just a couple MQTT topic subscriptions. mongoose os already has extensive support of mqtt, i don't think we'll need to bring in any additional libraries.

rojer avatar Sep 21 '20 12:09 rojer

IMO Alexa Integration would help the firmware to reach much more households and additionally talented helpers to write code or test new firmwares in new environments

macomic avatar Sep 21 '20 12:09 macomic

i think having choice is good. privacy concerns are addressed by having these features off by default - if you don't trust google or amazon, don't use them. space impact needs to be evaluated. this firmware is and will remain primarily about homekit support, but if we can afford it, i don't see why we shouldn't add it as an option.

rojer avatar Sep 21 '20 12:09 rojer

i think having choice is good. privacy concerns are addressed by having these features off by default - if you don't trust google or amazon, don't use them. space impact needs to be evaluated. this firmware is and will remain primarily about homekit support, but if we can afford it, i don't see why we shouldn't add it as an option.

just out of curiosity how much free RAM do we have atm for additional features. like schedules, dummy switches etc.

andyblac avatar Sep 21 '20 13:09 andyblac

BTW I read somewhere that a Part of Apple cloud services use AWS

Just google it

macomic avatar Sep 21 '20 13:09 macomic

right now we have about 7K code space (flash) left on our biggest target (Shelly25, which includes power metering). there are ways to reclaim code space:

  1. disable HAP logging, saves 44K, easy
  2. reduce fs size from 256K to 128, reclaims 128K for code, also easy but adds a constraint to stock firmware compatibility: must be upgrading from 1.8 or newer, older versions cannot reconfigure fs size in OTA updates. as times passes and 1.8 gets out into the field, this becomes less of a restriction. plus, it's always possible to update stock fw before migrating.

i did a quick experimant and adding full TLS support (required for AWS connections) requires 107K flash space, which leaves 65K to spare with (1) and (2) both applied or about 21K with just (2). this is quite comfortable.

in terms of RAM, with HAP ADK optimizations applied we are quite comfortable now with about 25K free. this goes down during OTA updates and TLS handshake will require additional resources, so we may need to implement a solution where HAP connection is shut down for the duration of the update to free resources. this is not very difficult to do.

all in all, i don't see major resource constraints to implementing AWS support.

rojer avatar Sep 21 '20 18:09 rojer

This would be very useful and remove the dependancy of the homebridge-shelly plugin for me.

ttimpe avatar Oct 15 '20 12:10 ttimpe

This would be very useful and remove the dependancy of the homebridge-shelly plugin for me.

+1

davidfierro avatar Nov 02 '20 18:11 davidfierro