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
Hey @Ranjib would it be possible to add a delay timer to the equipment configuration something similar that you did with the option on reboot or power outage to not turn on? I would like the ability on a power reboot to delay certain equipment from turning back on for a period of time, like ATO, skimmer, wave pumps etc. I want them to turn on but id like to be able to specify a timer to run when things come back on and then turn them on when the timer expires.

I might have mentioned this in the past but right now we have the ability leave things off and I am looking for something in between. Use case, for my nano tanks with a sump it drains down with power outage and takes a few minutes to fill back up and the drain to flush the air etc, it can cause ATO to kick on not to mention having wave pumps kick back on before things are full etc. Wasn't sure if anyone else had requested something similar and thought I would throw it out.
:)
We can , but it will require some work. It’s bit complicated , not impossible as we have to do this asynchronously . Currently reef-pi sequentially starts /stop equipment as part of the start up . If delay is involved we have to do that process in dedicated thread (asynchronously ) , otherwise one equipment will block the starting of rest of things. While doing this, we have to also make sure we don’t shoot too many threads leading to some sort of cpu congestion.
This is doable , can you please submit a feature request ?
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,349
Reaction score
1,724
Location
Missouri
Rating - 0%
0   0   0
We can , but it will require some work. It’s bit complicated , not impossible as we have to do this asynchronously . Currently reef-pi sequentially starts /stop equipment as part of the start up . If delay is involved we have to do that process in dedicated thread (asynchronously ) , otherwise one equipment will block the starting of rest of things. While doing this, we have to also make sure we don’t shoot too many threads leading to some sort of cpu congestion.
This is doable , can you please submit a feature request ?
Yeah I wasn't sure how complicated it would be, if I had a way to start things back up after a reboot I could just change the setting to off and start them later. I thought about creating timers and checking every x minutes to ensure they are on but then I have to to remember to turn the timers off if I turn the equipment off etc. I know you have a lot of things that you are working on and I wouldn't want to do this unless others want it etc. Maybe we have something like this but sometimes I think it may be nice to have a feature request listing that users can vote on, that way you can see which feature requests are most wanted etc. Lets see if others chime in regards to if others may find it useful.

:)
 

elysics

Valuable Member
View Badges
Joined
Jan 15, 2020
Messages
1,591
Reaction score
1,590
Rating - 0%
0   0   0
Wouldn't a more general approach be the ability to run a macro on startup? That way you can leave everything that's not supposed to immediately reactivate on powerup off and the macro then turns stuff on after a time and/or does additional powerloos specific stuff. Sounds easier to implement too

Edit: i guess that's less powerful in the sense that it doesn't remember the previous state, but if there's some complex sequence going on and interrupted by powerloss, it seems to me to be better to reset that than having the controller try to carry on where it remembers it left off, where who knows what could have changed during the period of no power
 
Last edited:

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,349
Reaction score
1,724
Location
Missouri
Rating - 0%
0   0   0
Wouldn't a more general approach be the ability to run a macro on startup? That way you can leave everything that's not supposed to immediately reactivate on powerup off and the macro then turns stuff on after a time and/or does additional powerloos specific stuff. Sounds easier to implement too
Yeah I have thought about a macro but I'm pretty leary of automated macros. I use them all the time for water changes etc where I manually execute them, but not comfortable with having them automated but that may just be me. At one time I was trying to think of a way to do a cron job to enable the equipment based on uptime but just haven't gotten back to seeing how I could implement it. It's not as easy to say if uptime is greater than x since I only want to have it fire off once after a power on/reboot etc. I may be one of the few that think this is needed and do not want to spend time on it if it is a very narrow use case etc. I'd rather have him spend the time of things that are most requested etc.

But your right a macro would serve the purpose for putting in the order and having things turn as you would like, its how to have that executed on a power event etc.
 

elysics

Valuable Member
View Badges
Joined
Jan 15, 2020
Messages
1,591
Reaction score
1,590
Rating - 0%
0   0   0
Yeah I have thought about a macro but I'm pretty leary of automated macros. I use them all the time for water changes etc where I manually execute them, but not comfortable with having them automated but that may just be me. At one time I was trying to think of a way to do a cron job to enable the equipment based on uptime but just haven't gotten back to seeing how I could implement it. It's not as easy to say if uptime is greater than x since I only want to have it fire off once after a power on/reboot etc. I may be one of the few that think this is needed and do not want to spend time on it if it is a very narrow use case etc. I'd rather have him spend the time of things that are most requested etc.

But your right a macro would serve the purpose for putting in the order and having things turn as you would like, its how to have that executed on a power event etc.
you can do @reboot instead of a time in cron and have that run a script with a timer, if you want to do it in linux

like "@reboot sleep 300 && yourscript_here.sh"

Or a whole pile of other entry points that fire on startup

Be careful to keep a printed/written piece of paper around (and a file on a computer somewhere for copy/paste) with all the modifications you did to linux, if your pi/sd-card ever dies and you need to resetup reefpi. Had to spent a couple hours reresearching what i did a couple times because i didn't do this
 
Last edited:

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,349
Reaction score
1,724
Location
Missouri
Rating - 0%
0   0   0
you can do @reboot instead of a time in cron and have that run a script with a timer, if you want to do it in linux

like "@reboot sleep 300 && yourscript_here.sh"

Or a whole pile of other entry points that fire on startup

Be careful to keep a printed/written piece of paper around (and a file on a computer somewhere for copy/paste) with all the modifications you did to linux, if your pi/sd-card ever dies and you need to resetup reefpi. Had to spent a couple hours reresearching what i did a couple times because i didn't do this
Understand, I'm actually a linux person, all I pretty much run except when someone is paying me to use winblows etc. I agree though when setting another instance up its another thing to have to remember to do etc. Still mulling things over and why I haven't done anything up to now there really wasn't an easy button, lol. :)
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,349
Reaction score
1,724
Location
Missouri
Rating - 0%
0   0   0
I have a brand new 3a+ that I was able to score, if anyone is interested and needs one for a reef-pi project PM me. Only wanting someone that is looking to set up a reef-pi unit...not as cheap as a rpi zero w 2 but its not to bad, anyway throwing that out there. I am trying to pick some up to pass along at my cost plus shipping when I am able to score them, pretty slim pickens but just FYI...
 

DWKDiver

Community Member
View Badges
Joined
May 18, 2021
Messages
44
Reaction score
42
Location
Georgia
Rating - 0%
0   0   0
I had a diy controller that delayed items on restart. But I now use reef pi.

To emulate that on reef pi, I use a float for high sump level. If the power goes out the sump level rises. On power restored the sump float is high and that keeps my Skimmer and such from coming on until sump level is normal and it doesn't over flow.

Hope this may work for you.
 

PlantedAquaChicago

New Member
View Badges
Joined
May 10, 2022
Messages
13
Reaction score
18
Location
Chicago
Rating - 0%
0   0   0
Hi. I purchased a Leviathan Reef Pi 1.1 board recently. I've tried for a week now to get the image that they have on their website working, but even after 6 different Raspberry Pi devices, 5 different SD cards and 4 different power supplies (all known working) I can't get it to load. I have gotten through a manual OS and vanilla Reef-Pi installation, however I'm curious about how to configure the Leviathan hardware in Reef-Pi. I've read through their documentation top to bottom, and it doesn't provide any sort of instructions, save for using their pre-built image that doesn't work.

Anyone have any ideas how I can get started here? I've purchased all the sensors listed from RPO to pH, temp, optical level, etc.

*Edit*
To be more specific, I need the list of connectors. There are no schematics I can see, and even if I had one I'd rather not dig through that trying to figure out what goes where. Hopefully someone else has used this setup and can give me a screenshot or basic guide on how their hardware and connectors are setup, inlets/outlets etc.

And yes, I did email leviathan through the website.
 
Last edited:

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,349
Reaction score
1,724
Location
Missouri
Rating - 0%
0   0   0
Hi. I purchased a Leviathan Reef Pi 1.1 board recently. I've tried for a week now to get the image that they have on their website working, but even after 6 different Raspberry Pi devices, 5 different SD cards and 4 different power supplies (all known working) I can't get it to load. I have gotten through a manual OS and vanilla Reef-Pi installation, however I'm curious about how to configure the Leviathan hardware in Reef-Pi. I've read through their documentation top to bottom, and it doesn't provide any sort of instructions, save for using their pre-built image that doesn't work.

Anyone have any ideas how I can get started here? I've purchased all the sensors listed from RPO to pH, temp, optical level, etc.

*Edit*
To be more specific, I need the list of connectors. There are no schematics I can see, and even if I had one I'd rather not dig through that trying to figure out what goes where. Hopefully someone else has used this setup and can give me a screenshot or basic guide on how their hardware and connectors are setup, inlets/outlets etc.

And yes, I did email leviathan through the website.
Welcome! Not sure if @Schreiber has any board specific documentation but at least for getting the software loaded and configured I would follow this guide - https://docs.google.com/document/d/1t9majBpGlqKacDjkyEZ1HQNWsTRo3woZ/edit and towards the end there is a script that you can load and run that will guide you through initial setup and make sure everything is ready to go (the script will configure non robo-tank boards, highly recommended). Once you have done that I would then look at this manual - https://docs.google.com/document/d/1tjz9fLcwKz_VgTcj1oM2Nvs4kynVYJLV/edit#heading=h.30j0zll and the adafruit user guides - https://learn.adafruit.com/reef-pi-installation-and-configuration

That should at least get you started and answer most questions. :)
 

PlantedAquaChicago

New Member
View Badges
Joined
May 10, 2022
Messages
13
Reaction score
18
Location
Chicago
Rating - 0%
0   0   0
Welcome! Not sure if @Schreiber has any board specific documentation but at least for getting the software loaded and configured I would follow this guide - https://docs.google.com/document/d/1t9majBpGlqKacDjkyEZ1HQNWsTRo3woZ/edit and towards the end there is a script that you can load and run that will guide you through initial setup and make sure everything is ready to go (the script will configure non robo-tank boards, highly recommended). Once you have done that I would then look at this manual - https://docs.google.com/document/d/1tjz9fLcwKz_VgTcj1oM2Nvs4kynVYJLV/edit#heading=h.30j0zll and the adafruit user guides - https://learn.adafruit.com/reef-pi-installation-and-configuration

That should at least get you started and answer most questions. :)
Thank you! I have been through all the documentation provided by Leviathan and the Adafruit guides, but withouth a hardware list and schematic for this board, I was stuck at inlets and outlets. Hopefully this can auto-detect what I have and configure the board.

I'll try that right now and let you know how that goes. I have messaged the Leviathan board creator and it doesn't look like he's logged in for a few months so I'm guessing that's not a very common board. Hopefully someone has used it and can send me a screenshot of their connectors page so I can try to replicate it.

Thanks!
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,349
Reaction score
1,724
Location
Missouri
Rating - 0%
0   0   0
Thank you! I have been through all the documentation provided by Leviathan and the Adafruit guides, but withouth a hardware list and schematic for this board, I was stuck at inlets and outlets. Hopefully this can auto-detect what I have and configure the board.

I'll try that right now and let you know how that goes. I have messaged the Leviathan board creator and it doesn't look like he's logged in for a few months so I'm guessing that's not a very common board. Hopefully someone has used it and can send me a screenshot of their connectors page so I can try to replicate it.

Thanks!
I assume you have seen this documentation on his website? - https://www.leviathanautomation.com/manual

This manual looks like was updated in Feb and looks like it covers everything, he even has software image -
 

PlantedAquaChicago

New Member
View Badges
Joined
May 10, 2022
Messages
13
Reaction score
18
Location
Chicago
Rating - 0%
0   0   0
I assume you have seen this documentation on his website? - https://www.leviathanautomation.com/manual

This manual looks like was updated in Feb and looks like it covers everything, he even has software image -

Yes, as I said I've read through all of their documentation many times, very thoroughly. It only provides instructions for using their pre-built image, which is non-functional. I've tried with half a dozen Pi boards, SD cards and power supplies (all known working) and it always fails at the same spot.
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,349
Reaction score
1,724
Location
Missouri
Rating - 0%
0   0   0
Yes, as I said I've read through all of their documentation many times, very thoroughly. It only provides instructions for using their pre-built image, which is non-functional. I've tried with half a dozen Pi boards, SD cards and power supplies (all known working) and it always fails at the same spot.
The configuration of the bits should be the same regardless of the image, thats all done in reef-pi, typically the order is add drivers that you need, then connectors etc...I would think he touches on some of that information in his documentation - are you looking for wiring diagrams or what specifically are you looking for?

What size SD card are you using, I just looked at his image and it needs to be at least a 32g SD card to handle the image. What were you using to write the image to the SD card?
 
Last edited:

PlantedAquaChicago

New Member
View Badges
Joined
May 10, 2022
Messages
13
Reaction score
18
Location
Chicago
Rating - 0%
0   0   0
The configuration of the bits should be the same regardless of the image, thats all done in reef-pi, typically the order is add drivers that you need, then connectors etc...I would think he touches on some of that information in his documentation - are you looking for wiring diagrams or what specifically are you looking for?
As I said, the documentation doesn't cover any of that. It only references his pre-built image that already has the equipment and connectors already added. And as I said, yes - a wiring diagram would be great, although what would be best is:
Working image
Screenshot of connectors tab of reef-pi from someone who has this setup
Wiring diagram so I can figure out what goes where
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,349
Reaction score
1,724
Location
Missouri
Rating - 0%
0   0   0
I was able to mount the img and extract the database from the image, since you have a working image you can try to replace the database, not sure if he has things pre-configured or not but worth a shot. I do not have my testing unit up or I would try it and see what is configured. Will try to get it up and working later today and can try it then...if you want to wait.

The file will need to be renamed reef-pi.db, fyi...
 

Attachments

  • reef-pi-leviathon.txt
    64 KB · Views: 70

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,349
Reaction score
1,724
Location
Missouri
Rating - 0%
0   0   0
Oh my goodness, that's huge. Thank you so much! That's really above and beyond, thank you.

I will try it now and report back. Again, thank you so much!!!!!
Like I said I'm not sure whats in the database configured since my testing unit is down, but thought it couldn't hurt to swap it out and see...
 
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 able to mount the img and extract the database from the image, since you have a working image you can try to replace the database, not sure if he has things pre-configured or not but worth a shot. I do not have my testing unit up or I would try it and see what is configured. Will try to get it up and working later today and can try it then...if you want to wait.

The file will need to be renamed reef-pi.db, fyi...
You are our guardian angel :)
 

HAVE YOU EVER KEPT A RARE/UNCOMMON FISH, CORAL, OR INVERT? SHOW IT OFF IN THE THREAD!

  • 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