-
Notifications
You must be signed in to change notification settings - Fork 10
Additional Information, Sensors & Commands and Add‐ons
Method 1 - Use XX_change_address
action.
Method 2 - Use XX_custom_command
action and command I2C, XXX
Next, tell the microcontroller to listen to new address. Change the repsective EZO sensor adrreess (ie. addPH: "99"
) substituion in ESPHome Builder to the new address, or create a whole new sensor like if adding another pH sensor.
The temperature probes are dallas one-wire probes, meaning they are little special. They each are assigned an address that you can only get by reading the device's logs once plugged in. Natively, the software only allows for 1 temperature probe so we don't need to get the specific address of a probe hen we only have 1 attached, but in some cases, we want more than one.
substitutions:
dallasPin: "16"
update_temp: "60s"
# Calibration variables
# 0C using Ice Water; 100C using Boiling Water
# Calibration Temp. 1
cal_0: "0.0"
cal_100: "100.0"
range_cool: "74"
range_warm: "82"
You will need to go into AquaPi's logs when it starts up to get the address of the probes, it'll show the address in the boot part of the logs. Once obtained, we can edit the .yaml via ESPHome.
YAML Config (Click to Expand)
Replace <DALLAS_ADDRESS_1> and <DALLAS_ADDRESS_2> with the addresses of your sensors, ie. 0x8201204769dfbc28
and another for the 2nd one. You can add more by using unique names and IDs.
substitutions:
cal_0_2: "0.0"
cal_100_2: "100.0"
sensor:
- id: !extend temp_1
address: <DALLAS_ADDRESS_1>
# Temperature Probe 2
- platform: dallas_temp
id: temp_2
icon: mdi:thermometer-lines
address: <DALLAS_ADDRESS_2>
name: "Temperature 2"
state_class: "measurement"
device_class: "temperature"
filters:
- calibrate_linear:
method: least_squares
datapoints:
- 0.0 -> ${cal_0_2}
- 100.0 -> ${cal_100_2}
on_value:
then:
- component.update: temp_range_2
# The Following is Optional
# Convert to Fahrenheit - Temp. 2
- platform: template
state_class: "measurement"
device_class: "temperature"
id: temp_f_2
lambda: |-
return id(temp_2).state * 9 / 5 + 32;
# Calibration Temp. 2 at 0C
- platform: template
name: Calibration at 0°C - Temp. 2
id: cal_0_2_sen
icon: mdi:snowflake-alert
unit_of_measurement: "°C"
state_class: "measurement"
device_class: "temperature"
entity_category: "diagnostic"
lambda: |-
return {${cal_0_2}};
# Calibration Temp. 2 at 100C
- platform: template
name: Calibration at 100°C - Temp. 2
id: cal_100_2_sen
icon: mdi:water-thermometer
unit_of_measurement: "°C"
state_class: "measurement"
device_class: "temperature"
entity_category: "diagnostic"
lambda: |-
return {${cal_100_2}};
binary_sensor:
- platform: template
name: Ideal Temperature 2
id: ideal_temp_2
icon: mdi:thermometer-check
lambda: |-
if (id(temp_range_2).state == "OK") {
return true;
} else {
return false;
}
text_sensor:
# Temperature Range 2
- platform: template
name: Temperature 2 Range
id: temp_range_2
icon: mdi:thermometer-water
update_interval: "${update_temp}"
lambda: |-
if(id(temp_f_2).state <= id(range_cool_2).state) {
return {"Cool"};
}
if(id(temp_f_2).state < id(range_warm_2).state && id(temp_f_2).state > id(range_cool_2).state) {
return {"OK"};
}
if(id(temp_f_2).state >= id(range_warm_2).state) {
return {"Warm"};
}
else {
return {"Unknown"};
}
number:
# Temperature 2 when Cool
- platform: template
name: "Temp. 2 Cool"
id: range_cool_2
icon: mdi:snowflake-thermometer
optimistic: true
mode: box
min_value: 0.0
max_value: 100.0
step: 0.5
restore_value: True
initial_value: ${range_cool}
entity_category: "Config"
device_class: "temperature"
on_value:
then:
- component.update: temp_range_2
# Temperature 2 when Warm
- platform: template
name: "Temp. 2 Warm"
icon: mdi:sun-thermometer
id: range_warm_2
optimistic: true
mode: box
min_value: 0.0
max_value: 100.0
step: 0.5
restore_value: True
initial_value: ${range_warm}
entity_category: "Config"
device_class: "temperature"
on_value:
then:
- component.update: temp_range_2
substitutions:
# EC circuit, who's address is 100
addEC: "100"
update_ec: "60s"
update_button_ec: "60s"
ec_custom_command
- Sends custom command, see documentaion. Result will be shown in repsective Command Result
entity.
ec_change_address
- Changes I2C Address
ec_read_continous
- Reads the probe for about 60s
ec_calibrate_dry
- Calibrates a dry probe
ec_calibrate_high_80000
- Calibrates at 80,000 µS/m
ec_calibrate_low_12880
- Calibrates at 12,880 µS/m
ec_output_all_parameters
- Outputs all parameters to enable all sensor units
substitutions:
# PH circuit, who's address is 99
addPH: "99"
update_ph: "60s"
ph_custom_command
- Sends custom command, see documentaion. Result will be shown in repsective Command Result
entity.
ph_change_address
- Changes I2C Address
ph_read_continous
- Reads the probe for about 60s
ph_calibrate_mid_7
- Calibrates at pH 7
ph_calibrate_high_10
- Calibrates at pH 10
ph_calibrate_high_1001
- Calibrates at pH 10.01
ph_calibrate_low_4
- Calibrates at pH 4
substitutions:
# DO circuit, who's address is 97
addDO: "97"
update_do: "60s"
update_button_do: "60s"
do_custom_command
- Sends custom command, see documentaion. Result will be shown in repsective Command Result
entity.
do_change_address
- Changes I2C Address
do_read_continous
- Reads the probe for about 60s
do_calibrate_dry
- Calibrates in air
do_calibrate_0
- Calibrates at 0%
do_salinity_compensation_35ppt
- Compensates for saltwater at 35ppt
do_output_all_parameters
- Outputs all parameters to enable all sensor units
substitutions:
# ORP circuit, who's address is 98
addORP: "98"
update_orp: "60s"
orp_custom_command
- Sends custom command, see documentaion. Result will be shown in repsective Command Result
entity.
orp_change_address
- Changes I2C Address
orp_read_continous
- Reads the probe for about 60s
orp_calibrate_225
- Calibrates at 225mV
NOTE: Using Dose Volume for Time
can fail sometimes. In using the pump to dose 5 gallons over 8 hours, sometimes the pump would stop working and it would needed to be tapped or jostled to get it started again.
Try only using the Dose Volume
methods or Quick Water Change blueprints.
Replace the color in the following commands and substitutions with the respective pump color you want to configure.
substitutions:
# PMP circuit
addPMP_white: "103" # White
update_pmp_white: "60s"
pump_white_change_address
- Changes I2C Address
pump_white_dose_volume
- Dose a specific volume in mL at full flow rate
pump_white_dose_volume_time
- Dose a specific volume in mL for a specific time in seconds
pump_white_dose_flow_rate_time
- Dose a specific flow rate in mL/s for specific time in seconds
pump_white_dose_set_calibration
- Sets calibrated volume
The Pump cases are designed to attach directly onto the AquaPi base product. There are up to 8 removable plugs on the AquaPi, you can remove 2 adjacent ones and insert the pump case into the empty plug holes.
Plug into Red label cable of the AquaPi, this is the I2C connection for various EZO circuits. Test that the pump is connected by using the corresponding Dose Continuously
button, then use the Stop Dosing
button to stop it.
The default address for the EZO-Pump is 103
but I wanted to support all 6 colors Atlas Scientific supplies so I changed the address based on specific colors.
White - 103
Red - 108
Green - 109
Orange - 110
Yellow - 104
Blue - 106
White - Pump White
Red - Pump Waste
Green - Pump Clean
Orange - Pump Orange
Yellow - Pump Yellow
Blue - Pump Blue
Store Link
ESPHome Documentation
By default, the camera is in low resolution (640x480) which allows for a higher framerate, but you can raise the resolution at the cost of frames, essentially a snapshot camera.
Using the ESPHome add-on, try this configuration:
esp32_camera:
jpeg_quality: 10
# vertical_flip: false
# horizontal_mirror: false
# resolution: 720x1280 # NOT RECOMMENDED
If you want to stream it to an NVR like MotionEye or Frigate:
esp32_camera_web_server:
- port: 8080
mode: stream
- port: 8081
mode: snapshot
AquaPi for ESPHome
The Aquarium meets the Smart Home!