Reef-pi + Home Assistant Build

OP
sfgabe

sfgabe

Active Member
Review score
+0 /0 /-0
View Badges
Joined
Sep 7, 2018
Messages
139
Reaction score
236
Review score
+0 /0 /-0
Adding a few more pics since I got the Atlas pH probe kit up and running today.

reef-pi-box-inside2.png


Atlas sent the new version (4) of the ESO isolation board so I designed and printed a panel mount support for it. It's available on Thingiverse here: https://www.thingiverse.com/thing:4773577

reef-pi-box-ezo.png


Here it is in it's final incognito form. I'm really pleased that it blends in to the furniture so well. The new Noctua fan is absolutely silent so I'm looking forward to forgetting all about it. :D

reef-pi-box-hidden.png
 
Join the movement!
OP
sfgabe

sfgabe

Active Member
Review score
+0 /0 /-0
View Badges
Joined
Sep 7, 2018
Messages
139
Reaction score
236
Review score
+0 /0 /-0
One more update: I created a notification screen for quick tank stats. It works great with Home Assistant but can also be used as a standalone with the new MQTT feeds from reef-pi, as long as you have an MQTT broker somewhere in your local network and can modify a few lines of the arduino code.

InShot_20210227_024037147.jpg


There is an optional led notification light and a motion sensor that will activate the screens backlight, so you can see your tank info with a wave of your hand.

More info and specific details are on my Github here: https://github.com/sfgabe/OITProjects/tree/master/NotifyLCD_with_MQTT
 

attiland

2500 Club Member
Review score
+0 /0 /-0
View Badges
Joined
Jul 22, 2020
Messages
2,588
Reaction score
4,764
Review score
+0 /0 /-0
Location
United Kingdom
One more update: I created a notification screen for quick tank stats. It works great with Home Assistant but can also be used as a standalone with the new MQTT feeds from reef-pi, as long as you have an MQTT broker somewhere in your local network and can modify a few lines of the arduino code.

InShot_20210227_024037147.jpg


There is an optional led notification light and a motion sensor that will activate the screens backlight, so you can see your tank info with a wave of your hand.

More info and specific details are on my Github here: https://github.com/sfgabe/OITProjects/tree/master/NotifyLCD_with_MQTT
Nice one. Check your link in the post as it drops to Amazon instead of github
 
Top Shelf Aquatics

Ranjib

7500 Club Member
Review score
+0 /0 /-0
View Badges
Joined
Apr 16, 2016
Messages
9,603
Reaction score
16,612
Review score
+0 /0 /-0
Location
Pleasant Hill, Concord
One more update: I created a notification screen for quick tank stats. It works great with Home Assistant but can also be used as a standalone with the new MQTT feeds from reef-pi, as long as you have an MQTT broker somewhere in your local network and can modify a few lines of the arduino code.

InShot_20210227_024037147.jpg


There is an optional led notification light and a motion sensor that will activate the screens backlight, so you can see your tank info with a wave of your hand.

More info and specific details are on my Github here: https://github.com/sfgabe/OITProjects/tree/master/NotifyLCD_with_MQTT
Lools awesome :).
 
OP
sfgabe

sfgabe

Active Member
Review score
+0 /0 /-0
View Badges
Joined
Sep 7, 2018
Messages
139
Reaction score
236
Review score
+0 /0 /-0
Top Shelf Aquatics

cryptodendrum

Community Member
Review score
+0 /0 /-0
View Badges
Joined
Dec 22, 2020
Messages
60
Reaction score
155
Review score
+0 /0 /-0
Location
Netherlands
Latest updates to the Home Assistant UI. I added the pH sensor and simplified the light display, thanks to the granularity available through the MQTT integration.

I also added a manual test results and redfield ratio panel as outlined in @cryptodendrum 's post on the HomeAssistant forum here: https://community.home-assistant.io...of-aquarium-automation-whos-with-me/18486/320
Very cool UI @sfgabe!!!

Just an update about the Redfield Ratio (I'll check later today if I need to amend my original post about this), because of the way our tests for PO4 / NO3 measure the values, our targets for Redfield Ratio should be based on a Target value of a 10:1 Ratio, not 16:1. I think it was Ryan on BRSTV who I heard first comment about this, and after doing some further research, it seems he was correct. No code changes needed, just adjust your target value.
 

attiland

2500 Club Member
Review score
+0 /0 /-0
View Badges
Joined
Jul 22, 2020
Messages
2,588
Reaction score
4,764
Review score
+0 /0 /-0
Location
United Kingdom
Very cool UI @sfgabe!!!

Just an update about the Redfield Ratio (I'll check later today if I need to amend my original post about this), because of the way our tests for PO4 / NO3 measure the values, our targets for Redfield Ratio should be based on a Target value of a 10:1 Ratio, not 16:1. I think it was Ryan on BRSTV who I heard first comment about this, and after doing some further research, it seems he was correct. No code changes needed, just adjust your target value.
That makes me even more satisfied with my results as I always had 1:10 rato
 
Nutramar Foods

woejillis

Community Member
Review score
+0 /0 /-0
View Badges
Joined
Jun 4, 2014
Messages
65
Reaction score
29
Review score
+0 /0 /-0
Location
United States
This is what I did (with some suggestions of a friend of mine) some weeks ago (I hope to remeber every step):

1) I installed and set up the Mosquitto Brocker Add on on my Docker;

2) I have used MQTT Explorer (free softare) to see the mqtt data that Reef-pi sent to the Broker.

3) In the config.yaml file I added the following line (It was there... but to help people to better "understand" every step...):
sensor: !include sensors.yaml
climate: !include climate.yaml

4) In the sensors.yaml file, I added the following:

# Dati Acquario
- platform: mqtt
name: Temperatura Acquario DX
state_topic: "temp_dx_reading"
- platform: mqtt
name: Temperatura Raspberry 3B+
state_topic: "temp_raspberry_reading"
- platform: mqtt
name: Temperatura Acquario SX
state_topic: "temp_sx_reading"
- platform: mqtt
name: pH
state_topic: "ph_ph"

5) After a reboot, the sensor were in the "Developer Tool" section of the frontend.

6) I created the climate.yaml file and I added 3 generic thermost:

- platform: generic_thermostat
name: Temperatura SX
heater: switch.meross_acquario_mss425f_switch_3
target_sensor: sensor.temperatura_acquario_sx
ac_mode: false
target_temp: 25.1
cold_tolerance: 0.2
hot_tolerance: 0.2
initial_hvac_mode: "heat"

- platform: generic_thermostat
name: pH
heater: switch.meross_acquario_mss425f_switch_1
target_sensor: sensor.ph
ac_mode: true
target_temp: 6.70
cold_tolerance: 0.03
hot_tolerance: 0.03
initial_hvac_mode: "cool"

- platform: generic_thermostat
name: Temperatura DX
heater: switch.meross_acquario_mss425f_switch_2
target_sensor: sensor.temperatura_acquario_dx
ac_mode: false
target_temp: 25
cold_tolerance: 0.2
hot_tolerance: 0.2
initial_hvac_mode: "heat"

7) Then, I create the grafic "page" of my Fish Tank working on the ui-lovelace.yaml (see attached file)

8) At the end I created some automations that send me a telegram message if:
- temperature is > 27°C
- temperature is < 23°C
- ph is > 7.00 (in progress... I forget to write it)
- ph is < 6.50 (in progress)

I prefer to use a 4 plugs MEROSS smart wifi power strip to control temperature (heating cable and heater) and the CO2 valve.

That's all... any suggestion is welcome.

Schermata 2020-12-18 alle 00.14.11.png
I'm currently trying to get MQTT working between reef-pi and my home assistant setup in which I'm new to both but have been using Smartthings for years.

How do you use MQTT Explorer to view the topics out of reef-pi? I assume the "host" is supposed to be the IP address of my reef-pi and the user/pass for reef-pi access.

Are those assumptions correct?
 
OP
sfgabe

sfgabe

Active Member
Review score
+0 /0 /-0
View Badges
Joined
Sep 7, 2018
Messages
139
Reaction score
236
Review score
+0 /0 /-0
I'm currently trying to get MQTT working between reef-pi and my home assistant setup in which I'm new to both but have been using Smartthings for years.

How do you use MQTT Explorer to view the topics out of reef-pi? I assume the "host" is supposed to be the IP address of my reef-pi and the user/pass for reef-pi access.

Are those assumptions correct?
If I'm understanding correctly, you want the opposite. In the reef-pi config you want the mqtt host address and port. Then in the explorer you put in the host address also and listen for the reef-pi channels.
 

woejillis

Community Member
Review score
+0 /0 /-0
View Badges
Joined
Jun 4, 2014
Messages
65
Reaction score
29
Review score
+0 /0 /-0
Location
United States
If I'm understanding correctly, you want the opposite. In the reef-pi config you want the mqtt host address and port. Then in the explorer you put in the host address also and listen for the reef-pi channels.
That generated results but it seems I can only see details generated by the MQTT host server (the Mosquito Broker add-on in HA). I believe that my MQTT settings in Reef-Pi are not configured properly



In the MQTT broker log (running on my HA instance) I can see when I connect using the MQTT Explorer but I see no connection details from the Reef-Pi.

In reef-pi, my MQTT connection details look like this:
Server: tcp://[HA.ip.address]:[MQTT broker port]
Username: (HA username)
Client ID: reef
Password: (HA password for username)
QoS: 0
Retained: False


I'm getting no MQTT errors in the reef-pi log with this configuration. If I alter the configuration, I do get MQTT connection errors in RP.
 
OP
sfgabe

sfgabe

Active Member
Review score
+0 /0 /-0
View Badges
Joined
Sep 7, 2018
Messages
139
Reaction score
236
Review score
+0 /0 /-0
That generated results but it seems I can only see details generated by the MQTT host server (the Mosquito Broker add-on in HA). I believe that my MQTT settings in Reef-Pi are not configured properly



In the MQTT broker log (running on my HA instance) I can see when I connect using the MQTT Explorer but I see no connection details from the Reef-Pi.

In reef-pi, my MQTT connection details look like this:
Server: tcp://[HA.ip.address]:[MQTT broker port]
Username: (HA username)
Client ID: reef
Password: (HA password for username)
QoS: 0
Retained: False


I'm getting no MQTT errors in the reef-pi log with this configuration. If I alter the configuration, I do get MQTT connection errors in RP.
Username and password are unique to MQTT, they aren't the HA username and password. You may not have set an MQTT username and password, so maybe try leaving everything blank besides address and port.
 

woejillis

Community Member
Review score
+0 /0 /-0
View Badges
Joined
Jun 4, 2014
Messages
65
Reaction score
29
Review score
+0 /0 /-0
Location
United States
Username and password are unique to MQTT, they aren't the HA username and password. You may not have set an MQTT username and password, so maybe try leaving everything blank besides address and port.
I was finally able to get it to work, there seemed to be a bug preventing me from moving forward. I had to disable the SMTP telemetry which I have enabled and leverage.

Once I disabled SMTP, MQTT started working as expected. I could then reenable SMTP and everything seems to still be working correctly.

Thank you for your help!
 

RedViper

New Member
Review score
+0 /0 /-0
View Badges
Joined
May 25, 2021
Messages
7
Reaction score
4
Review score
+0 /0 /-0
Location
Finland
Hi @sfgabe,
You project has inspired me to start my aquarium automation (freshwater for the beginning) :)
I created a simple Home Assistant integration for Reef-PI: https://community.home-assistant.io/t/reef-pi-home-assistant-integration/312945.
What do you think?
I am going to add more features into it.
Currently it supports:
  • basic information (CPU temperature and attributes) sensor.reef-pi name,
  • temperature sensors (sensor.sensor name)
  • equipment switches (switch.switch name)
 
First Choice Sale
OP
sfgabe

sfgabe

Active Member
Review score
+0 /0 /-0
View Badges
Joined
Sep 7, 2018
Messages
139
Reaction score
236
Review score
+0 /0 /-0
Hi @sfgabe,
You project has inspired me to start my aquarium automation (freshwater for the beginning) :)
I created a simple Home Assistant integration for Reef-PI: https://community.home-assistant.io/t/reef-pi-home-assistant-integration/312945.
What do you think?
I am going to add more features into it.
Currently it supports:
  • basic information (CPU temperature and attributes) sensor.reef-pi name,
  • temperature sensors (sensor.sensor name)
  • equipment switches (switch.switch name)
This looks great! I'm going to be upgrading my freshwater tank in a few weeks, I'll give it a test run.
 

overmyhead

Community Member
Review score
+0 /0 /-0
View Badges
Joined
Sep 22, 2020
Messages
26
Reaction score
29
Review score
+0 /0 /-0
Location
GA
Hi @sfgabe,
You project has inspired me to start my aquarium automation (freshwater for the beginning) :)
I created a simple Home Assistant integration for Reef-PI: https://community.home-assistant.io/t/reef-pi-home-assistant-integration/312945.
What do you think?
I am going to add more features into it.
Currently it supports:
  • basic information (CPU temperature and attributes) sensor.reef-pi name,
  • temperature sensors (sensor.sensor name)
  • equipment switches (switch.switch name)
I just tried to install this and it is not showing up in my integrations. I did the manual install steps first and it appeared to save the files but it did not find the integration. I then checked the files and there was no reef-pi-hass-custom folder. So i manually created the folder and saved each document used file editor. All files are now in and I have restarted just in case and no integration is showing for reef-pi. Any suggestions?
 

RedViper

New Member
Review score
+0 /0 /-0
View Badges
Joined
May 25, 2021
Messages
7
Reaction score
4
Review score
+0 /0 /-0
Location
Finland
I just tried to install this and it is not showing up in my integrations. I did the manual install steps first and it appeared to save the files but it did not find the integration. I then checked the files and there was no reef-pi-hass-custom folder. So i manually created the folder and saved each document used file editor. All files are now in and I have restarted just in case and no integration is showing for reef-pi. Any suggestions?
What version of Home Assistant and on what planform are you running?

The file structure should be like this:
Code:
custom_components/
|-- reef-pi-hass-custom
|   |-- LICENSE
|   |-- README.md
|   |-- __init__.py
|   |-- api.py
|   |-- config_flow.py
|   |-- const.py
|   |-- manifest.json
|   |-- sensor.py
|   |-- strings.json
|   |-- switch.py
|   `-- translations
|       `-- en.json

The "custom_components" folder should be in the same directory where you have configuration.yaml

And yes, you have to restart Home Assistant after unpacking all files.

I also found a bug in manual steps: you don't need to create the "reef-pi-hass-custom" folder, it will be extracted from zip automatically. The README is updated.
 
Last edited:
AS

overmyhead

Community Member
Review score
+0 /0 /-0
View Badges
Joined
Sep 22, 2020
Messages
26
Reaction score
29
Review score
+0 /0 /-0
Location
GA
What version of Home Assistant and on what planform are you running?

The file structure should be like this:
Code:
custom_components/
|-- reef-pi-hass-custom
|   |-- LICENSE
|   |-- README.md
|   |-- __init__.py
|   |-- api.py
|   |-- config_flow.py
|   |-- const.py
|   |-- manifest.json
|   |-- sensor.py
|   |-- strings.json
|   |-- switch.py
|   `-- translations
|       `-- en.json

The "custom_components" folder should be in the same directory where you have configuration.yaml

And yes, you have to restart Home Assistant after unpacking all files.

I also found a bug in manual steps: you don't need to create the "reef-pi-hass-custom" folder, it will be extracted from zip automatically. The README is updated.
That is the file structure that I have. I already had a custom_components folder. I'm running OS 5.1 and core-2021.2.1.
 

overmyhead

Community Member
Review score
+0 /0 /-0
View Badges
Joined
Sep 22, 2020
Messages
26
Reaction score
29
Review score
+0 /0 /-0
Location
GA
What version of Home Assistant and on what planform are you running?

The file structure should be like this:
Code:
custom_components/
|-- reef-pi-hass-custom
|   |-- LICENSE
|   |-- README.md
|   |-- __init__.py
|   |-- api.py
|   |-- config_flow.py
|   |-- const.py
|   |-- manifest.json
|   |-- sensor.py
|   |-- strings.json
|   |-- switch.py
|   `-- translations
|       `-- en.json

The "custom_components" folder should be in the same directory where you have configuration.yaml

And yes, you have to restart Home Assistant after unpacking all files.

I also found a bug in manual steps: you don't need to create the "reef-pi-hass-custom" folder, it will be extracted from zip automatically. The README is updated.
I got it working. Failed to authenticate for one. Tried it for another reef-pi and it worked. Thanks.
 
Last edited:

How have you used eggcrate in or around your aquarium?

  • Aquarium lid

    Votes: 38 37.3%
  • Frag rack

    Votes: 55 53.9%
  • Skimmer stand

    Votes: 33 32.4%
  • Sump Divider

    Votes: 26 25.5%
  • Other (please describe in the discussion)

    Votes: 16 15.7%
  • I have not used eggcrate in or around my aquarium

    Votes: 22 21.6%
www.dinkinsaquaticgardens.com
Top