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

GaryE

Well-Known Member
View Badges
Joined
Mar 12, 2020
Messages
992
Reaction score
1,385
Location
Coatesville, Indiana
Rating - 0%
0   0   0
Probably my lack of knowledge, but, is it possible to normalize the power monitoring data collected from the Kasa HS300 power strip? I just set it up today as a test to monitor my 300Watt AWC bucket heater. it's displaying 2612 in the RPI Dashboard and 2.6Kw in Grafana.

Reef-Pi v5.1
Pi 3
To be perfectly honest, I don't really use the graphs on the reef-pi UI for anything. I stick with the grafana. Way more configurable.
 
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
Probably my lack of knowledge, but, is it possible to normalize the power monitoring data collected from the Kasa HS300 power strip? I just set it up today as a test to monitor my 300Watt AWC bucket heater. it's displaying 2612 in the RPI Dashboard and 2.6Kw in Grafana.

Reef-Pi v5.1
Pi 3
It’s milliamp, you just have to choose the right unit I think, in grafana
 
Last edited:
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
To be perfectly honest, I don't really use the graphs on the reef-pi UI for anything. I stick with the grafana. Way more configurable.
That’s because you have multi node setup and your home is a tiny data center :)

I get this dilemma all the time . But Last two years I realized the importance of stand alone reef-pi with built in dashboard. It makes a huge difference for the folks who does not run similar setup .

This is very similar issue like the start up unit file configuration (waiting on network ) . Reef-pi allows a wide variety of setup , being a opensource extensible system. The default setup that comes with the software must stay core to its original value of enabling frugal, diy , reef focused controller. In that paradigm making reef-pi critically dependent on grfana will be undesirable. It does create significant work on our side to maintain those ui code, but I think it’s worth it. I have started using (and improving ) the built in dashboards In recent times. I understand it will never be like grafana, but we should be able to provide a smaller , less features yet relevant and effective built in dashboard .

grafana is the very best dashboard /telemetry tool I can think of right now. It’s used in large tech companies across the world. It’s a beast :) . I have used it with hundreds and thousands of servers for years now . Big fan of it.

I think for setups where there are many tanks , like public aquariums, coral farms, fish stores , reef-pi , grafana combo will shine.
 

GaryE

Well-Known Member
View Badges
Joined
Mar 12, 2020
Messages
992
Reaction score
1,385
Location
Coatesville, Indiana
Rating - 0%
0   0   0
That’s because you have multi node setup and your home is a tiny data center :)

I get this dilemma all the time . But Last two years I realized the importance of stand alone reef-pi with built in dashboard. It makes a huge difference for the folks who does not run similar setup .

This is very similar issue like the start up unit file configuration (waiting on network ) . Reef-pi allows a wide variety of setup , being a opensource extensible system. The default setup that comes with the software must stay core to its original value of enabling frugal, diy , reef focused controller. In that paradigm making reef-pi critically dependent on grfana will be undesirable. It does create significant work on our side to maintain those ui code, but I think it’s worth it. I have started using (and improving ) the built in dashboards In recent times. I understand it will never be like grafana, but we should be able to provide a smaller , less features yet relevant and effective built in dashboard .

grafana is the very best dashboard /telemetry tool I can think of right now. It’s used in large tech companies across the world. It’s a beast :) . I have used it with hundreds and thousands of servers for years now . Big fan of it.

I think for setups where there are many tanks , like public aquariums, coral farms, fish stores , reef-pi , grafana combo will shine.


I agree, not everyone has the time, energy or patience to deal with the level of nonsense guys like us are dealing with.

I would love to jump in and help out, but as the code base has very little in the way of comments, I'm not exactly sure what's going on with a lot of it. I don't like mucking about in things I don't understand. (completely untrue)
 

elysics

Valuable Member
View Badges
Joined
Jan 15, 2020
Messages
1,591
Reaction score
1,590
Rating - 0%
0   0   0
I wanted to try out the stepper implementation but it wouldn't let me save the configuration.

Created outlets on GPIO 7 and 8 for STEP and DIR. It threw errors if i wanted to save without A, B, C assigned, but that was a simple fix, i created dummy outlets on GPIOs 23,24,25 and just didn't connect anything. Then, with every field filled out, it throws validation error null

Is there a problem with my pin selection? Or something else? Schedule was the default selection, hour minute, second as 0, the rest starred

1647515930326.png


Also, having 1/64 stepping as an option, at least for calculation purposes might be nice, but not hugely important, haven't tried out how fast the pi can even keep up
 

elysics

Valuable Member
View Badges
Joined
Jan 15, 2020
Messages
1,591
Reaction score
1,590
Rating - 0%
0   0   0
Thought it was pin7/8 being blocked by SPI somehow, but GPIO 16 and 20 instead show the same problem. Tried 0,1,100 for Delay (what is that supposed to be btw, time in milliseconds between step pulses?), different Microsteppings,different vol/rotation and dosing volumes, to no avail, always "The settings cannot be saved due to validation errors. Please correct the errors and try again.null"

No idea what is null and how i can fix it
 

brandon clow

Active Member
View Badges
Joined
Oct 22, 2017
Messages
121
Reaction score
155
Rating - 0%
0   0   0
Thought it was pin7/8 being blocked by SPI somehow, but GPIO 16 and 20 instead show the same problem. Tried 0,1,100 for Delay (what is that supposed to be btw, time in milliseconds between step pulses?), different Microsteppings,different vol/rotation and dosing volumes, to no avail, always "The settings cannot be saved due to validation errors. Please correct the errors and try again.null"

No idea what is null and how i can fix it
I couldn't get past this error message also. I was going to see the API would reject it also when I have some time
this weekend.
 

DWKDiver

Community Member
View Badges
Joined
May 18, 2021
Messages
44
Reaction score
42
Location
Georgia
Rating - 0%
0   0   0
For for thought...

Steppers for dosing seems like it is screaming for i2c stepper driver boards. Many dosers and NO RPI pins required. I used 5v L293 i2c boards with BYJ cheap steppers for project and it was a piece of cake. It would require a driver for each specific i2c stepper board though assuming i2c commands where different between boards. You would just get the peristaltic head and attach the stepper.
 

Martin Lowry

Community Member
View Badges
Joined
Sep 19, 2017
Messages
60
Reaction score
66
Location
Dover, NH
Rating - 0%
0   0   0
To be perfectly honest, I don't really use the graphs on the reef-pi UI for anything. I stick with the grafana. Way more configurable.
Thanks @GaryE , Can you normalize the Y-Axes in Grafana so it accurately represents the actual Wattage? I've looked for a way to do it but have not found a way so far. I tried setting it to Miliwatts, didn't work. Set it back to Watts and it's looking better...
 
Last edited:

elysics

Valuable Member
View Badges
Joined
Jan 15, 2020
Messages
1,591
Reaction score
1,590
Rating - 0%
0   0   0
For for thought...

Steppers for dosing seems like it is screaming for i2c stepper driver boards. Many dosers and NO RPI pins required. I used 5v L293 i2c boards with BYJ cheap steppers for project and it was a piece of cake. It would require a driver for each specific i2c stepper board though assuming i2c commands where different between boards. You would just get the peristaltic head and attach the stepper.
Maybe there are good ones with i2c capabilties, the trinamic ones sadly only have uart which isn't much help when looking at multiple steppers at the same time, but i really wouldn't recommend using L293 as stepper "drivers". At least not if you are going to be in the same room. That's worse than a4988 and those are already loud.

I don't know what the best way forward is, maybe it is an arduino based pin extender/ arduino based doser controlled by the pi, some other kind of expansion, or maybe we just have to cram in as much to the pins we have as we can, with the current way of doing things all we really need is 1 pin per pump to run a doser, 2 if we want to run a pump in both directions, the rest can be hardwired

edit: come to think of it, there are some with SPI, but that wouldn't really save on pins either due to the need for chip select
 
Last edited:

GaryE

Well-Known Member
View Badges
Joined
Mar 12, 2020
Messages
992
Reaction score
1,385
Location
Coatesville, Indiana
Rating - 0%
0   0   0
Thanks @GaryE , Can you normalize the Y-Axes in Grafana so it accurately represents the actual Wattage? I've looked for a way to do it but have not found a way so far. I tried setting it to Miliwatts, didn't work. Set it back to Watts and it's looking better...
I was having a similar issue with my flow meter, it was showing incorrectly. It was 100 times higher than it should have been.

So, simple math fixed it.. (by the way, I was stationed at Pease AFB in the late 1980's)
1647564959040.png
 

GaryE

Well-Known Member
View Badges
Joined
Mar 12, 2020
Messages
992
Reaction score
1,385
Location
Coatesville, Indiana
Rating - 0%
0   0   0
I agree, not everyone has the time, energy or patience to deal with the level of nonsense guys like us are dealing with.

I would love to jump in and help out, but as the code base has very little in the way of comments, I'm not exactly sure what's going on with a lot of it. I don't like mucking about in things I don't understand. (completely untrue)

And the sickness continues.. another RPI 4 on the way, thanks to Adafruit...
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,349
Reaction score
1,724
Location
Missouri
Rating - 0%
0   0   0
I was having a similar issue with my flow meter, it was showing incorrectly. It was 100 times higher than it should have been.

So, simple math fixed it.. (by the way, I was stationed at Pease AFB in the late 1980's)
1647564959040.png
+1 I had the same issue for my return pump, I just did the math and applied it...all good now. :)
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,349
Reaction score
1,724
Location
Missouri
Rating - 0%
0   0   0
And the sickness continues.. another RPI 4 on the way, thanks to Adafruit...
I was able to order 2 zero 2w this week from pihut, still more than I wanted to pay but they are supposedly on their way...still pretty crazy I do not think this will get much better supply wise this year...:(
 

robsworld78

Well-Known Member
View Badges
Joined
Feb 14, 2020
Messages
985
Reaction score
1,325
Location
Edmonton, Canada
Rating - 0%
0   0   0
Hive mind,
I have cut 5.2 release of reef-pi yesterday.

This release brings an experimental stepper based doser support using drv8825 ICs. I have tested it with a 42 step doser from Amazon ( goso) . The wiring details are explaIned here:
I’m calling this an experimental driver as I expect the ui might change a bit, I may move it under connector/driver later on .
ph controller now has enabled/disabled toggle button from collapsed ui similar to ato or temperature controllers.
Users with MQTT integration can now specify a prefix value that will be used as parent topic for publishing all messages.


other than this, the main focus was on fixing outstanding bugs. Community member Markus Kuhn contributed bulk of the ui validation related fixes and i18n improvements across temperature, ph, lighting, driver components.
Ato reset button not working bug was fixed.

Capability changes under settings ui was not reflected correctly with backend state. Fixed.

Timer when used with revert back feature, would raise duration parsing error . Fixed

Journal entries were not sorted. I fixed this. But have some bad news here, this is a breaking change. Due to the poor was I designed it in the beginning the time information was not modeled correctly. It will be considerably hard to decipher correct time, that we need to sort the entries using the existing type. To make this manageable in time, I have updated the type. This will save the sorting issue for all new entries, but existing entries will render as invalid (Reset toast jan 01, 01 ). I request users to recreate the journal. I’m sorry for this, I’ll be mindful of this. In fact this is what made me call out stepper driver as experimental. I think going forward it will be wise to augment the newly developed component that we are still hammering through user feedbacks and has not gone through couple of minor release cycle at least , will be called out experimental . This also means we can be double strict about not altering non experimental api in minor releases,


Release builds are available in usual location : https://github.com/reef-pi/reef-pi/releases/tag/5.2

Nice job, thanks for all your efforts. I think this is a great start for steppers and like the method you've used, I also don't mind the settings where they are, seems to make sense, select stepper and you get all the settings.

As others have reports there is a bug when adding one, I noticed if I changed pump type to "DC motor" it was complaining for "duration" and "speed". If something is put in these fields, then switched back to "Stepper" you can save it ok.

For down the road it would be nice to have a selection or setting of "Don't Use" for direction and micro stepping pins. :)

For for thought...

Steppers for dosing seems like it is screaming for i2c stepper driver boards. Many dosers and NO RPI pins required. I used 5v L293 i2c boards with BYJ cheap steppers for project and it was a piece of cake. It would require a driver for each specific i2c stepper board though assuming i2c commands where different between boards. You would just get the peristaltic head and attach the stepper.
That might seems like a good idea but IMO I2C or SPI should only be used when absolutely necessary. It was never designed to leave a circuit board and is very susceptible to noise and interference. Using GPIO's are by far the most reliable method for DIY.
 
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
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
OK I did further trials for ato resets. I had to delete the first ato for resest to work. However, it now works for all the ato resets. One down.

Tried the same with the temp keyboard pop up, still no go... value error.
the ato issue could be due to cached front end code (fix was in front end code). Use shift+refresh after the update, just to be sure. I'll check the temperature ui. Can you file a github bug, it will be awesome to have the details, it helps me quickly recreate the issue (and fix henceforth).
 
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 wanted to try out the stepper implementation but it wouldn't let me save the configuration.

Created outlets on GPIO 7 and 8 for STEP and DIR. It threw errors if i wanted to save without A, B, C assigned, but that was a simple fix, i created dummy outlets on GPIOs 23,24,25 and just didn't connect anything. Then, with every field filled out, it throws validation error null

Is there a problem with my pin selection? Or something else? Schedule was the default selection, hour minute, second as 0, the rest starred

1647515930326.png


Also, having 1/64 stepping as an option, at least for calculation purposes might be nice, but not hugely important, haven't tried out how fast the pi can even keep up
I can reproduce this. Looking into it. I dont know why this is happening, will report back soon (suspect some UI bug must have gone through)


Here are the details :
Delay, is in nano second. It is the pause in between steps. For micro stepping, it will be divided by the appropriate micro step level. By default it is 20800000.
All pins are required right now, as the underlying driver currently requires all those pins. You are right, most of it could be done out of band, but those are specific cases. The initial version for experimenting needs to support all of it. As we understand the user experience, we can make it simpler, and just require one pin or so.. those will be special case of this driver.
I had tested with 42 stepper motor.



https://github.com/reef-pi/reef-pi/blob/main/controller/modules/doser/stepper.go#L25
 
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 was having a similar issue with my flow meter, it was showing incorrectly. It was 100 times higher than it should have been.

So, simple math fixed it.. (by the way, I was stationed at Pease AFB in the late 1980's)
1647564959040.png
+100. This is very handy and useful for any generic transformation function, including decimal reduction ..
 

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