mikeybatoz
(Mikeybatoz)
January 22, 2023, 12:12pm
1
fired automatically a few times then i changed the value to 650 and now it doesn fire automatically…only when i press run… any suggestions?
alias: doser
description: ""
trigger:
- platform: numeric_state
entity_id: sensor.water_ppm
for:
hours: 0
minutes: 10
seconds: 0
below: 650
id: tds
condition: []
action:
- service: switch.turn_on
data: {}
target:
entity_id:
- switch.tasmota2
- switch.tasmota3
- delay:
hours: 0
minutes: 0
seconds: 8
milliseconds: 0
- service: switch.turn_off
data: {}
target:
entity_id:
- switch.tasmota2
- switch.tasmota3
- service: switch.turn_on
data: {}
target:
entity_id: switch.tasmota4
- delay:
hours: 0
minutes: 0
seconds: 24
milliseconds: 0
- service: switch.turn_off
data: {}
target:
entity_id: switch.tasmota4
- service: switch.turn_on
data: {}
target:
entity_id: switch.tasmota6
- delay:
hours: 0
minutes: 0
seconds: 16
milliseconds: 0
- service: switch.turn_off
data: {}
target:
entity_id: switch.tasmota6
- service: switch.turn_on
data: {}
target:
entity_id: switch.tasmota7
- delay:
hours: 0
minutes: 0
seconds: 8
milliseconds: 0
- service: switch.turn_off
data: {}
target:
entity_id: switch.tasmota7
- service: notify.mobile_app_iphone
data:
message: Doser has been activated!
mode: single
tom_l
January 22, 2023, 12:24pm
2
Does the water ppm sensor cross from above 650 to below 650?
That is the only time it will trigger. It won’t trigger if for example it changes from 600 to 610.
mikeybatoz
(Mikeybatoz)
January 22, 2023, 12:26pm
3
water ppm is 620 currently
it should dose since its state has been below the expected number of 650 for more than 10 minutes correct? @tom_l
tom_l
January 22, 2023, 12:28pm
4
That did not answer my question.
mikeybatoz
(Mikeybatoz)
January 22, 2023, 12:30pm
5
sorry to answer your question …yes
technically what your saying is i shouldnt be concered since it does work as intended. its just not going to function unless the dilution ratio matches the ppm sensor for the program to trigger properly
mikeybatoz
(Mikeybatoz)
January 22, 2023, 12:35pm
6
ill run it manually above the setting and wait patiently. thank you for your time in this matter @tom_l
tom_l
January 22, 2023, 12:42pm
7
So it is crossing from above 650 to below 650 but not triggering?
That’s not normal.
mikeybatoz
(Mikeybatoz)
January 22, 2023, 12:49pm
8
no not yet, its below it currently and im slowly raising it up to that state.
the ph dosers are doing that abnormal thing allowing it to cross out of state and not trigger
alias: ph doser down
description: ph high to dose
trigger:
- platform: numeric_state
entity_id: sensor.water_ph
for:
hours: 0
minutes: 10
seconds: 0
above: 5.9
condition: []
action:
- service: switch.turn_on
data: {}
target:
entity_id: switch.tasmota5
- delay:
hours: 0
minutes: 0
seconds: 10
milliseconds: 0
- service: switch.turn_off
data: {}
target:
entity_id: switch.tasmota5
- service: notify.mobile_app_iphone
data:
message: Doser added pH down
mode: single
woke up to 6.5 instead of below 5.9 and it was 5.7-5.8 last time i checked it
tom_l
January 22, 2023, 1:02pm
9
That’s a different automation.
I have no idea what you are on about now.
mikeybatoz
(Mikeybatoz)
January 22, 2023, 1:08pm
10
same trigger and setup just different input
as you stated above if an automation crosses a trigger state it should be triggered
state was 5.8 it crossed up to 6.5 and never got triggered by automation
Edwin_D
(Edwin D.)
January 22, 2023, 1:43pm
11
It needs to cross from 5.9 or below to above 5.9 and hold above 5.9 for 10 minutes and then it will trigger. If at any point within the 10 mins it drops to 5.9 or below it will not.
If that is not what you like, I suggest you take a look at a threshold sensor. It has a hysteresis to prevent situations like I described.
1 Like
mikeybatoz
(Mikeybatoz)
January 22, 2023, 1:54pm
12
Exactly what I want it to do. It just sometimes decides it’s not going to do it @Edwin_D
Then as I say something it just went off and worked.
Last night it allowed it to cross and stay out of range . I woke up and manually ran the program back into range.
Need it to be consistent
tom_l
January 22, 2023, 2:14pm
13
Can you post the history graph of sensor.water_ph for last night?
tom_l
January 22, 2023, 3:36pm
15
Does the automation trace show it being triggered between 6 and 8 pm?
mikeybatoz
(Mikeybatoz)
January 22, 2023, 3:55pm
16
I does show it triggered , I’ll look into it , but seems it hung up somehow and never allowed it to run properly
So then it was in a state that didn’t allow it to meet trigger
tom_l
January 22, 2023, 4:47pm
17
Check the state history of switch.tasmota5, was it unavailable at all around that time?
1 Like
mikeybatoz
(Mikeybatoz)
January 22, 2023, 5:40pm
18
Exactly right! Now to find a work around if it becomes unavailable to trigger it when it does if the state is still above the trigger
mikeybatoz
(Mikeybatoz)
January 22, 2023, 7:19pm
19
alias: ph doser down
description: ph high to dose
trigger:
- platform: numeric_state
entity_id: sensor.water_ph
for:
hours: 0
minutes: 10
seconds: 0
above: 5.9
condition: []
action:
- if:
- condition: state
entity_id: switch.tasmota5
state: unavailable
then:
- wait_for_trigger:
- platform: state
entity_id:
- switch.tasmota5
from: unavailable
to: "off"
- service: switch.turn_on
data: {}
target:
entity_id: switch.tasmota5
- delay:
hours: 0
minutes: 0
seconds: 10
milliseconds: 0
- service: switch.turn_off
data: {}
target:
entity_id: switch.tasmota5
- service: notify.mobile_app_iphone
data:
message: Doser was unavailable at time of trigger, finally able to recover
else:
- service: switch.turn_on
data: {}
target:
entity_id: switch.tasmota5
- delay:
hours: 0
minutes: 0
seconds: 10
milliseconds: 0
- service: switch.turn_off
data: {}
target:
entity_id: switch.tasmota5
- service: notify.mobile_app_iphone
data:
message: Doser added pH down
mode: single
this should be able to wait for state if switch is unavailable , then notify me that an issue had occured
i dont know how to make it also check for it being above 5.9 as well , without it actually being below 5.9