In general, home automation is not as economical or as easy as most people would like. There are too many incompatible protocols, and most often, for all to talk about, you have to reluctantly sign up for a "cloud" service that you have not asked for. If you're an Apple fan, you'll have more to do. For your unsupported smart home devices to work with this Cupertino-designed ecosystem, you often need to use your own HomeKit bridge.
To try to simplify things, [Michele Gruppioni] has developed a firmware for the widely used Sonoff WIFI Smart Switch that allows him to speak native HomeKit. No need to use a Raspberry Pi to mediate between your sophisticated Apple hardware and AliExpress $ 4 Sonoff stack, they can now talk to each other directly. In the video after the break, you can see that the iPad identifies the switch as an unofficial device, but as it complies with the HomeKit API, this does not prevent them from communicating with each other.
This MIT-licensed firmware not only allows your Sonoff Basic, Sonoff Slampher or Sonoff S26 to interact with your Apple gadgets, but it also provides a Web interface and a REST API to maintain compatibility with everything you do in your setup. Automation. . So, even if the most pedestrian users in your system may be lighting the porch light with their iPhones, you can still trigger it with a Bash script as nature wants.
Of course, if you do not mind adding a Raspberry Pi bridge to the growing collection of devices on your network, we have many other HomeKit compatible projects that you can examine.