Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. My Project
  3. Irrigation Controller (up to 16 valves with Shift Registers)

Irrigation Controller (up to 16 valves with Shift Registers)

Scheduled Pinned Locked Moved My Project
371 Posts 56 Posters 248.8k Views 52 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • dbemowskD dbemowsk

    Okay, so I was just looking over the code. I first did a search for "Valve Data:" as that was what was showing on the screen. I found that in the goGetValveTimes() method. According to the code, that is only supposed to show if the inSetup variable evaluates to true. I then searched on that variable, and in the code just before the setup() method, I see this:

    bool inSetup = true;
    

    But I don't see anywhere in the code where it sets that value to false. So every time the main loop() calls goGetValveTimes();, it is going to display that since inSetup never gets changed to false. At the very end of the setup routine I see this bit of code:

    //
      //Update valve data when first powered on 
      for (byte i = 1; i <= NUMBER_OF_VALVES; i++)
      {
        lcd.clear();
        goGetValveTimes();
      }
      lcd.clear();
    

    I think that it is just after that for loop, or after the lcd.clear(); that it is supposed to set inSetup to false. I have not tested this theory yet as I need to unmount my controller and open it up to push the new code to it, but I am pretty sure that this is the issue. That would explain why everything else with it appears to work normally.

    I double checked with the example code on the build page to see if possibly I may have deleted something when doing my edits. Looking it over, I found the same thing. If you ask me, this looks to be a bug in the code and it should be fixed and updated.

    T Offline
    T Offline
    Topdawg2881
    wrote on last edited by
    #294

    @dbemowsk
    I am in front of my computer and I have my controller in front of me and hooked up. Give me a couple minutes and I will run it. See what happens.

    1 Reply Last reply
    0
    • dbemowskD Offline
      dbemowskD Offline
      dbemowsk
      wrote on last edited by dbemowsk
      #295

      I just made the change and tested it. That was definitely the problem. Works perfect now.

      Not sure who can change the example code, but all that needs to be added is this:

      //
        //Update valve data when first powered on 
        for (byte i = 1; i <= NUMBER_OF_VALVES; i++)
        {
          lcd.clear();
          goGetValveTimes();
        }
        lcd.clear();
        //Add this line
        inSetup = false;
      

      Vera Plus running UI7 with MySensors, Sonoffs and 1-Wire devices
      Visit my website for more Bits, Bytes and Ramblings from me: http://dan.bemowski.info/

      T 1 Reply Last reply
      0
      • dbemowskD dbemowsk

        I just made the change and tested it. That was definitely the problem. Works perfect now.

        Not sure who can change the example code, but all that needs to be added is this:

        //
          //Update valve data when first powered on 
          for (byte i = 1; i <= NUMBER_OF_VALVES; i++)
          {
            lcd.clear();
            goGetValveTimes();
          }
          lcd.clear();
          //Add this line
          inSetup = false;
        
        T Offline
        T Offline
        Topdawg2881
        wrote on last edited by
        #296

        @dbemowsk
        You beat me too it. I added the same line in same location and it works perfect. Every so often I see the raindrop icon to show that it is pulling data to update the valve times.

        1 Reply Last reply
        0
        • dbemowskD Offline
          dbemowskD Offline
          dbemowsk
          wrote on last edited by
          #297

          So it is definitely a confirmed bug. I ended up finding some old sample code from when I started this last year and this bit of code was actually in the setup method and not in goGetValveTimes:

                lcd.print(F(" Updating  "));
                lcd.setCursor(0, 1);
                lcd.print(F(" Valve Data: "));
                lcd.print(valveIndex);
          

          So some time in the past year the sample code had been changed.

          Vera Plus running UI7 with MySensors, Sonoffs and 1-Wire devices
          Visit my website for more Bits, Bytes and Ramblings from me: http://dan.bemowski.info/

          BulldogLowellB 1 Reply Last reply
          0
          • dbemowskD dbemowsk

            So it is definitely a confirmed bug. I ended up finding some old sample code from when I started this last year and this bit of code was actually in the setup method and not in goGetValveTimes:

                  lcd.print(F(" Updating  "));
                  lcd.setCursor(0, 1);
                  lcd.print(F(" Valve Data: "));
                  lcd.print(valveIndex);
            

            So some time in the past year the sample code had been changed.

            BulldogLowellB Offline
            BulldogLowellB Offline
            BulldogLowell
            Contest Winner
            wrote on last edited by
            #298

            @dbemowsk

            good to see you found it. I haven't looked at the code for two years, and mine is still working. (@petewill 's demo worked well too). there must have been some change that managed its way into the source

            maybe look on GitHub and do a pull request if you the problem is there...

            1 Reply Last reply
            0
            • tombstoneT Offline
              tombstoneT Offline
              tombstone
              wrote on last edited by
              #299

              Hi I just order all the parts that was listed. Do I need to read the 230 post or it's ok just watched the video.

              dbemowskD 1 Reply Last reply
              0
              • tombstoneT tombstone

                Hi I just order all the parts that was listed. Do I need to read the 230 post or it's ok just watched the video.

                dbemowskD Offline
                dbemowskD Offline
                dbemowsk
                wrote on last edited by
                #300

                @tombstone You shouldn't need to read all the posts. Maybe just search the thread if you run into any snags. What kind of setup are you dropping this into? Do you currently have valves installed? Does your setup have a master valve or pump relay? Is it a standard 24V AC system?

                Vera Plus running UI7 with MySensors, Sonoffs and 1-Wire devices
                Visit my website for more Bits, Bytes and Ramblings from me: http://dan.bemowski.info/

                1 Reply Last reply
                0
                • tombstoneT Offline
                  tombstoneT Offline
                  tombstone
                  wrote on last edited by
                  #301

                  Ok I read it all. Just want to start with the basic then change to pH reader soil reader water reader rain detector.

                  1 Reply Last reply
                  0
                  • tombstoneT Offline
                    tombstoneT Offline
                    tombstone
                    wrote on last edited by
                    #302

                    It's really hard to work out what's good post over bad post. Lol

                    1 Reply Last reply
                    0
                    • tombstoneT Offline
                      tombstoneT Offline
                      tombstone
                      wrote on last edited by
                      #303

                      Its my 1st project and I have learnt alot but have got myself a snag and I am getting this....

                      Arduino: 1.8.3 (Windows 10), Board: "Arduino Pro or Pro Mini, ATmega328 (5V, 16 MHz)"

                      C:\Users\HTPC\Documents\Arduino\Irrigation_Controller_1\Irrigation_Controller_1..ino:82:21: fatal error: TimeLib.h: No such file or directory

                      #include <TimeLib.h>

                                       ^
                      

                      compilation terminated.

                      exit status 1
                      Error compiling for board Arduino Pro or Pro Mini.

                      1 Reply Last reply
                      0
                      • gohanG Offline
                        gohanG Offline
                        gohan
                        Mod
                        wrote on last edited by
                        #304

                        go to library manager and install Time library

                        tombstoneT 1 Reply Last reply
                        0
                        • tombstoneT Offline
                          tombstoneT Offline
                          tombstone
                          wrote on last edited by
                          #305
                          This post is deleted!
                          1 Reply Last reply
                          0
                          • tombstoneT Offline
                            tombstoneT Offline
                            tombstone
                            wrote on last edited by
                            #306
                            This post is deleted!
                            1 Reply Last reply
                            0
                            • tombstoneT Offline
                              tombstoneT Offline
                              tombstone
                              wrote on last edited by
                              #307
                              This post is deleted!
                              1 Reply Last reply
                              0
                              • gohanG gohan

                                go to library manager and install Time library

                                tombstoneT Offline
                                tombstoneT Offline
                                tombstone
                                wrote on last edited by
                                #308
                                This post is deleted!
                                1 Reply Last reply
                                0
                                • tombstoneT Offline
                                  tombstoneT Offline
                                  tombstone
                                  wrote on last edited by
                                  #309

                                  ok I almost there :-D but my pro mini has just Analog 1 to 3. I say I have to change the coda were abouts...
                                  I also have not setup up my Vera Controller as I see you have to pay...

                                  Is there another one that is eazy as I have try some but can not get it to work. eg HomeGenie is download and on my pc but don't think its not to good. don't know how to find my pro mini. happy to chagaen to someing eazer to get me started thanks guys....

                                  1 Reply Last reply
                                  0
                                  • tombstoneT Offline
                                    tombstoneT Offline
                                    tombstone
                                    wrote on last edited by
                                    #310

                                    Domoticz LOOKS :-D GOOD
                                    BUT new to all this :-D

                                    1 Reply Last reply
                                    0
                                    • Black CatB Offline
                                      Black CatB Offline
                                      Black Cat
                                      wrote on last edited by
                                      #311

                                      If you are looking for Software, try openhab.

                                      You need to buy Vera, but the software is free.

                                      tombstoneT 1 Reply Last reply
                                      0
                                      • Black CatB Black Cat

                                        If you are looking for Software, try openhab.

                                        You need to buy Vera, but the software is free.

                                        tombstoneT Offline
                                        tombstoneT Offline
                                        tombstone
                                        wrote on last edited by
                                        #312

                                        @Black-Cat thanks 😁

                                        1 Reply Last reply
                                        0
                                        • tombstoneT Offline
                                          tombstoneT Offline
                                          tombstone
                                          wrote on last edited by
                                          #313

                                          ok so when adding to Domoticz..
                                          I go to hardware...
                                          I name is..... test...
                                          then choose.. MySensors Gateway with LAN interface....
                                          Data Timeout: .... Disabled.....
                                          Remote Address.... (I have tryed)....

                                          IP Address, Subnet Mask, Default Gateway, Primary DNS, Secondary DNS.

                                          (i try everythinbg I can think of and still not work)

                                          Port: ... 5003
                                          My pro min has the red light on and blink blue occassionally.

                                          what I get from the Domoticz log is

                                          
                                          
                                          2017-07-30 18:00:00.627 Error: MySensors: Can not connect to: 61.9.211.33:5003
                                          2017-07-30 18:00:00.627 TCP: Connection problem (Unable to connect to specified IP/Port)
                                          2017-07-30 18:00:00.627 TCP: Reconnecting in 30 seconds...
                                          '''
                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          12

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.1k

                                          Posts


                                          Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • MySensors
                                          • OpenHardware.io
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular