Any way to consolidate six smoker automations into fewer ones?

Hello!
I recently put together a thermometer that i use for when i smoke meat and fish in my electric smoker. It is a two NodeMCUs with esphome soldered to a prototype board, with each one measuring the temperature of an NTC thermistor meat probe. I recently created two automations (or six really) to send me notifications when the desired internal temperature of whatever i am smoking has been reached, but the number of automations became a bit bloated. There are three people using the smoker from time to time and two probes, so i have six automations set up for the notifications (one per person per probe), but id like to reduce this number if possible.


This is how it looks right now. I changed the labels in paint since they are originally in swedish (okänd just means unknown which shows when the probe is disconnected while power is on) to make it easier to follow. When you enable one of the users and one of the thermometers reaches the set temperature, a notification is sent via one of three notify services. Pushbullet is used for two on android, and the iPhone app for one. The notification looks like this:
Untitled
It basically reports the contents and the current internal temperature.

These are my automations:
Capture6

This is what my template for the automation looks like for the above notification:

{{states('sensor.ntc_temperature_2')|float >= states('input_number.rok_temp_hoger')|float and is_state('input_boolean.stefan_rok', 'on') and states('sensor.ntc_temperature_2') !='unavailable'}}

It triggers notify.stefan and sends this message:

{
  "message": "Rökning av {{ states('input_text.rok_memo2') }} klar! Innertempen är {{ states('sensor.ntc_temperature_2') }}°C."
}

My question with this post is, is there any way i can reduce the number of automations? Currently if i change the wording or function of one automation i have to remember to change five more to keep them all consistent. Ideally id like to reduce the number of automations needed for this to three or less, even one if it is possible. How do i do this? I have three separate notify integrations (notify.per , notify.julia , notify.stefan). And help with this is greatly appreciated, or if there is a different way to solve it that ok too.

1 Like

Post the automations.

- id: '1569377351169'
  alias: Röksignal stefan vänster
  trigger:
  - platform: template
    value_template: '{{states(''sensor.ntc_temperature'')|float >= states(''input_number.rok_temp_vanster'')|float
      and is_state(''input_boolean.stefan_rok'', ''on'') and states(''sensor.ntc_temperature'')
      !=''unavailable''}}'
  action:
  - data:
      message: Rökning av {{ states('input_text.rok_memo1') }} klar! Innertempen är
        {{ states('sensor.ntc_temperature') }}°C.
    service: notify.stefan
- id: '1569678098340'
  alias: Röksignal stefan höger
  trigger:
  - platform: template
    value_template: '{{states(''sensor.ntc_temperature_2'')|float >= states(''input_number.rok_temp_hoger'')|float
      and is_state(''input_boolean.stefan_rok'', ''on'') and states(''sensor.ntc_temperature_2'')
      !=''unavailable''}}'
  condition: []
  action:
  - data:
      message: Rökning av {{ states('input_text.rok_memo2') }} klar! Innertempen är
        {{ states('sensor.ntc_temperature_2') }}°C.
    service: notify.stefan
- id: '1569693332132'
  alias: Röksignal julia höger
  trigger:
  - platform: template
    value_template: '{{states(''sensor.ntc_temperature_2'')|float >= states(''input_number.rok_temp_hoger'')|float
      and is_state(''input_boolean.julia_rok'', ''on'') and states(''sensor.ntc_temperature_2'')
      !=''unavailable''}}'
  condition: []
  action:
  - data:
      message: Rökning av {{ states('input_text.rok_memo2') }} klar! Innertempen är
        {{ states('sensor.ntc_temperature_2') }}°C.
    service: notify.julia
- id: '1569693400046'
  alias: Röksignal julia vänster
  trigger:
  - platform: template
    value_template: '{{states(''sensor.ntc_temperature'')|float >= states(''input_number.rok_temp_vanster'')|float
      and is_state(''input_boolean.stefan_rok'', ''on'') and states(''sensor.ntc_temperature'')
      !=''unavailable''}}'
  condition: []
  action:
  - data:
      message: Rökning av {{ states('input_text.rok_memo1') }} klar! Innertempen är
        {{ states('sensor.ntc_temperature') }}°C.
    service: notify.julia
- id: '1569700267575'
  alias: Röksignal per höger
  trigger:
  - platform: template
    value_template: '{{states(''sensor.ntc_temperature_2'')|float >= states(''input_number.rok_temp_hoger'')|float
      and is_state(''input_boolean.per_rok'', ''on'') and states(''sensor.ntc_temperature_2'')
      !=''unavailable''}}'
  condition: []
  action:
  - data:
      message: Rökning av {{ states('input_text.rok_memo2') }} klar! Innertempen är
        {{ states('sensor.ntc_temperature_2') }}°C.
    service: notify.ios_iphone
- id: '1569701324188'
  alias: Röksignal per vänster
  trigger:
  - platform: template
    value_template: '{{states(''sensor.ntc_temperature'')|float >= states(''input_number.rok_temp_vanster'')|float
      and is_state(''input_boolean.per_rok'', ''on'') and states(''sensor.ntc_temperature'')
      !=''unavailable''}}'
  condition: []
  action:
  - data:
      message: Rökning av {{ states('input_text.rok_memo1') }} klar! Innertempen är
        {{ states('sensor.ntc_temperature') }}°C.
    service: notify.ios_iphone
- id: 'mf_social fixed me'
  alias: Smoker notifications
  trigger:
    platform: template
    value_template: >
      {{ ( states('sensor.ntc_temperature')|float >= states('input_number.rok_temp_vanster')|float and
          not is_state('sensor.ntc_temperature' , 'unavailable') ) or ( states('sensor.ntc_temperature_2')|float
          >= states('input_number.rok_temp_hoger')|float and not is_state('sensor.ntc_temperature_2' , 'unavailable') ) }}
  action:
    service_template: >
      {% if is_state('input_boolean.stefan_rok' , 'on') %} notify.stefan
      {% elif is_state('input_boolean.julia_rok' , 'on') %} notify.julia
      {% else %} notify.ios_phone {% endif %}
    data_template:
      message: >
       {% if states('sensor.ntc_temperature')|float >= states('input_number.rok_temp_vanster')|float %}
         Rökning av {{ states('input_text.rok_memo1') }} klar! Innertempen är {{ states('sensor.ntc_temperature') }}°C
       {% else %}
         Rökning av {{ states('input_text.rok_memo2') }} klar! Innertempen är {{ states('sensor.ntc_temperature_2') }}°C
       {% endif %}

You’ll have to double check the iterations but I think that’s all right.

1 Like

Id also be very interested in your nodemcu esphome configuration if you wouldnt mind posting it too.

Of course, here it is. I soldered the wires wrong the first time and got no readings at all so i had to redo it, but now it works really well.

esphome:
  name: thermo1
  platform: ESP8266
  board: nodemcuv2

wifi:
  networks:
  - ssid: !secret wifi1
    password: !secret wifipass1
  - ssid: !secret wifi2
    password: !secret wifipass2

# Enable logging
logger:

# Enable Home Assistant API
api:

ota:

sensor:
  - platform: ntc
    sensor: resistance_sensor
    calibration:
      b_constant: 3950
      reference_temperature: 25°C
      reference_resistance: 10kOhm
    name: NTC Temperature
  - platform: resistance
    id: resistance_sensor
    sensor: source_sensor
    configuration: DOWNSTREAM
    resistor: 4.7kOhm
    name: Resistance Sensor
  - platform: adc
    id: source_sensor
    pin: A0
    filters:
    - multiply: 3.3

Its hard to find NTC meat probes though, but after searching a while a found one that i was certain would work on aliexpress.

1 Like

Thanks a lot! I kind of see how it works, and it is a huge improvement to have one automation instead of six! I really appreciate you taking time to help me, and i of course kept the ‘mf_social fixed me’ as it is. I will test it out the next time i use my smoker, or ill just try it out with some hot water to see if it works but i am sure it will.

1 Like

Do you have a link to that probe you’re using?

Of course! I searched around for a week for something that i was sure was an NTC probe that didnt require me to buy over a 100 units. Here is the probe i am using:

https://www.aliexpress.com/item/32982284722.html

The beta value isnt listed in the ad and the customer service person wasn’t very good at english, but i measured it with a probe i knew the beta value on and it produced almost exactly the same resistance values, and i tested it in boiling water which showed up as exactly 100°C. Should be 3950 as listed in the esphome config.

EDIT: The connector for the probe is a 2,5mm audio plug, it should be easy enough to find and solder together with a NodeMCU.

Here’s two images of the build:


1 Like

that looks cool!

I’ve been looking around for a DIY solution for temp control/feedback for my smoker and this looks like something I’ll definitely have to try out.

Thanks!

Do try it out, i am very satisfied. I wanted it to be simple enough to use so my mother and her husband could use it without ant interaction from me, and it really is. Pushbullet was the only system for notifications to the android phones that woke the phones up from doze if you also want it to do that, but it might be different with other brands than Samsung.

Here is how you connect the minimal wiring:

If you try it but can’t get it to work, hit me up and ill try to help out.

1 Like