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

Is there a document that contains all of your configuration steps for the ML pihat? I am slowly making progress and I would prefer to use a proper solution. I have the imgur pictures showing the connections and scour the thread for the rest, but if there is a complete doc that would be great.

I am setting up my ATO. The Ranjib guide on adafruit mentioned a 12v pump. How does the ML pi-hat control the ATO pump?
I have the ATO sensor connected as you mentioned here previously. (ATO1, pin IO27).
I imagine I could use the ATO2 for a switch to a float valve.
How does the pump get wired? I have the 12v power going into the board via the connector on the hat.
Do I connect a cable to V+ and pick an IO, IO8 for example?
Thanks again,
t.
 
Is there a document that contains all of your configuration steps for the ML pihat? I am slowly making progress and I would prefer to use a proper solution. I have the imgur pictures showing the connections and scour the thread for the rest, but if there is a complete doc that would be great.

I am setting up my ATO. The Ranjib guide on adafruit mentioned a 12v pump. How does the ML pi-hat control the ATO pump?
I have the ATO sensor connected as you mentioned here previously. (ATO1, pin IO27).
I imagine I could use the ATO2 for a switch to a float valve.
How does the pump get wired? I have the 12v power going into the board via the connector on the hat.
Do I connect a cable to V+ and pick an IO, IO8 for example?
Thanks again,
t.

Think of it like this. The pump you use for your ATO is just a piece of equipment. So set it up as you would any equipment in reef-pi Obviously making sure you you run the correct power through the relay that the pump requires.

Now when you create your ATO in reef-pi, you set it up to use the float switch you have on IO27 to control whatever piece of equipment you want. In this case point it to the pump you want to use. You could actually have an ATO turn anything you've set up as equipment on and off. You just change what equipment the ATO controls.

Going forward reef-pi also plans to let you have an ATO trigger macro's.
 
Think of it like this. The pump you use for your ATO is just a piece of equipment. So set it up as you would any equipment in reef-pi Obviously making sure you you run the correct power through the relay that the pump requires.

Now when you create your ATO in reef-pi, you set it up to use the float switch you have on IO27 to control whatever piece of equipment you want. In this case point it to the pump you want to use. You could actually have an ATO turn anything you've set up as equipment on and off. You just change what equipment the ATO controls.

Going forward reef-pi also plans to let you have an ATO trigger macro's.
Ah-ha....thank you. So, I could also use my 120v AC pump from my old ATO and just turn the power on and off on the plug....nice.
Thank you again.
 
Hi everyone I made a account just to say thank you to rob with robo tank and everyone with reef pi I run fresh water but I love this project so far I've got all 4 power head's up and running with my kessils and 2 temp probes waiting on my ph probe to get here can't wait to see what is to come

Glad to hear you're enjoying it. :)
 
Ah-ha....thank you. So, I could also use my 120v AC pump from my old ATO and just turn the power on and off on the plug....nice.
Thank you again.

Cool. Or just thinking of it another way........ If you're using smart plugs for equipment, your ATO just controls that smartplug and whatever is plugged into it.
 
Hey guys question I keep getting this error when I try and use adafruit I've reset my key and changed everything in reef pi ty for any help error":"not found - that is an invalid URL, please check the API documentation at https://io.adafruit.com/api/docs to make sure your URL is correct"}
 
Ok, getting a weird error when I try to start reef-pi from the terminal window.

I was suddenly unable to connect through any browser, but could VNC into the Pi and reboot, start/stop reef-pi.service. I even deleted the databases and tried again. I was running 3.3.1 so I decided to try upgrading to 3.4.

This is the error :

pi@CakeReef:~ $ reef-pi
2020/06/24 21:57:30 driver-subsystem: registering driver id: rpi Name: Raspberry Pi
2020/06/24 21:57:30 Successfully started subsystem: system
2020/06/24 21:57:30 INFO: equipment subsystem: Finished syncing all equipment
2020/06/24 21:57:30 Successfully started subsystem: equipment
2020/06/24 21:57:30 Successfully started subsystem: ato
2020/06/24 21:57:30 Successfully started subsystem: temperature
2020/06/24 21:57:30 Successfully started subsystem: macro
2020/06/24 21:57:30 Successfully started subsystem: timers
2020/06/24 21:57:30 reef-pi is up and running
2020/06/24 21:57:30 Starting http server at: 0.0.0.0:80
2020/06/24 21:57:30 ERROR: Failed to run http server. Error: listen tcp 0.0.0.0:80: bind: permission denied
2020/06/24 21:57:30 Starting health checker
Methods: [GET]
2020/06/24 21:57:30 API Doc path: /api/settings


So, how do I fix the http server?
 
Hi, I had taken my pi board out a couple of weeks back to test something else on the pi, I just realised my doser isn't working, it's powered via a pca9685, I don't seem to have any output from the PCA 9685 (zero volts) now I removed the PCA 9685 from the drivers and after a reboot I'm now getting this error.
Screenshot_2020-06-25-19-20-14-584_com.android.chrome.jpg

This shows up when I click on connectors, is there a way I can put a clean install over the top without having to wipe the SD card?
 
Hi, I had taken my pi board out a couple of weeks back to test something else on the pi, I just realised my doser isn't working, it's powered via a pca9685, I don't seem to have any output from the PCA 9685 (zero volts) now I removed the PCA 9685 from the drivers and after a reboot I'm now getting this error.
Screenshot_2020-06-25-19-20-14-584_com.android.chrome.jpg

This shows up when I click on connectors, is there a way I can put a clean install over the top without having to wipe the SD card?

You can uninstall, delete the database, and reinstall.. you might have to do some searching through the forum at the commands for this, but it's pretty simple.
 
You can uninstall, delete the database, and reinstall.. you might have to do some searching through the forum at the commands for this, but it's pretty simple.

Thanks, I managed to get it back earlier it turns out that the PCA9685 isn't working anymore, I checked on the SSH pinged the i2s and no show. Bummer really as I had removed the pi to test an audio DAC that wasn't working as it should to show the manufacturer, pretty sure everything was put back exactly the same, strange thing is an Arduino Uno stopped working along with another pca9685 for my lighting, only the 12v PSU was shared between the Arduino and the l293d driver boards, at least the pi works
 
I tried the Servo again and I found that the servo PWM needs to be in between 1 and 2 ms. 1 ms is 0dgr and 2 ms is 180dgr. Using the PCA9685 you can set the Frequency. When a frequency is used of 350Hz that means 1/350= 2.86 ms. I used the Lights tab in Reefpi and set it to manual. When the percentage is set to 17% it moves to 0dgr and 55% it moves to 90dgr and 93% to 180dgr.

1592689238567.png


After some fine-tuning when the frequency is set to 320Hz (1/320=3.125ms) i get with 17% it moves to 0dgr and 50% it moves to 90dgr and 83% to 180dgr.
I am thinking of building an auto-feeder with Servos!!!

Sounds like an interesting project. I had an EHEIM and followed @robsworld78 directions to hook it up to my RPi3B ReefPi works really well. I setup a Macro to kill the return pump, wave makers and skimmer with a 1 sec wait on the EHEIM to feed, just like pushing the button ontop. Pretty slick.... I think I only paid $18 for the EHEIM. May be worth a look... cheap enough!
 
Last edited:
Hey y’all. I am looking for a reef-pi friendly lighting for my fluval evo 13.5. Stock light has been doing just fine for me but to be honest I miss the lack of control and night lighting. Tank is about 18.5x11.5x12.5 tall and I am looking for a light that I could control using reef-pi. I have seen a few posts suggesting kessil 80 and 160 but never a follow up on how it worked. Any ideas?
 
I've been playing with some code lately and made up a bash script that will install reef-pi from a fresh Raspbian install.

Now that I've done it so many times (one sd card doing 10 things) I see it really isn't that difficult but my first time it felt overwhelming as it was all new so this should help some. These steps will get you running.

1. Use Raspberry Pi Imager to install Rasbpian on your microSD card.

2. Add the files in attachment to /boot/ directory on microSD card. On Windows this is root directory of the SD card it shows. These 3 files are for wifi access to Pi and the installation script. Make sure to update the wpa_supplicant.conf file you just copied with your wifi login information.

3. Insert SD card into Pi, log into SSH terminal and run the following command.

bash /boot/install_reefpi.sh

4.
Login to reef-pi and setup.

This will do the following automatically, it's two steps as it needs a reboot after expanding the file system. After reboot log back into SSH terminal and it will continue.

* updates Raspbian
* expands file system on microSD card
* prompts for time zone (TZ database name - https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)
* enables time sync
* enables I2C
* sets I2C speed to 10 kHz
* disables SPI
* enables 1-wire
* enables PWM on Raspberry Pi pin GPIO12 and GPIO13
* installs reef-pi (prompts for Pi Zero W or Pi3/Pi4 install)
* generates website address link and shows credentials to access reef-pi

I'm going to be adding option for friendly URL, try and remove the output on terminal from processes so my guide isn't lost in it all and see if I can have this script auto start once.

@Ranjib Can a working database from a Pi Zero be installed over a working database on a Pi 3 or vice versa and work? What I want to do is setup reef-pi with defaults for my board, then with this script after it installs reef-pi it will copy over the database to match my board, then when they log in the drivers and connectors are there. This would be good for others who make boards as well, when this happens in script it can prompt, show a list of boards and a person can select what they have or skip. Right now I only have a Pi 3 so can't test.
 

Attachments

Last edited:
Well now I'm embarrassed, I posted this 15 minutes too soon, after this I started setting up a default database the I2C wasn't working, turns out just changing the config.txt file wasn't enough. So download this one instead. If a mod can remove the attachment on the previous post that would be cool. I tried but couldn't edit the post when I discovered.

This one is tested, I2C and 1-wire works. Command also needs sudo in front now.

sudo bash /boot/install_reefpi.sh
 

Attachments

Hi, I had taken my pi board out a couple of weeks back to test something else on the pi, I just realised my doser isn't working, it's powered via a pca9685, I don't seem to have any output from the PCA 9685 (zero volts) now I removed the PCA 9685 from the drivers and after a reboot I'm now getting this error.
Screenshot_2020-06-25-19-20-14-584_com.android.chrome.jpg

This shows up when I click on connectors, is there a way I can put a clean install over the top without having to wipe the SD card?
I think you have deleted a driver without deleting the corresponding connectors, which is breaking the UI. This bug is fixed in newer version, otherwise you have to reset the database
 
I've been playing with some code lately and made up a bash script that will install reef-pi from a fresh Raspbian install.

Now that I've done it so many times (one sd card doing 10 things) I see it really isn't that difficult but my first time it felt overwhelming as it was all new so this should help some. These steps will get you running.

1. Use Raspberry Pi Imager to install Rasbpian on your microSD card.

2. Add the files in attachment to /boot/ directory on microSD card. On Windows this is root directory of the SD card it shows. These 3 files are for wifi access to Pi and the installation script. Make sure to update the wpa_supplicant.conf file you just copied with your wifi login information.

3. Insert SD card into Pi, log into SSH terminal and run the following command.

bash /boot/install_reefpi.sh

4.
Login to reef-pi and setup.

This will do the following automatically, it's two steps as it needs a reboot after expanding the file system. After reboot log back into SSH terminal and it will continue.

* updates Raspbian
* expands file system on microSD card
* prompts for time zone (TZ database name - https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)
* enables time sync
* enables I2C
* sets I2C speed to 10 kHz
* disables SPI
* enables 1-wire
* enables PWM on Raspberry Pi pin GPIO12 and GPIO13
* installs reef-pi (prompts for Pi Zero W or Pi3/Pi4 install)
* generates website address link and shows credentials to access reef-pi

I'm going to be adding option for friendly URL, try and remove the output on terminal from processes so my guide isn't lost in it all and see if I can have this script auto start once.

@Ranjib Can a working database from a Pi Zero be installed over a working database on a Pi 3 or vice versa and work? What I want to do is setup reef-pi with defaults for my board, then with this script after it installs reef-pi it will copy over the database to match my board, then when they log in the drivers and connectors are there. This would be good for others who make boards as well, when this happens in script it can prompt, show a list of boards and a person can select what they have or skip. Right now I only have a Pi 3 so can't test.
yes, databases across pi zero/pi 3 should be portable. Let me know if you encounter any issue
 
I made up a sensor holder today for my ATO which is working great so far.
The lower one is the ATO sensor and the upper one turns off the skimmer if the water level gets high.

Is it possible to also use the upper sensor as a fail safe for the ATO if the sensor fails with the pump on? What would be the best way to set this up?
If I just set the upper sensor to turn the ATO pump off, will they just fight with each other each time the sensors do a check?

20200627_142627.jpg
 
Hi I am looking to add tds sensor for rodi. So I can go arduino one and tds board or is there a way to go analog to digital converter and then to pi? Mcp3008 driver is supported and izssame for ph.. is there something I am missing so tds would work on reefpi? Thank you!
 
Hi I am looking to add tds sensor for rodi. So I can go arduino one and tds board or is there a way to go analog to digital converter and then to pi? Mcp3008 driver is supported and izssame for ph.. is there something I am missing so tds would work on reefpi? Thank you!
Michael lane is working on an ads1115 driver, that might work aswell with a TDS meter.
 

ARE YOU READY TO CONFESS TO CRAZIEST, DUMBEST, FUNNIEST THING YOU’VE EVER DONE IN REEFING?

  • Yeah, I'll confess! (Share your story in the comments!)

    Votes: 16 57.1%
  • Nah, I'll keep mine a secret...(Don't be like that, share with the class!)

    Votes: 12 42.9%

New Posts

Back
Top
Home
Post thread…
Market
What's new