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

Sral

Valuable Member
View Badges
Joined
May 2, 2022
Messages
1,015
Reaction score
943
Location
Germany
Rating - 0%
0   0   0
I am having endless problems with my Reef-Pi installation including, but not limited to -
- Temperature probes randomly disappearing - I replaced all 3 yesterday and the problem persists - maybe even worse than before. Big issue is if a heater or something stays on.
- I cannot get Adafruit integration working - I keep getting told "invalid AIO key" and similar stuff.
- pH will not work - tried a new probe and still nothing.

I constantly have 50-80 errors in the "Error" tab. Clear them and more appear immediately - mostly from the AIO stuff.

My current system was set up early 2021 on a Rpi4. So the SD card is +- 3 years old. Could that be my problem? Would installing a small (128GB) SSD be a better call?

I am fast approaching the point where the constant admin of checking everything is OK is getting to be a bit of a pain. Would a fresh install help my problems?

Could I safely export the database and restore on the fresh setup? Or is there a chance I could migrate a problem?
Personally that sounds more like a hardware or software interface issue ... a fresh install should not hurt.
That's what the export and import feature is meant to be useful for.

I'd personally make a fresh install on another SD card (or SSD if you like) of a quality that you would trust and import the database there. If it doesn't work against all expectation, you still have the old SD as a backup.

Which version are you using ? It might be important to install exactly the same version you are currently using, just to be safe.
 

yury88

Active Member
View Badges
Joined
Oct 21, 2023
Messages
209
Reaction score
156
Location
indo-pacific
Rating - 0%
0   0   0
Hi folks.
May I ask- do we have some kinda standard for WEB/REST API hardware integration?
Because I'm going to add support of my project with smart doser to reef-pi and It's will be nice use same command structure for these kind of hardware, so far I'm trying to follow patterns in esp32, but appreciate for some advice.
 

Des Westcott

Well-Known Member
View Badges
Joined
May 29, 2018
Messages
646
Reaction score
1,025
Location
Durban - South Africa
Rating - 0%
0   0   0
Personally that sounds more like a hardware or software interface issue ... a fresh install should not hurt.
That's what the export and import feature is meant to be useful for.

I'd personally make a fresh install on another SD card (or SSD if you like) of a quality that you would trust and import the database there. If it doesn't work against all expectation, you still have the old SD as a backup.

Which version are you using ? It might be important to install exactly the same version you are currently using, just to be safe.
Thanks Sral

The plan with the new SD is one that I already have underway at the moment. I have a new card and am busy doing a fresh install.

I am currently running 6.0. Started as 3.xx I think, but I will back up the 6.0 DB, install 6.0 and thenrestore the DB.
 
Last edited:

InactiveAcct

Well-Known Member
View Badges
Joined
Dec 2, 2019
Messages
520
Reaction score
501
Rating - 0%
0   0   0
I am having endless problems with my Reef-Pi installation including, but not limited to -
- Temperature probes randomly disappearing - I replaced all 3 yesterday and the problem persists - maybe even worse than before. Big issue is if a heater or something stays on.
- I cannot get Adafruit integration working - I keep getting told "invalid AIO key" and similar stuff.
- pH will not work - tried a new probe and still nothing.

I constantly have 50-80 errors in the "Error" tab. Clear them and more appear immediately - mostly from the AIO stuff.

My current system was set up early 2021 on a Rpi4. So the SD card is +- 3 years old. Could that be my problem? Would installing a small (128GB) SSD be a better call?

I am fast approaching the point where the constant admin of checking everything is OK is getting to be a bit of a pain. Would a fresh install help my problems?

Could I safely export the database and restore on the fresh setup? Or is there a chance I could migrate a problem?


If you haven’t yet you can use the Prometheus telemetry guide (forum sticky) to get good insights into how hardware is performing.

I think there is a memory leak related to adafruit integration. I was having periodic dropouts daily associated with high CPU and memory activity. You can see the missing data and hardware activity in the Grafana screenshots below. Reefpi log was showing Adafruit errors at the same time. I turned off adafruit and have been running 2.5 days with no issues.

I am unclear why the Pi always uses >99% SWAP even when RAM is available. If your memory card is failing this could really hose you as the card would be acting as RAM.

I do run pretty heavy:
Pi4B 2GB RAM
Constant VNC share to iPad2 as monitor
Prometheus and Grafana running locally

IMG_8178.jpeg IMG_8177.jpeg IMG_8176.jpeg
 

yury88

Active Member
View Badges
Joined
Oct 21, 2023
Messages
209
Reaction score
156
Location
indo-pacific
Rating - 0%
0   0   0
Is it possible to install to a USB drive to avoid using the SD as SWAP? I'd imagine the SD would last longer in such a case.
Hi, kernel is smart, even if RAM empty it can use SWAP for loaded in memory objects.
Just edit /etc/sysctl.conf and put the line:
vm.swappiness=0

By default it's not set and parameter=60

To apply without reboot:
sudo sysctl vm.swappiness=0

With these your raspberry will avoid using SWAP as possible.

And it's good idea to move swapfile to mounted USB and even increase it's size to 8-16GB+
Because memory leak's happening some times and it will give your system chance to survive before you will mention it
 

Des Westcott

Well-Known Member
View Badges
Joined
May 29, 2018
Messages
646
Reaction score
1,025
Location
Durban - South Africa
Rating - 0%
0   0   0
If you haven’t yet you can use the Prometheus telemetry guide (forum sticky) to get good insights into how hardware is performing.

I think there is a memory leak related to adafruit integration. I was having periodic dropouts daily associated with high CPU and memory activity. You can see the missing data and hardware activity in the Grafana screenshots below. Reefpi log was showing Adafruit errors at the same time. I turned off adafruit and have been running 2.5 days with no issues.

I am unclear why the Pi always uses >99% SWAP even when RAM is available. If your memory card is failing this could really hose you as the card would be acting as RAM.

I do run pretty heavy:
Pi4B 2GB RAM
Constant VNC share to iPad2 as monitor
Prometheus and Grafana running locally

IMG_8178.jpeg IMG_8177.jpeg
IMG_8176.jpeg
I would like to move to the Grafana / Prometheus setup, but I am still doing my research, as I don't fully understand the "installation guide". It seems to assume the reader has a more intimate knowledge of Linux etc than I do. Working through all the steps so I at least get a partial understanding of what I'm doing. Then I can abandon the Adafruit idea.

I'm also running a Pi4 2GB. I have just upgraded an old desktop PC, so have the old one sitting as "spare" - thinking to set that up as the server.
 

InactiveAcct

Well-Known Member
View Badges
Joined
Dec 2, 2019
Messages
520
Reaction score
501
Rating - 0%
0   0   0
I would like to move to the Grafana / Prometheus setup, but I am still doing my research, as I don't fully understand the "installation guide". It seems to assume the reader has a more intimate knowledge of Linux etc than I do. Working through all the steps so I at least get a partial understanding of what I'm doing. Then I can abandon the Adafruit idea.

I'm also running a Pi4 2GB. I have just upgraded an old desktop PC, so have the old one sitting as "spare" - thinking to set that up as the server.
I struggled a little with the guide, ChatGPT got me through it. You can tell it what you’re doing and copy/ paste the code, it’ll tell you if it sees errors and give you something to copy and paste back in. You can also drop long error codes into it and it can usually figure them out
 

Sral

Valuable Member
View Badges
Joined
May 2, 2022
Messages
1,015
Reaction score
943
Location
Germany
Rating - 0%
0   0   0
https://github.com/reef-pi/pH-Board This board!

can I use the temperature from my sensor to optimize my ph reading? the ph is influenced by temperature.

:)
Ah, cool. That would make this rather easy regarding adresses ^^

Reading from this document mostly the pH of a solution is affected by temperature. Temperature does affect the probe and reference solutions rather little. From the docs is looks like the reference is afftected very little (maybe to 0.05 pH) and the probe is also not affected much (+/- 2% of the difference to pH 7.0 between 20C and 30C).

This should mean that temperature effects create deviations less than 0.1pH, whereas people I have read typically don't expect to be able to calibrate better than 0.1pH anyways.

You could try to do two things to compensate:
- When calibrating, make sure your solutions have the same temperature as your probe and tank and use the appropriate pH value for that temperature. You should be able to find that on the reference solution package.
- Use a transform formula to compensate for the change in probe behavior with temperature:
(v-7.0)/(1.0+0.99/5/59.16*T_diff) + 7.0
For T_diff you just enter the temperature difference that your tank has to 25°C. E.g. if your tank is kept at 28°C, just enter 3.0 there. FOr a temperature of 22°C, you enter -3.0
For that example this will result in a pH value of 8.2 to be corrected to 8.19

I don't think it's worth the effort.
 

bh750

Active Member
View Badges
Joined
Nov 17, 2016
Messages
419
Reaction score
265
Rating - 0%
0   0   0
Hi all, I'm a 10 year survivor of Apex. I will never, ever invest in their products again. More frustration than problems over the years. I came on here to see what its like in the DIY / open source world.

Just scanning through the pages my first reaction is ReefPi seems very technical and may have to spend lots of time troubleshooting. I'm not a developer but I work in technology and am fairly tech saavy.

- Is this something for a somewhat techy person but not an engineer?
- How much better than Apex?
- Is there a basic / newbie / beginner path? I dont need to control a ton of things but would be nice to automate things like lights and get some basic readings an monitoring

Back to more reading here! Thanks in advance!
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,680
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
reef-pi is a DIY project, it can be as hard as a furniture making/fine woodworking or even more (if you do not have any prior experience with computer stuff). Expect some learning, time involvement etc. It's an involved thing. its a project :-/

There are some off the shelf components that you can use to make it simpler and less cumbersome, albeit with compromises.

Its no where near as smooth experience as Apex. But it does the basic jobs (equipment control, temperature, ato control, ph monitoring etc ) fairly well. Many of us are running it for years now. I am of course biased :0) , I have been running 5+ tanks for 3+ years, few of them are more than 7 years old. All are on reef-pi from ground up, they are not super fancy, but also proper mix reef tanks (with beginner to intermediate level acros)


Hope this help,
 

Lingwendil

Well-Known Member
View Badges
Joined
Jul 23, 2012
Messages
534
Reaction score
447
Location
Antioch, California
Rating - 0%
0   0   0
Hey Ranjib, just a question on PWM with the PCA board for lighting.

I know that the PCA9685 supports 12 bit PWM, which accounts to 4096 steps. Is it possible to break the selected percentage down lower than 1% steps manually in reef-pi for sub 1% PWM output?

The reasoning behind this request is as follows-

My current Arduino setup uses a PCA9685 board for PWM, with Meanwell LDD -L and LDD-H drivers. The output is set by manually filling in the value from 0000-4095. I run my white channels at a 0001 or 0002 value, as anything higher is much too bright on my main channels. I also am not interested in adding specific moonlights at this time, as the main lights are excellent when appropriately dimmed.

Is this something that can be done easily in reef-pi, or does the ability to set/view actual steps versus 0-100% not currently exist?
 

InactiveAcct

Well-Known Member
View Badges
Joined
Dec 2, 2019
Messages
520
Reaction score
501
Rating - 0%
0   0   0
Hi all, I'm a 10 year survivor of Apex. I will never, ever invest in their products again. More frustration than problems over the years. I came on here to see what its like in the DIY / open source world.

Just scanning through the pages my first reaction is ReefPi seems very technical and may have to spend lots of time troubleshooting. I'm not a developer but I work in technology and am fairly tech saavy.

- Is this something for a somewhat techy person but not an engineer?
- How much better than Apex?
- Is there a basic / newbie / beginner path? I dont need to control a ton of things but would be nice to automate things like lights and get some basic readings an monitoring

Back to more reading here! Thanks in advance!

It wasn’t too bad for me but things that help are knowing how to use a multimeter for continuity/ resistance and voltage, good soldering / wire splicing skills with a good soldering iron (I prefer a solder gun which heats up really fast), using a heat gun and shrink sleaving, CAD and 3D printing. Programming skills come in handy but are more accessible with chatGPT etc. Will also save time and headache to do the more complicated circuits like L293D motor driver with an off the shelf breakout board so you can just connect leads to it.

An old version of my wiring diagram is below (had to make some changes, float switches each needed their own 10kohm resistor was biggest change) along with some pics. With time and patience it will be a rewarding project.

IMG_8115.jpeg IMG_8130.jpeg IMG_8129.jpeg
 
Last edited:

yury88

Active Member
View Badges
Joined
Oct 21, 2023
Messages
209
Reaction score
156
Location
indo-pacific
Rating - 0%
0   0   0
I know that the PCA9685 supports 12 bit PWM, which accounts to 4096 steps. Is it possible to break the selected percentage down lower than 1% steps manually in reef-pi for sub 1% PWM output?
I'm never used it for light, but you can just type float value in interface.
Like 0.024%...
 

yury88

Active Member
View Badges
Joined
Oct 21, 2023
Messages
209
Reaction score
156
Location
indo-pacific
Rating - 0%
0   0   0
Hi all, I'm a 10 year survivor of Apex. I will never, ever invest in their products again. More frustration than problems over the years. I came on here to see what its like in the DIY / open source world.

Just scanning through the pages my first reaction is ReefPi seems very technical and may have to spend lots of time troubleshooting. I'm not a developer but I work in technology and am fairly tech saavy.

- Is this something for a somewhat techy person but not an engineer?
- How much better than Apex?
- Is there a basic / newbie / beginner path? I dont need to control a ton of things but would be nice to automate things like lights and get some basic readings an monitoring

Back to more reading here! Thanks in advance!
What problems do you want to solve by switching to reef-pi?

I can say that the biggest challenge that you are going to face in this way - commercial equipment like dosers, KH auto-testers etc just do not have any API or interfaces for reef-pi integration.

So you will use "Apex" any way because functionality is limited by available hardware, not software.
 
Last edited:
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,680
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Hey Ranjib, just a question on PWM with the PCA board for lighting.

I know that the PCA9685 supports 12 bit PWM, which accounts to 4096 steps. Is it possible to break the selected percentage down lower than 1% steps manually in reef-pi for sub 1% PWM output?

The reasoning behind this request is as follows-

My current Arduino setup uses a PCA9685 board for PWM, with Meanwell LDD -L and LDD-H drivers. The output is set by manually filling in the value from 0000-4095. I run my white channels at a 0001 or 0002 value, as anything higher is much too bright on my main channels. I also am not interested in adding specific moonlights at this time, as the main lights are excellent when appropriately dimmed.

Is this something that can be done easily in reef-pi, or does the ability to set/view actual steps versus 0-100% not currently exist?
Reef-pi accepts a float value 0-100, for jack control (Pwm connector ) and the individual drivers maps it back to corresponding range (0-4095 for pca9685) .. this should not require any software changes .. on reef-pi side, you should be able to get this working by standard pwm circuitry,.. software drivers should take care of rest
 

bh750

Active Member
View Badges
Joined
Nov 17, 2016
Messages
419
Reaction score
265
Rating - 0%
0   0   0
Thanks for the insight and feedback....

reef-pi is a DIY project, it can be as hard as a furniture making/fine woodworking or even more (if you do not have any prior experience with computer stuff). Expect some learning, time involvement etc. It's an involved thing. its a project :-/

There are some off the shelf components that you can use to make it simpler and less cumbersome, albeit with compromises.

Its no where near as smooth experience as Apex. But it does the basic jobs (equipment control, temperature, ato control, ph monitoring etc ) fairly well. Many of us are running it for years now. I am of course biased :0) , I have been running 5+ tanks for 3+ years, few of them are more than 7 years old. All are on reef-pi from ground up, they are not super fancy, but also proper mix reef tanks (with beginner to intermediate level acros)


Hope this help,

Thanks this is encouraging, altho would never attempt making fine furniture :) As I'll detail below I am looking to do the most basic stuff.

It wasn’t too bad for me but things that help are knowing how to use a multimeter for continuity/ resistance and voltage, good soldering / wire splicing skills with a good soldering iron (I prefer a solder gun which heats up really fast), using a heat gun and shrink sleaving, CAD and 3D printing. Programming skills come in handy but are more accessible with chatGPT etc. Will also save time and headache to do the more complicated circuits like L293D motor driver with an off the shelf breakout board so you can just connect leads to it.

An old version of my wiring diagram is below (had to make some changes, float switches each needed their own 10kohm resistor was biggest change) along with some pics. With time and patience it will be a rewarding project.

Oh good - I'm very comfortable with basic wiring, using a multimeter, soldering skills, shrink sleeving. But no experience with CAD or 3D printing. Will I need a 3D printer? I have basic programming skills. Thanks for sending the diagram. How large are those boxes you show with all of the circuits?

What problems do you want to solve by switching to reef-pi?

I can say that the biggest challenge that you are going to face in this way - commercial equipment like dosers, KH auto-testers etc just do not have any API or interfaces for reef-pi integration.

So you will use "Apex" any way because functionality is limited by available hardware, not software.

So I'm really only looking to do some basic things: read temp, PH, Salinity, and turn on and off things like lights and pumps.

Is this something that can be kept as simple or complex as desired?

I also read somewhere someone mentioned their chip catching fire and had someone not been there could've burnt down the house (always a consideration with reef tanks) but is this a real risk?

Ideally I'd love to make something a simple as possible to:

1) Reporting of Parameters:
- Temperature
- Salinity
- PH

2) Turn on and off outlets:
- LED lights (Kessil A360) and maybe ramp up and down like I could with my apex
- pumps / powerheads on an off as needed
- Skimmer
- Heaters


If I could do that without burning down the house or my bank account I'd be thrilled!
 

TOP 10 Trending Threads

WHAT AMOUNT OF LIVE ROCK AND SAND SHOULD BE PRIORITIZED FOR OPTIMAL BIODIVERSITY/FILTRATION?

  • 100% live rock + bagged sand

    Votes: 38 27.3%
  • 100% dry rock + 100% live sand

    Votes: 47 33.8%
  • 50/50 live/dry rock, 50/50 live/bagged sand

    Votes: 30 21.6%
  • 75% live rock, 25% live sand

    Votes: 14 10.1%
  • 25% live rock, 75% live sand

    Votes: 10 7.2%
Back
Top