Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
GrowSmart - ESPHome
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jan Grewe
GrowSmart - ESPHome
Commits
e07f2cea
Commit
e07f2cea
authored
2 years ago
by
Jan Grewe
Browse files
Options
Downloads
Patches
Plain Diff
add STS35
parent
fbc152d9
No related branches found
No related tags found
No related merge requests found
Pipeline
#884
passed
2 years ago
Stage: validate
Stage: deploy
Changes
4
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
growbox.yaml
+4
-1
4 additions, 1 deletion
growbox.yaml
packages/ec.yaml
+5
-7
5 additions, 7 deletions
packages/ec.yaml
packages/ph.yaml
+5
-5
5 additions, 5 deletions
packages/ph.yaml
packages/sts35.yaml
+14
-0
14 additions, 0 deletions
packages/sts35.yaml
with
28 additions
and
13 deletions
growbox.yaml
+
4
−
1
View file @
e07f2cea
...
...
@@ -14,7 +14,6 @@ packages:
esp32
:
!include
packages/esp32.yaml
time
:
!include
packages/time_schedule.yaml
bme280
:
!include
packages/bme280.yaml
yieryi2178
:
!include
packages/yieryi3178.yaml
scd40
:
!include
packages/scd40.yaml
mlx90614
:
!include
packages/mlx90614.yaml
gp8403
:
!include
packages/gp8403.yaml
...
...
@@ -24,3 +23,7 @@ packages:
fan_scripts
:
!include
packages/fan_scripts.yaml
light_power
:
!include
packages/light_power.yaml
light_settings
:
!include
packages/light_settings.yaml
ads1115
:
!include
packages/ads1115.yaml
ec
:
!include
packages/ec.yaml
ph
:
!include
packages/ph.yaml
sts35
:
!include
packages/sts35.yaml
This diff is collapsed.
Click to expand it.
packages/ec.yaml
+
5
−
7
View file @
e07f2cea
substitutions
:
ec_k
:
'
0.9
92
'
ec_k
:
'
0.9
7090
'
# ec_ref & ec_res2: https://github.com/DFRobot/DFRobot_EC/blob/master/DFRobot_EC.cpp#L28 // https://www.dfrobot.com/forum/topic/28708
ec_ref
:
'
200.0'
ec_res2
:
'
820.0'
...
...
@@ -18,7 +18,7 @@ sensor:
gain
:
4.096
# max: 3.4V
update_interval
:
5s
accuracy_decimals
:
5
<<
:
!include
filter.yaml
#
<<: !include filter.yaml
-
platform
:
template
name
:
"
EC:
K
Value"
unit_of_measurement
:
"
K"
...
...
@@ -32,10 +32,9 @@ sensor:
accuracy_decimals
:
3
update_interval
:
5s
lambda
:
|-
float water_temperature = 20.0;
float ec_raw = id(analog_ec).state / ${ec_res2} / ${ec_ref} * 1000.0 * 1000.0;
float ec = ec_raw * id(ec_k);
return ec / (1 + (0.0185 * (water_temperature - 25))); // return with temperature correction
return ec / (1 + (0.0185 *
(id
(water_temperature
).state
- 25))); // return with temperature correction
button
:
-
platform
:
template
...
...
@@ -43,13 +42,12 @@ button:
on_press
:
-
then
:
-
lambda
:
|-
float water_temperature = 20.0;
float buffer_solution = -1;
if (id(ec).state > 0.9 && id(ec).state < 1.9) { // recognize 1.413us/cm buffer solution
ESP_LOGI("ec", "Calibrating EC with 1.413 mS/cm solution");
buffer_solution = 1.413 * (1.0 + 0.0185 * (water_temperature - 25.0));
buffer_solution = 1.413 * (1.0 + 0.0185 *
(id
(water_temperature
).state
- 25.0));
} else if (id(ec).state > 9 && id(ec).state < 16.8) { // recognize 12.88ms/cm buffer solution
buffer_solution = 12.88 * (1.0 + 0.0185 * (water_temperature - 25.0));
buffer_solution = 12.88 * (1.0 + 0.0185 *
(id
(water_temperature
).state
- 25.0));
ESP_LOGI("ec", "Calibrating EC with 12.88 mS/cm solution");
} else {
ESP_LOGI("ec", "Not calibrating EC, probe not in 1.413 or 12.88 mS/cm solution");
...
...
This diff is collapsed.
Click to expand it.
packages/ph.yaml
+
5
−
5
View file @
e07f2cea
substitutions
:
ph400_raw
:
'
2.06
8
'
ph686_raw
:
'
1.57
4
'
ph700_raw
:
'
1.5
55
'
ph918_raw
:
'
1.21
5
'
ph400_raw
:
'
2.06
785
'
ph686_raw
:
'
1.57
897
'
ph700_raw
:
'
1.5
4883
'
ph918_raw
:
'
1.21
447
'
globals
:
-
id
:
ph400_raw
# raw V value from probe using pH 4.0 calibration solution.
...
...
@@ -30,7 +30,7 @@ sensor:
gain
:
4.096
# max: 3.0V
update_interval
:
5s
accuracy_decimals
:
5
<<
:
!include
filter.yaml
#
<<: !include filter.yaml
-
platform
:
template
name
:
"
pH:
4.00
Calibration
Value"
unit_of_measurement
:
"
V"
...
...
This diff is collapsed.
Click to expand it.
packages/sts35.yaml
0 → 100644
+
14
−
0
View file @
e07f2cea
sensor
:
-
platform
:
sts3x
id
:
water_temperature
name
:
"
Water:
Temperature"
address
:
0x4a
update_interval
:
5s
accuracy_decimals
:
2
<<
:
!include
filter.yaml
prometheus
:
relabel
:
water_temperature
:
id
:
temperature_water
name
:
"
Water:
Temperature"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment