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

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,349
Reaction score
1,724
Location
Missouri
Rating - 0%
0   0   0
I would have a 3d printer if I could figure out how to make things with a 3d Cad program... That stuff baffles me.
I use several but the one I use the most is tinkercad, free to use. It comes across as pretty simple solid cad tool but you can make some pretty complex stuff with it, once you get used to it you can make things pretty quickly - https://www.tinkercad.com/
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,349
Reaction score
1,724
Location
Missouri
Rating - 0%
0   0   0
This is why a long while ago i was very adamant, maybe even rudely so, about wanting hardwired outlets and no wifi smart devices. I actually ran rather often into the situation where the network/router wasn't up.

And in that case, or if the pis network chip dies, or whatever, I'd rather have the pi continue operating the ato and dosers and alarms and stuff than shut all that down and wait for a network that might never come or only hours or days later, particularly if noone is home. Power outage situations/ running on backup power are another consideration.

I've got a better router now, and some smart plugs, but i still only give them noncritical devices to control like some unimportant pumps and other stuff unrelated to the tank.

I am not sure compromising reefpi by default for the sake of one driver for one particular device is a great idea, especially when people that have those can make their own choice to do that if they want.
You may want to re-think things and make sure to understand how relays fail open or close based on their default setting. If the rpi locks up, loose power, etc it may leave those devices that are directly connected not as you intended. The Kasa strips remember the power state and return to that state regardless of the rpi, so for me I have my return pump on, I almost always want it onn regardless. If the rpi sd card gets corrupted on a power outage it may not come back up and if it doesn't then what is the state of the relays that you are using will determine if they continue with power or not, fail-open or fail close states. I split things across the strips based on failure scenario and what I want to keep running vs what I want off if things are in a wonky state. If the rpi gets corrupted etc, your not going to get any alarms unless you have some external monitoring program setup to notify you, if you don't have such a thing I would recommend that you do. Automation is really nice up to the point where its not, lol. :)

Keep in mind that wait for network times out after a period of time it doesn't wait forever...
 

elysics

Valuable Member
View Badges
Joined
Jan 15, 2020
Messages
1,591
Reaction score
1,590
Rating - 0%
0   0   0
You may want to re-think things and make sure to understand how relays fail open or close based on their default setting. If the rpi locks up, loose power, etc it may leave those devices that are directly connected not as you intended. The Kasa strips remember the power state and return to that state regardless of the rpi, so for me I have my return pump on, I almost always want it onn regardless. If the rpi sd card gets corrupted on a power outage it may not come back up and if it doesn't then what is the state of the relays that you are using will determine if they continue with power or not, fail-open or fail close states. I split things across the strips based on failure scenario and what I want to keep running vs what I want off if things are in a wonky state. If the rpi gets corrupted etc, your not going to get any alarms unless you have some external monitoring program setup to notify you, if you don't have such a thing I would recommend that you do. Automation is really nice up to the point where its not, lol. :)

Keep in mind that wait for network times out after a period of time it doesn't wait forever...

The outlets remembering whatever unpredictable state they happened to be in at the time, with any switching operations or failsafes disabled for a while is precisely on of the scenarios i am scared of. I'd much rather have them revert to the default state given by the relay's switching properties. Normally closed relays for things i want to stay on, normally open ones for things i want to stay off in an emergency. Or in the case of my smart plugs, programming them to remember the default i chose, not their last state. The real worry is then about things that aren't okay to be just always on, but leaving them always off is not fine either, like heaters that aren't controlled by redundant temperature controllers.

But yeah, i didn't know the wait for network part times out, not such an issue then regarding disabling reefpis functionality in that case i guess
 

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 use several but the one I use the most is tinkercad, free to use. It comes across as pretty simple solid cad tool but you can make some pretty complex stuff with it, once you get used to it you can make things pretty quickly - https://www.tinkercad.com/
I forgot about that one.. I'll have to log in and take a look..
 

JachPot

Active Member
View Badges
Joined
Feb 12, 2022
Messages
444
Reaction score
665
Location
Colorado
Rating - 0%
0   0   0

has anyone looked into these? They have 25+ in stock right by my house and I'd be willing to go pick some up
 

elysics

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

has anyone looked into these? They have 25+ in stock right by my house and I'd be willing to go pick some up
Not even in the same category as any other pi, those are not a proper computer, just microprocessor, like arduino etc.
 

GaryE

Well-Known Member
View Badges
Joined
Mar 12, 2020
Messages
992
Reaction score
1,385
Location
Coatesville, Indiana
Rating - 0%
0   0   0

has anyone looked into these? They have 25+ in stock right by my house and I'd be willing to go pick some up

Those are cool, but they won't run reef-pi. Its similar to an Arduino.
 

DrWTF

New Member
View Badges
Joined
Mar 15, 2022
Messages
1
Reaction score
0
Location
United States
Rating - 0%
0   0   0
Just got my Reef Pi running on a Robo Tank and am really loving it. However, I do see some misc. noise spikes in the data stream that could be solved with a simple filter on the data (I'd choose a median, or really a Hampel filter).

Both for displaying and for taking action based, this seems prudent. Curious if anyone has looked into it?
 
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

I found that calibrating the temp probe using the GO button on the pop up key pad gives error if value is not in a given range. If I use APPLY and not the GO button it seems to use the value given. This might be a UI issue. And I don't understand the GO value limits given at all. Can you explain? Thank you and nice work.
I’ll have to go through the ui and reproduce it. It will be big help if you can test if it’s present in 5.2 , and file a bug if it’s present. I suspect a few other ui bugs … I want to address these as first priority
 
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 delay the start or have it start with out a network after a 30s or 1 minute? I do think it's good idea for it to run with network or not but could the start be delayed somehow?
I’m pretty sure you can craft something with systemd to do this .
 
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
This may not sound that exciting to most (especially my Spousal Equivalent), but I have a KP303 on my desk with one outlet being repeatedly turned on and off by an ESP32. Turning on / off a single outlet Kaza device is not trivial, adding the 2 extra outlets on a strip increases the complexity. Having to identify the target relay with only knowing the ip address of the power strip is a task. (Im sure @Ranjib can relate) I was able to (with some help from Stack Overflow) make a function to encrypt the json string to send to the Kaza device..

I just need to integrate a temp sensor and the logic to monitor it and use what I have built here on my desk now to turn the thing on and off when the temps are outside the set parameter.

My test board is this Adafruit ESP32-S2 TFT Feather (https://www.adafruit.com/product/5300). I plan to use the TFT on it to display the current temp and status of the heater. Thinking just display the temp nice and large with 2 decimal places and color the background either green for not heating or red for heating. And since the ds18b20 is supported by ardiuno, should be a robust little temp controller.

1647339224993.png
This is awesome. Can it run a tiny web server ? It will be cool if we can have some simple api and reef-pi can integrate with it :) . I always wanted to have an network based driver implementation (may be just reuse tasmota’s spec) in reef-pi that can be used to integrate with custom , diy esp32 based purpose made devices. Could be sensors or outputs ,,, this is a good excuse .
 
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
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
 

elysics

Valuable Member
View Badges
Joined
Jan 15, 2020
Messages
1,591
Reaction score
1,590
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

Options for steppers look great, will try that out later today or tomorrow, but you are right, the 5 pin selection might look better hidden away under connectors or somewhere around there

I am not sure there's a perfect solution to be had here, but I assume the microstepping selector controls the A, B, C outputs? Leaving A, B, C disconnected and hardwiring those pins instead and selecting the correct microstepping for calculation purposes is no problem, i see no immediately obvious reasons to want to switch microstepping after initial tweaking for a doser or titrator, but making those generic and independent from the microstepping selection would allow to use pretty much any stepper driver. Would make setup less intuitive and open for errors though, needing to look up tables, or need another selector for the type of chip. Different chips have different tables, here is an example for TMC2209

1647432223250.png
 

DWKDiver

Community Member
View Badges
Joined
May 18, 2021
Messages
44
Reaction score
42
Location
Georgia
Rating - 0%
0   0   0
I’ll have to go through the ui and reproduce it. It will be big help if you can test if it’s present in 5.2 , and file a bug if it’s present. I suspect a few other ui bugs … I want to address these as first priority
Checked out 5.2.

Still has message: invalid value. Use values between xx.yy and xx.zz.

The valid value it wants is 2 x histeresis is if that helps.

Now on to se the changes in 5.2.
 

DWKDiver

Community Member
View Badges
Joined
May 18, 2021
Messages
44
Reaction score
42
Location
Georgia
Rating - 0%
0   0   0
Checked out 5.2.

Still has message: invalid value. Use values between xx.yy and xx.zz.

The valid value it wants is 2 x histeresis is if that helps.

Now on to se the changes in 5.2.
Checked out journal. Did get error. So deleted and rebuilt. Now works and get a graph???

My ATOs will not reset. Created test ato item with and will wait till data accumulates to test. It currently gets same error message. Item undefined does not exist in bucket ato.

I have rebooted and restarted reef pi already.
 

DWKDiver

Community Member
View Badges
Joined
May 18, 2021
Messages
44
Reaction score
42
Location
Georgia
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.
 

GaryE

Well-Known Member
View Badges
Joined
Mar 12, 2020
Messages
992
Reaction score
1,385
Location
Coatesville, Indiana
Rating - 0%
0   0   0
This is awesome. Can it run a tiny web server ? It will be cool if we can have some simple api and reef-pi can integrate with it :) . I always wanted to have an network based driver implementation (may be just reuse tasmota’s spec) in reef-pi that can be used to integrate with custom , diy esp32 based purpose made devices. Could be sensors or outputs ,,, this is a good excuse .
yes, it can run a webserver.

I have a couple ESP32's running air quality sensors that output metrics for Prometheus.

I also have one that's connected to a flow sensor that is inline between my RO/DI and my ATO reservoir. I use it to alert me when the reservoir is overflowing onto my living room floor.. That also emits prometheus metrics. Very simple to setup.

I started work on the ESP32 that will interface with Kasa last night to read temps, ran into a snag, but hopefully will have that worked out by this weekend. Once I get past that, I'll have the temp control worked out.

1647468584404.png

1647468624823.png
 
Last edited:

Martin Lowry

Community Member
View Badges
Joined
Sep 19, 2017
Messages
60
Reaction score
66
Location
Dover, NH
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
 

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