Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

SonOff Low Cost Wifi Switches for Home Automation

Options
1171820222325

Comments

  • Registered Users Posts: 2,279 ✭✭✭PaulKK


    kenmc wrote: »
    Finally arrived. Slowest. Post. Ever

    Mine arrived today :) have you used it yet?


  • Registered Users Posts: 7,276 ✭✭✭kenmc


    PaulKK wrote: »
    Mine arrived today :) have you used it yet?

    Yeah I reflashed it with tasmota and installed it in the switch box for the towel rail. Now I've a nice warm towel for my shower every morning thanks to tasmota and openhab


  • Registered Users Posts: 2,273 ✭✭✭UsedToWait


    kenmc wrote: »
    Yeah I reflashed it with tasmota and installed it in the switch box for the towel rail. Now I've a nice warm towel for my shower every morning thanks to tasmota and openhab


    Is there any way you could give an idiot's guide to flashing these ken?


    I understand it involves a piece of arduino kit and some soldering?


  • Registered Users Posts: 7,276 ✭✭✭kenmc


    The Shelly's require no soldering, they have headers built in, exposed, ready to go.

    You need Arduino ide, you get tasmota from GitHub, it has loads of instructions too.

    The bit you need to buy is a USB to serial convertor, which has 3.3v output. This connects your computer, using 4 wires to the Shelly. 3.3v, 0v, receive and transmit. There's one other wire used to connect one if the other pins on that header to 0v when powering up so the Shelly goes into programming mode. I'm on the phone now but tomorrow or Thursday I should be able to find the parts I got, eBay probably. There are loads of you tube videos around it also.

    Ken


  • Registered Users Posts: 7,276 ✭✭✭kenmc


    DO NOT PERFORM ANY PROGRAMMING WITH THE DEVICE CONNECTED TO MAINS!!!!!!!.
    Also, once you install tasmota, you cannot go back to the factory version of the firmware - you can reflash with other stuff, e.g. espeasy, and different versions of sonoff, but not back to the manufacturers firmware (*though possibly, you can copy the file off the device before overwriting, but I've never bothered)


    I've a few different versions of these Usb to Serial, for different purposes. It's important that the one you use for Shelly/Sonoff has 3.3v output, some have 5.

    I have one of these I use for the shelly/sonoff
    https://tinyurl.com/y8xf7nsa

    it has 3.3 and 5v outputs, switchable with the jumper.
    You'll also need jumper cables, e.g. https://tinyurl.com/yctv7zrv to perform the connections. Depending on the exact USB/Serial board you use, you may need Male-Male, or else Male-Female like the link posted.

    THe Tasmota wiki has info on the shelly, and the connections to use
    https://github.com/arendst/Sonoff-Tasmota/wiki/Shelly-1-and-2

    I have a shelly 1, v1. Pay attention to the warning about the pin labels on v1 and v2.

    So you connect

    Shelly :::::::: USB/SERIAL
    GND
    GND
    3.3V
    VCC (set to 3.3v)
    RXD
    TX
    TXD
    RX
    (unless it's a poor quality chinese clone with the labels reversed in which case)
    RXD
    RX
    TXD
    TX

    if you get the TX and RX wrong way round no harm will come, but it won't work, it will fail to program.

    One last thing to do is, when powering up the shelly, have a jumper wire between GND and GPIO0, this can be taken away after a few seconds, it's just to force the shelly to programmable mode. Otherwise it will boot as intended an you will not be able to program it.

    Follow the instructions for arduino (there are other options, like platformio and vscode, but i've not used them so can't comment) from tasmota wiki : https://github.com/arendst/Sonoff-Tasmota/wiki/Arduino-IDE

    also look at the https://github.com/arendst/Sonoff-Tasmota/wiki/Prerequisite and the https://github.com/arendst/Sonoff-Tasmota/wiki/Hardware-Preparation though these talk more about the sonoffs than then shelly

    If you desire, you can download precompiled binaries and flash them directly, rather than building the code in arduino (though i haven't done this) https://github.com/arendst/Sonoff-Tasmota/wiki/SonOTA---Espressif2Arduino---Tasmota-without-compiling.

    Like I said there are plenty of youtube videos going through the whole process e.g. https://www.youtube.com/watch?v=chyVjtYb0EA though it's more specific to sonoff than shelly, the configuration etc is all the same


  • Advertisement
  • Registered Users Posts: 3,019 ✭✭✭thecivvie


    I use pogo pins and therefore no need to solder anything to the motherboard. Cannot recall what size. I use them with female leads so I can leave permanently on the ftdc unit

    Join Ireland Weather Network




  • Registered Users Posts: 3,019 ✭✭✭thecivvie


    I have 2 S20 EU that I flashed. I got them cheap and used them when I travelled. Now back at home and looking to use the motherboard for a different purpose.

    Knowing that I am working with mains voltages, it maybe a case of doing something small with them.

    Just curious if anyone else has found a use for the motherboards and how they safely used them

    Join Ireland Weather Network




  • Registered Users Posts: 3,019 ✭✭✭thecivvie


    This is the unit I use to program sonoff devices. The white cable is neutral

    Join Ireland Weather Network




  • Registered Users Posts: 7,276 ✭✭✭kenmc


    I use pogos also for sonoff basics, but the s26 has the pads on different sides of the board, pita


  • Registered Users Posts: 7,276 ✭✭✭kenmc


    thecivvie wrote: »
    I have 2 S20 EU that I flashed. I got them cheap and used them when I travelled. Now back at home and looking to use the motherboard for a different purpose.

    Knowing that I am working with mains voltages, it maybe a case of doing something small with them.

    Just curious if anyone else has found a use for the motherboards and how they safely used them

    Can you not use them here? Get an adapter


  • Advertisement
  • Registered Users Posts: 3,019 ✭✭✭thecivvie


    kenmc wrote: »
    Can you not use them here? Get an adapter

    Not really as I have no 2 pin devices. I have an idea to take the board out of one and put it on an LED light , suitably insulated and use it to turn the light on and off. It is a mains powered LED light

    Join Ireland Weather Network




  • Registered Users Posts: 7,276 ✭✭✭kenmc


    Duh of course it's eu both input and output. Doh!


  • Registered Users Posts: 2,279 ✭✭✭PaulKK


    kenmc wrote: »
    Yeah I reflashed it with tasmota and installed it in the switch box for the towel rail. Now I've a nice warm towel for my shower every morning thanks to tasmota and openhab

    Mind sharing how you wired it? I've put it in front of the switched fuse and wired the incoming live and neutral to L and N on the Shelly.

    I wired the I from the Shelly back in to the switched fuse Live in and O from the Shelly to the switched fuse Neutral In.

    I didn't think I needed to use the SW output on the Shelly?

    The Shelly is getting power and I've connected it added it to the app no problem.

    It's not providing power to the switched fuse though. Do I need to link SW and I?


  • Registered Users Posts: 33,641 ✭✭✭✭listermint


    Aliexpress in 2 and a half weeks? I wish. Aliexpress is typically 4-8 weeks delivery.

    no idea what store you are buying from but my Sonoffs came in 3 weeks, 8 is a red herring. Dont exaggerate


  • Registered Users Posts: 7,276 ✭✭✭kenmc


    PaulKK wrote: »
    Mind sharing how you wired it? I've put it in front of the switched fuse and wired the incoming live and neutral to L and N on the Shelly.

    I wired the I from the Shelly back in to the switched fuse Live in and O from the Shelly to the switched fuse Neutral In.

    I didn't think I needed to use the SW output on the Shelly?

    The Shelly is getting power and I've connected it added it to the app no problem.

    It's not providing power to the switched fuse though. Do I need to link SW and I?
    So mine sits between the fused spur and the rad. Turning on the spur turns on the Shelly.

    Neutrals are common, rad and Shelly to n from spur.
    L from spur goes to L of Shelly, and I.

    O of Shelly goes to rad.

    Sw is unconnected


  • Registered Users Posts: 2,279 ✭✭✭PaulKK


    kenmc wrote: »
    So mine sits between the fused spur and the rad. Turning on the spur turns on the Shelly.

    Neutrals are common, rad and Shelly to n from spur.
    L from spur goes to L of Shelly, and I.

    O of Shelly goes to rad.

    Sw is unconnected

    Thanks very much! Working no problem now. The diagram showed the O connected to the neutral.

    I fed L and I (input) from Live and shared the N between Shelly and the spur and used O for the live in on the spur. All is well!


  • Registered Users Posts: 7,276 ✭✭✭kenmc


    Cool


  • Registered Users Posts: 1,022 ✭✭✭Gulliver


    listermint wrote: »
    no idea what store you are buying from but my Sonoffs came in 3 weeks, 8 is a red herring. Dont exaggerate

    Sometimes they sit in the An Post warehouse for a few weeks. European packages aren't as bad.


  • Registered Users Posts: 1,462 ✭✭✭Tinder Surprise


    Gulliver wrote: »
    Sometimes they sit in the An Post warehouse for a few weeks. European packages aren't as bad.

    Your Honor, Exhibit A...

    had two deliveries arrive in Ireland 2 days apart - each delivery arrived at my door nearly 2 weeks apart


  • Registered Users Posts: 1,410 ✭✭✭Dr4gul4


    A bit stuck here, so any advice welcome..

    Ordered one of these And after a few weeks it arrived, grabbed the drivers from here. All detected, Soldered on some pin headdders to a few sonoff's and attempted to flash, but no joy, tried via Visual studio, arduinoide and finally esptool, all see to sit waiting for the headder when they go to open the connection. ( I even we so far as to try for a separate laptop )

    I can see the com port, configure all s/w to use it, hold down the button, whip in the usb, and still nothing.

    I'm sure the headder pins are on the right way arround, e.g yellow from 3.3 to vcc, brown from gnd to gnd, etc..

    More curious to see if anybody has used a cp210x before to flash and if it worked ..


  • Advertisement
  • Registered Users Posts: 7,276 ✭✭✭kenmc


    Dr4gul4 wrote: »
    A bit stuck here, so any advice welcome..

    Ordered one of these And after a few weeks it arrived, grabbed the drivers from here. All detected, Soldered on some pin headdders to a few sonoff's and attempted to flash, but no joy, tried via Visual studio, arduinoide and finally esptool, all see to sit waiting for the headder when they go to open the connection. ( I even we so far as to try for a separate laptop )

    I can see the com port, configure all s/w to use it, hold down the button, whip in the usb, and still nothing.

    I'm sure the headder pins are on the right way arround, e.g yellow from 3.3 to vcc, brown from gnd to gnd, etc..

    More curious to see if anybody has used a cp210x before to flash and if it worked ..

    I have a cp2102 based programmer also, but never used it for sonoffs as it doesn't have a header for 3.3v (it does have a pad, but I never bothered soldering a lead to it, as I've got the ftdi which has 3.3 on the pins)

    You could try using esptool to read the flash, to ensure that everything is working. I'm not sure if sonoffs spit anything out the serial port by default, but you could try to open the serial monitor and see if there's anything coming in. Also I presume you've tried switching the TX and RX at one end in case it's wired or labelled wrongly?

    Are you using windoze or linux? If linux then there's some udev rules you need to set to allow the usb device be accessed by normal user, not root.


  • Registered Users Posts: 1,410 ✭✭✭Dr4gul4


    kenmc wrote: »
    I have a cp2102 based programmer also, but never used it for sonoffs as it doesn't have a header for 3.3v (it does have a pad, but I never bothered soldering a lead to it, as I've got the ftdi which has 3.3 on the pins)

    You could try using esptool to read the flash, to ensure that everything is working. I'm not sure if sonoffs spit anything out the serial port by default, but you could try to open the serial monitor and see if there's anything coming in. Also I presume you've tried switching the TX and RX at one end in case it's wired or labelled wrongly?

    Are you using windoze or linux? If linux then there's some udev rules you need to set to allow the usb device be accessed by normal user, not root.


    Hmm, this model appears to have a 3.3 on the first pin .. i'll snap a photo and attach it in a few mins.

    Running windows 10, tried the serial monitor in VS code, but got nout back, i'll attempt a simple read with esptool .. 100% swapped the cabled forf rx and tx, altho im pretty confident i've them on the right way I did quite a bit of digging as the TH models dont list which is which on the board.


  • Registered Users Posts: 1,410 ✭✭✭Dr4gul4


    Image attached


  • Registered Users Posts: 1,410 ✭✭✭Dr4gul4


    The 3.3V from CP2102 has only 200mA output. It's not enough for esp8266 ..... luckily i also order a different adapter as per ken's post ;) .. back to the waiting game now .


  • Registered Users Posts: 525 ✭✭✭JHet


    Hi,

    I bought a Sonoff TH16. I plan on wiring it to my boiler switch. Its an old boiler so no stat.

    Here is an image of the old back plate:

    464202.jpg

    Just want to double check the wiring on this one.

    L goes to the Input L on the Sonoff.
    4 goes to the Output L on the Sonoff.

    N and E can go to any slot marked accordingly.

    Don't need loop cable between terminals as sonoff controls circuit internally.

    Can some verify the above?


  • Moderators, Home & Garden Moderators, Technology & Internet Moderators Posts: 10,952 Mod ✭✭✭✭Stoner


    All you possibly have is
    Live
    Neutral
    Earth and
    Switched live

    There are looped out live cables there.

    Keep them in connector blocks

    You don't need to switch the neutral, just join them in a good connection block and feed the N in on the SONOFF.

    Connect all the Earth cables again SONOFF has no earth connection but I you need to join them so the boiler gets one.

    Output of the SONOFF only needs one cable connected, the switched live into the live out.


    That is the case for a very simple system, if that is what you have.

    One of the looped live cables should feed the boiler circulation pump so that the hot water pump still have power to work when the boiler feed is switched off many boilers control this.


  • Registered Users Posts: 525 ✭✭✭JHet


    I believe the looped live is there to provide voltage to terminal 2 which is switched to terminal 4 when the timeswitch is in the ON position, and to terminal 2 when the timeswitch is in the OFF position.

    The old switch is a RWB27 by the way.


  • Registered Users Posts: 1,115 ✭✭✭chrismon


    I had no idea these were so cheap.
    Bought one basic one from Amazon, €12 delivered by Thursday using prime.


  • Registered Users Posts: 1,115 ✭✭✭chrismon


    Going to use it for my basic heating system.


  • Advertisement
  • Registered Users Posts: 341 ✭✭tweek84


    JHet wrote: »
    Hi,

    I bought a Sonoff TH16. I plan on wiring it to my boiler switch. Its an old boiler so no stat.

    Here is an image of the old back plate:

    464202.jpg

    Just want to double check the wiring on this one.

    L goes to the Input L on the Sonoff.
    4 goes to the Output L on the Sonoff.

    N and E can go to any slot marked accordingly.

    Don't need loop cable between terminals as sonoff controls circuit internally.

    Can some verify the above?

    Yes what you are doing is correct.
    Do you plan on using the time schedules on the sonoff app for the timing of your heating?


Advertisement