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

Blaxkin

Community Member
View Badges
Joined
Oct 4, 2019
Messages
27
Reaction score
46
Rating - 0%
0   0   0
Ok :) Can you say to me where i can change this value ? :)

I think in the linux driver w1_slave i found it. But on Raspberry i don't know

/* prevent the slave from going away in sleep */
atomic_inc(THERM_REFCNT(family_data));
memset(rom, 0, sizeof(rom));
while (max_trying--) {
verdict = 0;
crc = 0;
if (!w1_reset_select_slave(sl)) {
int count = 0;
unsigned int tm = 750;
unsigned long sleep_rem;
w1_write_8(dev, W1_READ_PSUPPLY);
external_power = w1_read_8(dev);
if (w1_reset_select_slave(sl))
continue;
/* 750ms strong pullup (or delay) after the convert */
if (w1_strong_pullup == 2 ||
(!external_power && w1_strong_pullup))
w1_next_pullup(dev, tm);
w1_write_8(dev, W1_CONVERT_TEMP);
if (external_power) {
mutex_unlock(&dev->bus_mutex);
sleep_rem = msleep_interruptible(tm);
if (sleep_rem != 0) {
ret = -EINTR;
goto post_unlock;
}
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,056
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Quick question about something I've noticed.

Our electricity supplier here in SA has just started implementing "load shedding" where there is supply problems and everyone has scheduled power outages. My area typically has 2 hours a day, occasionally 2 sessions of 2 hours. This will typically last a week and then they will be back on track. It doesn't worry me and my tank. I'm equipped to handle it.

BUT i noticed something interesting with the ATO usage graphs below. My main Tank ATO usage in the top centre has data saved from as far back as the 26th November. The AWC Out and AWC In at the bottom left and centre lose all their data every time the Pi loses power. Not sure if this is some sort of bug or not.


2019-12-06 (2).png
Can you file a issue in github to track this. I need to dig deeper into this. Somethings to remember
- reef-pi stores all stats in memory to reduce disk io. This is a global strategy to avoid sad card wear and tier as much as possible,
- reef-pi will save the stats in disk (sd card ) during regular shutdown and hourly roll up .
- if you are shutting down the pi abruptly , it is expected to loose the current hours data,

I have to decipher if your condition is as expected due to those. Or we have a bug somewhere
 

MikeSpike

Community Member
View Badges
Joined
Jan 2, 2019
Messages
73
Reaction score
52
Rating - 0%
0   0   0
@Ranjib is the check frequency Time in the ATO tab just for turning ON. E.g. I set the frequency to 2 minutes - it will check if the tanks needs more water every 2 mins. However When it does turn the ATO pump on it will then monitor real time to know when to turn it off? Or will it only check the sensor again in another 2 mins (and my tank will be full of RODI) - in which case I would set my time to something like 5 seconds.
thank u
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,056
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
@Ranjib is the check frequency Time in the ATO tab just for turning ON. E.g. I set the frequency to 2 minutes - it will check if the tanks needs more water every 2 mins. However When it does turn the ATO pump on it will then monitor real time to know when to turn it off? Or will it only check the sensor again in another 2 mins (and my tank will be full of RODI) - in which case I would set my time to something like 5 seconds.
thank u
The second one. Configure the ato to run every 5 seconds. I’ll be changing the default check frequency to 5 in next minor release

We are thinking of a feature akin to option 1, as you called out. Feel free to add comments in the tracking issue https://github.com/reef-pi/reef-pi/issues/701
 

Schreiber

Leviathan
View Badges
Joined
Jun 28, 2016
Messages
468
Reaction score
593
Location
Knoxville
Rating - 0%
0   0   0
Is there a good write-up somewhere about setting up a pH probe for 3.0? The adafruit guide is outdated now & I'm having trouble getting my pH board to be recognized.

Also, I've got a really weird bug when I try to go to my connectors:
TypeError: this.state.driver is undefined
in t in div in div in div in t in Connect(t) in div in div in t in div in t in t in div in div in div in div in t in Connect(t) in t in a

This error when I go to the log:
Error: Minified React error #31; visit https://reactjs.org/docs/error-deco...e.drivers.filter(...)[0] is undefined&args[]= for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
in td in tr in tbody in table in div in div in t in Connect(t) in t in div in div in div in div in t in Connect(t) in t in a
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,056
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Is there a good write-up somewhere about setting up a pH probe for 3.0? The adafruit guide is outdated now & I'm having trouble getting my pH board to be recognized.

Also, I've got a really weird bug when I try to go to my connectors:
TypeError: this.state.driver is undefined
in t in div in div in div in t in Connect(t) in div in div in t in div in t in t in div in div in div in div in t in Connect(t) in t in a

This error when I go to the log:
Error: Minified React error #31; visit https://reactjs.org/docs/error-decoder.html?invariant=31&args[]=TypeError: e.drivers.filter(...)[0] is undefined&args[]= for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
in td in tr in tbody in table in div in div in t in Connect(t) in t in div in div in div in div in t in Connect(t) in t in a
I am really slacking on updating the docs.. here are the steps:
- Go to drivers tab and add a new driver , choose type as ph board and address 64 (or whatever you have configured, get it using i2cdetect)
- Once the driver is added, head over to the connector tab and create an analog input , with the new driver and pin 0.
- Head over to ph tab and create a probe , associate the newly created analog input with it


Thats it. The connector UI issue you are facing indicates you have connectors that have non-existent driver. It can happen due to 2 -> 3 upgrade or some other issues (deleted driver without deleting connectors). Reset database if possible, and make sure to delete connectors before deleting their associated drivers
 

Schreiber

Leviathan
View Badges
Joined
Jun 28, 2016
Messages
468
Reaction score
593
Location
Knoxville
Rating - 0%
0   0   0
I am really slacking on updating the docs.. here are the steps:
- Go to drivers tab and add a new driver , choose type as ph board and address 64 (or whatever you have configured, get it using i2cdetect)
- Once the driver is added, head over to the connector tab and create an analog input , with the new driver and pin 0.
- Head over to ph tab and create a probe , associate the newly created analog input with it


Thats it. The connector UI issue you are facing indicates you have connectors that have non-existent driver. It can happen due to 2 -> 3 upgrade or some other issues (deleted driver without deleting connectors). Reset database if possible, and make sure to delete connectors before deleting their associated drivers

Thanks for the suggestions. That's exactly what happened, I deleted the pH driver to troubleshoot it.

I just reset my database & started from scratch. Everything is good so far! The only minor thing I've run into is the annoying pH probe calibration. Whenever you type in a value, it outlines the box in red & says it's not valid. However, if you click the arrows to the side to go up by one, then back down by one to the same value, it lets you calibrate it.
 

MikeSpike

Community Member
View Badges
Joined
Jan 2, 2019
Messages
73
Reaction score
52
Rating - 0%
0   0   0
The second one. Configure the ato to run every 5 seconds. I’ll be changing the default check frequency to 5 in next minor release

We are thinking of a feature akin to option 1, as you called out. Feel free to add comments in the tracking issue https://github.com/reef-pi/reef-pi/issues/701

Thank you!

One other suggestion (apologies don't understand how to do on GitHub) would be good if you could click on the bar chart in the dashboard to make things go on and off rather than having to go to the equipment tab
 

hhaase

Active Member
View Badges
Joined
Nov 11, 2019
Messages
415
Reaction score
355
Rating - 0%
0   0   0
Based on Ranjib's input, here's my updated hat board. Same concept as before, basically taking my previous one and adding the PH and Orp probe circuits. But based on the ReefPi PH probe board, instead of the Atlas Scientific. The various chips needed for these circuits aren't cheap, but still a lot more affordable than using the Atlas stuff, that's for sure.

Schedule wise, I'm hoping to have these ready to test around the end of the year. I should probably get another Pi or two at some point as well, since I plan on using these in a few locations once the tank gets here.



Reefpi v0_2_1.jpg
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,056
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Thank you!

One other suggestion (apologies don't understand how to do on GitHub) would be good if you could click on the bar chart in the dashboard to make things go on and off rather than having to go to the equipment tab
We have discussed something similar, a widget instead of chart for equipment in dashboard, that will allows switching equipment on/off from dashboard directly .ill see if we can get it done soonish
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,056
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Based on Ranjib's input, here's my updated hat board. Same concept as before, basically taking my previous one and adding the PH and Orp probe circuits. But based on the ReefPi PH probe board, instead of the Atlas Scientific. The various chips needed for these circuits aren't cheap, but still a lot more affordable than using the Atlas stuff, that's for sure.

Schedule wise, I'm hoping to have these ready to test around the end of the year. I should probably get another Pi or two at some point as well, since I plan on using these in a few locations once the tank gets here.



Reefpi v0_2_1.jpg

Looks awesome .
Remind us again what all this board will offer ? I noticed double ph probe , db9 for power strip , couple of temp probe and two ato probe ( photoelectric ). No float switch and 10v pwm output right ?
 

PaulJ2303

Community Member
View Badges
Joined
Sep 30, 2018
Messages
76
Reaction score
172
Rating - 0%
0   0   0
Can I ask a small QOL question:
Is there a way to manually set the vertical scale of temperature displays on the dashboard?
 

hhaase

Active Member
View Badges
Joined
Nov 11, 2019
Messages
415
Reaction score
355
Rating - 0%
0   0   0
Looks awesome .
Remind us again what all this board will offer ? I noticed double ph probe , db9 for power strip , couple of temp probe and two ato probe ( photoelectric ). No float switch and 10v pwm output right ?

Two temp probes. Two measurement probes (Can be either Ph or Orp depending on the installed resistor). DB9 power controller output. One photo-electric water sensor.

For this version I haven't done a float switch yet, but that's on my list for the next version after this. I haven't looked at the 10v pwm yet either. I could probably still add a float switch but I haven't had time to dig up the needed circuit. Would it still be just a power/ground/signal header, with a pull-up resistor on the signal? If you can suggest which GPIO pin to attach to, I can add one or more of them easily. I haven't ordered these yet.

-hans
 

Des Westcott

Well-Known Member
View Badges
Joined
May 29, 2018
Messages
646
Reaction score
1,035
Location
Durban - South Africa
Rating - 0%
0   0   0
Can you file a issue in github to track this. I need to dig deeper into this. Somethings to remember
- reef-pi stores all stats in memory to reduce disk io. This is a global strategy to avoid sad card wear and tier as much as possible,
- reef-pi will save the stats in disk (sd card ) during regular shutdown and hourly roll up .
- if you are shutting down the pi abruptly , it is expected to loose the current hours data,

I have to decipher if your condition is as expected due to those. Or we have a bug somewhere

I have filed a bug on GitHub. It is definitely happening outside the 1 hour window. ie data from a water change 6 hours ago disappears when I lose power unexpectedly.
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,056
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
I have filed a bug on GitHub. It is definitely happening outside the 1 hour window. ie data from a water change 6 hours ago disappears when I lose power unexpectedly.
Thank you . I’ll investigate as soon as I can. Meanwhile if you know the time of power outage it’s worth configuring a systemD timeR (cron job) for reloading reef-pi before the outage. That will save things on disk proactively . Keep a backup sd card ready , sudden shutdown will speed up the bad card wear n tear
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,056
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Two temp probes. Two measurement probes (Can be either Ph or Orp depending on the installed resistor). DB9 power controller output. One photo-electric water sensor.

For this version I haven't done a float switch yet, but that's on my list for the next version after this. I haven't looked at the 10v pwm yet either. I could probably still add a float switch but I haven't had time to dig up the needed circuit. Would it still be just a power/ground/signal header, with a pull-up resistor on the signal? If you can suggest which GPIO pin to attach to, I can add one or more of them easily. I haven't ordered these yet.

-hans
Yes, the float switch circuit is exactly same as attaching any latching /spst switch . Use any of the free gpio excluding i2c, pwm and one wire.

Gpio 18 & 19 are normal 3.3v pwm output , Gate them with a npn transistor to convert them to 10v pwm. This will allow kessil light, deltec pump and variety of other equipment control
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,056
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Can I ask a small QOL question:
Is there a way to manually set the vertical scale of temperature displays on the dashboard?
Not right now. We removed it in 3.0 due to some inconsistent behavior. We plan to reintroduce it back after we have some idea how to cleanly support this
 

hhaase

Active Member
View Badges
Joined
Nov 11, 2019
Messages
415
Reaction score
355
Rating - 0%
0   0   0
Ahhhh, now I see it. The PWM control falls under the 'light controller' design, with the PCA9685, correct? So there will be additional voltage regulation and such involved.

I think I'm going to handle that as a daughter-board actually. But I can very easily add on a header for that until I have time to do that extra board.

-Hans
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,056
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Ahhhh, now I see it. The PWM control falls under the 'light controller' design, with the PCA9685, correct? So there will be additional voltage regulation and such involved.

I think I'm going to handle that as a daughter-board actually. But I can very easily add on a header for that until I have time to do that extra board.

-Hans
PCA9685 provides additional 16 channels of pwm, but Pi itself has two hardware backed pwm (GPIO18/19), I was referring to the later, as it wont increase the price/complexity significantly. Yes, generally a voltage regulator (lm2596 is what I use, but you can go with lm7810 or something similar) is use to supply the target pwm voltage (10V), frequency control is done on pi (via reef-pi)
 

Fusion in reefing: How do you feel about grafted corals?

  • I strongly prefer grafted corals and I seek them out to put in my tank.

    Votes: 3 2.9%
  • I find grafted corals appealing and would be open to having them in my tank.

    Votes: 57 55.9%
  • I am indifferent about grafted corals and am not enthusiastic about having them in my tank.

    Votes: 31 30.4%
  • I have reservations about grafted corals and would generally avoid having them in my tank.

    Votes: 8 7.8%
  • I have a negative perception and would avoid having grafted corals in my tank.

    Votes: 3 2.9%
Back
Top