***SONOFF - WiFi Wireless Smart Switch***

Would you use a Sonoff..?


  • Total voters
    85

Randomblame

Well-Known Member
Once you've reflashed the Sonoff it won't work with or need the welink app. Homeassistant is a little more complex setting up learning all the syntax and how to modify the config files. A good place to start would be https://home-assistant.io/blog/2017/07/25/introducing-hassio/ and then there a few good youtubers that go over more in-depth configs like BruhAutomation and DrZZZ if you can handle the editing. If you're trying to just set it up to control the Sonoffs that's pretty straightforward and I can share some of my configs to get you started if you want. Oh and for the Raspberry Pi no HDD is needed as it uses the SD card as the hard drive.
Okay, thanks for the offer!
But I have to read in there first. I have no idea about encoding, just flashing Custom Recoveries and Roms on my Android devices, which is really easy. If I'm confident, I'll send you a PM. If its above my horizon then not, Lol!
Is Homeserver.oi the only working solution for a flashed Sonoff?
 

T-Time

Well-Known Member
Ohhh why I didn't find this thread before :wall:
Sonoff 4ch pro on the way :D

One noob question. Does that kind of smart switch sends wifi and rf sygnall all the time? Or just when You're trying to connect to it ?

I've recently added 3 smart switches to my tent and my plants are growing noticabbly slower. That might explain this thing. I've seen similar thing with my friend running wifi router on his tent. As soon he moved it, plants looked happier :)
 

Mazer

Well-Known Member
Broken down to get a setup like this you would need:
1x Raspberry Pi or a computer you keep running 24x7 to run HomeAssistant.io
Any # of Sonoffs to monitor/switch power.
Wi-Fi



View attachment 4078307 View attachment 4078308 View attachment 4078309
Dear tekmunki,

Allow me with, without the slightest tinge of fawning, to congratulate you on your setup. It does look amazingly fantastic!
I started to grow again after a 15 year break. Prior to my "ReGrowlution" I had no electricity knowledge nor soldering skills. Yet, after hours of watching tutorials and browsing deep into forums, I managed to put together my very own Veg and Flow light using CXA 2530, finding all the right components etc. I have even formulated my own bespoke ROLS recipe based again upon information gathered here and there.
I am pleased to say that I am getting very satisfactory result.
This introductory paragraph has one goal; I just want to demonstrate that I am driven (at a high current hahahah).

I have neither arduino/rasberry nor IoT knowledge. Yet, I am very much interested in automating my tent as much as possible. I currently use a straight out of the box 4 channel sonoff (https://www.itead.cc/sonoff-4ch.html) to control lights. As well as a thermostatic plug for heating when needed. I would be delighted to centralize all these functions with a "brain" as you call it using sensors relays etc.

Now let me ask my actual question.
For someone who has no programming skills, on a scale of 1 to 10 how difficult would it be to duplicate a setup similar to yours?
For your information, I already possess an arduino uno, many sensors and some relays. Yet I know that when I try to wrap my head around an arduino design, I look like a primate trying to start a F-1 fighter jet.

IoTingly yours,
M
 

tekmunki

Active Member
Okay, thanks for the offer!
But I have to read in there first. I have no idea about encoding, just flashing Custom Recoveries and Roms on my Android devices, which is really easy. If I'm confident, I'll send you a PM. If its above my horizon then not, Lol!
Is Homeserver.oi the only working solution for a flashed Sonoff?
Homeassistant is definitely not the only solution to utilize a flashed Sonoff there are a couple dozen home automation systems out there now but I chose Homeassistant because of the community behind it making it easy for me to figure out how to do the things I needed quickly. The main thing you're looking for is MQTT support which just about all of the major home automation have built in some way or another. You could even run a MQTT server off your phone that you manually fire off, hell you could also just access the Sonoff by its IP on your network and control it from there if all you're looking for is basic switch operation without timers or a schedule that's an option too and they all can run right alongside each other.

There is other firmware you could load after you've flashed it like ESPEasy that has a built-in rule system that essentially lets you schedule it to do things without having to connect to any external systems. That's what I used to repurpose the little magnetic sensors they built into the house for the alarm. I ripped out the alarm panel and stuck the wires into a breadboard with a NodeMCU (essentially a small Arduino with a built-in ESP866 chip) that's running ESPEasy so whenever a door is opened it plays a chime through a speaker and it's still tied in to Homeassistant which I have set up so if a door is opened longer than 5 mins it shuts off my Nest thermostats so I'm not wasting AC/Heat.

It's like growing there's no one way to do it but if you find a way that has a ton of documentation it might be a good idea to start there and work your way around to the more obscure sides of it as the end result is usually the same.

@Mazer if you have absolutely no experience and tried to do it all on your own I'd give it a solid 9 only because you'd have to figure out how to flash an SD card with the operating system for the Raspberry Pi, then set it up for remote access, flash the new firmware to the Sonoff, then integrate the Sonoffs into Homeassistant's YAML configs, and this is all assuming you know how to link it all to your Wi-Fi.

Now if you can follow Youtube videos and read a few posts on a forum and be able to copy and paste while understanding computer lingo I'd give it a 3 because everything is so well documented and there is most likely someone that has tried to do what you're doing that they've already asked the questions for you on how to do it.

I wouldn't really try to use the Arduino board you have right now for this type of project unless you had a lot of time and parts laying around to replicate what a Sonoff basic can do for $5 you'd need to scrounge up the Arduino board, wifi chip, 10Amp relay, AC-DC converter, push button switch, wire tie downs, and some sort of case. Even when you get into the 2 and 4 channel relay Sonoffs it doesn't really benefit you to roll you're own at these price points. I would just head over to iTead.cc and get them direct for pretty cheap prices or if you can't wait and don't mind paying double Amazon has them with prime shipping.
 

bizfactory

Well-Known Member
@tekmunki definitely share those configs if you can! I got homeassistant up and running last night but haven't added the sonoff yet. It found my chromecast and plex server right away though! Can't wait till I have more time to get this all set up and dialed in.
 

noodle-led

Well-Known Member
There is other firmware you could load after you've flashed it like ESPEasy that has a built-in rule system that essentially lets you schedule it to do things without having to connect to any external systems. That's what I used to repurpose the little magnetic sensors they built into the house for the alarm. I ripped out the alarm panel and stuck the wires into a breadboard with a NodeMCU (essentially a small Arduino with a built-in ESP866 chip) that's running ESPEasy so whenever a door is opened it plays a chime through a speaker and it's still tied in to Homeassistant which I have set up so if a door is opened longer than 5 mins it shuts off my Nest thermostats so I'm not wasting AC/Heat.
Oh man we're like birds of a feather. I also put an ESP8266 into my Alarm panel and dump the info into MQTT. Also thanks for posting the gif of the damper working, now I can see how you've got it all hooked up. I have to admit I watched it loop dozens of times, open... closed... open... closed.

Another option on the automation with the Sonoffs is Node-Red. It is definitely a lot more programmer driven than HomeAssistant but I do all my scheduling through that and use the Dashboard plugin to show state and graphs of temp/humidity and stuff. I was just looking at moisture sensors for putting into the coco coir to trigger automatic watering instead of my analog method of actually looking at plants. Other smart plugs are being added to the Tasmota compatibility list all the time, including the newer-sized "Sparin Outlet" and I think the ones that look identical. Nice because they don't block multiple outlets on a power strip.
 

tekmunki

Active Member
@tekmunki definitely share those configs if you can! I got homeassistant up and running last night but haven't added the sonoff yet. It found my chromecast and plex server right away though! Can't wait till I have more time to get this all set up and dialed in.
The file I've uploaded has some examples of what I'm using and I've commented it with some info on each part everything after a "#" is comments. If you use Notepad++ or Atom to open it just rename it to .yaml from .txt and it should show you the syntax coloring. Just copy and paste the sections you want to use in your configuration.yaml file and restart Homeassistant make sure you have a way to edit the files without being able to access the Homeassistant web interface because if you mistype or add an extra character somewhere it could cause the web interface to not load until you fix it.

@noodle-led Lol, I knew there had to be someone on this board that's MQTT'd their alarm system as well. I've tried using Node-Red for the more advanced triggers but ended up just not needing all the complex workflows I thought I did but I agree Node-Red and Homeassistant together can make some really neat stuff like you said with auto watering based on soil condition. I've just never had good luck with the soil monitors lasting more than one harvest so I just settled on auto shut off of the watering pump since I'm down there with the plants every day anyway and can trigger the pump manually or on a schedule from my phone at any time. A sweet option is to get some of those Amazon Dash buttons and you can reprogram with Dasher them to send a MQQT command everytime you push it so you just mount it on the outside of the tent and bam you have a wireless trigger for whatever automation you set up on the Sonoffs.
 

Attachments

InTheValley

Well-Known Member
ok, getting into this Sonoff stuff today.

Plan:

2 chamber grow cab/ 1 for veg - one for Flower/dry

using 4 luminus cxm22, 2pc in each chamber.

using 1 600H-54B Meanwell driver.

Will be using GrowMau5 Nighttime puck.

I want sunrise/sunset ( wattage rampup and rampdown at set programmable times )

so, 3 timers, Home assistant hub, smarttablet.

Am i right? Do i need a separate cord for firmware update?

best to use the 600H or 2 separate drivers?

Oh, need switches for heatsink fans to,

so 5 switchs?

If anyone is bored, like to hear info on this set-up and Sonoff setup.

Thanks fellas
 

noodle-led

Well-Known Member
@noodle-ledI thought I did but I agree Node-Red and Homeassistant together can make some really neat stuff like you said with auto watering based on soil condition. I've just never had good luck with the soil monitors lasting more than one harvest so I just settled on auto shut off of the watering pump since I'm down there with the plants every day anyway and can trigger the pump manually or on a schedule from my phone at any time. [/QUOTE]
Yeah I've heard that about the soil sensors too, they go bad in a hurry. I really don't need all the complexity of Node-Red either but I've been on it for years now and devices come and go as they come into service and serve out their lives so I've never switched to anything new. Homeassistant is like what I wanted back when I set up my node system initially! Still, for fun, I'd like to set up a little fully automated system someday, for like growing a single head of lettuce or something just because we've got all these tools we can use it would be a shame to not make the world's most complicated Aerogarden.
 

tekmunki

Active Member
@InTheValley Not sure where you got the info you used to calculate the need for a HLG-600h-54B or if you just had one laying around that you wanted to use but it is well over the necessary driver needed for 4 cxm22. The cobs are ~36v forward voltage meaning they need around at minimum 33.5v to turn on and light up after that the amount of current you put into them determines how bright and how long they will last but the amount of current they pull goes up with the voltage so at 37.5v they would pull 2.56amps each. 02722-00-59.png

The HLG600-54 is capable of 11.2 amps so unless you plan on running them at 37.5v and maxing out the amps (which will burn them out super fast and make them run super hot) you'll be leaving a lot on the table only running 4 cobs. It's usually best practice to run them at about half of what they can max out on if not lower to maximize lumens/watt meaning you only need a driver capable of putting out 144v at about 1.4 amps like the HLG-185H-1400B which is 1/3rd the price of the HLG-600h-54b on arrow.com and that's with free overnight shipping if you're in the U.S.

Ideally, you would run two cobs on one driver so you can turn them on and off independently for veg/flower as they don't run on the same time schedule. So now you only need 72v and 1.4 amps per pair of cobs meaning you could get away with using 2xHLG-120H-c1400B pulling around 100 watts a pair of cobs. At these low of wattages, you can get away with passive cooling very easily meaning no need for fans. To give you an example I have 12 cxb3590's running off of 2 HLG-320H-1400B using 140mm heatsinks and I can rest my hand on the heatsinks and it's lukewarm to the touch after running all night.

As far as dimming goes the Sonoffs are relay based devices meaning they turn things off or on. There are ways of modding them to have a PWM signal with some soldering and reflashing the firmware but then you'd also have to custom build the sunset/sunrise component as most of the major firmware like tasmota or espeasy don't have that built in. You would be better off having the Sonoffs handle turning the drivers on and off at certain times and having a separate device control the dimming.

TL;DR:
2 Chambers 1 Cab
2g1up.png
2 Sonoffs wired into a power strip each
1 HLG-120H-C1400B with 2 CXM22 plugged into a power strip (2 drivers 4 cobs total)
1 fan per chamber for airflow plugged into a powerstrip
Sonoffs trigger the powerstrips and cobs and fans turn on same time at different scheduled times all easily doable with the stock Sonoff app or Homeassistant.
 

Randomblame

Well-Known Member
@tekmunki
I agree on the whole, but one thing is not true. The CXM22 is a 50v chip! That said, an HLG-600H-54A is still oversized, because maximum current of one CXM22 is 2.4Amps.

One could use two HLG-150H-54(A)'s and 2 COB's in parallel on each driver.

But I would use only 1 COB in my veg area and 3 in the flower room.
An HLG-80H-54A and an HLG-240H-54A would be max. 85w for vegging and 250w for flowering. A Sonoff dual could be used to switch both drivers separately.
 

Attachments

Last edited:

InTheValley

Well-Known Member
@tekmunki,, thanks for taking your time to write that out man, much appreciated. Like Randomblame said, they are 50V-55V

I wanted to run them at 75W each, but now that Random talked about 1veg, 3 flower, I might go 2 veg, 3 flower, so that would be 5, *75, 375watts, which will be just over 50% of the driver. I couldnt pass up the 600H purchase, the price was a steal. 2pc of 185H-1400B would be more then the 600H,

BUT, if it wont work, then it wont work, and Ill go the route Randomblame outlined above, AGAIN, lol..


This is my final build, I want this to be right. Going to be a nice cab. Dont want to hijack the thread with my rambling, lol.. I was going to go the Zigbee route for dimming purposes, till I was steared to Sonoff in this thread. Like the price. But the dimming via time, is important to my needs, as Im a firm believer in the plant maxing out Photon intake and doesnt need intense Photon pounding all day long.

that is all, thanks tekmunki and Random..
 

InTheValley

Well-Known Member
screw the dimming, no dimming has been working for years, lol.. and going with 2pc 185H-54A, 2pc 4000K veg, 3500K Flower, 3 Sonoffs, ( 1 power strip, 2 for lights)

Complete BoxBuild total- $500

Thanks for the Help fellas
 
Last edited:

Randomblame

Well-Known Member
It's a CV driver and the current is shared between the number of COB's. You need to dimm the current down to 60% so that all run with ~only 75w. But in this case you can only use one timer setted up for vegging "or" flowering.

To really take advantage of the HLG-600 you would have to increase your area (4x 4') or use more COB's to fill the driver out and avoid damage if you crank the light up to maximum. With 5 COB's each COB get's ~2,2Amps at 100% driver output, that's 117w per COB, so well below the rated maximum(2,4A), but you will need an active cooling solution or at least an additional fan blowing air above the heatsinks. Just because the driver has 2 outputs does not mean you can drive two different lamps with it.
 
Top