reef-pi :: An opensource reef tank controller based on Raspberry Pi.

Matevz Savarin

Active Member
View Badges
Joined
Dec 5, 2018
Messages
209
Reaction score
163
Rating - 0%
0   0   0
Ok I understand, how do you assign pin number to pi, so pin 8 cant be same as pin 8 on hat..?

4BDF8845-1EB8-4B9A-B48C-A409DE45374C.jpeg
 

robsworld78

Well-Known Member
View Badges
Joined
Feb 14, 2020
Messages
952
Reaction score
1,281
Location
Edmonton, Canada
Rating - 0%
0   0   0
Ok I understand, how do you assign pin number to pi, so pin 8 cant be same as pin 8 on hat..?

4BDF8845-1EB8-4B9A-B48C-A409DE45374C.jpeg

After you install it go to configuration tab and then drivers.

Add a new driver, select the PCA9685 from the drop down menu and leave the address at 64, that's the default.

Now you can go to the connectors and setup the jacks. In the driver drop down select the PCA9685 driver you just added and enter the pins for the jack from 0 to 15.
 

Matevz Savarin

Active Member
View Badges
Joined
Dec 5, 2018
Messages
209
Reaction score
163
Rating - 0%
0   0   0
Ranjib tnx, but I allready use pca9685 driver on 64 adress for controlling 12 pwm connectors on my hat. But now, tnx to your answear I understand it, I will add new unasigned adress on witch this i2c expansion board will be and then same driver and pin number. I get it;) Thank you!
 

Alaa

Community Member
View Badges
Joined
Nov 28, 2018
Messages
74
Reaction score
80
Rating - 0%
0   0   0
Ok I understand, how do you assign pin number to pi, so pin 8 cant be same as pin 8 on hat..?

4BDF8845-1EB8-4B9A-B48C-A409DE45374C.jpeg
Hi
You need to solder the A0 connector on the second board (just make the 2 points connect) this will give the second board 65 address, then go to drivers and add it changing the default address to 65. now you have additional 16 pins to use. you may want to read the posts above on removing the pull up resistor on the second board.
 
Last edited:

Des Westcott

Well-Known Member
View Badges
Joined
May 29, 2018
Messages
646
Reaction score
1,035
Location
Durban - South Africa
Rating - 0%
0   0   0
I've recently been down the rabbithole of Macros and Timers and thought I'd share some of my findings.

So, reef-pi can do the following since 3.0 :
  • Run a series of commands called a Macro - (Old news, but one of the most amazing features I believe)
  • Use a Timer to trigger a Macro to run.
  • Use a Macro to run another Macro or series of Macro's
  • Run a Macro in reverse. This runs the Macro steps in the reverse order and also reverses the individual steps - so "turn Item X on" becomes "turn Item X off". So a Macro with 3 steps like below
    • 1 - Turn X on
    • 2 - Turn Y off
    • 3 - Turn Z off will run as follows when run in reverse
    • 1 - Turn Z on
    • 2 - Turn Y on
    • 3 - Turn X off
  • To use this reversible function, Macros must have "Make Reversible" - "Yes" selected.
  • Once this is selected, you can run the Macro in reverse and you can use Timers and other Macros totrigger that Macro, BUT IT WILL RUN IN REVERSE. You can still run the Macro manually in forward mode, but any attempt to automate it's running will trigger it in reverse.
So for my Auto Water Change (AWC) macro, as long as I triggered it manually, it ran fine. However the only way I could get it to run properly on a timer was to re-write the Macro in reverse. Reversing the series of steps and their actions. This achieved what I was wanting - an AWC done at a preset time with no interaction from me.

This reversing thing isn't a big deal on simple Macros like "Turn X off, wait 300 seconds, Turn X on". If you run that in reverse, its exactly the same as forward. More complex Macros are not the same.

Macro's to run Macro's
I've had a "Feed" macro that I've developed and updated over time to be about an hour long now. It's evolved to be pretty bulletproof. Turning return off, skimmer off, temperature control, plus the chiller / heater off to make sure they aren't running while return is off. Turns wavemaker off for a calm period ofr fish to eat, then sowly turning the various pumps on to distribute the uneaten food so that it doesn't just end up down the overflow.
Now I managed to get a dry pellet autofeeder to run from reef-pi, I would like to be able to have a new Macro that triggers "Feed", waits 3 minutes, then triggers the autofeeder as often as I want. In order to get this right, I either need to re-write the new "Feed with autofeed" Macro or write the old "Feed" macro in reverse.
Not a big deal either way, but if you're planning on trying something similar, these are teh ways I've discovered to get these things done.

What would be nice (I think)
  • To be able to have Timers and Macros trigger Macros forward.
  • to be able to choose whether the reversible Macro runs steps in reverse, states in reverse, or both. I think I can see uses for all three.
I've rambled a bit in this post, I know, but if my experience helps another user, I'll be a happy boy.
I personally think that this kind of functionality is what makes these controllers some of the most powerful innovations in the reefkeeping hobby in recent years. Well, this and automated testing :D
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,058
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
I've recently been down the rabbithole of Macros and Timers and thought I'd share some of my findings.

So, reef-pi can do the following since 3.0 :
  • Run a series of commands called a Macro - (Old news, but one of the most amazing features I believe)
  • Use a Timer to trigger a Macro to run.
  • Use a Macro to run another Macro or series of Macro's
  • Run a Macro in reverse. This runs the Macro steps in the reverse order and also reverses the individual steps - so "turn Item X on" becomes "turn Item X off". So a Macro with 3 steps like below
    • 1 - Turn X on
    • 2 - Turn Y off
    • 3 - Turn Z off will run as follows when run in reverse
    • 1 - Turn Z on
    • 2 - Turn Y on
    • 3 - Turn X off
  • To use this reversible function, Macros must have "Make Reversible" - "Yes" selected.
  • Once this is selected, you can run the Macro in reverse and you can use Timers and other Macros totrigger that Macro, BUT IT WILL RUN IN REVERSE. You can still run the Macro manually in forward mode, but any attempt to automate it's running will trigger it in reverse.
So for my Auto Water Change (AWC) macro, as long as I triggered it manually, it ran fine. However the only way I could get it to run properly on a timer was to re-write the Macro in reverse. Reversing the series of steps and their actions. This achieved what I was wanting - an AWC done at a preset time with no interaction from me.

This reversing thing isn't a big deal on simple Macros like "Turn X off, wait 300 seconds, Turn X on". If you run that in reverse, its exactly the same as forward. More complex Macros are not the same.

Macro's to run Macro's
I've had a "Feed" macro that I've developed and updated over time to be about an hour long now. It's evolved to be pretty bulletproof. Turning return off, skimmer off, temperature control, plus the chiller / heater off to make sure they aren't running while return is off. Turns wavemaker off for a calm period ofr fish to eat, then sowly turning the various pumps on to distribute the uneaten food so that it doesn't just end up down the overflow.
Now I managed to get a dry pellet autofeeder to run from reef-pi, I would like to be able to have a new Macro that triggers "Feed", waits 3 minutes, then triggers the autofeeder as often as I want. In order to get this right, I either need to re-write the new "Feed with autofeed" Macro or write the old "Feed" macro in reverse.
Not a big deal either way, but if you're planning on trying something similar, these are teh ways I've discovered to get these things done.

What would be nice (I think)
  • To be able to have Timers and Macros trigger Macros forward.
  • to be able to choose whether the reversible Macro runs steps in reverse, states in reverse, or both. I think I can see uses for all three.
I've rambled a bit in this post, I know, but if my experience helps another user, I'll be a happy boy.
I personally think that this kind of functionality is what makes these controllers some of the most powerful innovations in the reefkeeping hobby in recent years. Well, this and automated testing :D
Thank you for the detailed post, we really appreciate you taking the time to document feedback. I’ll be going through this. Macros should run forward via timer or other macro, the reverse mode is only used for the automatic turn off feature in timer (or reverse mode in parent macro). If this is not the case, it’s a bug, and we’ll fix it.

For reversible macros to not trigger opposite action in reverse mode (your second ask) , I think it’s doable, but I would like to think through the use case, for some reason I feel it’s not intuitive and we might be able to adress this better in some different fashion, ... but we’ll see.

I’ve been busy with the new house move , my tanks are still not setup and everything is still in plastic containers. Thanks to reef-pi I don’t have coral mortality this time, temp, ato , everything is up even in plastic container. But I’ll need some more time to setup home, tanks and then resume back my reef-pi works.
 

loueradun

New Member
View Badges
Joined
Feb 19, 2020
Messages
1
Reaction score
1
Rating - 0%
0   0   0
New user here.

I'm considering setting up a Raspberry-Pi to control a Finnex Plated+ light, as the controller board recently died, and I am really missing the day/night cycles. My main question is whether reef-pi can be used to control a light like this? Does it do day/night cycles or use weather information? The Finnex light has a ground, +15V, and Red, Green, Blue, and White contacts on the edge of the LED board. I currently have it wired +15v to R,G,B,W so that it is 100% on with a timer at the wall. In order to do proper dimming I will need to pulse +15v to the R, G, B, W contacts. Is reef-pi for me, or should I get something like an Arduino or coding something for myself? I would like to expand it to do other things over time like adding sensors/cameras, so I think something like a Raspberry-Pi would be better in the long run, but trying to figure out exactly what I need (both software and hardware).
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,058
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
New user here.

I'm considering setting up a Raspberry-Pi to control a Finnex Plated+ light, as the controller board recently died, and I am really missing the day/night cycles. My main question is whether reef-pi can be used to control a light like this? Does it do day/night cycles or use weather information? The Finnex light has a ground, +15V, and Red, Green, Blue, and White contacts on the edge of the LED board. I currently have it wired +15v to R,G,B,W so that it is 100% on with a timer at the wall. In order to do proper dimming I will need to pulse +15v to the R, G, B, W contacts. Is reef-pi for me, or should I get something like an Arduino or coding something for myself? I would like to expand it to do other things over time like adding sensors/cameras, so I think something like a Raspberry-Pi would be better in the long run, but trying to figure out exactly what I need (both software and hardware).
You'll need a meanwell driver or at least a mosfet to sit in between the pi/pca9685 pwm output and the light. If you want only two channel control then pi should be enough, for more than two channels you'll need a pca9685 ic.
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,344
Reaction score
1,722
Location
Missouri
Rating - 0%
0   0   0
Thank you for the detailed post, we really appreciate you taking the time to document feedback. I’ll be going through this. Macros should run forward via timer or other macro, the reverse mode is only used for the automatic turn off feature in timer (or reverse mode in parent macro). If this is not the case, it’s a bug, and we’ll fix it.

For reversible macros to not trigger opposite action in reverse mode (your second ask) , I think it’s doable, but I would like to think through the use case, for some reason I feel it’s not intuitive and we might be able to adress this better in some different fashion, ... but we’ll see.

I’ve been busy with the new house move , my tanks are still not setup and everything is still in plastic containers. Thanks to reef-pi I don’t have coral mortality this time, temp, ato , everything is up even in plastic container. But I’ll need some more time to setup home, tanks and then resume back my reef-pi works.

Congrats on the new house, hopefully comes with lots more space! :)
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,344
Reaction score
1,722
Location
Missouri
Rating - 0%
0   0   0
Where is the best place for build threads, should that go in DIY? I need to start one and so many spots not sure where to start.

Thanks...
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
New user here.

I'm considering setting up a Raspberry-Pi to control a Finnex Plated+ light, as the controller board recently died, and I am really missing the day/night cycles. My main question is whether reef-pi can be used to control a light like this? Does it do day/night cycles or use weather information? The Finnex light has a ground, +15V, and Red, Green, Blue, and White contacts on the edge of the LED board. I currently have it wired +15v to R,G,B,W so that it is 100% on with a timer at the wall. In order to do proper dimming I will need to pulse +15v to the R, G, B, W contacts. Is reef-pi for me, or should I get something like an Arduino or coding something for myself? I would like to expand it to do other things over time like adding sensors/cameras, so I think something like a Raspberry-Pi would be better in the long run, but trying to figure out exactly what I need (both software and hardware).
I am pulsing +15v to beamswork lights. Im sending +15v to the blue and white channel on 2 beamswork DA fspec lights for a total of 4 channels and it works great for almost a year now. Read my build thread and buy some premade mosfet modules... no need for meanwell drivers because you can use the existing light power supply. Because you are pulsing +15v the modules need to use a p channel mosfet. ALOT OF MODULES ON EBAY OR AMAZON USE n channel mosfets and wont work. Message me if you need help.

The p channel mosfet modules are based on the IRF5305s mosfet and look like this: the green terminals are where the light power input and output to the respective RGB or W channel will land. The small 2 pin connector is the pwm signal and ground from a pca9685.

E-switch.jpeg
20190530_170557.jpg
 
Last edited:

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
Thank you for the detailed post, we really appreciate you taking the time to document feedback. I’ll be going through this. Macros should run forward via timer or other macro, the reverse mode is only used for the automatic turn off feature in timer (or reverse mode in parent macro). If this is not the case, it’s a bug, and we’ll fix it.

For reversible macros to not trigger opposite action in reverse mode (your second ask) , I think it’s doable, but I would like to think through the use case, for some reason I feel it’s not intuitive and we might be able to adress this better in some different fashion, ... but we’ll see.

I’ve been busy with the new house move , my tanks are still not setup and everything is still in plastic containers. Thanks to reef-pi I don’t have coral mortality this time, temp, ato , everything is up even in plastic container. But I’ll need some more time to setup home, tanks and then resume back my reef-pi works.
Congrats...moving is a pain in the butt but more space means more tanks?!!
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,058
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Congrats...moving is a pain in the butt but more space means more tanks?!!
Thank you.. most likely bigger tank instead of more :) . want to keep some new fish. I want to spend some time thinking and decide on plumbing first. For larger tank, water change is my biggest concern. I am thinking of a spot in the living area , right adjacent to garage... so probably can do some plumbing through the drywall.
 

Des Westcott

Well-Known Member
View Badges
Joined
May 29, 2018
Messages
646
Reaction score
1,035
Location
Durban - South Africa
Rating - 0%
0   0   0
Thank you.. most likely bigger tank instead of more :) . want to keep some new fish. I want to spend some time thinking and decide on plumbing first. For larger tank, water change is my biggest concern. I am thinking of a spot in the living area , right adjacent to garage... so probably can do some plumbing through the drywall.

I definitely agree with bigger rather than more. 1 x 200l tank is definitely less work that 2 x 100l
 

Des Westcott

Well-Known Member
View Badges
Joined
May 29, 2018
Messages
646
Reaction score
1,035
Location
Durban - South Africa
Rating - 0%
0   0   0
Thank you for the detailed post, we really appreciate you taking the time to document feedback. I’ll be going through this. Macros should run forward via timer or other macro, the reverse mode is only used for the automatic turn off feature in timer (or reverse mode in parent macro). If this is not the case, it’s a bug, and we’ll fix it.

For reversible macros to not trigger opposite action in reverse mode (your second ask) , I think it’s doable, but I would like to think through the use case, for some reason I feel it’s not intuitive and we might be able to adress this better in some different fashion, ... but we’ll see.

I’ve been busy with the new house move , my tanks are still not setup and everything is still in plastic containers. Thanks to reef-pi I don’t have coral mortality this time, temp, ato , everything is up even in plastic container. But I’ll need some more time to setup home, tanks and then resume back my reef-pi works.

Hey Ranjib. Yes, I understand you are moving - good luck with that! It's been a long time since I had to do it!

I had the time, so decided to write the post detailing my experience. I'm sure if I've experiencing this, others must be too. Triggering a macro with a timer is potentially such a powerful feature and I've been really excited to use it. It takes reeftank automation (and reef-pi) to the next level for me.

As far as the two reversing Macro options I mentioned might be nice, maybe I didn't think things through enough. I personally (in my use cases) haven't come across a situation (yet possibly) where I've though that being able to reverse Macros would a usefull. This is probably because of the way I used my Macros so far. Mine lay out all the steps, turning equipment off and then back on but sometimes with different wait times between. But I can see how being able to create a Macro to turn a set of features on and then reverse it would be usefull if the Macro was complex enough. I also appreciate the ability to have Macro "modules" and combine them to operate as "subroutines" like the very basic computer programming principles.

Re-thinking things, if the Timers and Macros were triggering the Macros forwards, maybe there is no need for the additional reversing options at all.

Good luck with getting the tanks set up again!
 

Freccialata

Community Member
View Badges
Joined
Jan 31, 2020
Messages
53
Reaction score
98
Location
Rome (Italy)
Rating - 0%
0   0   0
Ufffff...... it's really hard!!!

I have bought a TP-Link HS110 smart plug (EU plug).
I wish to test if it works as a simple timer function.
It is connected to my router by WiFi (IP: 192.168.1.137).
To set it on reef-pi, I login into reef-pi.

Configuration --> Drivers --> + --> Name: HS110_1 Type: HS110 Address: 192.168.1.137 --> Add

Configuration --> Admin --> Reload

Configuration --> Connectors --> Outlets --> + --> Name: Test1 Pin: 0 Driver: HS110 --> Add

Configuration --> Admin --> Reload

Equipment --> + --> Name: TimerTest Outlet: Test1 --> Add

I have this error:
{"error":"Failed to create. Error: dial tcp: address 192.168.1.137: missing port in address"} | HTTP 500

Whats wrong???
 

Algae invading algae: Have you had unwanted algae in your good macroalgae?

  • I regularly have unwanted algae in my macroalgae.

    Votes: 39 34.2%
  • I occasionally have unwanted algae in my macroalgae.

    Votes: 23 20.2%
  • I rarely have unwanted algae in my macroalgae.

    Votes: 9 7.9%
  • I never have unwanted algae in my macroalgae.

    Votes: 8 7.0%
  • I don’t have macroalgae.

    Votes: 31 27.2%
  • Other.

    Votes: 4 3.5%
Back
Top