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

burningbaal

Active Member
View Badges
Joined
Aug 13, 2019
Messages
232
Reaction score
257
Location
Near Seattle
Rating - 0%
0   0   0
Anyone use a normal jabao 3 or 4 channel doser controlled by reef-pi? I bought @Michael Lane 's dosing adapter since I was buying something else from his shop. I think I'll have a shot at finding a used DP-4, but even the new DP-4s seems hard to find...Figure I could probably wire into the non-slave with the same dosing adapter...right?
 
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
A rebuild of my OS worked for me as well -- I think I missed the SPI config last time, which would totally bork the single-pin relay control, I think.

So I've got 3 temp probes, a float switch ATO and 8 relay ports working, although I only have one outlet in the house right now to use with the relay, but that's enough for the ATO pump.

I'm almost done with a shell script that will handle all of the config we need in raspbian:

timesyncd
dtoverlay=pwm-2chan
dtparam=spi=off
sudo modprobe w1-gpio

I'm also wondering what it would take to pre-bake an img file in CI, but I haven't looked into it yet.
You can, but im not sure its worth it. reef-pi does not have any dependencies which makes it easier to install straight using dpkg, most folks build distro because dependencies
 

raketemensch

Ape That Likes Fish
View Badges
Joined
Oct 13, 2019
Messages
378
Reaction score
478
Location
Northwest CT
Rating - 0%
0   0   0
You can, but im not sure its worth it. reef-pi does not have any dependencies which makes it easier to install straight using dpkg, most folks build distro because dependencies

Yeah, it looks pretty convoluted to do so, I was hoping for something as simple as a Dockerfile.

I’ll still wrap up the shell script, though, I have a strong aversion to GUIs for installation/configuration.
 

elysics

Valuable Member
View Badges
Joined
Jan 15, 2020
Messages
1,520
Reaction score
1,511
Rating - 0%
0   0   0
Hi @Ranjib , Im currently in the planning stages for my reef-pi. I saw that you mentioned on issue 668 on github that you might be planning to implement executing external programs/commands in Version 4.0. Is that still happening?

The reason i ask is because here in europe, germany in particular, there aren't any voltage controllable powerbars like the SRP8, that i could find (at least i didnt find any with prices that wouldnt make GHL the affordable option). The next closest thing is the Silvershield SIS-PMS or now rebranded Gembird/Energenie EG-PMS and its variants, but the problem is that the interface is some USB data exchange.
There is a well established opensource linux program/driver that can control these via command line (google "sispmctl"), so i was hoping to just be able to call that program.

My current alternative is to just throw a second pi at it to act as a translator between the input and output signals of reef-pi and the program, because i am not familiar with go and kind of overwhelmed with the reef-pi code so i dont know if there is a quick and dirty hacky way to do this, could you maybe point me in the right direction if you think there is?

I really don't wan't to mess with 230V for several reasons and dont trust radio controlled solutions enough to stake the life of my tank on them.
 
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
Yeah, it looks pretty convoluted to do so, I was hoping for something as simple as a Dockerfile.

I’ll still wrap up the shell script, though, I have a strong aversion to GUIs for installation/configuration.
Im in process of opensource the chef cookbooks. It covers stuff like essential services (ssh, timesync ), reef-pi installation, node exporter installation etc.
 
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
Hi @Ranjib , Im currently in the planning stages for my reef-pi. I saw that you mentioned on issue 668 on github that you might be planning to implement executing external programs/commands in Version 4.0. Is that still happening?

The reason i ask is because here in europe, germany in particular, there aren't any voltage controllable powerbars like the SRP8, that i could find (at least i didnt find any with prices that wouldnt make GHL the affordable option). The next closest thing is the Silvershield SIS-PMS or now rebranded Gembird/Energenie EG-PMS and its variants, but the problem is that the interface is some USB data exchange.
There is a well established opensource linux program/driver that can control these via command line (google "sispmctl"), so i was hoping to just be able to call that program.

My current alternative is to just throw a second pi at it to act as a translator between the input and output signals of reef-pi and the program, because i am not familiar with go and kind of overwhelmed with the reef-pi code so i dont know if there is a quick and dirty hacky way to do this, could you maybe point me in the right direction if you think there is?

I really don't wan't to mess with 230V for several reasons and dont trust radio controlled solutions enough to stake the life of my tank on them.
You can use the new HAL layer to write a driver for the specific powerstrip you want. Its really easy now post 3.0, let us know if you need any help
 
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
You can also grab the RTSP firmware from Wyze and that will allow you to stream the video feed, vs just having to use the Wyze application to view it. I've done this with 2 of my cams, one for the tank, and another in the sump.
Thats not supported last time i checked. Once you go that route, you;ll miss all the updates. I am still looking for a decent rtsp supported camera
 

Barclay

New Member
View Badges
Joined
Jan 9, 2014
Messages
13
Reaction score
6
Location
Potenza Italy
Rating - 0%
0   0   0
Hi friends, today my reef-pi has arrived, i took it used by a friend who had changed the project, i made all the updates and i started to see the operation, but when i go to configure the lights, i get this error, can someone help me? it's the first time i use raspberry and i don't know it at all, thanks to who will help me. PS I have already enabled I2C in raspi-config
IMG_20200120_232123.jpg
 

Urtoo

Well-Known Member
View Badges
Joined
Jul 1, 2019
Messages
688
Reaction score
924
Rating - 0%
0   0   0
Barclays, did you follow the guide?
Here is the link, you need to configure i2c in raspi-config
 

dmolavi

Well-Known Member
View Badges
Joined
Jan 3, 2015
Messages
509
Reaction score
644
Location
United States
Rating - 0%
0   0   0
Thats not supported last time i checked. Once you go that route, you;ll miss all the updates. I am still looking for a decent rtsp supported camera

True, but you can keep track of the updates, or go OpenIP Cam on the Wyze as well. You can also flash back the non-RTSP firmware if you want.
 

Barclay

New Member
View Badges
Joined
Jan 9, 2014
Messages
13
Reaction score
6
Location
Potenza Italy
Rating - 0%
0   0   0
[QUOTE = "Urtoo, post: 6972038, membro: 125000"]
Barclays, hai seguito la guida?
Ecco il link, devi configurare i2c in raspi-config
[URL unfurl = "true"] https://learn.adafruit.com/reef-pi-installation-and-configuration/raspberry-pi-configuration [/ URL]
[/CITAZIONE]
Hi, please read my post...
[QUOTE = "Urtoo, post: 6972038, membro: 125000"]
Barclays, hai seguito la guida?
Ecco il link, devi configurare i2c in raspi-config
[URL unfurl = "true"] https://learn.adafruit.com/reef-pi-installation-and-configuration/raspberry-pi-configuration [/ URL]
[/CITAZIONE]
please, read my post
 

burningbaal

Active Member
View Badges
Joined
Aug 13, 2019
Messages
232
Reaction score
257
Location
Near Seattle
Rating - 0%
0   0   0
anyone know a quick guide on telling reef-pi (v3.1) how to use pwm? I'm trying to get Michael Lane's Mars Aqua adapter working and can't find any info on adding a pwm driver.
He'll help later this evening, but figured the hive mind might have something ready-at-hand and take some burden off of him
 

Phildago

Well-Known Member
View Badges
Joined
Oct 11, 2019
Messages
854
Reaction score
933
Location
Broad Channel
Rating - 0%
0   0   0
anyone know a quick guide on telling reef-pi (v3.1) how to use pwm? I'm trying to get Michael Lane's Mars Aqua adapter working and can't find any info on adding a pwm driver.
He'll help later this evening, but figured the hive mind might have something ready-at-hand and take some burden off of him
You have to go into the terminal configuration and enable i2c communication
 

Michael Lane

Well-Known Member
View Badges
Joined
Aug 11, 2018
Messages
677
Reaction score
1,123
Rating - 0%
0   0   0
anyone know a quick guide on telling reef-pi (v3.1) how to use pwm? I'm trying to get Michael Lane's Mars Aqua adapter working and can't find any info on adding a pwm driver.
He'll help later this evening, but figured the hive mind might have something ready-at-hand and take some burden off of him

It sounds like you already have i2c enabled, so the next step is to verify that the i2c bus is working.

Verify the i2c address by running i2cdetect. You can install it with the following command if you don't already have it.
Bash:
sudo apt-get install i2c-tools

Bash:
i2cdetect -y 1

image


0x40 and 0x70 are the PCA9685 PWM chip. 0x45 is my pH module.

Next, in reef-pi, make sure you have Lighting and Dosing enabled at Configuration | Settings (depending on what you want to do). You'll need to Reload reef-pi from Configuration | Admin and then refresh your browser window.

1579740359277.png


A driver needs to be associated with the pwm chip at Configuration | Drivers

1579740553718.png


You can name it whatever makes sense to you. Choose pca9685 as the Type and keep 64 as the address unless your pca9685 was listed with an address different from 0x40. Use whatever frequency makes sense for your hardware.

Now you can create a Jack for the light or doser. Navigate to Configuration | Connectors. Click the Add button under jacks and create the jack you intend to use. In my case, I'm using pins 13 and 14 (exposed as the left pins on Light1 on my board). Be sure to choose the driver set up in the previous step.
1579741013756.png


From there, it's similar to previous versions of reef-pi. Create a new light and set it up as you like.
1579741232308.png

I like to switch to manual mode to test the outputs first.
1579741322556.png


This lets you change the output in real time without having to edit and save.
1579741375601.png
 

burningbaal

Active Member
View Badges
Joined
Aug 13, 2019
Messages
232
Reaction score
257
Location
Near Seattle
Rating - 0%
0   0   0
It sounds like you already have i2c enabled, so the next step is to verify that the i2c bus is working.

Verify the i2c address by running i2cdetect. You can install it with the following command if you don't already have it.
Bash:
sudo apt-get install i2c-tools

Bash:
i2cdetect -y 1

image


0x40 and 0x70 are the PCA9685 PWM chip. 0x45 is my pH module.

Next, in reef-pi, make sure you have Lighting and Dosing enabled at Configuration | Settings (depending on what you want to do). You'll need to Reload reef-pi from Configuration | Admin and then refresh your browser window.

1579740359277.png


A driver needs to be associated with the pwm chip at Configuration | Drivers

1579740553718.png


You can name it whatever makes sense to you. Choose pca9685 as the Type and keep 64 as the address unless your pca9685 was listed with an address different from 0x40. Use whatever frequency makes sense for your hardware.

Now you can create a Jack for the light or doser. Navigate to Configuration | Connectors. Click the Add button under jacks and create the jack you intend to use. In my case, I'm using pins 13 and 14 (exposed as the left pins on Light1 on my board). Be sure to choose the driver set up in the previous step.
1579741013756.png


From there, it's similar to previous versions of reef-pi. Create a new light and set it up as you like.
1579741232308.png

I like to switch to manual mode to test the outputs first.
1579741322556.png


This lets you change the output in real time without having to edit and save.
1579741375601.png
This looks better. I'll see if it actually lights up soon, but the config is there now!
I guess either the i2cdetect is required (it was new when I retrieved it) or I was just too blind to notice the other driver in the dropdown...Either way, I'm closer than I was!
 

fulltang

Active Member
View Badges
Joined
Dec 12, 2018
Messages
192
Reaction score
201
Rating - 0%
0   0   0
Here is one of my latest build, involving a pi zero, a temperature sensor and a float switch. It’s powered by 5v 2.4A micro USB adapter directly. Tiny and feature rich when combined with smart plugs , I am using it to benchmark various power banks for backup /emergency use cases.
3D models: https://www.thingiverse.com/thing:4077533

Here is how it looks in real life
747D93DB-5CF7-47D3-9A8D-B7794DD429AF.jpeg


Internals
E138B991-C356-46E6-A0A8-10F1B1521911.jpeg
EFA8B2FE-5E8F-493D-9A10-6C0D5395B654.jpeg

Hello! I'm currently in the process of setting up my first tank (a 2gallon pico jar) and I'm exploring the idea of a reef-pi to control temp in conjunction with some smart plugs, and this set up looks ideal. I live in the Bay Area and a victim of PG&E's power safety shutoffs during the summer, so being able to run off battery power is incredibly valuable to me. I really only need temperature control for my heater/fan, and my light would be a plus.

Do you have any further instruction on how to wire this up? Thank you so much for your hard work.
 

burningbaal

Active Member
View Badges
Joined
Aug 13, 2019
Messages
232
Reaction score
257
Location
Near Seattle
Rating - 0%
0   0   0
Hello! I'm currently in the process of setting up my first tank (a 2gallon pico jar) and I'm exploring the idea of a reef-pi to control temp in conjunction with some smart plugs, and this set up looks ideal. I live in the Bay Area and a victim of PG&E's power safety shutoffs during the summer, so being able to run off battery power is incredibly valuable to me. I really only need temperature control for my heater/fan, and my light would be a plus.

Do you have any further instruction on how to wire this up? Thank you so much for your hard work.
Welcome!

You can start here, but the easiest way is probably to buy from Michael Lane's Tindie store (his goby hat) or from Schreiber's current Leviathan Kickstarter.
Any of those options have readily-available plans to include temperature control, power control, and lighting. you'll need to be a little extra conscious of power consumption if you're expecting PG&E's extended outages, but @Ranjib (creator) is in the bay area, so I'm guessing he is in your boat as well :)

first tank as a pico, eh? pretty hard way to get started, best of luck!
 

Reefing threads: Do you wear gear from reef brands?

  • I wear reef gear everywhere.

    Votes: 31 16.1%
  • I wear reef gear primarily at fish events and my LFS.

    Votes: 11 5.7%
  • I wear reef gear primarily for water changes and tank maintenance.

    Votes: 1 0.5%
  • I wear reef gear primarily to relax where I live.

    Votes: 25 13.0%
  • I don’t wear gear from reef brands.

    Votes: 112 58.3%
  • Other.

    Votes: 12 6.3%
Back
Top