Jump to content
C4 Forums | Control4

ITEAD Sonoff WiFi Wireless Smart Switch


Amr

Recommended Posts

Hello Everyone,

Did someone played or tried these WiFi Wireless Smart Switch devices, they are incredibly affordable starting @ $5 a piece!

https://www.itead.cc/smart-home.html

They are pretty open and tons of people manage to re-flash them to even work locally, a C4 driver will add an amazing option and affordable one for many retrofit work ...

Link to comment
Share on other sites

  • 7 months later...

  • 1 year later...
On 9/8/2017 at 6:59 PM, zaphod said:

Bump.  

Has anyone ever looked at these?  They look very interesting and seem to have interesting functionality and they are very cheap - as in outlet switches for $17, switch/relay for about $7.

Yes.

This is a good piece of kit. 

Open source hardware. Out of the box it requires that you use the Sonoff app and their AWS MQTT servers but you are able to put your own firmware on the device which opens it up eg. ESPurna or Tasmota.

I have a full MQTT Bridge driver and Sonoff Relay driver that enables you to use your own MQTT Broker.

Works a treat.

Link to comment
Share on other sites

5 hours ago, David said:

Yes.

This is a good piece of kit. 

Open source hardware. Out of the box it requires that you use the Sonoff app and their AWS MQTT servers but you are able to put your own firmware on the device which opens it up eg. ESPurna or Tasmota.

I have a full MQTT Bridge driver and Sonoff Relay driver that enables you to use your own MQTT Broker.

Works a treat.

David, are these c4 drivers, did u develop them or some one did? From where I can get a copy to try them out? Ian tired of the Orvibo S20 l, they have good patches and bad ones and I need to take them out of my project and replace them by Sonoff’s ...

Link to comment
Share on other sites

These are drivers I've written myself.

You need to flash the Sonoff kit with Tasmota or ESPurna, see https://github.com/xoseperez/espurna/wiki or https://github.com/arendst/Sonoff-Tasmota/wiki.

You then need to setup an MQTT broker either locally or in the cloud, see https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-the-mosquitto-mqtt-messaging-broker-on-ubuntu-18-04.

My driver does not currently support SSL so I use a local MQTT broker and rather than open firewall ports to it I bridge it with a cloud based broker eg. AWS IoT or Digital Ocean as above.

I use MQTT Dash on my Android phone, https://play.google.com/store/apps/details?id=net.routix.mqttdash&hl=en_GB, which enables me to setup simple buttons etc. to issue commands to my Control4 system.

I also have a simple Relay Light driver that allows you to connect lights up to Sonoff relays and they then appear as normal Control4 lights.

Very good kit and very fast interface/control.

If you would like to play with the drivers I have in beta then send me an email address and I'll email you the drivers. I assume you are able to install drivers on you Control4 system?

Link to comment
Share on other sites

  • 1 month later...
On 11/27/2018 at 12:45 PM, David said:

This is really interesting! I installed Mosquitto broker on my Ubuntu home server, my dealer will install the drivers this week, USB adapter is on the way!

I'm planning to test the Sonoff smart switches to light up the backyard when there is a motion and the system is armed. And maybe few beeps or a siren on the outdoor speakers!

Link to comment
Share on other sites

5 minutes ago, Zuhair said:

This is really interesting! I installed Mosquitto broker on my Ubuntu home server, my dealer will install the drivers this week, USB adapter is on the way!

I'm planning to test the Sonoff smart switches to light up the backyard when there is a motion and the system is armed. And maybe few beeps or a siren on the outdoor speakers!

Great.

You only need to install the Berto_Clould driver from GitHub, https://raw.githubusercontent.com/davidmassot/Berto/master/c4z/Berto_Cloud.c4z. You can install the remaining drivers from the Berto Cloud properties page. I've made some updates so make sure your dealer downloads the latest one when he goes to install.

Have fun.

Link to comment
Share on other sites

David,

Would you have a sample code of how to send a mqtt message?

I am planning to send the status of my switches and dimmers to Home Assistant every time they change the state.

I believe it won't be much different of how you send messages to Sonoff/Tasmota.

Thanks in advance

Link to comment
Share on other sites

4 hours ago, NOS4A2 said:

David,

Would you have a sample code of how to send a mqtt message?

I am planning to send the status of my switches and dimmers to Home Assistant every time they change the state.

I believe it won't be much different of how you send messages to Sonoff/Tasmota.

Thanks in advance

You can publish messages to topics from my MQTT Bridge driver. The bridge needs to be registered to your MQTT broker, I use Mosquitto on a local Raspberry Pi but any platform will do, you could use AWS IoT services but then your going out to the Internet etc. 

Once the bridge is setup and logged into a broker you can publish messages from programming, I have enclosed screenshots.

If on the other hand you would like to write your own Control4 drivers to interface with my MQTT Bridge then I can send you a sample driver that links to the bridge.

Thanks

David733379227_Screenshot2018-12-06at08_42_32.thumb.png.7f758c5fa2a58987fe97a6be5b6bbc85.png1913624592_Screenshot2018-12-06at08_41_10.thumb.png.adedfdc5777c6344598fb76761efe8bf.png

Link to comment
Share on other sites

Thanks a lot for the tips.

I would love to have access to your code. I wonder if it will be possible to make my Control4, Smartthings, Hubitat and Home Assistant talk to each other through MQTT. All talking and living in peace...

One can dream that someday all will have some embedded MQTT support.

Link to comment
Share on other sites

The DEVICE messages are those messages received from subscribed topics associated to connected drivers to the bridge ie. those with a link the the MQTT_LINK connection. I have a Sonoff _Relay and Homekit driver that talk directly to the bridge.

The GENERAL messages are those that are received against topics that you specify in the Topics field on the properties page.

Cheers

 

David

 

Link to comment
Share on other sites

Another quick question related to the topic above.

When a general message is received, how do I make some light to change its state?

As you can see in the pictures, the message was received and the script seems right but no light was turned on. Is there a better way to implement this?

Best regards,

Luis Carlos

Message.jpg

Script.jpg

Link to comment
Share on other sites

Luis,

This looks correct and is the same way that I trigger things. See enclosed. 

I have used my IFTTT driver to send a message when the light is turn on or off and all appears to work fine.

The only thing I can think of is that the variables in programming do not match the ones being updated which can sometimes happen when adding/deleing variables when the driver is loaded.

May be worth clearing the current programming, rebooting and trying again.

David213908990_Screenshot2018-12-14at09_40_23.thumb.png.15aa600d3b48ba965f6ea056078f9548.png

Link to comment
Share on other sites

Great.
You only need to install the Berto_Clould driver from GitHub, https://raw.githubusercontent.com/davidmassot/Berto/master/c4z/Berto_Cloud.c4z. You can install the remaining drivers from the Berto Cloud properties page. I've made some updates so make sure your dealer downloads the latest one when he goes to install.
Have fun.


I will be asking my dealer to install the driver, shall I ask him to install an instant for each room or one master instant?


Sent from my iPhone using Tapatalk
Link to comment
Share on other sites

Zuhair,

You only need one instance of the Cloud driver installed.

When this is installed you will be able to install the MQTT Bridge from the properties page, you need an instance of this per MQTT broker you want to connect to, normally one.

You then install the Sonoff Relay driver, one per 4 way relay unit. Set the Topic name to be the same that you set in the Tasmota or ESPurna config page on the Sonoff.

Thanks

 

David

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.