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

OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
I was thinking about that this morning. Couldn't we store on the SD card? I'm running a 64gb card. I have space. That would free up memory quite a bit. Maybe have it archive every 12 hours or so.
We could, but then that will incur disk I/O, which is another performance issue (CPU). I am shipping a feature that will allow customizing the retention period. It will help us identify if this is the actual cause. If so, I'll think of next steps.
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
@Ranjib I I confirmed the doser timer is working. I watched it dump 5ml at 7 this morning. The doser dashboard however is not updating. Which is strange because it used to update. I did a reboot last night to rule that out. In the pic alk is updating showing last dose yesterday at 1900. Alk adjustment has not updated since the 21st.
ac49db4d6ea1fa6fd67f964f070f438c.jpg
Did you made a hard restart of reef-pi (or it got killed by memory pressure), that may cause loss of stats as it was in memory
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
I am fighting a temp probe fail issue as well. Appears now that the jump wire or wires from the socket to the pi hat pins were loose. In soldered the pins and soldered the leads direct to the pi hat and so far, so good. I as well thought my sensors, that are new, were bad.
I am glad you shared this. I have only one probe failed on me in past 2-3 years, among the dozen I use. Its funny, becuase couple of my probes are really cheap, and not the black powder coated, they didn't even rust.
 

daveCB

Community Member
View Badges
Joined
Nov 5, 2013
Messages
39
Reaction score
77
Location
Mays Landing, NJ
Rating - 0%
0   0   0
Also, to jump back a few posts, I also conclude that I have a memory leak. I only have some timers doing wave makers and temp control running with one sensor. The balance is turned off. I also am transmitting data to Adafruit IO. I have a suspicion about that and I am turning it off for now. It was after I configured the IO that I noticed building memory after three or four days.
 

4dtough

New Member
View Badges
Joined
Jan 5, 2019
Messages
23
Reaction score
46
Rating - 0%
0   0   0
I have had random temp errors before but they have always stopped, today they didn't... I soldered up a new probe and dropped it in and sense to be working fine. Also the new probe reads about 1 degree higher. I have a digital thermometer for backup that had always read different than my first probe so maybe there had been a problem from the start.I've only had the reef pi up and running for about a month.
 

b4tn

Valuable Member
View Badges
Joined
Jun 17, 2015
Messages
1,673
Reaction score
2,244
Location
Columbia MD
Rating - 0%
0   0   0
Did you made a hard restart of reef-pi (or it got killed by memory pressure), that may cause loss of stats as it was in memory

I did a hard restart because 2 of my 4 doser dashboards where not updating. A hard restart did not fix the issue. It still will not update either on the timer or by running the calibrate function. The two main dosers on pin 1 and 0 update. The second dosers Are also on pin 1 and 0 but separate timers and they do not update on the dashboard
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Ranjib
How close are you to releasing 2.2 or 2.3?
I can cut it tonight, or do some more testing and release it later this weekend. This is such a trick software question :)
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,349
Reaction score
1,724
Location
Missouri
Rating - 0%
0   0   0
You are not over your head. It is just your head is not in the clouds like these geniuses.

The problem you are having is that the config.txt is a system file and is protected from accidental changes. It won't save changes for a normal user. To get around this open terminal and use the command "sudo nano /boot/config.txt". make the change then save by pressing ctrl X then yes to save.

"sudo" gives you admin rights and allows the file to be changed. "nano" is a text editor you can run from the terminal window.

I only know all this because I spent 30 minutes banging my head into a wall on why I couldn't change the file. The knot on my head grew new brain cells and I finally understood.

Much better explanation, thanks for providing the details, wasn't sure if nano was loaded by default for the gui, it usually is but wasn't sure. I pretty much always use vi and haven't played with the gui to know how they have things set up. Will try to load that up over the weekend so I can help answer questions from the perspective of the gui.

I have a lot to learn on the electronics side but I can help out with the system questions, been doing that for quite sometime. :)
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,349
Reaction score
1,724
Location
Missouri
Rating - 0%
0   0   0
I'm up to 58% on memory on day 4, looks like it goes up a little each day, free memory is 127M

2019/01/23 19:06:52 health check: Used memory: 58.36 Load5: 0.12
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,349
Reaction score
1,724
Location
Missouri
Rating - 0%
0   0   0
WRT storing data to disk, since flash memory is the weakest link, why not make that either a configurable option (every X hrs), to free up memory? Long term, maybe storing on google drive or something similar...

I was thinking about that this morning. Couldn't we store on the SD card? I'm running a 64gb card. I have space. That would free up memory quite a bit. Maybe have it archive every 12 hours or so.

I saw these postings this morning but unable to post from work, actually I would like being able to write to disk also, although I wouldn't write to the SD card I would write to a network share (NFS to be exact). I think this would be nice so if you do restart the reef-pi it reads the file and picks up from where it left off. I would also like to know if you can backup the database file and restore to a new installation so you don't have to re-configure things.

Great discussions as always, just thought I would weigh in. :)
 

DirtDiggler2823

If I can't break it, it doesn't exist
View Badges
Joined
Jul 31, 2018
Messages
1,667
Reaction score
2,077
Location
Gambrills
Rating - 0%
0   0   0
I saw these postings this morning but unable to post from work, actually I would like being able to write to disk also, although I wouldn't write to the SD card I would write to a network share (NFS to be exact). I think this would be nice so if you do restart the reef-pi it reads the file and picks up from where it left off. I would also like to know if you can backup the database file and restore to a new installation so you don't have to re-configure things.

Great discussions as always, just thought I would weigh in. :)
I have 4 usb slots I could use
 

theatrus

Valuable Member
View Badges
Joined
Mar 26, 2016
Messages
2,223
Reaction score
3,632
Location
Sacramento, CA area
Rating - 0%
0   0   0
I’m +1 on just going to disk, at least as an option. We already spill the reef pi log file to disk(c/o journald) and the telemetry database can be much smaller.
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
I saw these postings this morning but unable to post from work, actually I would like being able to write to disk also, although I wouldn't write to the SD card I would write to a network share (NFS to be exact). I think this would be nice so if you do restart the reef-pi it reads the file and picks up from where it left off. I would also like to know if you can backup the database file and restore to a new installation so you don't have to re-configure things.

Great discussions as always, just thought I would weigh in. :)
yes. you can just scp/copy the /var/lib/reef-pi/reef-pi.db file. That file and the reef-pi version running on it should be sufficient a recreate a reef-pi setup instantly (given the circuit is in place).
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Thought I'll share my controller memory/cpu charts.
Here is the first one, the ph monitor, runs nothing but ph monitoring and health check, backed my pi zero. Memory increases very little, and very slow (expected)
Screen Shot 2019-01-23 at 6.11.06 PM.png


here is the pico tank controller , powerd by the baseboard from @theatrus, running on pi zero, controlling ato, temperature controller, 6 equipment and kessil. very little memory usage increase
Screen Shot 2019-01-23 at 6.12.51 PM.png

Here is the nano tank controller, running pi zero, controlling couple of temperature (one just monitoring room temperature) controllers, equoment, bunch of timers (like nighly skimmer on/off). This one shows some memory growth, though I have restarted it couple of time in past week, paying attention to this one now..

Screen Shot 2019-01-23 at 6.14.46 PM.png


I just added the ability to control stats retention, if tuning that impacts this memory growth, then I know what to do next, else I have to do some profiling work
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,349
Reaction score
1,724
Location
Missouri
Rating - 0%
0   0   0
Thought I'll share my controller memory/cpu charts.
Here is the first one, the ph monitor, runs nothing but ph monitoring and health check, backed my pi zero. Memory increases very little, and very slow (expected)

here is the pico tank controller , powerd by the baseboard from @theatrus, running on pi zero, controlling ato, temperature controller, 6 equipment and kessil. very little memory usage increase

Here is the nano tank controller, running pi zero, controlling couple of temperature (one just monitoring room temperature) controllers, equoment, bunch of timers (like nighly skimmer on/off). This one shows some memory growth, though I have restarted it couple of time in past week, paying attention to this one now..


I just added the ability to control stats retention, if tuning that impacts this memory growth, then I know what to do next, else I have to do some profiling work

Now isn't that interesting, no memory increase and behaving like its supposed to. Looks like your running a mix of 2.0 and 2.1 versions. The one thing that jumps out at me is that you are running on all zero's, not sure the versions should make a difference but I need to go and look back at ryan115 and see what hardware he is using but that is a difference.
 
Back
Top