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

I have installed reef-pi using this guide here . However I cannot start ntp service with sudo systemctl start ntp.service and I suspect that’s the reason why I cannot use timers to trigger macros. Just looking to have some equipment off during the night. Everything else is working as expected. Is there any other way to start that service via SSH?
You probably don't need ntp service. I think Raspian no longer includes it, but systemd-timesyncd should do the same thing. I have several headless reef-pi setups and didn't have to mess with ntp for any of them.

You can confirm the newer time service is running with the following.
sudo systemctl status systemd-timesyncd.service
 
You probably don't need ntp service. I think Raspian no longer includes it, but systemd-timesyncd should do the same thing. I have several headless reef-pi setups and didn't have to mess with ntp for any of them.

You can confirm the newer time service is running with the following.
sudo systemctl status systemd-timesyncd.service
Thanks. That wasn’t the issue with my timers though. If I set up a timer to turn equipment on/off it will work. If I set it to trigger a macro it won’t . And it won’t show any error.
 
I can't remember where I bought these temp sensors. The wiring doesn't match up with the guide. The only thing that comes close is that's its the Japanese standard colors for temperature sensor wiring.
1596814105918.png

Can anyone help identify these wires or should I just buy new sensors with the correct color coding?
 
I can't remember where I bought these temp sensors. The wiring doesn't match up with the guide. The only thing that comes close is that's its the Japanese standard colors for temperature sensor wiring.
1596814105918.png

Can anyone help identify these wires or should I just buy new sensors with the correct color coding?
I'm pretty sure red is V+, white is ground, and yellow is data.
 
I am having an issue with a timer triggering a macro. I am on 3.3.1. I left a message with details in an existing issue post from May.

I can get a timer to start a simple macro, but when I try to have a timer trigger my real macro nothing happens.

If I missed something explaining this here let me know. Maybe I missed it.

Thanks,
Mike

I left the timer to start every minute at 0 seconds after about 10 minutes it ran. Over night I set it to run at 5 hr, 0 min, 0 sec. It ran.

From what I can tell the issue either resolved itself or it will work intermittently. Is there possibly an issue where if the pi doesn't look at the timer program during the "0" second that it misses the signal to start?
 
I've recently been down the rabbithole of Macros and Timers and thought I'd share some of my findings.

So, reef-pi can do the following since 3.0 :
  • Run a series of commands called a Macro - (Old news, but one of the most amazing features I believe)
  • Use a Timer to trigger a Macro to run.
  • Use a Macro to run another Macro or series of Macro's
  • Run a Macro in reverse. This runs the Macro steps in the reverse order and also reverses the individual steps - so "turn Item X on" becomes "turn Item X off". So a Macro with 3 steps like below
    • 1 - Turn X on
    • 2 - Turn Y off
    • 3 - Turn Z off will run as follows when run in reverse
    • 1 - Turn Z on
    • 2 - Turn Y on
    • 3 - Turn X off
  • To use this reversible function, Macros must have "Make Reversible" - "Yes" selected.
  • Once this is selected, you can run the Macro in reverse and you can use Timers and other Macros totrigger that Macro, BUT IT WILL RUN IN REVERSE. You can still run the Macro manually in forward mode, but any attempt to automate it's running will trigger it in reverse.
So for my Auto Water Change (AWC) macro, as long as I triggered it manually, it ran fine. However the only way I could get it to run properly on a timer was to re-write the Macro in reverse. Reversing the series of steps and their actions. This achieved what I was wanting - an AWC done at a preset time with no interaction from me.

This reversing thing isn't a big deal on simple Macros like "Turn X off, wait 300 seconds, Turn X on". If you run that in reverse, its exactly the same as forward. More complex Macros are not the same.

Macro's to run Macro's
I've had a "Feed" macro that I've developed and updated over time to be about an hour long now. It's evolved to be pretty bulletproof. Turning return off, skimmer off, temperature control, plus the chiller / heater off to make sure they aren't running while return is off. Turns wavemaker off for a calm period ofr fish to eat, then sowly turning the various pumps on to distribute the uneaten food so that it doesn't just end up down the overflow.
Now I managed to get a dry pellet autofeeder to run from reef-pi, I would like to be able to have a new Macro that triggers "Feed", waits 3 minutes, then triggers the autofeeder as often as I want. In order to get this right, I either need to re-write the new "Feed with autofeed" Macro or write the old "Feed" macro in reverse.
Not a big deal either way, but if you're planning on trying something similar, these are teh ways I've discovered to get these things done.

What would be nice (I think)
  • To be able to have Timers and Macros trigger Macros forward.
  • to be able to choose whether the reversible Macro runs steps in reverse, states in reverse, or both. I think I can see uses for all three.
I've rambled a bit in this post, I know, but if my experience helps another user, I'll be a happy boy.
I personally think that this kind of functionality is what makes these controllers some of the most powerful innovations in the reefkeeping hobby in recent years. Well, this and automated testing :D
I thought it would be good to repost this. This is the issue I was having with my macro. Using this post helped solve the issue.
 
I spent most of the day hopefully making my reef pi more reliable, I swapped out my l293d driver boards with l298n boards, I've removed all the jumper pins and soldered wires directly to the PCB's for the pwm module I cut 20 pin headers and fitted them upside down, then soldered the wires to the header, fingers crossed my reef pi will be reliable for some time.

IMG_20200809_194833.jpg
 
I spent most of the day hopefully making my reef pi more reliable, I swapped out my l293d driver boards with l298n boards, I've removed all the jumper pins and soldered wires directly to the PCB's for the pwm module I cut 20 pin headers and fitted them upside down, then soldered the wires to the header, fingers crossed my reef pi will be reliable for some time.

IMG_20200809_194833.jpg
I have had to open my case up probably 5 times due to broken wires or pins coming off. I guess stripping wires with with a blade isn’t smart. Lots of breaks where the strip started. I also started soldering my wires to the crimp pin connectors because they kept pulling out.
 
I have had to open my case up probably 5 times due to broken wires or pins coming off. I guess stripping wires with with a blade isn’t smart. Lots of breaks where the strip started. I also started soldering my wires to the crimp pin connectors because they kept pulling out.
Definitely get a wire stripper. My favorite electronics tool. Takes seconds instead of rolling a wire over a knife for minutes, no nicked wires, and the ka-ching sound it makes is super satisfying. And it's not even expensive.
 
Definitely get a wire stripper. My favorite electronics tool. Takes seconds instead of rolling a wire over a knife for minutes, no nicked wires, and the ka-ching sound it makes is super satisfying. And it's not even expensive.
As an electrician +1 on a good set of wire strippers!
 
Well guys I messed up I updated my reef-pi without a back up image of my SD now I keep getting this error? Can someone please help me. I have tried to uninstall it several times and cleared all data and a fresh install other that reinstalling rasbian I don't know what to do. Please help

15970152489721736946206519799550.jpg
 
Well guys I messed up I updated my reef-pi without a back up image of my SD now I keep getting this error? Can someone please help me. I have tried to uninstall it several times and cleared all data and a fresh install other that reinstalling rasbian I don't know what to do. Please help

15970152489721736946206519799550.jpg

If you're running a Pi4 you'll have to reinstall Raspbian but don't install the Raspbian update.
 
Thank you ill give that a shot. Do you happen to know why that is?
Cool, let me know if it works. I have no idea why it's happening, I think it's rather complicated to figure out.

@Ranjib @Michael Lane Do you think it's something serious? Should I stop recommending Pi 4? Since I make cases I know what people use and most is Pi 4 then Pi 3 and very few with Zero.
 
Cool, let me know if it works. I have no idea why it's happening, I think it's rather complicated to figure out.

@Ranjib @Michael Lane Do you think it's something serious? Should I stop recommending Pi 4? Since I make cases I know what people use and most is Pi 4 then Pi 3 and very few with Zero.


So just for crap$ and giggles I pulled my pi4 and slipped the old pi3 in and she's back working unfortunately I already cleared everything. With the 4 I was able to get it to kinda work intermittently but could not see any of my temps but she's going now off the old 3 and everything is currently just plugged into normal power for tonight while I setup all my I/O. I really need to learn how to copy an SD image and keep a second setup ready for this occasion. Thanks for the help I was ready to toss my pi4 in the trash i figured it took a crap on me
 
Thank you ill give that a shot. Do you happen to know why that is?
This seems to be due to a combination of a kernel update that reports a different version of the host and processor and a bit of code in kidoman/embd dependency that reef-pi uses.

embd/detect.go returns the error message that Smin was able to track down in the reef-pi logs. I believe Ranjib is working on a patch, although I'm not sure what the resolution may be since embd no longer seems to be an active project.
 
So just for ****$ and giggles I pulled my pi4 and slipped the old pi3 in and she's back working unfortunately I already cleared everything. With the 4 I was able to get it to kinda work intermittently but could not see any of my temps but she's going now off the old 3 and everything is currently just plugged into normal power for tonight while I setup all my I/O. I really need to learn how to copy an SD image and keep a second setup ready for this occasion. Thanks for the help I was ready to toss my pi4 in the trash i figured it took a crap on me

I've never tested to see what works and what doesn't after this happens but either way it's unusable. Download Win32 Disk Imager, you can create an image file of your SD card and use it to write back.

 
Im planning to run cooling fans over a l298 board via a pwm signal from a pca9685. The goal being PID control where the fans can spin slowly (and therefore silently) all the time instead of fast and loud again and again.

Now as far as i know reef-pi can't do this, but my question is, can i have an external program control that one channel of the pca9685 while reef-pi controls the others? or is that not going to work?
 

TOP 10 Trending Threads

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: 26 57.8%
  • Nah, I'll keep mine a secret...(Don't be like that, share with the class!)

    Votes: 19 42.2%
Back
Top
Home
Post thread…
Market
What's new