jackstone Posted April 20, 2020 Share Posted April 20, 2020 Here a simple, yet fully featured driver for the cheap SONOFF Wi-Fi Smart Switches you can purchase almost anywhere. The driver work with the "DIY" version of the SONOFF switches and does not require any custom firmware, no MQTT or any Cloud connection. It's all local control and it will work forever. Quick features: Auto-discovery of SONOFF devices Two-way communication Auto-IP configuration that will survive IP change Light and Relay proxies bulit-in, no need for external driver This is by far the cheapest Smart Light solution compatible with Control4. Check it out: https://www.blackwiredesigns.com/store/sonoff-driver-for-basic-mini-wi-fi-smart-switch-diy-mode/ Amr, johnpg and South Africa C4 user 2 1 Quote Link to comment Share on other sites More sharing options...
Amr Posted April 20, 2020 Share Posted April 20, 2020 Good Job really, these are very stable switches and incredibly cheap, I use them for automating every single load in my house after the main C4 Panelized lighting I must say it’s a really good combination so far ... Quote Link to comment Share on other sites More sharing options...
jackstone Posted April 20, 2020 Author Share Posted April 20, 2020 2 minutes ago, Amr said: Good Job really, these are very stable switches and incredibly cheap, I use them for automating every single load in my house after the main C4 Panelized lighting I must say it’s a really good combination so far ... Yes I was also very impress how reliable they are... I've ran few of them in my own home for two months while writing the driver, to make sure the product holds up and sure it do. Very stable and responsive. Only drawback is how it provide feedback, although realtime is possible and the driver allow it (at your own risk), this is contraindicated by C4 staff so the preferred (and default) way to get two-way communication is polling. Quote Link to comment Share on other sites More sharing options...
Amr Posted April 20, 2020 Share Posted April 20, 2020 Yep, am still running it thorough my local MQTT and it’s really amazing, I have some never lost WiFi signal in years! There is another unit like the mini that can be used as well without a switch, you may need to take a look at Canwing CW-001 this will complete your driver for now Quote Link to comment Share on other sites More sharing options...
jackstone Posted April 20, 2020 Author Share Posted April 20, 2020 3 minutes ago, Amr said: Yep, am still running it thorough my local MQTT and it’s really amazing, I have some never lost WiFi signal in years! There is another unit like the mini that can be used as well without a switch, you may need to take a look at Canwing CW-001 this will complete your driver for now In fact there is tons of those cheap Wi-Fi switch available, and they all seems to be built using a similar "engine" that oddly reassemble how brand name's "Smart Outlet" are built. That's means is pretty easy to build a driver for. I'm currently doing Shelly, which is a bit pricier but offer a broader range of product, I can do any other Wi-Fi mini switch product if it is popular enough and allow control over local network (I do not do Cloud driver because I don't like service calls) Quote Link to comment Share on other sites More sharing options...
Amr Posted April 20, 2020 Share Posted April 20, 2020 Another good example and way to go , I’m only sharing my experience with this hardware, yes there are 1180 brand out their! I can’t test all and will work with the most reliable, so far Sonoff Mini, Canwing and Shelly 2.5 constitutes my most implementation, Shelly needs stronger WiFi for sure, Sonoff Mini are very strong and stable due to external antenna design. Great driver and congrats for stepping in with this driver, a good addition to the community for sure. Quote Link to comment Share on other sites More sharing options...
Amr Posted April 20, 2020 Share Posted April 20, 2020 9 minutes ago, jackstone said: In fact there is tons of those cheap Wi-Fi switch available, and they all seems to be built using a similar "engine" that oddly reassemble how brand name's "Smart Outlet" are built. That's means is pretty easy to build a driver for. I'm currently doing Shelly, which is a bit pricier but offer a broader range of product, I can do any other Wi-Fi mini switch product if it is popular enough and allow control over local network (I do not do Cloud driver because I don't like service calls) Yep Most are using ESP866! it either eWelink echo system or Tuya! So that’s why I use Tasmota with all these devices ... Actually I had added Smart Valves, WiFi buttons, LED strips and finally a Curtin to the punch! Quote Link to comment Share on other sites More sharing options...
david@berto.co.uk Posted April 20, 2020 Share Posted April 20, 2020 2 hours ago, jackstone said: Yes I was also very impress how reliable they are... I've ran few of them in my own home for two months while writing the driver, to make sure the product holds up and sure it do. Very stable and responsive. Only drawback is how it provide feedback, although realtime is possible and the driver allow it (at your own risk), this is contraindicated by C4 staff so the preferred (and default) way to get two-way communication is polling. Yep Feedback is a pain with polling as not always instant and puts extra load on the controller, especially when you have lots of lights. The Shelly kit does support CoAP, as well as MQTT, which does provide the low level protocol needed. Similar to the Lifx LAN Protocol along with all the same complexity to implement in C4, good fun though! The ideal would be for C4 to implement an MQTT broker on the controller, low CPU and memory footprint that would open things up to a world of IoT devices. Quote Link to comment Share on other sites More sharing options...
jackstone Posted April 20, 2020 Author Share Posted April 20, 2020 In fact, instant feedback with SONOFF devices does not add any overhead to the CPU, but it require to keep the mDNS socket running all the time and that's not a good practice because it prevent other driver of using mDNS for discovery or other stuff. My driver allow the use of instant feedback with SONOFF and it work well, it's really fast, but I have enforced manual enable and must be done my someone who know what he's doing. Quote Link to comment Share on other sites More sharing options...
david@berto.co.uk Posted April 20, 2020 Share Posted April 20, 2020 18 minutes ago, jackstone said: In fact, instant feedback with SONOFF devices does not add any overhead to the CPU, but it require to keep the mDNS socket running all the time and that's not a good practice because it prevent other driver of using mDNS for discovery or other stuff. My driver allow the use of instant feedback with SONOFF and it work well, it's really fast, but I have enforced manual enable and must be done my someone who know what he's doing. I'm aware that the mDNS allows the auto discovery but was not aware it gave device state feedback, does that follow for when the device state changes outside of C4? Quote Link to comment Share on other sites More sharing options...
zaphod Posted April 20, 2020 Share Posted April 20, 2020 Is this the right switch for this driver: https://www.amazon.ca/Wireless-Universal-Automation-Compatible-Assistant/dp/B07NYP6Y65/ref=sr_1_5?crid=22T7QWL9QFPIM Quote Link to comment Share on other sites More sharing options...
jackstone Posted April 20, 2020 Author Share Posted April 20, 2020 2 minutes ago, david@berto.co.uk said: I'm aware that the mDNS allows the auto discovery but was not aware it gave device state feedback, does that follow for when the device state changes outside of C4? That's unusual but Sonoff used this for it's device feedback, that's why you get instant feedback from the app or the PC configuration utility. This is also the way I've done the instant feedback option in my driver. Quote Link to comment Share on other sites More sharing options...
jackstone Posted April 20, 2020 Author Share Posted April 20, 2020 1 minute ago, zaphod said: Is this the right switch for this driver: https://www.amazon.ca/Wireless-Universal-Automation-Compatible-Assistant/dp/B07NYP6Y65/ref=sr_1_5?crid=22T7QWL9QFPIM no, this is the one: https://www.amazon.ca/Sonoff-Switch-récepteur-compatible-Assistant/dp/B07S46XLTR/ref=sr_1_1_sspa?ie=UTF8&keywords=Sonoff diy&language=en_CA&psc=1&qid=1587412241&s=hi&spLa=ZW5jcnlwdGVkUXVhbGlmaWVyPUFXWVQ2OVkwTlhKM1kmZW5jcnlwdGVkSWQ9QTAzODk0ODJRWlhZOTFRNUZYODAmZW5jcnlwdGVkQWRJZD1BMDk1NzU3NzhMTzNSQklJVU42RiZ3aWRnZXROYW1lPXNwX2F0ZiZhY3Rpb249Y2xpY2tSZWRpcmVjdCZkb05vdExvZ0NsaWNrPXRydWU%3D&sr=1-1-spons Quote Link to comment Share on other sites More sharing options...
jackstone Posted April 20, 2020 Author Share Posted April 20, 2020 2 minutes ago, zaphod said: Is this the right switch for this driver: https://www.amazon.ca/Wireless-Universal-Automation-Compatible-Assistant/dp/B07NYP6Y65/ref=sr_1_5?crid=22T7QWL9QFPIM Or this one for the mini version: https://www.amazon.ca/Wireless-Universal-Automation-Compatible-Assistant/dp/B07TRSWY23/ref=sr_1_4?keywords=Sonoff+mini+diy&qid=1587412338&s=hi&sr=1-4 To get them at $5 you need to order then from iTead website in europe Quote Link to comment Share on other sites More sharing options...
david@berto.co.uk Posted April 20, 2020 Share Posted April 20, 2020 6 minutes ago, jackstone said: That's unusual but Sonoff used this for it's device feedback, that's why you get instant feedback from the app or the PC configuration utility. This is also the way I've done the instant feedback option in my driver. Sorry, you mentioned polling above so assumed that's what you're doing. I'll take a look at the mDNS feedback. Thanks Quote Link to comment Share on other sites More sharing options...
jackstone Posted April 20, 2020 Author Share Posted April 20, 2020 1 minute ago, david@berto.co.uk said: Sorry, you mentioned polling above so assumed that's what you're doing. I'll take a look at the mDNS feedback. Thanks I also mentioned I've allowed to turn on the realtime feedback through a manual option. So by default the driver will poll, but if someone need realtime feeback he can turn it ON knowing this may cause issue with other drivers. Quote Link to comment Share on other sites More sharing options...
Amr Posted April 20, 2020 Share Posted April 20, 2020 19 minutes ago, zaphod said: Is this the right switch for this driver: https://www.amazon.ca/Wireless-Universal-Automation-Compatible-Assistant/dp/B07NYP6Y65/ref=sr_1_5?crid=22T7QWL9QFPIM No this is R2, R3 is, but I suggest you go with the Mini, smaller foot print and with external antenna is much better for retrofit work. Quote Link to comment Share on other sites More sharing options...
zaphod Posted April 20, 2020 Share Posted April 20, 2020 Is it actually allowable in the building code to put them in the wall they way they imply in this photo? And would you be able to do it with North American 110V outlets? Quote Link to comment Share on other sites More sharing options...
jackstone Posted April 20, 2020 Author Share Posted April 20, 2020 @zaphod Yes it actually work on North American 120v, I live in Canada just like you and I've done all my tests on 120v. Don't forget to get the DIY version of the Sonoff mini!!! It's the same price, but it's the only model that allow running without cloud or MQTT. Quote Link to comment Share on other sites More sharing options...
zaphod Posted April 20, 2020 Share Posted April 20, 2020 It is product's like this where you can buy a wifi controlled smart switch for <$10 that makes me wonder why it costs about $1000 to be able to get smart controls for your swimming pool. Quote Link to comment Share on other sites More sharing options...
RAV Posted April 21, 2020 Share Posted April 21, 2020 These correct for USA? https://www.amazon.com/Wireless-Developers-Compatible-Assistant-Required/dp/B07Y9RZ4QN/ref=sr_1_1?dchild=1&keywords=sonoff%2Br3%2Bdiy%2Bmodel&qid=1587476930&sr=8-1&th=1 https://www.amazon.com/Wireless-Universal-Automation-Compatible-Assistant/dp/B07TRSWY23/ref=sr_1_3?dchild=1&keywords=sonoff+mini+10a&qid=1587477178&sr=8-3 Quote Link to comment Share on other sites More sharing options...
jackstone Posted April 21, 2020 Author Share Posted April 21, 2020 43 minutes ago, RAV said: These correct for USA? https://www.amazon.com/Wireless-Developers-Compatible-Assistant-Required/dp/B07Y9RZ4QN/ref=sr_1_1?dchild=1&keywords=sonoff%2Br3%2Bdiy%2Bmodel&qid=1587476930&sr=8-1&th=1 https://www.amazon.com/Wireless-Universal-Automation-Compatible-Assistant/dp/B07TRSWY23/ref=sr_1_3?dchild=1&keywords=sonoff+mini+10a&qid=1587477178&sr=8-3 Yes those are the right ones. Quote Link to comment Share on other sites More sharing options...
RyanE Posted April 21, 2020 Share Posted April 21, 2020 Not to fearmonger, but if I were a dealer, I would *never* install these products (or any other products direct shipped from China with no local US support/testing, for that matter) in a customer's house. They're not UL listed, the only mark they show is the EU's CE mark (at least it's not the 'China Export' CE mark https://www.ybw.com/vhf-marine-radio-guide/warning-dont-get-confused-between-the-ce-mark-and-the-china-export-mark-4607)... The EU's CE mark indicates a declaration of conformity, which means a self-certification, no testing. Also, the hardware is a bit questionable, and is definitely 'cost-optimized' (cheap)... For example, on the Sonoff POW/POW2, the case's plastic isn't sonically welded, and isn't even screwed together. There is the single screw and cover to bind the input/output plugs that also holds the case together. The plastic is flimsy, and it wouldn't take much abuse or *any* water, and having the power leads not built in assumes that they're installed safely and stay secure / out of kids' hands... I don't think they're inherently unsafe, but as a dealer, there's likely some liability there for recommending / installing them, with no recourse upstream if there are problems. As someone who does some DIY / makes his own hardware also based on the ESP8266/ESP32, they're fun devices, and I have a few in use, but I wouldn't recommend them to customers. RyanE Quote Link to comment Share on other sites More sharing options...
jackstone Posted April 21, 2020 Author Share Posted April 21, 2020 I think Europe and Asia dealers does not have to comply to UL, so they can still use it without breaking any building code. The R3 device is not as badly built with screws holding the case, and can be installed safety in a metal 4x4 box. I would not use the POW/POW2 anywhere though... Anyways the driver I've written is only for the two DIY devices and both come in an enclosed form. Quote Link to comment Share on other sites More sharing options...
david@berto.co.uk Posted April 21, 2020 Share Posted April 21, 2020 Agree on Sonoff and most cheap kit from China. Shelly recently started producing their 2.5 unit with UL certification and have still maintained a relatively cheap price at under €20. Hopefully they'll do the same with the rest of their devices. I've found them to be very reliable. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.