Reef-pi + Home Assistant Build

Get Fish & Corals directly for the suppliers

Bigtrout

Well-Known Member
View Badges
Joined
Dec 16, 2018
Messages
760
Reaction score
1,922
Thanks!
FYI - This is the setting that is working (and squeaking).

Screen Shot 2019-02-17 at 1.02.21 AM.png
This could have been related to the stuck PCA9685 frequency bug. My frequency was stuck at 1500hz, @Ranjib had his stuck in the 200's somewhere, there is a new release that fixes the frequency setting.
Load the new release and try some different frequencies on the configuration---settings---pca9685 freq setting box. Yours may have been stuck and your dosing motors may do better on a different freq.

Also when ramping up and down your motors may not like the low duty cycles. So try putting something higher than Zero in the min setting box. If freq changes dont help. The motor may not make enough power on a low setting and may be 'lugging' making the squeak noise
 
OP
sfgabe

sfgabe

Member
View Badges
Joined
Sep 7, 2018
Messages
67
Reaction score
143
I just upgraded to 2.3 yesterday, so I'll see if a change in frequency helps. In the meantime, an update on some other changes.

  • I've switched the feeder to a continuous rotation auger type on Thingiverse here. The barrel type was pulling in too much moisture and getting gunked up. The python script for running it off of a pi is "fishfeeder360.py" in my scripts repository

  • There is a pump on a Tuya switch that cycles water from a small sump, Home Assistant runs this every three minutes until Reef-pi sees the float switch go Low (usually about a minute), then it has time to fill again.

  • The Amazon Tank is now combined with a aquaponic system as seen here on Thingiverse. The lightswitch and plant_waterer scripts in my scripts repository are triggered by a Home Assistant automation. This also allows for gradual water changes.

  • I spoke to Richard Ross from the Steinhart Aquarium when he spoke at last months Brooklyn Aquarium Society Meeting (a great resource for anyone in the NYC area) and he agreed that the data pulled from NOAA and weather services as surface water temps seemed high for a home aquarium but were probably accurate for Bali. He said he had come across a similar issue at their coral spawning facility and adjusted the data down by 2 degrees - which is the same as I had done through a Home Assistant template anyway. The talk was on coral spawning, which is triggered by moon phases, so coordinating nightlights with lunar data might be next in the works.
 
Last edited:
Top Shelf Aquatics

Ranjib

Valuable Member
View Badges
Joined
Apr 16, 2016
Messages
6,895
Reaction score
12,058
Location
Palo Alto, Bay Area
I just upgraded to 2.3 yesterday, so I'll see if a change in frequency helps. In the meantime, an update on some other changes.

  • I've switched the feeder to a continuous rotation auger type on Thingiverse here. The barrel type was pulling in too much moisture and getting gunked up. The python script for running it off of a pi is "fishfeeder360.py" in my scripts repository

  • There is a pump on a Tuya switch that cycles water from a small sump, Home Assistant runs this every three minutes until Reef-pi sees the float switch go Low (usually about a minute), then it has time to fill again.

  • The Amazon Tank is now combined with a aquaponic system as seen here on Thingiverse. The lightswitch and plant_waterer scripts in my scripts repository are triggered by a Home Assistant automation. This also allows for gradual water changes.

  • I spoke to Richard Ross from the Steinhart Aquarium when he spoke at last months Brooklyn Aquarium Society Meeting (a great resource for anyone in the NYC area) and he agreed that the data pulled from NOAA and weather services as surface water temps seemed high for a home aquarium but were probably accurate for Bali. He said he had come across a similar issue at their coral spawning facility and adjusted the data down by 2 degrees - which is the same as I had done through a Home Assistant template anyway. The talk was on coral spawning, which is triggered by moon phases, so coordinating nightlights with lunar data might be next in the works.
Very informative. Thank you for sharing. Steinhert aquarium is so close by , I would love to interact with Richard and get his thoughts on reef-pi , anything we can do to support research etc. reef-pi is already being used by three universities for different types of experiments, it would be nice to see it supporting my local public aquariums
 
OP
sfgabe

sfgabe

Member
View Badges
Joined
Sep 7, 2018
Messages
67
Reaction score
143
Very informative. Thank you for sharing. Steinhert aquarium is so close by , I would love to interact with Richard and get his thoughts on reef-pi , anything we can do to support research etc. reef-pi is already being used by three universities for different types of experiments, it would be nice to see it supporting my local public aquariums
@Ranjib when I lived in the bay area I went to the SF Aquarium society meetings - also a good resource. They arranged a "backstage" tour of the aquarium, among the giant pipes and pumps, it was amazing. They seemed very supportive of hobbyists. Richard said they were using Apex for the coral spawning project, but I think they had to modify some things to get data synced up. Seems like a good place to have a more flexible setup like reef-pi, maybe you should get in touch!
 
OP
sfgabe

sfgabe

Member
View Badges
Joined
Sep 7, 2018
Messages
67
Reaction score
143
Just adding an update, if anyone's following. The reef-pi build has been chugging along pretty effortlessly since the last posts, and I've added an orchid dottyback, some inverts and frags. Here's some pics of the full setup.

I also added a pan-tilt camera with a raspberry pi running motioneyeos, that's the black box hanging off the top right corner in the pics. You can find out more about motioneyeos here, and find my action button scripts here. I'm not super thrilled with the lag on the image refresh, but not sure if there are a lot of better options.

One glitch I did find about running reef-pi (or any pi) in this environment, is that the magnets that so often are securing pumps, etc. in the right place through the glass are wreaking havoc on the wifi connection. I installed a shelf on the back so I could hide the reef-pi box out of the way but whenever I put it there I couldn't connect to it (it was still running as a standalone controller, but the broadcast to web UI was very weak). I'm working on getting a wired cat6 connection to that corner so I can tuck it all out of sight and still have a solid connection.

IMG_20190526_153224.jpg IMG_20190526_152208.jpg
IMG_20190526_151038.jpg IMG_20190526_151211.jpg
IMG_20190526_151852.jpg
 
Last edited:

Ranjib

Valuable Member
View Badges
Joined
Apr 16, 2016
Messages
6,895
Reaction score
12,058
Location
Palo Alto, Bay Area
Tank is looking awesome. Careful with those green mushroom, they can be invasive.
The magnet induced wifi aberration is very good information. Thank you for sharing, i'll keep it in mind. This might explain some of my network issues
 
OP
sfgabe

sfgabe

Member
View Badges
Joined
Sep 7, 2018
Messages
67
Reaction score
143
Careful with those green mushroom, they can be invasive.
Haha, but that also means they are easy to take care of. I'm into slowly growing the coral collection as I come across interesting stuff, so the mushrooms take up some otherwise uninteresting space. The kenya tree may need to be trimmed down first though.
 
Get Fish & Corals directly for the suppliers
OP
sfgabe

sfgabe

Member
View Badges
Joined
Sep 7, 2018
Messages
67
Reaction score
143
Also, @Ranjib - I saw there is a prerelease for 3.0 - congrats!

Question about that before I dive in - so much of my setup relies on the API. Have there been substantial changes to the API with the new version? If so, is there any documentation about it somewhere?
 

Ranjib

Valuable Member
View Badges
Joined
Apr 16, 2016
Messages
6,895
Reaction score
12,058
Location
Palo Alto, Bay Area
Also, @Ranjib - I saw there is a prerelease for 3.0 - congrats!

Question about that before I dive in - so much of my setup relies on the API. Have there been substantial changes to the API with the new version? If so, is there any documentation about it somewhere?
Not yet. The API for 3.0 is not finalized and will change in next couple of months. I'll keep you posted.
 
OP
sfgabe

sfgabe

Member
View Badges
Joined
Sep 7, 2018
Messages
67
Reaction score
143
Oh and here's my latest UI for the reef tank in Home Assistant. The development of the lovelace UI has come leaps and bounds since my initial install so I've been playing with it quite a bit. I should add, almost everything is done through automations based on data coming in from the reef weather, etc. but this is just so I can keep an eye on it and make sure everything is going smoothly.

reef-UI-homeassistant.png
 

Ranjib

Valuable Member
View Badges
Joined
Apr 16, 2016
Messages
6,895
Reaction score
12,058
Location
Palo Alto, Bay Area
Oh and here's my latest UI for the reef tank in Home Assistant. The development of the lovelace UI has come leaps and bounds since my initial install so I've been playing with it quite a bit. I should add, almost everything is done through automations based on data coming in from the reef weather, etc. but this is just so I can keep an eye on it and make sure everything is going smoothly.

reef-UI-homeassistant.png
Looks awesome:)
 

daveabbott007

Member
View Badges
Joined
Aug 12, 2014
Messages
5
Reaction score
8
Location
United Kingdom
hi sfgabe, could you help with sercrets.yaml file setup, i have tried looking everywhere and all sorts of ways to enter the cookie .txt info but so far none have worked. could you share how your syntax looks for the cookie entry and where you got the info

many thanks
 
Top Shelf Aquatics
OP
sfgabe

sfgabe

Member
View Badges
Joined
Sep 7, 2018
Messages
67
Reaction score
143
hi sfgabe, could you help with sercrets.yaml file setup, i have tried looking everywhere and all sorts of ways to enter the cookie .txt info but so far none have worked. could you share how your syntax looks for the cookie entry and where you got the info

many thanks
Sorry for the late reply, I havn't checked in here for a bit.

Here’s what I have in secrets.yaml:

Code:
reefcontrolpi_cookie: "auth=BIGSTRINGOFNUMBERSANDLETTERS="
 
OP
sfgabe

sfgabe

Member
View Badges
Joined
Sep 7, 2018
Messages
67
Reaction score
143
I just added a separate top off to my freshwater tank. It's in a different area, so it needed something that allowed me to hide the ATO water jug in a closet and work independently of the other systems.

Details and wiring diagram on Github here: https://github.com/sfgabe/OITProjects/tree/master/WaterPump

It's still controlled through homeassistant, with 3 additions to shell_commands.yaml:
  • ato_on: curl -X POST http://esp_ipaddress/pump1on
    (turns on for 30 seconds at a time)
  • ato_off: curl -X POST http://esp_ipaddress/pump1off
    (does nothing but prevents the "on" page from reloading if the page reloads)
  • ato_level: curl -X GET http://esp_ipaddress/checklevel
    (reads water level as a sensor response, I have it set to check every 12 hours)
 
Last edited:

Have you ever been accused of talking to much about your tank?

  • Yes (tell us about it)

    Votes: 176 53.3%
  • No

    Votes: 154 46.7%

Online statistics

Members online
1,772
Guests online
4,133
Total visitors
5,905
teffo, contstant temperature & 4 ch controller
Top