We have moved at community.getvera.com

Author Topic: Saltwater Tank & Need Help Config Timer In Seconds  (Read 7468 times)

Offline computerjohn

  • Full Member
  • ***
  • Posts: 189
  • Karma: +0/-0
Saltwater Tank & Need Help Config Timer In Seconds
« on: March 07, 2011, 02:02:11 am »
Hello Everyone,

I have a 90gal saltwater reef tank in my theater room. I have two powerhead pumps that I would like to configure one to run for 20sec then stop & the other pump to run for 20sec then stop & repeat the process. This is what we call wavemaking. The water current flows in one direction & then switches back the other way.  I also only want this to run between certain times. So during it's sleep mode, the livestock can rest.

I have tried to figure this out already & is driving me nuts!  Tomorrow's project is to switch out my X10 modules that are running my 48" T5 fixture with outdoor Z-Wave modules. My custom fish room that I built in my walkout basement already has Z-Wave modules running my equipment in there, so this would be wrapping up this project.

Thank you in advance..   :)

John
Vera2 UI4 (1.1.1245), IT-100, 2x Trane Thermostats, 6x Intermatic HA03 Lamp Modules, 1x Intermatic HA07 Remote, 4x GE 45613 3-way Dimmer Switches, 13x GE45606 Dimmers Switches, 2x GE 45605 Receptacles, 16x GE 45604 Outdoor Modules, 3x GE 45603 Appliance Modules, Automated Saltwater Reef System

Offline oTi@

  • Community Beta
  • Master Member
  • ******
  • Posts: 4041
  • Karma: +32/-6
  • UI what ?!
Re: Saltwater Tank & Need Help Config Timer In Seconds
« Reply #1 on: March 07, 2011, 08:55:35 am »
That's probably going to require some programming.

But I'm not sure if I would use Z-wave to do something (2 things) every 20 seconds. How critical is the timing of this? Would it be an issue if one or both pumps were left on, etc.
Dezwaved at the moment...

Offline raskell

  • Full Member
  • ***
  • Posts: 169
  • Karma: +0/-0
Re: Saltwater Tank & Need Help Config Timer In Seconds
« Reply #2 on: March 07, 2011, 09:14:24 am »
Hello fellow reef keeper.  What you are looking to do is perhaps a bit easier than you are finding it.  I am currently running a sequence like this managing my heated gutters during 'ice dam' forming conditions.  I have two zones of heaters which I can alternate from on to off and vice-versa and after a set time, switiching them.

I presume that you have either a z-wave switch or outlet for each of your pumps.  They do need to be independently controlled for on/off state.  I would recommend that you create a separate room called 'reef tank' and put your devices into that room.   Create a new scene using the scene wizzard and on the command tab, select the room, 'reef tank'  and check the boxes for the two switches or outlets.  On the first one, set it to be on, then after 30 seconds off.  On the second switch set it to be off, then after 30 seconds to be on.  The last step is to create a timer (I would call it flip) set to an interval of every 1 minute.

This would run one wave pump for 30 seconds, run the other pump for 30 seconds then repeat to the original process every minute.  With the standard timers and programming, this is the shortest cycle you could program without custom code, but I believe this should be acceptable for wave control.
 
 
« Last Edit: March 07, 2011, 09:17:22 am by raskell »
Vera2, UI4, Trane/Schlage TStats(6), Schlage LeverLock, GE 3-wayswitches, WD HA14 3-way dimmers, Intermatic Outdoor Module, Hawking door/window sensor(s), VeraLite UI5, Everspring SM-103

Offline aa6vh

  • Hero Member
  • *****
  • Posts: 642
  • Karma: +15/-0
Re: Saltwater Tank & Need Help Config Timer In Seconds
« Reply #3 on: March 07, 2011, 10:15:52 am »
At this link: http://forum.micasaverde.com/index.php?topic=3015.0

is code that is designed to blink the front porch light (to attract attention to the fire department or ambulance in case of emergency). That code could be modified to do what you want.

Offline raskell

  • Full Member
  • ***
  • Posts: 169
  • Karma: +0/-0
Re: Saltwater Tank & Need Help Config Timer In Seconds
« Reply #4 on: March 08, 2011, 09:41:57 am »
@computerjohn

Have you had a chance to try the recommendations?  Please post back and let us know.
Vera2, UI4, Trane/Schlage TStats(6), Schlage LeverLock, GE 3-wayswitches, WD HA14 3-way dimmers, Intermatic Outdoor Module, Hawking door/window sensor(s), VeraLite UI5, Everspring SM-103

Offline oTi@

  • Community Beta
  • Master Member
  • ******
  • Posts: 4041
  • Karma: +32/-6
  • UI what ?!
Re: Saltwater Tank & Need Help Config Timer In Seconds
« Reply #5 on: March 08, 2011, 10:00:59 am »
@computerjohn
Have you had a chance to try the recommendations?  Please post back and let us know.
@raskell, how do you propose to limit running the scenes during certain times of the day only?
« Last Edit: March 08, 2011, 10:38:13 am by oTi@ »
Dezwaved at the moment...

Offline raskell

  • Full Member
  • ***
  • Posts: 169
  • Karma: +0/-0
Re: Saltwater Tank & Need Help Config Timer In Seconds
« Reply #6 on: March 08, 2011, 10:15:58 am »
One of two ways, first one is not an elegant solution because you have to manually enable and disable the timer by edit of the scene.  This is a royal pain since there is no other way to 'stop' a scene that I have found.

The better approach for this appliction is to have a third z-wave switch provide line power to the existing devices which are alternating the pumps.  The on/off periods can then be programmed with another scene for example to turn on the mains at 8:00 am and then after 10 hours, turn off or something to that effect.

I have prototyped this and it seems to work fine, although I am  not currenlty using this type of wave makers in my reef tanks (125Gal & 75Gal).   
Vera2, UI4, Trane/Schlage TStats(6), Schlage LeverLock, GE 3-wayswitches, WD HA14 3-way dimmers, Intermatic Outdoor Module, Hawking door/window sensor(s), VeraLite UI5, Everspring SM-103

Offline oTi@

  • Community Beta
  • Master Member
  • ******
  • Posts: 4041
  • Karma: +32/-6
  • UI what ?!
Re: Saltwater Tank & Need Help Config Timer In Seconds
« Reply #7 on: March 08, 2011, 10:44:47 am »
The better approach for this appliction is to have a third z-wave switch provide line power to the existing devices which are alternating the pumps.
Yep, that would provide a full solution, and is the best that can be accomplished with the GUI, i.e. no programming.
Dezwaved at the moment...

Offline TimAlls

  • Hero Member
  • *****
  • Posts: 722
  • Karma: +0/-0
Re: Saltwater Tank & Need Help Config Timer In Seconds
« Reply #8 on: March 08, 2011, 12:27:53 pm »
I am sure there is a way for this to be worked out but consider this.....
You are asking Vera to tie up its time and resources on an on going basis when a time delay relay could do the same thing and not slow your system down. Have you considered doing this without Vera or is this a programing challenge you want to tackle?
Regards
Tim

Offline raskell

  • Full Member
  • ***
  • Posts: 169
  • Karma: +0/-0
Re: Saltwater Tank & Need Help Config Timer In Seconds
« Reply #9 on: March 08, 2011, 01:13:07 pm »
@TimAlls

It appears to me that this 'task' is a very low overhead scene.  I have run it as a prototype on my system for several hours and nothing else seems to suffer.  Vera simply sits there and doles out the commands. 

Reef Keepers have been looking for creative hardware solutions to simulate wave making for over a decade.  This is the first I have seen using z-wave to tackle it.  I would think that as long as nothing else is compromised in the sytem, getting some longer term experience with cycling these devices can only be goodness. IMHO
Vera2, UI4, Trane/Schlage TStats(6), Schlage LeverLock, GE 3-wayswitches, WD HA14 3-way dimmers, Intermatic Outdoor Module, Hawking door/window sensor(s), VeraLite UI5, Everspring SM-103

Offline computerjohn

  • Full Member
  • ***
  • Posts: 189
  • Karma: +0/-0
Re: Saltwater Tank & Need Help Config Timer In Seconds
« Reply #10 on: March 10, 2011, 01:13:28 am »
Hello everyone,

Sorry I haven't checked in, but been very busy with some work projects.
Vera2 UI4 (1.1.1245), IT-100, 2x Trane Thermostats, 6x Intermatic HA03 Lamp Modules, 1x Intermatic HA07 Remote, 4x GE 45613 3-way Dimmer Switches, 13x GE45606 Dimmers Switches, 2x GE 45605 Receptacles, 16x GE 45604 Outdoor Modules, 3x GE 45603 Appliance Modules, Automated Saltwater Reef System

Offline computerjohn

  • Full Member
  • ***
  • Posts: 189
  • Karma: +0/-0
Re: Saltwater Tank & Need Help Config Timer In Seconds
« Reply #11 on: March 10, 2011, 01:25:04 am »
Hello fellow reefer indeed.  ;D

I could this with a reef controller which I plan on still purchasing, looking at the Reef Angel.  I'm going to be using GE Outdoor modules for three reasons. One cost, two the simple fact they are weather proof & would be protected from the harsh elements, & three the heavy duty construction of the module & the demand of it's use.

I already have two room configured in Vera, Fish Room & 90Gal DT. The Fish Room houses all my equipment (return pumps, ATO, skimmer, heater, refuge light & my 29gal frag/QT). The 90Gal DT will be my lighting, moonlights, & power heads which are 2  Koralia Evolution 1400's. Yes, each powerhead will have it's own Z-Wave module, which is the only way this would be possible.  I do have a RedSea Wave Master Pro, but I can't stand the way it controls my wave making & it is not custom configurable.

I'll give it a try. Thank you..

Hello fellow reef keeper.  What you are looking to do is perhaps a bit easier than you are finding it.  I am currently running a sequence like this managing my heated gutters during 'ice dam' forming conditions.  I have two zones of heaters which I can alternate from on to off and vice-versa and after a set time, switiching them.

I presume that you have either a z-wave switch or outlet for each of your pumps.  They do need to be independently controlled for on/off state.  I would recommend that you create a separate room called 'reef tank' and put your devices into that room.   Create a new scene using the scene wizzard and on the command tab, select the room, 'reef tank'  and check the boxes for the two switches or outlets.  On the first one, set it to be on, then after 30 seconds off.  On the second switch set it to be off, then after 30 seconds to be on.  The last step is to create a timer (I would call it flip) set to an interval of every 1 minute.

This would run one wave pump for 30 seconds, run the other pump for 30 seconds then repeat to the original process every minute.  With the standard timers and programming, this is the shortest cycle you could program without custom code, but I believe this should be acceptable for wave control.
 
 
Vera2 UI4 (1.1.1245), IT-100, 2x Trane Thermostats, 6x Intermatic HA03 Lamp Modules, 1x Intermatic HA07 Remote, 4x GE 45613 3-way Dimmer Switches, 13x GE45606 Dimmers Switches, 2x GE 45605 Receptacles, 16x GE 45604 Outdoor Modules, 3x GE 45603 Appliance Modules, Automated Saltwater Reef System

Offline aa6vh

  • Hero Member
  • *****
  • Posts: 642
  • Karma: +15/-0
Re: Saltwater Tank & Need Help Config Timer In Seconds
« Reply #12 on: March 10, 2011, 10:35:18 am »
Had a few spare moments, and was bored, so I modified this LUA code to do what you want. In the following code, 29 is the device number for the first device (plug/module), and 30 is the device number for the second device. You would need to substitute your actual device number.


Scene 1 LUA code (use a timer to envoke scene when you want the wave action to start):

function RunLeft(stuff)
  if (sWave == "1") then
    luup.call_action("urn:upnp-org:serviceId:SwitchPower1","SetTarget",{ newTargetValue="1" },29)
    luup.call_action("urn:upnp-org:serviceId:SwitchPower1","SetTarget",{ newTargetValue="0" },30)
    luup.call_timer("RunRight", 1, "20", "", "")
  end
end
function RunRight(stuff)
  if (sWave == "1") then
    luup.call_action("urn:upnp-org:serviceId:SwitchPower1","SetTarget",{ newTargetValue="0" },29)
    luup.call_action("urn:upnp-org:serviceId:SwitchPower1","SetTarget",{ newTargetValue="1" },30)
    luup.call_timer("RunLeft", 1, "20", "", "")
  end
end
sWave = "1"
luup.call_timer("RunLeft", 1, "1", "", "")

Scene 2 LUA code (use a timer to envoke scene when you want the wave action to cease):

sWave = "0"
luup.call_action("urn:upnp-org:serviceId:SwitchPower1","SetTarget",{ newTargetValue="0" },29)
luup.call_action("urn:upnp-org:serviceId:SwitchPower1","SetTarget",{ newTargetValue="0" },30)

Offline computerjohn

  • Full Member
  • ***
  • Posts: 189
  • Karma: +0/-0
Re: Saltwater Tank & Need Help Config Timer In Seconds
« Reply #13 on: March 10, 2011, 11:59:27 pm »
aa6vh many thanks my friend!!! I just added the modules, created the scenes & added the coding.  It's works perfectly.  So, basically the LUA code are scripts calling sub routines. Is there a master list or manual for this?

Many thanks, this is what I was looking for.   ;)

Had a few spare moments, and was bored, so I modified this LUA code to do what you want. In the following code, 29 is the device number for the first device (plug/module), and 30 is the device number for the second device. You would need to substitute your actual device number.


Scene 1 LUA code (use a timer to envoke scene when you want the wave action to start):

function RunLeft(stuff)
  if (sWave == "1") then
    luup.call_action("urn:upnp-org:serviceId:SwitchPower1","SetTarget",{ newTargetValue="1" },29)
    luup.call_action("urn:upnp-org:serviceId:SwitchPower1","SetTarget",{ newTargetValue="0" },30)
    luup.call_timer("RunRight", 1, "20", "", "")
  end
end
function RunRight(stuff)
  if (sWave == "1") then
    luup.call_action("urn:upnp-org:serviceId:SwitchPower1","SetTarget",{ newTargetValue="0" },29)
    luup.call_action("urn:upnp-org:serviceId:SwitchPower1","SetTarget",{ newTargetValue="1" },30)
    luup.call_timer("RunLeft", 1, "20", "", "")
  end
end
sWave = "1"
luup.call_timer("RunLeft", 1, "1", "", "")

Scene 2 LUA code (use a timer to envoke scene when you want the wave action to cease):

sWave = "0"
luup.call_action("urn:upnp-org:serviceId:SwitchPower1","SetTarget",{ newTargetValue="0" },29)
luup.call_action("urn:upnp-org:serviceId:SwitchPower1","SetTarget",{ newTargetValue="0" },30)

Vera2 UI4 (1.1.1245), IT-100, 2x Trane Thermostats, 6x Intermatic HA03 Lamp Modules, 1x Intermatic HA07 Remote, 4x GE 45613 3-way Dimmer Switches, 13x GE45606 Dimmers Switches, 2x GE 45605 Receptacles, 16x GE 45604 Outdoor Modules, 3x GE 45603 Appliance Modules, Automated Saltwater Reef System

Offline computerjohn

  • Full Member
  • ***
  • Posts: 189
  • Karma: +0/-0
Re: Saltwater Tank & Need Help Config Timer In Seconds
« Reply #14 on: March 14, 2011, 10:23:25 pm »
Just to give everone an update. I have been running this configuration for 4 days now and runs from 4:00pm til 2:00am every 20sec without one problem or misfire. I haven't notice this giving Vera any load what so ever to where my other scenes are being affected.

Here's a pic of my 90gal Reef Tank that it is running on.
« Last Edit: March 14, 2011, 10:33:50 pm by computerjohn »
Vera2 UI4 (1.1.1245), IT-100, 2x Trane Thermostats, 6x Intermatic HA03 Lamp Modules, 1x Intermatic HA07 Remote, 4x GE 45613 3-way Dimmer Switches, 13x GE45606 Dimmers Switches, 2x GE 45605 Receptacles, 16x GE 45604 Outdoor Modules, 3x GE 45603 Appliance Modules, Automated Saltwater Reef System