Saltwater Tank & Need Help Config Timer In Seconds

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… :slight_smile:

John

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.

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.

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.

@computerjohn

Have you had a chance to try the recommendations? Please post back and let us know.

[quote=“raskell, post:5, topic:167793”]@computerjohn
Have you had a chance to try the recommendations? Please post back and let us know.[/quote]
@raskell, how do you propose to limit running the scenes during certain times of the day only?

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).

Yep, that would provide a full solution, and is the best that can be accomplished with the GUI, i.e. no programming.

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

@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

Hello everyone,

Sorry I haven’t checked in, but been very busy with some work projects.

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…

[quote=“raskell, post:3, topic:167793”]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.[/quote]

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)

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. :wink:

[quote=“aa6vh, post:13, topic:167793”]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)[/quote]

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.

Nice!

Are device status updates slower in Vera, or do you not have any secondary controllers?

Thank you… I haven’t seen any slowness as of yet. I’m running over 40 Z-Wave switches/modules & all have been working very well. I only have Vera as my main controller. I’m going to config my remote as a secondary so the wife can control lighting & such. Now keep in mind all my important Z-Wave modules have been programmed to notify me when are turned on & off.

For example everything that has to do with my 90Gal & 29Gal reef tanks alert me. (Actinic Lighting, daytime lighting, LED lighting, moonlights, cooling fans, powerhead pumps, ATO, return pumps, skimmers, heaters & refuge lighting) are all running Z-Wave modules & all alert me via text messaging. Any issues, I can access my system remotely using Home Buddy on my HTC EVO Android phone.

[quote=“oTi@, post:16, topic:167793”]Nice!

Are device status updates slower in Vera, or do you not have any secondary controllers?[/quote]

@ComputerJohn

Now that you have been running the wave-maker routine this week, any feedback on how it is doing for you?

Hello there fellow reefer. ;D The routine is running FLAWLESS on my Evo 1400 powerheads. The left one stops at 20secs & the right one starts, then repeats. I can monitor it in Vera since it tells me that trasmission was OK every 20 sec. All my other scenes run with no ill affects of the timer demand of the wavemaking.

At 16:00
On my 90Gal System: Refuge light turns off, Actinics turn on, Fixture fan turns on, wavemaking routine turns on.
On my 29Gal Frag System: LED lights turn on

At 17:00
On my 90Gal System: Daytime lights turn on

At 00:00
On my 90Gal System: Daytime turn off

At 00:30
On my 90Gal System: Moonlights turn on

At 01:00
On my 90Gal System: Refuge light turns on, Actinics turn off, Fixture fan turns off
On my 29Gal Frag System: LED lights turns off

At 02:00
On my 90Gal System: Wavemaking routine turns off

At 04:00
On my 90Gal System: Moonlights turn off

Theses scenes run everyday 7 days a week. Except the wakemaking, each one I get a text message when they turn on & off. I have not had any issues so far.

[quote=“raskell, post:18, topic:167793”]@ComputerJohn

Now that you have been running the wave-maker routine this week, any feedback on how it is doing for you?[/quote]