Generally speaking, home automation isn’t as cheap or as easy as most people would like. There are too many incompatible protocols, and more often than not, getting everything talking requires you to begrudgingly sign up for some “cloud” service that you didn’t ask for. If you’re an Apple aficionado, there can be even more hoops to jump through; getting your unsupported smart home devices working with that Cupertino designed ecosystem often involves running your own HomeKit bridge.
To try and simplify things, [Michele Gruppioni] has developed a firmware for the ubiquitous Sonoff WIFI Smart Switch that allows it to speak native HomeKit. No more using a Raspberry Pi to act as a mediator between your fancy Apple hardware and that stack of $4 Sonoff’s from AliExpress, they can now talk to each other directly. In the video after the break you can see that the iPad identifies the switch as unofficial device, but since it’s compliant with the HomeKit API, that doesn’t prevent them from talking to each other.
Not only will this MIT licensed firmware get your Sonoff Basic, Sonoff Slampher, or Sonoff S26 talking with your Apple gadgets, but it also provides a web interface and REST API so it retains compatibility with whatever else you might be running in your home automation setup. So while the more pedestrian users of your system might be turning the porch light on with their iPhones, you can still fire it up with a Bash script as nature intended.
Of course, if you don’t mind adding a Raspberry Pi bridge to the growing collection of devices on your network, we’ve got plenty of other HomeKit-enabled projects for you to take a look at.
Why is a lamp that can be switched on/off from a phone app or web page called “smart”. It is not smart. It just has a remote control. A smart lamp is a lamp that turns on if people are home and it is dark in the room. At least in my head…
I really do agree on that there are too many competing systems for smart devices. If I like to replace a normal dumb light switch in my home today I can buy any brand or style I want. Even the old switch was installed in the 80’s. I’m not interested in replacing ALL the equipment in my smart home system every five years or so when a device dies and that model is no longer produced. There needs to be a common standard protocol that can last for decades, and a standard form factor of the devices that fits standard house wiring systems.
“Turn on the lamp when someone is home and the room is dark” is a trivial automation you can create and run with Homekit. Or bash, since with a 1:1 phone:person everyone has a MAC address. There are other types of sensors and software triggers you can use to add the smarts (but you do it yourself).
Wholly agreed on a need for standardization. But you know what they say about standards… everyone’s got one.
I personally prefer making the switches smart rather than the bulbs, which goes a good ways towards fitting in with existing hardware.
That kind of automatic lamp is something I have longer than iPhones or Homekits exist in my toilet . A cheap pyroelectric sensor/switch for less than 10,- It does not even need software or an internet connection. No it is not and needs not to be remote controlled.
A smart lamp would be a lamp that knows when to turn on or off whether someone is home (sleeping VS reading) or not (all save VS burglar approaching).
I have found that the Shelly1 is a much-improved version of the Sonoff. It is smaller and fits in the electrical box. It works with 3-way switches. It will work from the web without any modifications. It is rated at 15 amps, the Sonoff is rated at 10 amps and most light circuits are fused to 15 amps, therefore, it could be a fire hazard, It is much easier to install. I replaced all my Somoffs with Sheey1s and they are much faster also.
Is it as easily reprogrammed? I like the Sonoff switches b/c they’re essentially dev boards in a plastic case.
I haven’t tried one yet, but the Shelly 1’s are ESP8266 as well, and are reflashable:
https://shelly.cloud/shelly1-open-source/
https://github.com/arendst/Tasmota/wiki/Shelly-1
Nice form-factor. One problem is price, the other is that up here anyway, just about all the outlet and switchboxes are grounded steel, so there may be problems with RF.
Agreed with the general sentiment that a remote-controlled light does not a smart-home make… but it is the first step and most people’s first conception of what it entails. Currently, useful integrated home automation is mainly available to the rich (Crestron etc), or the hacker, with some toylike stuff that loops through Alexa or whatever being tried by the average non-tech.
Lots of progress yet to be made to have “commodity” smart outlets and switches as the default.
“As nature intended” had me laughing.
This firmware appears do be unmaintained, however there is a current and up to date maintained codebase available here:
https://github.com/RavenSystem/esp-homekit-devices
This is a great link, thanks for sharing. I have used the RavenSystem firmware on my SonOffSV’s to control my garage doors. Homekit picked them up, and I was able to install them with minimal configuration. The new version of iOS (13) and CarPlay display the garage door on my car’s screen when I am leaving home and when I arrive back at home. Excellent find!
Is there a write up somewhere with step by step instructions to get the switch to work? I don’t exactly understand how to do this.
Home automation that requires the internet both defeats the purpose, and puts you at risk.
It never made any sense to me.
Unless I’m mistaken, the only network this project requires/uses is local WiFi. (Don’t know about Apple’s stuff.)
HomeKit is completely local. The only thing that requires the Internet is Siri and, since iOS 15, even parts of that are local now.
LOVE this article Hackaday and Tom. Please, more like this!
How long until Apple decides it doesn’t like people using them this way and blocks access in the next update?
Apple already for quite some time (*) “blocked” me from buying their products :-) So that doesn’t bother me.
*) emotionally
Why?
This is over a year late in response, but Homekit is open source, so what you suggested over a year ago wouldn’t happen:
https://www.theverge.com/2019/12/20/21031197/apple-homekit-smart-home-open-source-accessory-development-kit-adk-connected-home-over-ip
good night
I need to change the firmware for homekit
Sonoff T1 3 Keys but I’m not getting someone could help me?
i recommend you check out the RavenCore firmware (as i mentioned above) as it is more actively worked on. it has support for the Sonoff T1 Touch 3 button
https://github.com/RavenSystem/esp-homekit-devices/wiki/RavenCore#11-switch-3ch
you can also do further customisation withe “Eve for Homekit” iOS app.
Can I run this flash.sh from a raspberry pi? If so how, I have flashed the Tasmota on to the Sonoff ok.
Thanks
Martyn
Unable to get it to connect to my WiFi. I have the sonoff basic and flashed two of them. Once I connect to the sonoff and select the WiFi network in the captive portal, it displays a blank page.
Same here…. The way to solve that is burn any firmware (arduino ide examples) that connects to wifi. Connect to your wifi and then burn the above firmware again. The esp (at least for me) holds the info for the wifi. After I did these steps it connected to the network but I could not find it in the Home app on Ios. I have it working now with RavenCore
So I erased the flash first then programmed new flash with esptool. Shows up in HomeKit and takes a minute to connect.
Hi Guys
As i´m a noob and know nothing about development .
Someone knows if there is any tutorial for Ravencore + Apple homekit? I bought the new Sonoff touch T2 and T3 and my will is use with Homekit.
I would also like to see a write up on this
Hi, i have a sonoff basic witch ESP8285. I successfully installed ravcore and add to homekit.. But.. as a Switch. How can use like a button to activare my home relay lights ?
Would this firmware be compatible with the SonOff Mini as well?
Do you were able to put working?
I have a sonoff mini. Does he support it?
I have tried this with a Sonoff Mini and it works, but you can not use an external switch anymore :(.
Hey Nico, I’m strageling to make this work with Sonoff-Mini, as I’m trying to flash the firmware with DIY mode tool over WiFi but it is just NOT accepting the Bin files.. it says that firmware can not be greater than 508k, even if my Bin files are less than that.
Could you please share the steps you’ve managed to make it work ??
Thanks!
Is it possible to use this firmware also for sonoff POW? I was wondering if there is a way to also use the power consumption function in apple homekit.
There are library as well with open source and open code for Arduino https://github.com/Yurik72/ESPHap
Does it works on sonoff mini?
Sonoff mini is the same esp8266/8255 processor , the difference maybe is goop, which easily to change
I bought a Sonoff temperature and Humidity sensor before I learned about the bridge component. Is this a requirement before I can get alerts on my phone?