Giter Site home page Giter Site logo

mongoose-os-apps / shelly-homekit Goto Github PK

View Code? Open in Web Editor NEW
1.7K 108.0 127.0 3.32 MB

Apple HomeKit firmware for Shelly's

License: Other

Makefile 0.62% HTML 6.24% CSS 1.07% C++ 68.50% Python 12.43% JavaScript 9.09% C 0.36% Dockerfile 0.10% Go 1.59%
firmware homekit shelly smarthome

shelly-homekit's Introduction

License Gitter

Open Source Apple HomeKit Firmware for Shelly Devices

This firmware exposes Shelly devices as Apple HomeKit accessories.

Firmware is compatible with stock and can be uploaded via OTA (Watch a 2 minute video), for more info take a look at the flashing wiki here.

Reverting to stock firmware is also possible see here.

Supported devices and features

1 1PM +1 +1PM 1L Plug PlugS 2 2.5 i3 +i4(AC/DC) UNI RGBW2 Bulb Duo Vintage
Switch & Co.1
Stateless Input2
Sensors3
Temperature measurement 4 4 - - - -
Garage door opener
Roller shutter mode
Power measurement - - - - -
RGB(W)
CCT -
Brightness control -

Notes:
✓: supported
-: possible but not supported yet
✗: not possible
1: includes lock, outlet and valve
2: includes doorbell
3: includes motion, occupancy, contact, smoke, leak
4: with Sensor AddOn and DS18B20 sensor

Features that are not yet supported:

  • Cloud connections: no Shelly Cloud, no MQTT
  • Remote actions (web hooks)
  • Valve with timer support

Quick Start

Updating from stock firmware

  • Important: Please update to the latest stock firmware prior to converting to Shelly-HomeKit.

  • Watch a 2 minute video.

    • New: One link for all device types: http://A.B.C.D/ota?url=http://shelly.rojer.cloud/update

    • If that doesn't work (did you remember to update the stock firmware first?), try link for a specific model:

      • Shelly 1: http://A.B.C.D/ota?url=http://rojer.me/files/shelly/shelly-homekit-Shelly1.zip

      • Shelly 1L: http://A.B.C.D/ota?url=http://rojer.me/files/shelly/shelly-homekit-Shelly1L.zip

      • Shelly 1PM: http://A.B.C.D/ota?url=http://rojer.me/files/shelly/shelly-homekit-Shelly1PM.zip

      • Shelly 2: http://A.B.C.D/ota?url=http://rojer.me/files/shelly/shelly-homekit-Shelly2.zip
        Note: Not for Shelly Dimmer 2!

      • Shelly 2.5: http://A.B.C.D/ota?url=http://rojer.me/files/shelly/shelly-homekit-Shelly25.zip

      • Shelly Duo: http://A.B.C.D/ota?url=http://rojer.me/files/shelly/shelly-homekit-ShellyDuo.zip

      • Shelly Duo RGBW (ColorBulb): http://A.B.C.D/ota?url=http://rojer.me/files/shelly/shelly-homekit-ShellyColorBulb.zip

      • Shelly i3: http://A.B.C.D/ota?url=http://rojer.me/files/shelly/shelly-homekit-ShellyI3.zip

      • Shelly Plug: http://A.B.C.D/ota?url=http://rojer.me/files/shelly/shelly-homekit-ShellyPlug.zip

      • Shelly Plug S: http://A.B.C.D/ota?url=http://rojer.me/files/shelly/shelly-homekit-ShellyPlugS.zip

      • Shelly Plus 1: http://A.B.C.D/ota?url=http://rojer.me/files/shelly/shelly-homekit-ShellyPlus1.zip Note: The Shelly must have installed 0.10.0-beta3 or above to be flushed, please update first!

      • Shelly Plus 1PM: http://A.B.C.D/ota?url=http://rojer.me/files/shelly/shelly-homekit-ShellyPlus1PM.zip Note: The Shelly must have installed 0.10.0-beta3 or above to be flushed, please update first!

      • Shelly Plus I4 AC & DC: http://A.B.C.D/ota?url=http://rojer.me/files/shelly/shelly-homekit-ShellyPlusI4.zip Note: The Shelly must have installed 0.10.0-beta3 or above to be flushed, please update first!

      • Shelly RGBW2: http://A.B.C.D/ota?url=http://rojer.me/files/shelly/shelly-homekit-ShellyRGBW2.zip
        Note: The Shelly must be in color mode to flash, flashing in white mode is not supported!

      • Shelly UNI: http://A.B.C.D/ota?url=http://rojer.me/files/shelly/shelly-homekit-ShellyUNI.zip

      • Shelly Vintage: http://A.B.C.D/ota?url=http://rojer.me/files/shelly/shelly-homekit-ShellyVintage.zip

  • See here for detailed instructions.

  • Script here for an automated way to update your devices.

    • ./flash_shelly.py hostname (for single device)
    • ./flash_shelly.py -a (for all devices on the network)

Documentation

See our Wiki.

Getting Support

If you'd like to report a bug or a missing feature, please use GitHub issue tracker.

Some of us can be found in the Gitter chat room.

Contributions and Development

Code contributions are welcome! Check out open issues and feel free to pick one up.

See here for development environment setup.

Alternatively, you can support the project by donating:

Donate via PayPal

Authors

See here.

License

This firmware is free software and is distributed under Apache 2.0 license.

shelly-homekit's People

Contributors

alexbartsch avatar andyblac avatar chaosgramer avatar eurich avatar handy-manny-swe avatar idomo avatar ipsw1 avatar jobl1978 avatar jonnylamb avatar jsiegenthaler avatar ladvoc avatar louis49 avatar markirb avatar pmkane avatar rojer avatar schemhad avatar timoschilling avatar web-premiere avatar zeevox avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

shelly-homekit's Issues

Reboot button

A reboot feature for the shelly would be appreciated. Twice now the issue occurred to me that the homekit connection got lost. I needed to reboot the shelly, but since it is installed in an outlet, I cannot cut off the power supply easily. A button on the dashboard to reboot the device would be great.

Edge Switch type

Before I flash my Shelly's I'd like to know if it is possible to change the switch type from Momentary to Edge or Toggle after flashing?

AP Mode not working?

Hi, my shelly 1 flashed with your firmware lost it's wifi connection. Now when I reset the Shelly 1 using 5 times on/off, I hear the clicking sound from the shelly, but no AP is presented. What could be wrong, or what can I do?

Shelly1 no response in Homekit

I have included a total of three Shelly1 in HomeKit. I have assigned a fixed IP to all devices and all devices are reachable under their IP. Two run without problems with SW version 1.3.3 ( 20200217-232831/1.3.3-g518dd07-master )
One Shelly always loses contact in HomeKit. This Shelly has the SW version 1.7.0 (20200331-194631/1.7.0-ga963921-master)
When I reboot this Shelly via the web browser he is accessible in HomeKit. After the first (sometimes second) switching via HomeKit the connection is lost.
Is there a way to flash this shelly to the 1.3.3 version?

MQTT function

with this firmware is possible to mantain MQTT function?

Bypass auto off.

would it be possible to bypass the auto off, on a double press of the physical switch ?. So it would just ignore the auto off for that session only, if one has been configured.

I use a momentary switch as my physical switch, so a double press would have to also be supported within a time window (maybe 2 seconds).

Shelly1 PM

Good evening

Would this work on the Shelly1 PM obviously without the PM features?

Thanks

Timer functionality (staircase timer)

I use my shelly as staircase timer. Light is turned on with activation and turned off after a preset time. This setting is available in the stock firmware. I'd be really glad if this feature could be added. :)

help flashing

hi,

my Shelly 1 does not have original firmware on it, I purchase from Voltio.cz it has custom HomeKit firmware, I would like to test your firmware, could you help me flash via https://github.com/espressif/esptool ? or do know a better way to refresh your firmware on a Mac via FTDI (Serial header) ?

Thanks
Andy.

Devices will not obtain IP address

I successfully installed the firmware on some shelly 1s and 2.5s in my home. After 1 day many of them will no longer connect to my wifi and get an IP, some are working fine. I can reset them and force them into AP mode and then re-enable wifi and they still do not connect.They have static IPs assigned to them. It’s very strange.

Automated code review for shelly-homekit

Hi!
I am a member of the team developing monocodus — a service that performs automatic code review of GitHub pull requests to help organizations ensure a high quality of code.
We’ve developed some useful features to the moment, and now we’re looking for early users and feedback to find out what we should improve and which features the community needs the most.

We ran monocodus on a pre-created fork of your repo on GitHub https://github.com/monocodus-demonstrations/shelly-homekit/pull/1, and it found one potentially overcomplicated function. I hope that this information will be useful to you and would be happy to receive any feedback here or on my email [email protected]

Most of all, though, we need some feedback from you on what kinds of checkers could potentially benefit your project, if readily available in a user-friendly manner.

If you want to try our service, feel free to follow the link: https://www.monocodus.com
The service is entirely free of charge for open source projects. Hope you'll like it :)

Homekit Switch on / Off issue

Hi, I just flashed my Shelly 1 ( V 1.7.0 to: Build 20200404-124930

After adding to Home app when clicking on the switch nothing happens, when i open the switch control i can switch it on but it doesn't register on the switch and the current state is not reflected on the app..

IMG_2367E1F7E93C-1

UPDATE: worked after connecting all wires initially I just powered on the unit with L & N

“Auto off” functionality in mili-seconds....

Hello Folks,

The 1.8 release is awesome! Thanks a lot ;o)
I face a specific application that would require pulses in mili-seconds.....
The regular Shelly firmware can be set up this way. Any chance that the next release could consider a format: like: 00:00:00:01 or 00:00:00:05 ?

Thanks for your support in advance,
Flying150!

detached input switch state

Hi,

is possible to see state of detached physical input switch (SW input on shelly device) in Home app?

Thanks

Original firmware for Shelly 1PM

Hi all,

I have updated all my Shelly 1PM and they work fine with HomeKit, but for one of them I need to revert back to the original firmware because I need to keep Alexa compatibility.
Is the firmware for Shelly 1 available in the Code page compatible even with Shelly 1PM?
If yes, how can I upload it? I'm used to us the following command line, but files names are different:
esptool.py -p /dev/cu.usbserial-00000000 --baud 115200 write_flash -fs 1MB -fm dout -ff 40m \ 0x0 rboot.bin 0x1000 blank_config.bin 0x2000 main.bin
Any support is welcome, many thanks!!
Stefano

Lost Connection to Cloud / Amazon

Hi There,

thanks for providing the Home Kit Version. After updating my Shelly-1, I lost connection to the Shelly Cloud as well as to Amazon Alexa. Also via iOBroker the connection isn't possible any more. Is it a part of the home kit compatibility that any other services are offline?

Thanks,
Bastian

SHELLY 2.5 DUAL HOMEKIT SETTINGS

I am using a shelly 2.5 on a dual light switch in my lounge room. The problem i have is that you can only assign both switches to a single room, and one switch is for my outdoor light. It would be awesome if we could assign each switch their own homekit code and add them as individual switches for individual rooms in the home app.

reset Shelly 1 via serial ?

is there anyway to reset a Shelly1 via Serial. i have a shelly 1 that is not getting an IP, nor will it go into AP mode. any ideas ?

Shelly 2.5 room assignment

Good evening :)

Now the Shelly is working fine, when you add it to HomeKit it shows both switches under 1 tile, there is an option to separate them into 2 tiles, when I have done this I am unable to assign the switches to different rooms

For eg,
SW1 is the loft light
SW2 is the landing light

In HomeKit you can only assign 1 room to both switches I can’t assign SW1 to the loft and SW2 to the Landing

If I change the room on 1 of them it changes both of them to that room.

Is there anyway to be able to assign the switches to different rooms?

Thanks

Change Web UI to use WebSocket for RPC

Mongoose OS supports RPC over WebSocket.
We should open a channel and keep it open to make RPC more efficient. This will also allow regular updates of power readings and other status without sending HTTP request each time.

would it be possible to expose Single / Double / Long Press in HomeKit

as the title, would it be possible to expose Single / Double Press & Long Press actions in HomeKit, this would be handy to control the switch differently for those actions, obviously this would require push button type to be enabled.

example that could be setup in HomeKit GUI.
Single Press = normal switch operation.
Double Press = turn off after xx
Long Press = invoke a HomeKit scene.

Shelly 2.5 as roller shutter?

Hello

Congratulations! I was waiting for a firmware for using only home kit, now I'm using homebridge and a shelly plugin.
If I install this firmware... Will I be able to configure my shelly 2.5 as a roller shutter in homekit?

Thanks

Water valve support

Is it possible add support for Water valve? So HomeKit will see it as a real Water valve?

HK

Default ON, OFF or last state at device start

Hi there, thank for for the homekit support. I would like to have a configurable default state when the Shelly powers up, preferably configurable through the web interface (not sure if something is possible at all in homekit). It would be great if I can have the Shelly either ON, OFF or at the last state before it rebooted (lost power) on a new start up. Thank you!

Air Conditioner Support needed

Is it possible to configure an air conditioner support for a Shelly 2.5 so HomeKit will see it as an air conditioner?

It doesn’t have to control the temperature. An On/Off feature would be enough.

Thank you so much in advance.

possible web interface bug on shelly 2.5

Good Afternoon

i setup a shelly 2.5 yesterday, everything seems to work as it should in homekit etc, but
in the web interface if i turn on SW1 it actually switches on SW2 and vice versa

is this a bug in the web interface or with my wiring?

thanks

Garage door Support

Is it possible to configure it as a garage door opener? So HomeKit will see it as a real garage door?

Shelly disconnecting

After successfully pairing shelly 1 with HomeKit, the device disconnects from WiFi and won't reappear. Only cutting power helps to make a new connection. After some minutes up to a couple of hours it disconnects again.

HomeKit AND Alexa

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

Shellys does not respond...randomly

Hi everybody, i have 2 shelly 2.5 and 1 shelly 1 in my setup running version 1.7.1
All of them randomly are non reachable from homekit, tryed to ping and sometimes they loss packets.
Is this issue due to my network setup or it could be caused by mongoose firmware ?

sorry for my bad english.
Thank you

fails to build

all I get it is

Error: exec: "docker": executable file not found in $PATH
/private/tmp/mos-20200204-9510-12i29jp/mos-18c19395db3292985b1d067c4188efd91eea62d3/go/src/github.com/mongoose-os/mos/cli/build_local.go:697: 
/private/tmp/mos-20200204-9510-12i29jp/mos-18c19395db3292985b1d067c4188efd91eea62d3/go/src/github.com/mongoose-os/mos/cli/build_local.go:684: 
/private/tmp/mos-20200204-9510-12i29jp/mos-18c19395db3292985b1d067c4188efd91eea62d3/go/src/github.com/mongoose-os/mos/cli/build_local.go:449: 
/private/tmp/mos-20200204-9510-12i29jp/mos-18c19395db3292985b1d067c4188efd91eea62d3/go/src/github.com/mongoose-os/mos/cli/build.go:221: 
/private/tmp/mos-20200204-9510-12i29jp/mos-18c19395db3292985b1d067c4188efd91eea62d3/go/src/github.com/mongoose-os/mos/cli/build.go:164: 
/private/tmp/mos-20200204-9510-12i29jp/mos-18c19395db3292985b1d067c4188efd91eea62d3/go/src/github.com/mongoose-os/mos/cli/main.go:197: build failed

Shelly 1PM power consumption

Hi,

I have installed the shelly homekit firmware on a Shelly 1PM.
It works well but I can't find power consumption.

Would it be possible to add this feature ?

Thanks a lot.

device types

Hi and a thousand thanks for your outstanding work which makes getting Shelly into HomeKit so easy for anyone! I am just wondering if it’s possible to define a Shelly as an alternative HomeKit device type such as an outlet? That would be very helpful. Thanks, Fred

Edge switch support

Shelly1/2.5 should support at least 3 main types of the switches:

  1. Momentary (Push buton)
  2. Toglle (On and Off position)
  3. Edge - Every change of the switch state change the output state (this is using alot's in 2-way and 3-way wiring).

Shelly2.5: Power measurement support

good evening

i flashed the latest builds to my shellys , but on the shelly2.5s that i have, its not showing the power usage on SW1, it stays on 0w, SW2 seems to work ok as that gives a reading.

Shelly2 does not accept new fw via OTA

I have a Shelly2 and some Shelly2.5.
For 2.5 everything works fine doing a curl to the OTA link.

For Shelly 2 it does not work:

❯ curl 'http://10.0.20.40/ota?url=http://rojer.me/files/shelly/shelly-homekit-Shelly2.zip'
{"status":"updating","has_update":false,"new_version":"20200309-104038/v1.6.0@43056d58","old_version":"20200309-104038/v1.6.0@43056d58"}%

After waiting some Minutes, the device is up with it's old firmware.
Are there any known issues for 2 and this method?

Momentary button Shelly 1

Hi, I have hacked my garagedoor opener to be opened and closed with my Shelly 1. However, the mechanism works like a push button so it works like this:

Shelly on - off: garage opens
Shelly on - off: garage stop
Shelly on - off: garage closes

However this requires the homekit button to auto turn off again. The webpage of your firmware suggest a possibility in setting the mode to this: momentary. However, that doesn't work like I expected, at least, I don't see anything change at homekit level. Maybe I'm getting this wrong? I also tried Toggle, same result.

Unfortunately homekt doesn't allow this automation: when button is on, set button to off. Otherwise that would be ok for me. Now I'm stuck with pressing twice, which has a lot of latency issues as well.

Any idea?

Toggle switch

Hello,

Original Shelly firmware had an option to choose "Button type". Can you please add "Toggle switch" support? e.g. Shelly should change state on every button hit.

Thanks

2x Shelly 1: HomeKit Automations not working

Hi there,

I installed multiple Shelly 1’s in my home, primarily to use them for automations.

For instance: when Shelly A is switched off, switch off Shelly B as well.

Unfortunately, this does not work at all. When I create a new „When an accessory is controlled“ automation for Shelly A (disable) then disable Shelly B, nothing happens.

Maybe it is kind of a timing issue, it is possible to trigger a smart bulb when switching a Shelly, but not another Shelly.

Did someone experience the same issue and is there any solution for this?

Thanks a lot!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.