Irrigation Controller (up to 16 valves with Shift Registers)
-
@BulldogLowell
HI
Thanks for the post. On LCD there is no info about Time Synchronisation fail. It stops, as previously on info: Updating Valve : 0
So I cant check if the RTC is working
treb0rdid you get your RTC connected and tested?
-
did you get your RTC connected and tested?
@BulldogLowell
Yes, RTC is connected and tested with different sketches (just to check if RTC work correctly). Works ok.
With your correctes projects, as above mentioned: On LCD there is no info neither about Time Synchronisation, nor about Time Synchronisation fail. It stops, as previously on info: Updating Valve : 0
treb0r -
Yes, since clock no longer needs to call server for time, synchronizing is not necessary.
You should post serial output or show a video.
Did you find out if Domoticz supports V_VAR1?
-
Yes, since clock no longer needs to call server for time, synchronizing is not necessary.
You should post serial output or show a video.
Did you find out if Domoticz supports V_VAR1?
@BulldogLowell
OK, I will post the video. If I will manage I will also post serial output
treb0r -
@BulldogLowell
OK, I will post the video. If I will manage I will also post serial output
treb0r@treb0r @BulldogLowel I had a chance to play a little bit with VAR1 this weekend. I verified that if you declare MyMessage var(CHILD_ID, V_VAR1); you can set it with gw.send(var.set("hello")); and request its value from the gateway using gw.request(CHILD_ID, V_VAR1);. you will get the answer in the incoming message handler under the V_VAR1 message
if (message.type==V_VAR1) { Serial.println("got var1 answer"); Serial.println(message.getString()); }However I still didn't manage to find how to access or show these values on the domoticz. their site crashed so couldn't ask this in the forum
-
@Moshe-Livne Domoticz (as of today) doesn't support V_VARx ...
-
@Moshe-Livne Domoticz (as of today) doesn't support V_VARx ...
@epierre it does but in a strange way. The vars are not display vars. They are stored in the db and can be fetched and set only by the sensor. Tried it, it works....
-
@Moshe-Livne this is not what @GizMoCuz said in a post... strange...
-
@Moshe-Livne this is not what @GizMoCuz said in a post... strange...
@epierre can you please link to the post?
-
-
@epierre He meant in the sense that it does not display or use it for anything. he said there "it is used to store/retrieve variables". The thread was about the option to show the vars as part of the sensor output. for storing and retrieving, it works.... verified.... I might get annoyed enough to add to the code that the lua script can also retrieve these vars and then it would be sweet.....
-
ok good although it was not explicit... now I'll have to go back to him about water meter that heavily use V_VARs but is recognized.... as a power meter...
-
Hello
And thx for a nice forum, I did build the irrigation controller and tried to connect it to Domoticz. Everything just seems fine, LCD works, push button works and I can turn on the irrigation from Domoticz and it shows in the LCD.But the problem is that it doesn't switch the relays on, it just says "no valve time" and then go watering cycle complete.
Any suggestions on what the problem might be...... Domoticz?
Regards
-
Hello
And thx for a nice forum, I did build the irrigation controller and tried to connect it to Domoticz. Everything just seems fine, LCD works, push button works and I can turn on the irrigation from Domoticz and it shows in the LCD.But the problem is that it doesn't switch the relays on, it just says "no valve time" and then go watering cycle complete.
Any suggestions on what the problem might be...... Domoticz?
Regards
I don't have Domoticz but I suspect that the callback isn't functioning.
try populating the array with the desired times for each sequence. replace this:
int allZoneTime [NUMBER_OF_VALVES + 1]; int valveSoloTime [NUMBER_OF_VALVES + 1];with something like this:
int allZoneTime [NUMBER_OF_VALVES + 1] = {0, 10, 10, 10, 5,<... how many valves you have with zero in the first position>} ; int valveSoloTime [NUMBER_OF_VALVES + 1] = {0, 5, 5, 5, 5,<... how many valves you have with zero in the first position>};This will load in the times that the program uses as your 'default' values. Then, you can check with Domoticz experts on getting the V_VAR variables working.
-
Hi
I tried the code but it didn't compile, and I'm not good enough to be sure whats wrong.I did try change the code and I did get it to compile, but I don't know if I got it right. You can see the lame attempt below the colored line.
Clearly you understand that you are to put the times for each of the valve zones, led by a zero into the array, and not copy my verbatim instructions...
How many valves do you have? You need that many (plus one) integer numbers separated by commas...
Example 8 valves:
...= {0,5,5,5,5,5,5,5,5};You've commented out the wrong lines.
-
The inserted values in the array works from start, but it looks like the irrigation controller immediately starts to request valve data from the controller for variable1 and 2. As we cant set variable1 and 2 in Domoticz I guess it returns 0 and overwrite the inserted values in the arrays...or is it anything else happening?
Initialising... Turning All Valves Off... Unable to sync with the RTC Checking EEPROM for stored date: Retreiving last run time from EEPROM... send: 7-7-0-0 s=255,c=0,t=17,pt=0,l=3,sg=0,st=ok:1.5 send: 7-7-0-0 s=255,c=3,t=6,pt=1,l=1,sg=0,st=ok:0 read: 0-0-7 s=255,c=3,t=6,pt=0,l=1,sg=0:M sensor started, id=7, parent=0, distance=1 send: 7-7-0-0 s=255,c=3,t=11,pt=0,l=11,sg=0,st=ok:MySprinkler send: 7-7-0-0 s=255,c=3,t=12,pt=0,l=6,sg=0,st=ok:2.0nsr send: 7-7-0-0 s=0,c=0,t=3,pt=0,l=0,sg=0,st=ok: send: 7-7-0-0 s=1,c=0,t=3,pt=0,l=0,sg=0,st=ok: send: 7-7-0-0 s=2,c=0,t=3,pt=0,l=0,sg=0,st=ok: send: 7-7-0-0 s=3,c=0,t=3,pt=0,l=0,sg=0,st=ok: send: 7-7-0-0 s=4,c=0,t=3,pt=0,l=0,sg=0,st=ok: Sensor Presentation Complete Ready... Calling for Valve 0 Data... send: 7-7-0-0 s=0,c=2,t=24,pt=0,l=0,sg=0,st=ok: read: 0-0-7 s=0,c=2,t=24,pt=0,l=0,sg=0: Recieved variable1 valve:0 = 0 send: 7-7-0-0 s=0,c=2,t=25,pt=0,l=0,sg=0,st=ok: read: 0-0-7 s=0,c=2,t=25,pt=0,l=0,sg=0: Recieved variable2 valve:0 = 0 send: 7-7-0-0 s=0,c=2,t=26,pt=0,l=0,sg=0,st=ok: read: 0-0-7 s=0,c=2,t=26,pt=0,l=0,sg=0: No Name Recieved for zone 0 Calling for Valve 1 Data... send: 7-7-0-0 s=1,c=2,t=24,pt=0,l=0,sg=0,st=ok: read: 0-0-7 s=1,c=2,t=24,pt=0,l=0,sg=0: Recieved variable1 valve:1 = 0 New Zone Times Recieved... Zone 1 individual time: 1 group time: 0 Zone 2 individual time: 1 group time: 1 Zone 3 individual time: 1 group time: 1 Zone 4 individual time: 1 group time: 1 send: 7-7-0-0 s=1,c=2,t=25,pt=0,l=0,sg=0,st=ok: read: 0-0-7 s=1,c=2,t=25,pt=0,l=0,sg=0: Recieved variable2 valve:1 = 0 New Zone Times Recieved... Zone 1 individual time: 0 group time: 0 Zone 2 individual time: 1 group time: 1 Zone 3 individual time: 1 group time: 1 Zone 4 individual time: 1 group time: 1 send: 7-7-0-0 s=1,c=2,t=26,pt=0,l=0,sg=0,st=ok: read: 0-0-7 s=1,c=2,t=26,pt=0,l=0,sg=0: No Name Recieved for zone 1 Calling for Valve 2 Data... send: 7-7-0-0 s=2,c=2,t=24,pt=0,l=0,sg=0,st=ok: read: 0-0-7 s=2,c=2,t=24,pt=0,l=0,sg=0: Recieved variable1 valve:2 = 0 New Zone Times Recieved... Zone 1 individual time: 0 group time: 0 Zone 2 individual time: 1 group time: 0 Zone 3 individual time: 1 group time: 1 Zone 4 individual time: 1 group time: 1 send: 7-7-0-0 s=2,c=2,t=25,pt=0,l=0,sg=0,st=ok: read: 0-0-7 s=2,c=2,t=25,pt=0,l=0,sg=0: Recieved variable2 valve:2 = 0 New Zone Times Recieved... Zone 1 individual time: 0 group time: 0 Zone 2 individual time: 0 group time: 0 Zone 3 individual time: 1 group time: 1 Zone 4 individual time: 1 group time: 1 send: 7-7-0-0 s=2,c=2,t=26,pt=0,l=0,sg=0,st=ok: read: 0-0-7 s=2,c=2,t=26,pt=0,l=0,sg=0: No Name Recieved for zone 2 Calling for Valve 3 Data... send: 7-7-0-0 s=3,c=2,t=24,pt=0,l=0,sg=0,st=ok: read: 0-0-7 s=3,c=2,t=24,pt=0,l=0,sg=0: Recieved variable1 valve:3 = 0 New Zone Times Recieved... Zone 1 individual time: 0 group time: 0 Zone 2 individual time: 0 group time: 0 Zone 3 individual time: 1 group time: 0 Zone 4 individual time: 1 group time: 1 send: 7-7-0-0 s=3,c=2,t=25,pt=0,l=0,sg=0,st=ok: read: 0-0-7 s=3,c=2,t=25,pt=0,l=0,sg=0: Recieved variable2 valve:3 = 0 New Zone Times Recieved... Zone 1 individual time: 0 group time: 0 Zone 2 individual time: 0 group time: 0 Zone 3 individual time: 0 group time: 0 Zone 4 individual time: 1 group time: 1 send: 7-7-0-0 s=3,c=2,t=26,pt=0,l=0,sg=0,st=ok: read: 0-0-7 s=3,c=2,t=26,pt=0,l=0,sg=0: No Name Recieved for zone 3 Calling for Valve 4 Data... send: 7-7-0-0 s=4,c=2,t=24,pt=0,l=0,sg=0,st=ok: read: 0-0-7 s=4,c=2,t=24,pt=0,l=0,sg=0: Recieved variable1 valve:4 = 0 New Zone Times Recieved... Zone 1 individual time: 0 group time: 0 Zone 2 individual time: 0 group time: 0 Zone 3 individual time: 0 group time: 0 Zone 4 individual time: 1 group time: 0 send: 7-7-0-0 s=4,c=2,t=25,pt=0,l=0,sg=0,st=ok: read: 0-0-7 s=4,c=2,t=25,pt=0,l=0,sg=0: Recieved variable2 valve:4 = 0 New Zone Times Recieved... Zone 1 individual time: 0 group time: 0 Zone 2 individual time: 0 group time: 0 Zone 3 individual time: 0 group time: 0 Zone 4 individual time: 0 group time: 0 send: 7-7-0-0 s=4,c=2,t=26,pt=0,l=0,sg=0,st=ok: read: 0-0-7 s=4,c=2,t=26,pt=0,l=0,sg=0: No Name Recieved for zone 4 -
The inserted values in the array works from start, but it looks like the irrigation controller immediately starts to request valve data from the controller for variable1 and 2. As we cant set variable1 and 2 in Domoticz I guess it returns 0 and overwrite the inserted values in the arrays...or is it anything else happening?
Initialising... Turning All Valves Off... Unable to sync with the RTC Checking EEPROM for stored date: Retreiving last run time from EEPROM... send: 7-7-0-0 s=255,c=0,t=17,pt=0,l=3,sg=0,st=ok:1.5 send: 7-7-0-0 s=255,c=3,t=6,pt=1,l=1,sg=0,st=ok:0 read: 0-0-7 s=255,c=3,t=6,pt=0,l=1,sg=0:M sensor started, id=7, parent=0, distance=1 send: 7-7-0-0 s=255,c=3,t=11,pt=0,l=11,sg=0,st=ok:MySprinkler send: 7-7-0-0 s=255,c=3,t=12,pt=0,l=6,sg=0,st=ok:2.0nsr send: 7-7-0-0 s=0,c=0,t=3,pt=0,l=0,sg=0,st=ok: send: 7-7-0-0 s=1,c=0,t=3,pt=0,l=0,sg=0,st=ok: send: 7-7-0-0 s=2,c=0,t=3,pt=0,l=0,sg=0,st=ok: send: 7-7-0-0 s=3,c=0,t=3,pt=0,l=0,sg=0,st=ok: send: 7-7-0-0 s=4,c=0,t=3,pt=0,l=0,sg=0,st=ok: Sensor Presentation Complete Ready... Calling for Valve 0 Data... send: 7-7-0-0 s=0,c=2,t=24,pt=0,l=0,sg=0,st=ok: read: 0-0-7 s=0,c=2,t=24,pt=0,l=0,sg=0: Recieved variable1 valve:0 = 0 send: 7-7-0-0 s=0,c=2,t=25,pt=0,l=0,sg=0,st=ok: read: 0-0-7 s=0,c=2,t=25,pt=0,l=0,sg=0: Recieved variable2 valve:0 = 0 send: 7-7-0-0 s=0,c=2,t=26,pt=0,l=0,sg=0,st=ok: read: 0-0-7 s=0,c=2,t=26,pt=0,l=0,sg=0: No Name Recieved for zone 0 Calling for Valve 1 Data... send: 7-7-0-0 s=1,c=2,t=24,pt=0,l=0,sg=0,st=ok: read: 0-0-7 s=1,c=2,t=24,pt=0,l=0,sg=0: Recieved variable1 valve:1 = 0 New Zone Times Recieved... Zone 1 individual time: 1 group time: 0 Zone 2 individual time: 1 group time: 1 Zone 3 individual time: 1 group time: 1 Zone 4 individual time: 1 group time: 1 send: 7-7-0-0 s=1,c=2,t=25,pt=0,l=0,sg=0,st=ok: read: 0-0-7 s=1,c=2,t=25,pt=0,l=0,sg=0: Recieved variable2 valve:1 = 0 New Zone Times Recieved... Zone 1 individual time: 0 group time: 0 Zone 2 individual time: 1 group time: 1 Zone 3 individual time: 1 group time: 1 Zone 4 individual time: 1 group time: 1 send: 7-7-0-0 s=1,c=2,t=26,pt=0,l=0,sg=0,st=ok: read: 0-0-7 s=1,c=2,t=26,pt=0,l=0,sg=0: No Name Recieved for zone 1 Calling for Valve 2 Data... send: 7-7-0-0 s=2,c=2,t=24,pt=0,l=0,sg=0,st=ok: read: 0-0-7 s=2,c=2,t=24,pt=0,l=0,sg=0: Recieved variable1 valve:2 = 0 New Zone Times Recieved... Zone 1 individual time: 0 group time: 0 Zone 2 individual time: 1 group time: 0 Zone 3 individual time: 1 group time: 1 Zone 4 individual time: 1 group time: 1 send: 7-7-0-0 s=2,c=2,t=25,pt=0,l=0,sg=0,st=ok: read: 0-0-7 s=2,c=2,t=25,pt=0,l=0,sg=0: Recieved variable2 valve:2 = 0 New Zone Times Recieved... Zone 1 individual time: 0 group time: 0 Zone 2 individual time: 0 group time: 0 Zone 3 individual time: 1 group time: 1 Zone 4 individual time: 1 group time: 1 send: 7-7-0-0 s=2,c=2,t=26,pt=0,l=0,sg=0,st=ok: read: 0-0-7 s=2,c=2,t=26,pt=0,l=0,sg=0: No Name Recieved for zone 2 Calling for Valve 3 Data... send: 7-7-0-0 s=3,c=2,t=24,pt=0,l=0,sg=0,st=ok: read: 0-0-7 s=3,c=2,t=24,pt=0,l=0,sg=0: Recieved variable1 valve:3 = 0 New Zone Times Recieved... Zone 1 individual time: 0 group time: 0 Zone 2 individual time: 0 group time: 0 Zone 3 individual time: 1 group time: 0 Zone 4 individual time: 1 group time: 1 send: 7-7-0-0 s=3,c=2,t=25,pt=0,l=0,sg=0,st=ok: read: 0-0-7 s=3,c=2,t=25,pt=0,l=0,sg=0: Recieved variable2 valve:3 = 0 New Zone Times Recieved... Zone 1 individual time: 0 group time: 0 Zone 2 individual time: 0 group time: 0 Zone 3 individual time: 0 group time: 0 Zone 4 individual time: 1 group time: 1 send: 7-7-0-0 s=3,c=2,t=26,pt=0,l=0,sg=0,st=ok: read: 0-0-7 s=3,c=2,t=26,pt=0,l=0,sg=0: No Name Recieved for zone 3 Calling for Valve 4 Data... send: 7-7-0-0 s=4,c=2,t=24,pt=0,l=0,sg=0,st=ok: read: 0-0-7 s=4,c=2,t=24,pt=0,l=0,sg=0: Recieved variable1 valve:4 = 0 New Zone Times Recieved... Zone 1 individual time: 0 group time: 0 Zone 2 individual time: 0 group time: 0 Zone 3 individual time: 0 group time: 0 Zone 4 individual time: 1 group time: 0 send: 7-7-0-0 s=4,c=2,t=25,pt=0,l=0,sg=0,st=ok: read: 0-0-7 s=4,c=2,t=25,pt=0,l=0,sg=0: Recieved variable2 valve:4 = 0 New Zone Times Recieved... Zone 1 individual time: 0 group time: 0 Zone 2 individual time: 0 group time: 0 Zone 3 individual time: 0 group time: 0 Zone 4 individual time: 0 group time: 0 send: 7-7-0-0 s=4,c=2,t=26,pt=0,l=0,sg=0,st=ok: read: 0-0-7 s=4,c=2,t=26,pt=0,l=0,sg=0: No Name Recieved for zone 4try commenting out this in
setup():/* for (byte i = 0; i <= NUMBER_OF_VALVES; i++) { pinMode(relayPin[i], OUTPUT); lcd.print(F(" Updating ")); lcd.setCursor(0, 1); lcd.print(F(" Valve Data: ")); lcd.print(i); boolean flashIcon = false; DEBUG_PRINT(F("Calling for Valve ")); DEBUG_PRINT(i); DEBUG_PRINTLN(F(" Data...")); while (gw.process() == false) { lcd.setCursor(15, 0); flashIcon = !flashIcon; flashIcon ? lcd.write(byte(1)) : lcd.print(F(" ")); gw.request(i, V_VAR1); delay(100); } while (gw.process() == false) { lcd.setCursor(15, 0); flashIcon = !flashIcon; flashIcon ? lcd.write(byte(1)) : lcd.print(F(" ")); gw.request(i, V_VAR2); delay(100); } while (gw.process() == false) { lcd.setCursor(15, 0); flashIcon = !flashIcon; flashIcon ? lcd.write(byte(1)) : lcd.print(F(" ")); gw.request(i, V_VAR3); delay(100); } }*/and this in
loop()://goGetValveTimes();That will disable those callbacks and you should be OK with a HardCoded time table for the valves and valve names.