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

Maybe use a stepped drill bit. So that the exterior where the mount is installed is closer to the interior? Then slide a plastic washer over it incase anything is showing.
We must be missing something here. If these panel mount sockets are not working, then they must be designed for some other type of housing. I am thinking out loud, does using a anodized aluminum or some other type of housing make sense ?
 
Hi Ranjib,

I think I‘ve found a bug within the dashboard long capability in regard to the Temperature module. Or actually is more a buglike feature.

Does it make sense to display the Heater/Cooler diagram while the control is disabled?
In my opinion this diagram should only be displayed if the control box within the Temperature tab is checked.
You are correct , this is a bug. I am aware of this from the beginning, I just didn’t get time to fix it, it’s there since dashboard is introduced. Since it does not impact any function other than dashboard i did not prioritize it. I am planning to fix it as part of modular dashboard work
 
@Ranjib

Questions for future consideration (i.e. future, post 1.0 functionality):

Since we have the PCA9685 for outputting 5v PWM control signals, it would be easy to control fan speed via one of the pins on that board. In fact, I plan on doing so. I will have 12v in the enclosure already, so I'll just need to tap into power and run the control pin on the fan to one of the pins on the breakout board.

Question 1:

For health check reasons, how reasonable would it be to add support to check fan speed via the sense wire on the fan header?

Question 2:

Since checking CPU temp on the Pi itself is trivial, would it be possible to tie that reading to a PWM output on the PCA9685? That way we could easily have a fan on the enclosure that spun up on demand.

Question 3:

Since multiple temp probe support is planned for post 1.0, would it be possible, once support is added, to allow that to control PWM output on one (or more) of the pins? That way we could do multiple things, like kick on a fan to use as a cooler blowing over part of the tank that ramps up as the temp requires. Or, it could be tied to a temp probe that somewhere else, like in a light housing, that responds to the temp and ramps up and down as needed.

Thoughts? I certainly understand none of that would come soon. For a controllable fan on the enclosure, I may attempt to figure out how to control one of the PCA9685 pins independently of the Pi and have something run in the background as needed. Maybe I won't even break anything in the attempt.
I’m very happy that you thought about this. I went through the exact process during the development of temeperature controller. Pca9685 allows us to do variable control (pwm) of almost all dc based equipment, which include powerhead, led light , fans etc. for wavemaker and lighting cycle it’s a predetermined variation. Butvfor temeperature controller it’s kinda hard to dynamically derive the pwm value for fan, since depending upon the setup the fan and the heat source will be different . So , for a better / stable logic we need something like a PID(proportional integral derivative ) logic. I have added that to reef pi, but it still need lot of work to take it till fan controller(which involve choosing a hardware and necessary electronics). I deferred to work on this since I felt it will take lot longer and would not have as much impact as other more common things.
Now, the part that makes me excited is, it does not stop you from using reef-pi to do what you want if you can do a bit of programming and use reef-pi api to do walk the last mile. You can declare a jack in reef-pi, and a corresponding dummy light set in manual mode. Then you can use that light ui/api to control the fan on demand. Reef-pi does not have any clue on whether the dovice connected is a fan or light. It will set the pwm value as you asked it to. Next you can write a small script (in any language you prefer) to read temeperature after every minute and update that dummy light pwm value . This is not very elegant, but it’s good enough to test your setup. We can have better api/ui in future to make it whole lot less ugly.
Let me know if you think this is doable, I can share sample code in almost any language . You can run it in the pi itself if you want
 
So, my relays finally came in, that's good!! But I cannot seem to get them to switch, which is bad :( Anyone see anything wrong, or have suggestions to try?

Here are pictures of my hookups to the Pi & the relay board:

20171128_204851.jpg
20171128_204955.jpg
 
So, my relays finally came in, that's good!! But I cannot seem to get them to switch, which is bad :( Anyone see anything wrong, or have suggestions to try?

Here are pictures of my hookups to the Pi & the relay board:

20171128_204851.jpg
20171128_204955.jpg

Dev mode unchecked?

Wait, are you sure you dont have the pinout flipped? It looks like you have your pin 1 backwards.. So you have the red on pin 39 which is ground.. the black wire on pin 16, and the inputs on something else.. This picture should line up with your orientation.. Picture wasnt showing up in my edit so it's below..
 
Last edited:
Wait, are you sure you dont have the pinout flipped? It looks like you have your pin 1 backwards.. So you have the red on pin 39 which is ground.. the black wire on pin 16, and the inputs on something else.. This picture should line up with your orientation.. Picture wasnt showing up in my edit so it's below..

Aaaaaand this is why you don't try hooking things up in excitement 5 minutes before bed ;Facepalm Got home late, saw the package of relays at my door, & wanted to test it before sleeping.... It's definitely flipped.

Thanks for pointing that out, now at last I know I won't be scratching my head in confusion this evening!
 
Alright, so I got it hooked up the right way & still no dice. The relay LEDs are lighting, so they've got power. I've set up the Outlet & Equipment, tried it reversed & non-reversed. If I physically ground the pin connected to that relay channel on one of the RBPi's ground pin, it will trigger it. But nothing I've tried will let Reef Pi trigger it.

I'm 99% sure I have the right pins defined (11, 13 ,15 ,& 18 based on the image from the Reef Pi site).

https://reef-pi.github.io/img/power/breadboard.png

I've got Dev Mode unchecked, I'm not sure what else to try at this point. Any ideas?
 
Alright, so I got it hooked up the right way & still no dice. The relay LEDs are lighting, so they've got power. I've set up the Outlet & Equipment, tried it reversed & non-reversed. If I physically ground the pin connected to that relay channel on one of the RBPi's ground pin, it will trigger it. But nothing I've tried will let Reef Pi trigger it.

I'm 99% sure I have the right pins defined (11, 13 ,15 ,& 18 based on the image from the Reef Pi site).

https://reef-pi.github.io/img/power/breadboard.png

I've got Dev Mode unchecked, I'm not sure what else to try at this point. Any ideas?
Can you share your wiring /electronics image and log ?
https://reef-pi.github.io/additional-documentation/troubleshooting/
 
Here are the logs... Looking like everything is switching correctly. I'll post the pictures of my wiring in a minute.

-- Logs begin at Thu 2016-11-03 17:16:43 UTC. --
Nov 29 23:50:39 raspberrypi reef-pi[1675]: 2017/11/29 23:50:39 Setting GPIO Pin: 15 State: 1
Nov 30 01:14:47 raspberrypi reef-pi[1675]: 2017/11/30 01:14:47 Setting GPIO Pin: 15 State: 0
Nov 30 01:14:49 raspberrypi reef-pi[1675]: 2017/11/30 01:14:49 Setting GPIO Pin: 13 State: 0
Nov 30 01:14:53 raspberrypi reef-pi[1675]: 2017/11/30 01:14:53 Setting GPIO Pin: 11 State: 1
Nov 30 01:14:54 raspberrypi reef-pi[1675]: 2017/11/30 01:14:54 Setting GPIO Pin: 18 State: 0
Nov 30 01:15:32 raspberrypi reef-pi[1675]: 2017/11/30 01:15:32 Setting GPIO Pin: 18 State: 1
Nov 30 01:15:41 raspberrypi reef-pi[1675]: 2017/11/30 01:15:41 Setting GPIO Pin: 11 State: 0
Nov 30 01:15:45 raspberrypi reef-pi[1675]: 2017/11/30 01:15:45 Setting GPIO Pin: 13 State: 1
Nov 30 01:15:47 raspberrypi reef-pi[1675]: 2017/11/30 01:15:47 Setting GPIO Pin: 15 State: 1
Nov 30 01:26:33 raspberrypi reef-pi[1675]: 2017/11/30 01:26:33 Setting GPIO Pin: 15 State: 0
 
Here are the images. I've got LEDs lighting on the relays now, showing they're getting power. but no response when triggering them on Reef Pi.

Also, since it's not super apparent on the picture which is which, I have the brown wire on the ground pin on the relay & the orange on IN4. Colors appeared similar in my picture.

Another bit of info, I'm on 0.9.

20171129_203541.jpg


20171129_203556.jpg
 
Last edited:
Here are the images. I've got LEDs lighting on the relays now, showing they're getting power. but no response when triggering them on Reef Pi.

Also, since it's not super apparent on the picture which is which, I have the brown wire on the ground pin on the relay & the orange on IN4. Colors appeared similar in my picture.

Another bit of info, I'm on 0.9.

20171129_203541.jpg


20171129_203556.jpg
Can you follow this pinout, instead.
https://reef-pi.github.io/general-guides/electronics/
And then just test one equipment. And share the log
 
Hello,
I have cut a new release for reef-pi: 0.9.1, following are the key changes:
  • Bug: Timer subsystem had a bug where equipment actions were triggered more than once at the very first time when the timer start.
  • Chore: All subsystems (temperature & ato) has default values that reflect the 1.0 recommended pinout (https://reef-pi.github.io/general-guides/electronics/)
  • UI: the equipment on/off ui has been changed, i hope it is more intuitive now. If not, we 'll revisit this.
  • There is no database changes .. so upgrade should not break anything

I don't see too many serious issues for 1.0 release, and if things go as planned I'll hit 1.0 first week of December. I would love to get the dashboard modularity (i.e. dont show temp readings if its enabled but not configured) before 1.0 , but thats not a blocker, I am working on the docs currently. We might have an intermediate minor release with docs link updated (i want reef-pi to have documentation links present right in the ui itself).
Release builds can be found in usual place: https://github.com/reef-pi/reef-pi/releases/tag/0.9.1

Upgrade steps: https://reef-pi.github.io/additional-documentation/upgrade/
 
Sure thing, I’ll try that in the morning. Which pin do I use for the power? I see the ones labeled for the relays.
You can either use the 5v output from pca9685 to power relay or the ato power if you are not using it.
 
Here are the logs... Looking like everything is switching correctly. I'll post the pictures of my wiring in a minute.

-- Logs begin at Thu 2016-11-03 17:16:43 UTC. --
Nov 29 23:50:39 raspberrypi reef-pi[1675]: 2017/11/29 23:50:39 Setting GPIO Pin: 15 State: 1
Nov 30 01:14:47 raspberrypi reef-pi[1675]: 2017/11/30 01:14:47 Setting GPIO Pin: 15 State: 0
Nov 30 01:14:49 raspberrypi reef-pi[1675]: 2017/11/30 01:14:49 Setting GPIO Pin: 13 State: 0
Nov 30 01:14:53 raspberrypi reef-pi[1675]: 2017/11/30 01:14:53 Setting GPIO Pin: 11 State: 1
Nov 30 01:14:54 raspberrypi reef-pi[1675]: 2017/11/30 01:14:54 Setting GPIO Pin: 18 State: 0
Nov 30 01:15:32 raspberrypi reef-pi[1675]: 2017/11/30 01:15:32 Setting GPIO Pin: 18 State: 1
Nov 30 01:15:41 raspberrypi reef-pi[1675]: 2017/11/30 01:15:41 Setting GPIO Pin: 11 State: 0
Nov 30 01:15:45 raspberrypi reef-pi[1675]: 2017/11/30 01:15:45 Setting GPIO Pin: 13 State: 1
Nov 30 01:15:47 raspberrypi reef-pi[1675]: 2017/11/30 01:15:47 Setting GPIO Pin: 15 State: 1
Nov 30 01:26:33 raspberrypi reef-pi[1675]: 2017/11/30 01:26:33 Setting GPIO Pin: 15 State: 0

You‘re triggering the wrong Pins. Who have to use the GPIO-Pin numbers. In your case you have to “translate” following:
11 = 17
13 = 27
15 = 22
18 = 24
 
Hello,
I have cut a new release for reef-pi: 0.9.1, following are the key changes:
  • Bug: Timer subsystem had a bug where equipment actions were triggered more than once at the very first time when the timer start.
  • Chore: All subsystems (temperature & ato) has default values that reflect the 1.0 recommended pinout (https://reef-pi.github.io/general-guides/electronics/)
  • UI: the equipment on/off ui has been changed, i hope it is more intuitive now. If not, we 'll revisit this.
  • There is no database changes .. so upgrade should not break anything

I don't see too many serious issues for 1.0 release, and if things go as planned I'll hit 1.0 first week of December. I would love to get the dashboard modularity (i.e. dont show temp readings if its enabled but not configured) before 1.0 , but thats not a blocker, I am working on the docs currently. We might have an intermediate minor release with docs link updated (i want reef-pi to have documentation links present right in the ui itself).
Release builds can be found in usual place: https://github.com/reef-pi/reef-pi/releases/tag/0.9.1

Upgrade steps: https://reef-pi.github.io/additional-documentation/upgrade/
Ranjib, the new equipment tab is great. I think it will help to avoid some of the same confusion as new users come on.
Two Questions:
  1. I have noticed that every time I upgrade the temp charts completely restart. Is it possible to have it restore the old data and keep going as it was? Not a huge deal, but if you are testing anything out with respect to temp and your trend goes away, you have to start over again.
  2. Is there a possibility before or with 1.0 to be able to reconfigure outlets, timers, etc...?I remember that we discussed it a while ago, but cant remember what was said. Again, not a huge issue, but it would be nice when timers are getting adjusted, as it will be also with wavemakers and dosers. Mostly it is also probably an OCD issue for me, if I have to delete an outlet, timer, equipment, etc... it moves to the bottom of the list, and is then out of order.
 
@Ranjib

Here's a thought related to your response quoted below:

Have you considered a "plug-in" system for reef-pi? i.e. the ability to add scripts that expand the functionality of the underlying software. For example, if someone wrote a script that tied a pin on the PCA9685 to the results of polling the CPU for its temperature. Sure, it could be done via the API, as you outlined, but it might be a little more "elegant" (for lack of a better word) to have it all presented within the same interface, rather than seperate interfaces for the core software and items controlled via the API.

A system in which you could control the use of something like Python scripts (or whatever scripting language you see as the best option) would probably have many advantages.

I’m very happy that you thought about this. I went through the exact process during the development of temeperature controller. Pca9685 allows us to do variable control (pwm) of almost all dc based equipment, which include powerhead, led light , fans etc. for wavemaker and lighting cycle it’s a predetermined variation. Butvfor temeperature controller it’s kinda hard to dynamically derive the pwm value for fan, since depending upon the setup the fan and the heat source will be different . So , for a better / stable logic we need something like a PID(proportional integral derivative ) logic. I have added that to reef pi, but it still need lot of work to take it till fan controller(which involve choosing a hardware and necessary electronics). I deferred to work on this since I felt it will take lot longer and would not have as much impact as other more common things.
Now, the part that makes me excited is, it does not stop you from using reef-pi to do what you want if you can do a bit of programming and use reef-pi api to do walk the last mile. You can declare a jack in reef-pi, and a corresponding dummy light set in manual mode. Then you can use that light ui/api to control the fan on demand. Reef-pi does not have any clue on whether the dovice connected is a fan or light. It will set the pwm value as you asked it to. Next you can write a small script (in any language you prefer) to read temeperature after every minute and update that dummy light pwm value . This is not very elegant, but it’s good enough to test your setup. We can have better api/ui in future to make it whole lot less ugly.
Let me know if you think this is doable, I can share sample code in almost any language . You can run it in the pi itself if you want
 

IF YOU HAD TO TAKE A REEFING EXAM, WOULD YOU PASS?

  • Yes!

    Votes: 32 45.7%
  • Not yet, but I have one that I want to buy in mind!

    Votes: 9 12.9%
  • No.

    Votes: 26 37.1%
  • Other (please explain).

    Votes: 3 4.3%
Back
Top