Announcement

Collapse
No announcement yet.

Sonoff Irrigation Controller

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Sonoff Irrigation Controller

    Tasmota firmware has been updated and available at http://mcsSprinklers.com/mcsTasmota.bin. It has been evaluated in Sonoff 4CH Pro and Sonoff Basic. These units provide one or more WiFi-controllable relays that can be applied in an irrigation scenario.

    The Sonoff Tasmota irrigation controller operates in one of three modes.
    1. Slave to a master controller (e.g. Homeseer). It accepts WiFi ON and OFF commands and controls the relay(s) as commanded. These can be via HTTP or MQTT protocols.

    2. Control each relay with a WiFi-programmable duration and interval. Slave to master controller continues to be available.

    3.Accept predicted future irrigation time to monitor expected operation of master controller and revert to interval/duration mode when master appears to have failed.

    Periodic status is provided for when each relay will be activated based upon current interval and predicted times. Status is also provided for each actual relay ON & OFF transition.

    The discrete input available with the Sonoff can be used for a local override of the 2nd and 3rd irrigation modes thus reverting unit to only remote control or control by a master.

    The Sonoff 4CH Pro and Basic sell in China for around $25 and $5. Local distributors have additional markup. There are many other similiar products that accept the Tasmota software. Some have had success with installing Tasmota firmware over WiFi. My success has been via serial TX, RX, GND using a USB UART dongle which goes for around $10.

    The Sonoff Tasmota units have some configuration capability via WiFi HTTP/Browser. The irrigation programming uses WiFi MQTT. More information on this can be found at https://forums.homeseer.com/showthread.php?t=192675 and related sources. Chapter 13.5 of the mcsMQTT manual expands upon the use of this Tasmota firmware in the Sonoff 4CH Pro.

    mcsSprinklers 2.18.1.0 has been updated to recognize this Tasmota irrigation controller. It will soon be available in the Updater. mcsSprinklers will deliver irrigation schedule changes to the Sonoff based upon the optimized schedule computed each minute by mcsSprinklers. Tasmota will monitor and take over the irrigation based upon the last predicted and specified interval.

    The advantage of this architecture over simple relay devices is that the entity controlling the relay is monitoring for excessive ON and excessive OFF duration for the relay state. It has advantage over Rain8-class devices in that not only will it monitor for an excessive ON duration, it will take over the irrigation scheduling if irrigation has not been initiated for an excessive duration.

    The Sonoff units do not have any provisions for lightning strikes such as MOV and other fast acting electronics that will divert the lightning strike from the unit. All these protection circuits provide a degree of protection that will depend upon the proximity of the lightning strike. With the cost of the Sonoff being so low a viable strategy may be to just replace it rather than protect it.

    The Sonoff 4CH Pro also contains a 433 Mhz RF receiver. This will allow manual control of each relay as one roams the irrigation field during checkout. Both the 4Ch and Basic contain buttons to locally control the relay.

    Attached is an image of the Sonoff 4CH Pro with cover removed and rocker switch installed to act as the local override control.
    Attached Files

  • #2
    Can multiple Sonoff 4CH Pro units be used by mcsSprinklers to provide more than four zones in a single system? Is there a limit on the number of zones?
    What is a good choice for a 433 MHz transmitter to use with the 4CH Pro?
    Mike____________________________________________________________ __________________
    HS3 Pro Edition 3.0.0.548

    HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF, Rain8Net+ | RFXCOM | QSE100D | Vantage Pro | Green-Eye | X10: XTB-232, -IIR | Edgeport/8 | Way2Call | Ecobee3

    Comment


    • #3
      You can add as many units as desired with mcsSprinklers. You only consideration is the fallback setup where the start hour should be different for each unit so if a failure does occur multiple units do not start at the same time and exceed the water pressure available. I left this management outside of mcsSprinklers with an easy implementation using PubList in mcsMQTT.

      I do not yet have any experience with the RF side. Just yesterday I received my 4 button fob that is referenced by Itead/Sonoff. It is an attractive one with a hook for keychain. It has a slider on top so the buttons can be covered to prevent unintentional button presses.

      mcsSprinklers is setup to receive X10 RF (W800), but not other RF protocols. This RF use would be directly to the Sonoff. There is a RFLink that had some info recently posted in the RF and mcsMQTT forums. I will be looking into it as a potential mcsSprinklers interface for both control and sensor inputs.

      Comment


      • #4
        Today I paired the 4 button RF remote with the 4Ch Pro R2. Easy to pair with two quick pushes of one of the Sonoff buttons and then holding the remote button to pair until the Sonoff LED blinks.

        That was the good news. Now for the bad.

        I was disappointed with the range as it appears to be about 20 or 30 ft through walls. Thinking about it I recognize that I started several years ago with MR26A for my RF and the range was not very good until external antennae was added. Then I got better range of a few hundred feet with the more sensitive W800 and external antennae.

        I likely will have no use for the RF in the Sonoff 4CH Pro.

        For field use it will not be like a palmpad/W800, but a smartphone/WiFi, however if done through HS then any mechanism is possible with the desired plugin and corresponding hardware installed.

        Comment


        • #5
          I learned the hard way that GPIO2 on the ESP chips used with Sonoff devices needs to be floating high at time of application of power. If grounded it will not boot. Since GPIO2 is been used as the discrete input used for irrigation enable override, it becomes significant the position of the switch at time of application of power. If the switch for the override function is not installed then there will never be an issue because the input will then always float high.

          I updated mcsTasmota (now 5.9.12) so that irrigation enable is in the floating/high state and override/disable is in the ground state. I labeled my unit switch with Enable/Boot on the open position and Disable on the ground position.

          Comment


          • #6
            I upgraded two of the Sonoff 4 CH pro units earlier today. I did not install the aux switches.

            Both are showing:

            Program Version 5.9.11
            Build Date & Time 2018-06-03T21:54:44
            Core/SDK Version 2_4_0/2.1.0(deb1901)
            Uptime 3 Hours

            After update still showing:

            Program Version 5.9.11
            Build Date & Time 2018-06-03T21:54:44
            Core/SDK Version 2_4_0/2.1.0(deb1901)
            Uptime 0 Hours

            Not really sure that this would work with limited space for firmware. Noticed for the Smartthings configuration there is the optional static IP field. Not sure if this is a modded bin or original sonoff configuration. Note I just googled for sonoff - static IP configuration and found this.

            [ATTACH]69235[/ATTACH]

            I posted requesting a modification on the GitHub / Sonoff-Tasmota issues section Static ip configuration through the web interface
            Last edited by Pete; June 8th, 2018, 07:45 PM.
            - Pete

            Auto mator
            Homeseer 3 Pro - 3.0.0.534 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU - Mono 6.4X
            Homeseer Zee2 (Lite) - 3.0.0.534 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro - Mono 6.4X

            X10, UPB, Zigbee, ZWave and Wifi MQTT automation.

            Comment


            • #7
              From the source code that IP address can be set. I believe it is also available from the Console or MQTT with IPAddress1 for static I, IPAddress2 for gateway, IPAddress3 for subnet mask, IPAddress4 for DNS server IP. Things of this nature are the reason mcsMQTT Publist tab was added.

              I looked at the 5.9.12 version in the source and it looked like that was the one I had uploaded. I compiled & updloaded again.

              Comment


              • #8
                Thank you Michael. Yes found the references to using the console commands for IP static configuration.

                I was using the web command interface for the download of the bin and it appeared not to be downloading the bin file so I manually downloaded it last night and manually updated the firmware with the downloaded file. That said on reboot both of my test Sonoff basic devices have gone offline. I am using DHCP reservation for them at this time. I moved them a bit and thinking maybe they are not connecting to the WAP?

                Just looked at both of them and they were just flashing. Powered them off and powered them on. Still blinking ...going to move them closer to the WAP...

                Well had a look via the WAP wireless scanner which does see them. Looks like they lost their configuration. Not sure why...

                Note that this is related to the two SonOff basics that I have. I configured Don's two Sprinkler SonOffs and mailed them back yesterday. They appeared to be working fine after leaving them online for a couple of days.

                [ATTACH]69245[/ATTACH]

                Disconnected both of them for now after testing one and not able to get to it. Will probably need to connect serially to it to see what is going on with it. Dunno...it was working fine. I was at the point of connecting one for use in the garage. Using multiple 3 wire Sentrol sensors there easy peasey tap for the SonOff.
                Last edited by Pete; June 9th, 2018, 11:27 AM.
                - Pete

                Auto mator
                Homeseer 3 Pro - 3.0.0.534 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU - Mono 6.4X
                Homeseer Zee2 (Lite) - 3.0.0.534 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro - Mono 6.4X

                X10, UPB, Zigbee, ZWave and Wifi MQTT automation.

                Comment


                • #9
                  Oddest thing.

                  While both devices are statically mapped to addresses I have seen the Web gui once. Sniffing the wireless network it shows the two devices connected just fine to the network. I have read about these dropping off the wireless network.

                  Disabled the DHCP static mapping going back to regular DHCP and see and cannot ping them nor get to the web interface.

                  [ATTACH]69249[/ATTACH]

                  Note this is exactly the same stuff that I saw programming the two SonOff 4 Channel Pro devices except that I went to using the serial port to programming these afterwards.
                  Last edited by Pete; June 10th, 2018, 09:51 AM.
                  - Pete

                  Auto mator
                  Homeseer 3 Pro - 3.0.0.534 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU - Mono 6.4X
                  Homeseer Zee2 (Lite) - 3.0.0.534 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro - Mono 6.4X

                  X10, UPB, Zigbee, ZWave and Wifi MQTT automation.

                  Comment


                  • #10
                    I have seen at times a Sonoff unit that does not want to connect to my AP immediately after programming. Power it up some hours later and all is fine. I just attributed it to RF interference at the time.

                    I have 4 units deployed. 3 Basic and 1 4CH Pro. All of these remain connected to my AP and have never observed a LWT report after deployment. It may have happened, but if so not something that affects operation. It is nice with the QOS provisions of MQTT to deal with the expected dropouts of IOT devices.

                    I am now configured with one Ubiquiti LR AP at 17ft from ground in the rough center of the house. My 4CH is about 3 ft away. The others go through multiple walls to get to the Sonoff Basic at at rather poor WiFi locations. One in crawl space, one in a outside garden shed and one in the garage. The RSSI for all still seem pretty good and stable.

                    I have all my units as DHCP and then static assignments in the router.
                    Attached Files

                    Comment


                    • #11
                      Yeah starting a new post under mcsMQTT relating to my issues with the SonOff basics.

                      The 2 SonOff 4Channel Pro's that I configured were not getting on my wireless network for whatever reason until I did the basic Arduino IDE serial update which I think included the WiFi radio. These stayed online for one day fine. I shipped them both to Don after 2 days of testing.

                      Meanwhile went back to my SonOff Wifi basic modules and while the PFSense box showed that they were still on line with a DHCP reservation I could not ping them or get to the GUI on them.

                      I unplugged both of them and plugged one in and it came up for only a few minutes then dropped off the network. Same with the second one. Odd thing is that they do show up when scanning my network and they are authenticating fine to my AP...

                      I have read about these issues on the SonOff forums. SonOff's answer to these issues relating to misconfiguring wireless which personally is a mickey answer to an individual that knows how to configure a wireless client.
                      - Pete

                      Auto mator
                      Homeseer 3 Pro - 3.0.0.534 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU - Mono 6.4X
                      Homeseer Zee2 (Lite) - 3.0.0.534 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro - Mono 6.4X

                      X10, UPB, Zigbee, ZWave and Wifi MQTT automation.

                      Comment


                      • #12
                        I moved to a new house about 6 months ago when I ran MCS sprinklers alongside a Rain 8 Pro.

                        The new place has maybe 11-12 zones.

                        I have been toying with what controller to get: this was looking good, but the fact that it is wifi and people are experiencing drop off with their ubiquitis is troubling.

                        I am now thinking about the OpenSprinkler hard wired ethernet version. Could I get MCS Sprinklers to drive the valves on that?
                        HS3 Pro Edition 3.0.0.435 (Windows Server 8.1 on ESXi box)

                        Plug-Ins Enabled:
                        Z-Wave:,RaspberryIO:,AirplaySpeak:,Ecobee:,
                        weatherXML:,JowiHue:,APCUPSD:,PHLocation:,Chromecast:,EasyTr igger:

                        Comment


                        • #13
                          One option, which has nothing to do with sonoff or mqtt, could be to use a raspberry pi, use the raspberrypiIO plugin to control relays to turn on and off zones. This would require setting up events for the scheduling but EZtrigger might make this fairly easy. Just a thought.

                          Bruce

                          Comment

                          Working...
                          X