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
I've searched the threads coz I'm sure that I saw it somewhere... Can't find it! Can anyone help me with how I can choose which feeds are sent to AIO? AIO displays the first 10 in alphabetical order but not the feeds that I want. Sorry if this is a basic question but I'm a Noob with AIO.
As of now reef-pi does not have the ability to selectively choose telemetry for adafruit. its all or none. you can use the trick that @Bigtrout has mentioned, but even in that case reef-pi tries to send all the data and fails (due to deleted feed or being rate limited by adafruit), which is benign, but probably not the right thing to do.
 
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
Is it possible to log "events" rather then just "errors"? I did a quick search and didnt find anything.
events as in? generally the trigger conditions are emitted as metrics in adafruit /promethes / mqtt.. you can treat those as event (definitely in mqtt). It will be awesome if you can detail how you plan to use such feature..
 
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
@Ranjib maybe you can help me fix this manually -- is there a way to edit the drivers list if I edit the json file manually? I know it's possible to edit individual drivers with the terminal command, but is it possible to edit the entire drivers file as a json?
theres no bulk driver editing feature right now. in database each object is stored as individual json entity.
If you are comfortable with some scripting this is easily doable outside reef-pi, using perl/python/ruby etc.
 
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
Yep, I've got one temp probe running. i2cdetect included below for reference:

1607612462454.png
what is the i2c address you have specified in the driver config? it should be 88.
 

Martin Lowry

Community Member
View Badges
Joined
Sep 19, 2017
Messages
60
Reaction score
66
Location
Dover, NH
Rating - 0%
0   0   0
As of now reef-pi does not have the ability to selectively choose telemetry for adafruit. its all or none. you can use the trick that @Bigtrout has mentioned, but even in that case reef-pi tries to send all the data and fails (due to deleted feed or being rate limited by adafruit), which is benign, but probably not the right thing to do.
Thanks @Ranjib . I've been messing with it this afternoon and it's a bit hit or miss. So far I've deleted unwanted feeds and others appear that are useful so I have what I need for now. Think I'm going to go in the Prometheus/Grafana direction but that's a whole different learning curve. :rolleyes:
 
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
Man get busy and blink and reef-pi is out with v4, congrats. :) Where can I go to find the release notes in the threads, anyone have that handy? Found it...wish my tank looked as nice as your @Ranjib I'm currently in Dino hades. Things are running so well on 3.x that I am always reluctant to mess with things.

On another note, I am wanting/needing to start dosing Kalk and I do not want to run it in my ATO, I have @Michael Lane hat and dosing module hooked up to a jaebo doser but having second thoughts on using the Jaebo. Thinking of going with w/ a BRS doser controlled by reefpi on a timer. What is everyone using for dosing, I have a Nano tank and overdosing is much easier to accomplish, I've given a lot of thought to try to make it as fail proof as possible just looking for some advice.

Thanks :)
I did a lot of tinkering with dosing setup in 2019. My end state was i can not do two part due to Ca not being that low (i do pretty regular water change) and alk additive spiking up ph,. I ended up using sodium bicarbonate only dosing, which fixed Alk without disturning Ca or Ph. Because of the ATO chart i kinda know how much water is going in the tank and just added the necessary sodium bicarbonate concentrated solution in ato water directly. The result as pretty amazing, since its much frequent but higher dilution adjustment which gave me way more leverage to adjust the values based on daily or twice/weekly Alk readings. Since moving to new house, things got complicated due to me being very busy with all sorts of work. But im getting back to the tank chores now, and i want to revisit the dosing subsystem with new rigor and vigor (read as stepper driver ) :)
 
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
Thanks @Ranjib . I've been messing with it this afternoon and it's a bit hit or miss. So far I've deleted unwanted feeds and others appear that are useful so I have what I need for now. Think I'm going to go in the Prometheus/Grafana direction but that's a whole different learning curve. :rolleyes:
If you really like charts , please go for it. Its amazing. You can have a Pi 3/4 or even zero running prometheus and grafana (its as simple as the initial reef-pi installation), but it will open up the whole lot of metrics /charting possibilities. You will not regret. It will take some time, but hey so does this hobby, and we are here to help you out.
Grafana /Prometheus is what the big tech companies use , these tool are absolutely stellar. I get to see my 50+ pi metrics, their health, different sensors, behavior of ATO/temperature controller and much more. All charting customizations (boundary values, colors, graph style) are at your finger tip.
 
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’m not familiar with the 2 part probe at BRS. I looked real quick there and didn’t see it. Is it a double junction probe. If so then it should be fine.

the robotank board is communicating to the pi through i2c. Did you do this?

6. Setup reef-pi – Pi Clock Stretching for I2C
Note: If you installed reef-pi using the install script this page can be skipped as it will have been added.
The hardware on Raspberry Pi supports clock stretching however the drivers don’t so we need to manually adjust the clock speed on the Pi so it works with all I2C devices. This is required to use the Robo-Tank pH circuit.
clock stretching is required? Im not sure about this. My experience has been i2c errors are almost always due to wrong address configuration, for ezo and reef-pi ph board at least.

on related note, i noticed some confusion around why we are seeing i2c error when this is an analog input. Pi does not have analog input, we use ancillary circuit to do the analog input and that circuit is hooked up to pi using i2c , hence pH drivers are always i2c based.
 

Boostable

Active Member
View Badges
Joined
May 17, 2011
Messages
227
Reaction score
154
Location
Lake Mary, FL
Rating - 0%
0   0   0
events as in? generally the trigger conditions are emitted as metrics in adafruit /promethes / mqtt.. you can treat those as event (definitely in mqtt). It will be awesome if you can detail how you plan to use such feature..

Events as in anything that is triggered, switched or otherwise activated. (outlet, timers, on/off, ato, etc). Im my field (Industrial Instrumentation) we use event logs to verify functionality or success of a specific event/trigger. We use the event to trigger a change in state, that change in state confirms the action, be it a voltage/current change, load, etc. In the end I want to know the event actually did what I asked it to do. In Reef-Pi I can see an outlet change state on the dashboard, but I don't see it being logged that it actually happened. I know logging it does not give confirmation, however its a good start to at a minimum verify logic of a macro, timer, etc.

If this exists somewhere, please point me in the right direction.

Thanks for all you do.
 
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
Events as in anything that is triggered, switched or otherwise activated. (outlet, timers, on/off, ato, etc). Im my field (Industrial Instrumentation) we use event logs to verify functionality or success of a specific event/trigger. We use the event to trigger a change in state, that change in state confirms the action, be it a voltage/current change, load, etc. In the end I want to know the event actually did what I asked it to do. In Reef-Pi I can see an outlet change state on the dashboard, but I don't see it being logged that it actually happened. I know logging it does not give confirmation, however its a good start to at a minimum verify logic of a macro, timer, etc.

If this exists somewhere, please point me in the right direction.

Thanks for all you do.
most of the things you have mentioned should be logged as well as emitted as metrics. i,e. reef-pi logs as well as emits metric every time outlet state is changed. subsystem enable/disable (like enabling a specific timer) is only logged, if they do change equipment state, that will have log /metric trail as well. let me know if you need help with verifying any of these.

We can extend the telemetry sub-systems to include anything more sophisticated. I have some plans to accommodate metric backend (Adafruit, mqtt, Prometheus) specific nuances.. I can roll in anything relevant from event integration there.
 

arbiter42

New Member
View Badges
Joined
Sep 21, 2020
Messages
16
Reaction score
13
Location
Washington, D.C.
Rating - 0%
0   0   0
what is the i2c address you have specified in the driver config? it should be 88.
For the pH probe I have it at 99, which (I believe) is per the robo-tank manual. I know those are frequently updated though, so maybe I'm behind the times.

EDIT: changing the address to 88 (or making the probe/connector/driver new with that address) doesn't change the error I'm getting, sadly.

That error, for reference:
{"error":"write /dev/i2c-1: remote I/O error"} | HTTP 404
 

robsworld78

Well-Known Member
View Badges
Joined
Feb 14, 2020
Messages
985
Reaction score
1,325
Location
Edmonton, Canada
Rating - 0%
0   0   0
Yep, I've got one temp probe running. i2cdetect included below for reference:

1607612462454.png

Hi arbiter42, that error means the I2C address in the driver can't be found on the Pi. The default should have been 99 but I see by the i2cdetect its 98. I guess I forgot to change it back before programming it. Try changing the I2C address for the pH driver, after doing so go to "admin" tab and press "reload", then open the pH calibration screen and you should get a reading.

The clock stretching is required only for my circuit because it doesn't use an ADC chip instead it has an ATtiny85 and it requires I2C stretching, at least at my level. That hack slows down the I2C bus so it's not a problem. You would get parse errors if that wasn't setup.
 
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
Hi arbiter42, that error means the I2C address in the driver can't be found on the Pi. The default should have been 99 but I see by the i2cdetect its 98. I guess I forgot to change it back before programming it. Try changing the I2C address for the pH driver, after doing so go to "admin" tab and press "reload", then open the pH calibration screen and you should get a reading.

The clock stretching is required only for my circuit because it doesn't use an ADC chip instead it has an ATtiny85 and it requires I2C stretching, at least at my level. That hack slows down the I2C bus so it's not a problem. You would get parse errors if that wasn't setup.
Oops , supposed to be 98 not 88. Thank you @robsworld78 . Hexadecimal :) 6*16 +2. Can’t believe I messed that up,

Make sure to to reload reef-pi after every driver changes
 

Coolhack

Community Member
View Badges
Joined
Jul 21, 2019
Messages
80
Reaction score
50
Location
Anywhere
Rating - 0%
0   0   0
I have a question for Ranjib. In your picture above you have your dashboard set up with meters instead of the graph, how could i set mine up like that.
 

Boostable

Active Member
View Badges
Joined
May 17, 2011
Messages
227
Reaction score
154
Location
Lake Mary, FL
Rating - 0%
0   0   0
most of the things you have mentioned should be logged as well as emitted as metrics. i,e. reef-pi logs as well as emits metric every time outlet state is changed. subsystem enable/disable (like enabling a specific timer) is only logged, if they do change equipment state, that will have log /metric trail as well. let me know if you need help with verifying any of these.

We can extend the telemetry sub-systems to include anything more sophisticated. I have some plans to accommodate metric backend (Adafruit, mqtt, Prometheus) specific nuances.. I can roll in anything relevant from event integration there.
I thought this should be the case, but I am not getting anything in the logs. Running version 4.0 now and its blank. Let me run some routines and see if something pops up.
 

arbiter42

New Member
View Badges
Joined
Sep 21, 2020
Messages
16
Reaction score
13
Location
Washington, D.C.
Rating - 0%
0   0   0
Hi arbiter42, that error means the I2C address in the driver can't be found on the Pi. The default should have been 99 but I see by the i2cdetect its 98. I guess I forgot to change it back before programming it. Try changing the I2C address for the pH driver, after doing so go to "admin" tab and press "reload", then open the pH calibration screen and you should get a reading.

The clock stretching is required only for my circuit because it doesn't use an ADC chip instead it has an ATtiny85 and it requires I2C stretching, at least at my level. That hack slows down the I2C bus so it's not a problem. You would get parse errors if that wasn't setup.
That did it! Thanks @robsworld78 and @Ranjib.
 

Martin Lowry

Community Member
View Badges
Joined
Sep 19, 2017
Messages
60
Reaction score
66
Location
Dover, NH
Rating - 0%
0   0   0
If you really like charts , please go for it. Its amazing. You can have a Pi 3/4 or even zero running prometheus and grafana (its as simple as the initial reef-pi installation), but it will open up the whole lot of metrics /charting possibilities. You will not regret. It will take some time, but hey so does this hobby, and we are here to help you out.
Grafana /Prometheus is what the big tech companies use , these tool are absolutely stellar. I get to see my 50+ pi metrics, their health, different sensors, behavior of ATO/temperature controller and much more. All charting customizations (boundary values, colors, graph style) are at your finger tip.
I work for a Internet security company and our infrastructure team use Prometheus/Grafana to monitor our CA operations, so I reached out to them and they are pretty interested to here what I am doing with RPI and they offered to help me get up to speed, WooHoo!!!! Getting pretty exited to get started... Here's my cobbled together AIO dashboard so far, useful for now showing the important stuff that I can. Values are all over the place as the RPI is still on the work bench.
 

Attachments

  • AIO Dashboard.JPG
    AIO Dashboard.JPG
    161.5 KB · Views: 96
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 have a question for Ranjib. In your picture above you have your dashboard set up with meters instead of the graph, how could i set mine up like that.
It’s a grafana dashboard and not reef-pi. For this you have to setup Prometheus for metric storage , and configure reef-pi to emit Prometheus metrics. Then install grafana (dashboard software) and configure it to use Prometheus for data, and then you can do any type of charts in any color , size etc
 
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 thought this should be the case, but I am not getting anything in the logs. Running version 4.0 now and its blank. Let me run some routines and see if something pops up.
Please do and let us know. You can see the log of reef-pi using journalctl command
 

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