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

That Crusso Kid

10K Club member
View Badges
Joined
Oct 21, 2018
Messages
14,896
Reaction score
76,040
Location
SW, FL, USA
Rating - 0%
0   0   0
How do I set the timer to initiate a macro on a certain day of the week, at a certain time? Trying to have my skimmer shut down when I have my doser going.

From @Des Westcott 's most recent post below, it sounds like he has a "feed" macro that accomplishes what you're looking to do with your skimmer @DirtDiggler2823 . Maybe he can help you out.

Yesterday I had the temp probe / calibration / loose wire issue. Personally I don't think it was a bad connection issue, as unplugging one probe and replugging it caused all 3 temp readings to immediately re-appear - but I could be wrong - it just doesn't feel right.

Last night I went to feed - I have a "Feed" Macro that turns off pumps, skimmer etc for certain durations and then back on to minimise uneaten food. Every time I hit the Macro, I would get the "Fatal Error" like below.
2020-01-30.png


I thought it was WiFi related, so waited a while and tried various devices and all the same thing. Then I discovered that I could go to the equipment tab and control individual equipment directly without getting the error. Try "Feed" macro again, same error. Try run other macros, no error.

Obviously sleeping on this problem has led to an epiphany, because within minutes of waking up this morning, I remembered something. Step one in my "Feed" macro is to turn temperature control off. Yesterday's temp probe issue had me delete my main temp control and re-configure it - renaming it in the process. This made the macro point to a temp control that doesn't exist any more. I fixed the macro by telling it the correct temp control and problem solved.

So the issue was entirely of my own making, but maybe a more relevant error message would make it easier for people to troubleshoot the issue when faced with a similar mistake.
 

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
From @Des Westcott 's most recent post below, it sounds like he has a "feed" macro that accomplishes what you're looking to do with your skimmer @DirtDiggler2823 . Maybe he can help you out.

Actually my "Feed" macro is manually actuated as I don't feed at exactly the same time every day.

BUT I have been trying to get a macro to actuate on a timer and failing, but made a breakthrough just today. I got the timer and macro combination to work simply by making the macro to be triggered reversible. It's one of the first options when setting up a macro.

For more info on getting a timer to trigger at a certain time, Google "Cron cheat sheets" and you'll find lots of info on using the timer in reef-pi.

Here's one that helped me
 

DirtDiggler2823

If I can't break it, it doesn't exist
View Badges
Joined
Jul 31, 2018
Messages
1,667
Reaction score
2,075
Location
Gambrills
Rating - 0%
0   0   0
Actually my "Feed" macro is manually actuated as I don't feed at exactly the same time every day.

BUT I have been trying to get a macro to actuate on a timer and failing, but made a breakthrough just today. I got the timer and macro combination to work simply by making the macro to be triggered reversible. It's one of the first options when setting up a macro.

For more info on getting a timer to trigger at a certain time, Google "Cron cheat sheets" and you'll find lots of info on using the timer in reef-pi.

Here's one that helped me
I manually trigger my feeding macros as well, but this is for dosing. Trying to designate certain days of the week for the timer to trigger. Right now I have it set for every day, even though I'm not dosing every day.
 

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
I manually trigger my feeding macros as well, but this is for dosing. Trying to designate certain days of the week for the timer to trigger. Right now I have it set for every day, even though I'm not dosing every day.

In that case I would write a macro that handles the turning off of equipment, maybe waiting, dosing and then turning back on. I'd then use a timer to run the macro. The cron variables in the timer configuration will dictate how often the macro runs and the macro will control what happens.

The timer variables are actually very powerful and you can easily set them up to run x times a day or every x hours/ minutes .

Well maybe not easily, depending how you get your head around the Cron syntax, but it is doable
 

DirtDiggler2823

If I can't break it, it doesn't exist
View Badges
Joined
Jul 31, 2018
Messages
1,667
Reaction score
2,075
Location
Gambrills
Rating - 0%
0   0   0
Even the dosing module is basically just a Cron job at its heart
The doser isn't tied to the reef-pi, and I've built the macro to shut down and restart the skimmer. I just can't choose which days of the week it will run.
 

elysics

Valuable Member
View Badges
Joined
Jan 15, 2020
Messages
1,695
Reaction score
1,607
Rating - 0%
0   0   0
Could we get if-then-else statements for the macros that take sensor data and equipment statuses as parameters? Or are the different subsystems too dissimilar under the hood?

Could have a wide range of applications, from custom alerts, to automated fallback procedures in case of emergencies like a floor water sensor tripping or a power outage being sensed somehow, maybe even regulating different reactors without having to code an entire subsystem for each one-off application.

Unless it already exists somewhere and i am too stupid to see 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
Could we get if-then-else statements for the macros that take sensor data and equipment statuses as parameters? Or are the different subsystems too dissimilar under the hood?

Could have a wide range of applications, from custom alerts, to automated fallback procedures in case of emergencies like a floor water sensor tripping or a power outage being sensed somehow, maybe even regulating different reactors without having to code an entire subsystem for each one-off application.

Unless it already exists somewhere and i am too stupid to see it?

I agree that this would be handy and is basically how ATO, Temp and pH control work.

Maybe add the idea as a post on the UI Thread
 
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
Could we get if-then-else statements for the macros that take sensor data and equipment statuses as parameters? Or are the different subsystems too dissimilar under the hood?

Could have a wide range of applications, from custom alerts, to automated fallback procedures in case of emergencies like a floor water sensor tripping or a power outage being sensed somehow, maybe even regulating different reactors without having to code an entire subsystem for each one-off application.

Unless it already exists somewhere and i am too stupid to see it?
reef-pi will not have DSL (domain specific language) like Apex. The if/else/then like construct are exposed via ATO (binary sensor) and temperature/ph (analog sensor). reef-pi will allow seamless integration of those modules with macro (linear steps with reversible execution). DSL require more work and exposes arbitrary workflows that are very hard to diagnose when things go wrong.
reef-pi has API, and that you can use to directly program anything that reef-pi may not be able to do easily.
 
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
Anyone here lives in colorado , Denver ? Planning to attend reef stock?
 
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
Yesterday I had the temp probe / calibration / loose wire issue. Personally I don't think it was a bad connection issue, as unplugging one probe and replugging it caused all 3 temp readings to immediately re-appear - but I could be wrong - it just doesn't feel right.

Last night I went to feed - I have a "Feed" Macro that turns off pumps, skimmer etc for certain durations and then back on to minimise uneaten food. Every time I hit the Macro, I would get the "Fatal Error" like below.
2020-01-30.png


I thought it was WiFi related, so waited a while and tried various devices and all the same thing. Then I discovered that I could go to the equipment tab and control individual equipment directly without getting the error. Try "Feed" macro again, same error. Try run other macros, no error.

Obviously sleeping on this problem has led to an epiphany, because within minutes of waking up this morning, I remembered something. Step one in my "Feed" macro is to turn temperature control off. Yesterday's temp probe issue had me delete my main temp control and re-configure it - renaming it in the process. This made the macro point to a temp control that doesn't exist any more. I fixed the macro by telling it the correct temp control and problem solved.

So the issue was entirely of my own making, but maybe a more relevant error message would make it easier for people to troubleshoot the issue when faced with a similar mistake.
We have to do much better job at validation on reef-pi side. Currently only outlet deletion are validated. Across the board connectors , drivers , modules (temperature, ph, light , etc) all components must validate zero dependency before deletion. In absence of this , users are prone to get into inconsistent state leading to a lot of issues. That’s not acceptable , I’ll make sure we get this in 3.x series .
 

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
We have to do much better job at validation on reef-pi side. Currently only outlet deletion are validated. Across the board connectors , drivers , modules (temperature, ph, light , etc) all components must validate zero dependency before deletion. In absence of this , users are prone to get into inconsistent state leading to a lot of issues. That’s not acceptable , I’ll make sure we get this in 3.x series .

Yeah. Sometimes I feel bad for only seeming to talk about "problems" on this thread - I can't really "fix" anything in reef-pi myself. But I understand that you guys need the feedback / information. Nothing you can do about something if it isn't reported.

I'm just thankful that there are you guys that are doing the work in the background to constantly make it better. One step at a time.
 

Phildago

Well-Known Member
View Badges
Joined
Oct 11, 2019
Messages
854
Reaction score
908
Location
Broad Channel
Rating - 0%
0   0   0
Everyone in this forum and in this thread helped me so much with my reef pi. I use it to control my doser and its given me so much more convenience than I had before with even more accuracy then I could've imagined.

I upgraded my doser to reef pi from a jebao master doser. The jebao allowed me to change my dose by 1 ml/day, but in doing so I had to get under my tank and reconfigure the whole schedule, hour by hour in order to get an even disbursement throughout the day.

Now I can log in in my phone and increase by small increments, even just 1 or 2 percent/dose, or adding a fraction of a second to each dose.

So simple and it's giving me a level of accuracy that I didn't even consider. I'm close to having it perfectly dialed in at this point. I think within a few days I'll have no noticeable fluctuation
 

stefanm

Active Member
View Badges
Joined
Oct 11, 2017
Messages
360
Reaction score
394
Location
Sweden
Rating - 0%
0   0   0
Slight problem, my reef pi was running perfectly for quite a while, I recently noticed that the calcium had stopped dosing, despite being programmed correctly, also my main temperature sensor whilst working was displaying weird numbers.

So I decided to run the update from 2.3 to 3.0, the dosers didn't work at all and one temperature sensor went off line.

So I went back to the updated 2.3 isn't available for uploading, so I tried 2.5 dosers are working now, though my calcium dosers LED is dimly illuminated full time. Now non of my temperature sensors are working at all.

Any suggestions?
Screenshot_2020-01-31-20-17-16-973_com.android.chrome.jpg
Screenshot_2020-01-31-20-10-37-916_com.android.chrome.jpg
Screenshot_2020-01-31-20-17-16-973_com.android.chrome.jpg
Screenshot_2020-01-31-20-10-37-916_com.android.chrome.jpg
Screenshot_2020-01-31-19-54-00-247_com.android.chrome.jpg
Screenshot_2020-01-31-19-53-50-059_com.android.chrome.jpg
Screenshot_2020-01-31-20-14-21-548_com.android.chrome.jpg
 

DirtDiggler2823

If I can't break it, it doesn't exist
View Badges
Joined
Jul 31, 2018
Messages
1,667
Reaction score
2,075
Location
Gambrills
Rating - 0%
0   0   0
Slight problem, my reef pi was running perfectly for quite a while, I recently noticed that the calcium had stopped dosing, despite being programmed correctly, also my main temperature sensor whilst working was displaying weird numbers.

So I decided to run the update from 2.3 to 3.0, the dosers didn't work at all and one temperature sensor went off line.

So I went back to the updated 2.3 isn't available for uploading, so I tried 2.5 dosers are working now, though my calcium dosers LED is dimly illuminated full time. Now non of my temperature sensors are working at all.

Any suggestions?
Screenshot_2020-01-31-20-17-16-973_com.android.chrome.jpg
Screenshot_2020-01-31-20-10-37-916_com.android.chrome.jpg
Screenshot_2020-01-31-20-17-16-973_com.android.chrome.jpg
Screenshot_2020-01-31-20-10-37-916_com.android.chrome.jpg
Screenshot_2020-01-31-19-54-00-247_com.android.chrome.jpg
Screenshot_2020-01-31-19-53-50-059_com.android.chrome.jpg
Screenshot_2020-01-31-20-14-21-548_com.android.chrome.jpg

You have to clear the db and rebuild the programming.
 

TOP 10 Trending Threads

Back
Top