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

Zippyfear

Community Member
View Badges
Joined
Apr 30, 2019
Messages
86
Reaction score
150
Rating - 0%
0   0   0
I'm getting this error when setting up my gmail notification
{"error":"Failed to delete. Error: EOF"} | HTTP 500

looks like an error with adafruit IO telemetry, even though I turned it off, I keep seeing this in the error log

Nov 27 16:11:24
{"error":"not found - that is an invalid URL, please check the API documentation at https://io.adafruit.com/api/docs to make sure your URL is correct"}

but still can't get either adafruit or smtp working. ugh. I had smtp working before the upgrade

ok, it seems like the gmail relay is working, because I had a temp probe failure alert, it's just the test button that never sent me a notification. so that's good. and the temp probe sensor isn't an issue with the new version, I believe it's caused by interference from power cables. it happened occasionally on the old version.
 
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
@Ranjib Ok resident bug checker checking in.

Good news bad news type thing.

Good news.
1.Temp probes working as they should even on a reboot/reload.
2. Macros all working
3. Equipment page all working.
4. Adafruit works as before.
5. Ph probe(pi board type) working.
6. LIGHTING PWM works except as below.

Bad news. I FOUND ANOTHER BUG or two

1. Upon a reload I lose a light. Its still on the lighting page but when you look at the reef pi logs its not there. And the pwm percentage is not updating.
Its random which light dissappears. I have my lights designated as Frontlight pins 3 and 4 on the jack light1 and Rearlight is pins 6 and 7 on the jack light2. One or the other disappears on a reload. To get it back i just have to see which light disappeared while watching the logs...go to the lighting page for that light and click edit and save and its back running as it should until another reload. A reboot by itself brings both lights up unless the light was already lost by a reload.

2. The lighting graph on the dashboard is broken. It doesnt show the graph on an interval type profile like it used to

PM me with questions as i have tested this behavior for an hour.
reef-pi logs will only reflect lighting in two way.
- In manual mode, the channel values are only enforced as and when you changed it using the slider/UI or when reef-pi starts/reloads. Lights are created in manual mode. They are assigned profiles after creation by editing them using the UI
- In automatic mode , where lights are assigned a profile, light values are enforced after every 1 minute for each channels . The exact PWM values are derived using the assigned profile.

So if your lighting is set to manual mode, dont expect them in the log , unless you change the vlaues. If they have an assigned profile, they will appear in log every 1 minute when then need to be active (sine profiles have start and end time). If this is not the case, i.e. light have a profile and the current time is within the range of start-end time of that profile and yet the light channels are not being updated every minute... then its definitely a bug. I'll cross-check for possible bugs.

The light chart is not useful right now. It needs be rewritten and will not be available similar to older fashion for all the cases. This is because for some profile, like random, we dont know the value upfront. For some other we know, while for some other (composite profiles) its complicated thing to do. What we do have though is telemetry on the pwm value that is being generated at given time, and we emit it as metric which you can use to plot the light effect using adafruit.io or prometheus/grafana, currently. This is very similar to ph and temperature chart, where the chart shows as and when the values are computed, instead of light charts where everything is precomputed for the entire time range.

That said, I plan to work on this soon after 3.0 to support in-app light charts that are useful. But it will be sam as ph and temperature chart. i.e the chart will built as and when the pwm values are generated
 
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
This confused me as well. When getting the temp controls up, for some reason you have to put a temp into the chiller threshold box before it lets you enter a hysteresis value. Then you can save the temp control. The chiller threshold has to be greater than the heater threshold.
Yes, this is a validation related bug in the UI, where unless you provide a chiller threshold, it fails on hysteresis validation, we are tracking it, but we may not ship a fix as part of 3.0, due to time constrain and this not being a deal breaker type of bug. https://github.com/reef-pi/reef-pi/issues/910
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,811
Rating - 0%
0   0   0
reef-pi logs will only reflect lighting in two way.
- In manual mode, the channel values are only enforced as and when you changed it using the slider/UI or when reef-pi starts/reloads. Lights are created in manual mode. They are assigned profiles after creation by editing them using the UI
- In automatic mode , where lights are assigned a profile, light values are enforced after every 1 minute for each channels . The exact PWM values are derived using the assigned profile.

So if your lighting is set to manual mode, dont expect them in the log , unless you change the vlaues. If they have an assigned profile, they will appear in log every 1 minute when then need to be active (sine profiles have start and end time). If this is not the case, i.e. light have a profile and the current time is within the range of start-end time of that profile and yet the light channels are not being updated every minute... then its definitely a bug. I'll cross-check for possible bugs.

The light chart is not useful right now. It needs be rewritten and will not be available similar to older fashion for all the cases. This is because for some profile, like random, we dont know the value upfront. For some other we know, while for some other (composite profiles) its complicated thing to do. What we do have though is telemetry on the pwm value that is being generated at given time, and we emit it as metric which you can use to plot the light effect using adafruit.io or prometheus/grafana, currently. This is very similar to ph and temperature chart, where the chart shows as and when the values are computed, instead of light charts where everything is precomputed for the entire time range.

That said, I plan to work on this soon after 3.0 to support in-app light charts that are useful. But it will be sam as ph and temperature chart. i.e the chart will built as and when the pwm values are generated
I was watching the logs for my lights in auto mode...interval settings...the logs show channels 3 and 4 for one light...6 and 7 for another...with values as they change....after a reload one light disappears and the logs and quits updating...and the light that disappears from the logs is stuck at the values just before the reload...
 
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
@Ranjib
Was it a feature on this release to change lighting intervals from 2 hours to a shorter interval? If so how?
Yes. I'll explain it a bit here ,
reef-pi 3.0 introduces custom pwm profile types. One of this profile type is called "interval", where user gives a start and end time (e.g. morning 7:30 AM to 7 :30PM), a interval time (e.g. 1 hour or 15 min) and a set of values spanning the time period. Then reef-pi linearly interpolates the values in-between those specific intervals. This profile is used to re-implement the old 12 point two-hour interval (its a special case of the generic "interval" profile).
Now the challenge is, though we have all these features in the controller software, lot of UI work is still left. UI only supports manual, diurnal and "interval" mode , where in "interval" mode the UI does some magic to deduce the interval time by enforcing 12 points, by dividing the start-end time range by 12 equal point. We still have to work on the UI to expose all those new profile features in a user-friendly manner. Here is the net effect of this implementation, where the interval is almost 15 min, since I reduced the start-end time to 3 hours

Screen Shot 2019-11-27 at 7.05.14 PM.png



Now that said, since the controller actually supports it, if you are up for it, you can either use the api or reef-pi db command to update this directly to bypass the UI and assign your custom interval value and set points. All you have to make sure that your number of set points are = (end time - start time)/interval time + 1 . If you are interested I can explain the reef-pi db command or api to do this. Just let me know the values you are interested in (start-end time and interval) .
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,811
Rating - 0%
0   0   0
Yes, this is a validation related bug in the UI, where unless you provide a chiller threshold, it fails on hysteresis validation, we are tracking it, but we may not ship a fix as part of 3.0, due to time constrain and this not being a deal breaker type of bug. https://github.com/reef-pi/reef-pi/issues/910
No adafruit can graph the lights so its not a deal breaker...but one whole light that quits updating after a reload is.
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,811
Rating - 0%
0   0   0
Yes. I'll explain it a bit here ,
reef-pi 3.0 introduces custom pwm profile types. One of this profile type is called "interval", where user gives a start and end time (e.g. morning 7:30 AM to 7 :30PM), a interval time (e.g. 1 hour or 15 min) and a set of values spanning the time period. Then reef-pi linearly interpolates the values in-between those specific intervals. This profile is used to re-implement the old 12 point two-hour interval (its a special case of the generic "interval" profile).
Now the challenge is, though we have all these features in the controller software, lot of UI work is still left. UI only supports manual, diurnal and "interval" mode , where in "interval" mode the UI does some magic to deduce the interval time by enforcing 12 points, by dividing the start-end time range by 12 equal point. We still have to work on the UI to expose all those new profile features in a user-friendly manner. Here is the net effect of this implementation, where the interval is almost 15 min, since I reduced the start-end time to 3 hours

Screen Shot 2019-11-27 at 7.05.14 PM.png



Now that said, since the controller actually supports it, if you are up for it, you can either use the api or reef-pi db command to update this directly to bypass the UI and assign your custom interval value and set points. All you have to make sure that your number of set points are = (end time - start time)/interval time + 1 . If you are interested I can explain the reef-pi db command or api to do this. Just let me know the values you are interested in (start-end time and interval) .
I was playing with this and deduced this much...

Yes im interested in the db commands and other profiles...reef pi is what makes my beamswork lights into a fancy 24/7 light costing 3 times as much
 
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
I was watching the logs for my lights in auto mode...interval settings...the logs show channels 3 and 4 for one light...6 and 7 for another...with values as they change....after a reload one light disappears and the logs and quits updating...and the light that disappears from the logs is stuck at the values just before the reload...
hmm.. can you share the light settings (start time/end time) and i can test it out
 
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
Yes thats a seious bug.
@Bigtrout found it. This is the exact bug as the temp sensor. Patching right now.. let me know if anything else is not working as expected. I'm adding rigorous automated multi-sensor testing across all modules in my todo list. Currently all the test we are geared for single sensor/equipment style "happy path scenaios"

Thanks a tonne ..
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,811
Rating - 0%
0   0   0
hmm.. can you share the light settings (start time/end time) and i can test it out
Yes my lights are defined on 2 jacks using the pca9685 pwm driver.

One jack is pins 3 and 4 and defines light 1.

One jack is pins 6 and 7 and defines light 2.

Light 1 is on auto and interval.
channel 1(pin 3) i have set to start time on 00:00:00 and end time of 23:59:59. Sliders set to where i want them.
Channel 2(pin4) set the same way.

Light 2 is identical to light 1 only it uses pins 6 and 7 as channels 1 and 2.

On a RELOAD one or the other of the lights quits working. It doesnt update in the logs and quits changing intensity and its adafruit feed also quits updating. It stays at the levels it was at the time of reload. If i go to lighting taand simply hit edit and save it starts working normally again.

On a REBOOT if both lights were working they both come back up.

If a light quits working after a RELOAD and then you REBOOT before hitting edit and save to get it working again. It stays not working after the REBOOT.
 
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

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,811
Rating - 0%
0   0   0
@Bigtrout found it. This is the exact bug as the temp sensor. Patching right now.. let me know if anything else is not working as expected. I'm adding rigorous automated multi-sensor testing across all modules in my todo list. Currently all the test we are geared for single sensor/equipment style "happy path scenaios"

Thanks a tonne ..
Yes im not being critical...this takes a ton of work and I thank you for all you do. Part of my real job is troubleshooting , so i try do do my part and really beta test when you do a new release.
 

Soulreefer

Community Member
View Badges
Joined
Aug 16, 2018
Messages
44
Reaction score
67
Location
Jakarta, Indonesia
Rating - 0%
0   0   0
I got it installed this morning. So far my temp sensors are good after reboot and everything seems to be working normal. I will play with it more after work today. I have a couple questions not related to the update but more the new features in 3.0

1. Can someone give me an example of what and how the reversible function works in Macros?

2. on the subject of Macros, all of my flow pumps work on timers. In order to completely turn off pumps I have to make a macro like this

"Wavemakers off"
Timers - wavemaker right - off
Timers - wavemaker left - off
Timers - wavemaker lower - off
Equipment - wavemaker right - off
Equipment - wavemaker left - off
Equipment - wavemaker lower - off

To turn them back on I have another macro that turns all the timers back on.

"Wavemakers on"
Timers - wavemaker right - on
Timers - wavemaker left - on
Timers - wavemaker lower - on

Now to complicate things even further, I want to turn off flow pumps inside of a macro for water changes or feeding. Right now I have this huge macro that individually does the steps above for each flow pump... wait... all the steps for each pump again to turn them on... wait... all the steps again to turn them off..etc. Macro is a function to control but it does not seem to work so I do the following:

"Feed (how I actually have it)"
Timers - wavemaker right - off
Timers - wavemaker left - off
Timers - wavemaker lower - off
Equipment - wavemaker right - off
Equipment - wavemaker left - off
Equipment - wavemaker lower - off
Equipment - Return - off
Equipment - skimmer - off
wait 120 seconds
Timers - wavemaker right - on
Timers - wavemaker left - on
Timers - wavemaker lower - on
wait 120 seconds
Timers - wavemaker right - off
Timers - wavemaker left - off
Timers - wavemaker lower - off
Equipment - wavemaker right - off
Equipment - wavemaker left - off
Equipment - wavemaker lower - off
Wait 1200 seconds
Equipment - return - on
Wait 120 seconds
Timers - wavemaker right - on
Timers - wavemaker left - on
Timers - wavemaker lower - on
wait 120 seconds
Equipment - skimmer - on

The question I have is how to I get macro control inside of a macro to work? The option is there but the action is confusing it says on or off. Should it not be run? I have tried setting the action to both on and off for the macro but it does not work like it is above. below would be my understanding of how the above would work if I could have a macro run the macros. It shortens it up significantly

"Feed"
Macro - wavemakers off - (I would think there would be an option for run vs off/on I have tried both off and on with no luck)
Equipment - Return - off
Equipment - skimmer - off
wait 120 seconds
Macro - wavemakers on - (I would think there would be an option for run vs off/on I have tried both off and on with no luck)
wait 120 seconds
Macro - wavemakers off - (I would think there would be an option for run vs off/on I have tried both off and on with no luck)
Wait 1200 seconds
Equipment - return - on
Wait 120 seconds
Macro - Wavemakers on - (I would think there would be an option for run vs off/on I have tried both off and on with no luck)
wait 120 seconds
Equipment - skimmer - on

wow, this is a lot of macro ....:cool:

I experienced the same thing, a macro with a JACK conector could not work, with the OUTLET connector running properly.
 
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
wow, this is a lot of macro ....:cool:

I experienced the same thing, a macro with a JACK conector could not work, with the OUTLET connector running properly.
do you mean macros does not work with lights? Macros dont interface with connectors (outlets , jacks, inlets etc) and only work via their consumers (light, equipment, ph, ato etc).
 
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
Yes im not being critical...this takes a ton of work and I thank you for all you do. Part of my real job is troubleshooting , so i try do do my part and really beta test when you do a new release.
And I can not thank you enough for this. Its an enormous help for me, saves a lot of my time and particularly getting the bug reports from you means i have all the details I need to hunt it down fast.. like this one.. within few minutes :0)
 
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
Regarding the reversible macro .. I think someone just asked what it is and what the use of it. I'll explain it a bit here, and I hope I'll remember to add it in the docs:
- A macro is a linear set of step. Each step can be a wait step or an action step, where action stands for on/off (boolean) against a reef-pi entity (equioment, temperature controller, light, timer etc). On/Off can be interpreted as enable/disable in some of the cases
- A reversible macro is a property that allows user to explicitly declate the macro as safe to run in reverse mode. Such a macro can be treated as on/off entity and hence can be used inside another macros. Macro that are not reversible (i.e. reversible property is not checked in by users) will throw runtime errors.
- A reversible macro acts like normal macro in on state (normal triggers). In off state, the macro steps are replayed in reverse order and all actions steps work in reverse fashion. I,e. if a time was enabled, it will be diabled in reverse mode.... the wait state acts as same. Macros are triggered in off mode only by timers and other macros.


With all these mentioned, remember its a really new feature capable of doing great automation as well as great mayhem, if not careful. We'll be testing this heavily to do complex tasks like salt water mixing, water change, automated photography etc etc. So test it thoroughly and use it judiciously
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,811
Rating - 0%
0   0   0
Have had the new release up and running since early afternoon... and so far no other bugs other than the light reloading bug. And system resource usage also looks good. In fact its lighter than 3.0 alpha and 2.5. Im using,4 lighting channels, 3 temp sensors, 2 temp controllers, a ph probe and 8 equipment outlets amd a few macros. On a pi zero w im at 7 percent memory and .15 system load and holding steady!
 

Soulreefer

Community Member
View Badges
Joined
Aug 16, 2018
Messages
44
Reaction score
67
Location
Jakarta, Indonesia
Rating - 0%
0   0   0
do you mean macros does not work with lights? Macros dont interface with connectors (outlets , jacks, inlets etc) and only work via their consumers (light, equipment, ph, ato etc).

previously I would use a dosing pump for several injections a day and use the macro function to do the job, but it hasn't worked.;)

hopefully in the future this function can be added ..
several hour3.jpg

Thank you very much
 
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
previously I would use a dosing pump for several injections a day and use the macro function to do the job, but it hasn't worked.;)

hopefully in the future this function can be added ..
several hour3.jpg

Thank you very much
Purdon me, Im having some difficulty understanding the issue. The dosing system is used for dosing, what the macro is being used for? Im asking because unless i understand it will be hard for me to say if it will be solved by 3.0 features
 

TOP 10 Trending Threads

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

  • 100% live rock + bagged sand

    Votes: 37 27.2%
  • 100% dry rock + 100% live sand

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

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

    Votes: 13 9.6%
  • 25% live rock, 75% live sand

    Votes: 10 7.4%
Back
Top