I forked your fork.
I added the Alarm code, and made a few other adjustments. Unfortunately I didnāt have time to fix the Temperature C/F and reverted it back F for my purposes.
I forked your fork.
I added the Alarm code, and made a few other adjustments. Unfortunately I didnāt have time to fix the Temperature C/F and reverted it back F for my purposes.
Great job!
my HeaterMeter was broken. just got it fixed a couple of weeks ago. so zero progress from my side.
The change from āCā to āFā is mostly cosmetic, as the API use the absolute numbers.
removing the user/password break the support for older (or not up-to-date) HeatMeters. as it doesnāt harm anything, I think its good practice to support backwards if possible.
I hope that I can get back to adding the missing features soon - Iāll merge what i can from your branch when i do.
Just wanted to say thank you!! Works great!! I love the heatermeter.
I implemented automatic temperature unit selection based on āUnit Systemā setting in Configuration\General. Its a bit ugly (most of my code is) but it works.
New features added:
Thereās MQTT support (readonly).
Setting stuff still neds the API.
But we do not need to poll the API when using MQTT
in configuration.yaml I have this example that works.
sensor:
- platform: mqtt
name: Heatermeter pit fan (current)
state_topic: "heatermeter/hmstatus"
icon: mdi:fan
unit_of_measurement: "%"
device_class: power_factor
value_template: '{{ value_json.fan.c }}'
- platform: mqtt
name: Heatermeter pit temperatur (set)
state_topic: "heatermeter/hmstatus"
icon: mdi:fire
unit_of_measurement: "Celsius"
device_class: temperature
value_template: '{{ value_json.set }}'
- platform: mqtt
name: Heatermeter pit temperatur (min)
state_topic: "heatermeter/hmstatus"
icon: mdi:fire
unit_of_measurement: "Celsius"
device_class: temperature
value_template: '{% for x in value_json.temps %}{% if x["n"] == "Pit" %}{{x["a"]["l"] }}{{ break }}{% endif %}{% endfor %}'
- platform: mqtt
name: Heatermeter pit temperatur (max)
state_topic: "heatermeter/hmstatus"
icon: mdi:fire
unit_of_measurement: "Celsius"
device_class: temperature
value_template: '{% for x in value_json.temps %}{% if x["n"] == "Pit" %}{{x["a"]["h"] }}{{ break }}{% endif %}{% endfor %}'
- platform: mqtt
name: Heatermeter pit temperatur (current)
state_topic: "heatermeter/hmstatus"
icon: mdi:fire
unit_of_measurement: "Celsius"
device_class: temperature
value_template: '{% for x in value_json.temps %}{% if x["n"] == "Pit" %}{{x["c"] }}{{ break }}{% endif %}{% endfor %}'
#json_attributes:
#- temps
#expire_after: 60
- platform: mqtt
name: Heatermeter meat1 temperatur
state_topic: "heatermeter/hmstatus"
icon: mdi:pig
unit_of_measurement: "Celsius"
device_class: temperature
value_template: '{% for x in value_json.temps %}{% if x["n"] == "Meat1" %}{{x["c"] }}{{ break }}{% endif %}{% endfor %}'
- platform: mqtt
name: Heatermeter meat1 temperatur (min)
state_topic: "heatermeter/hmstatus"
icon: mdi:fire
unit_of_measurement: "Celsius"
device_class: temperature
value_template: '{% for x in value_json.temps %}{% if x["n"] == "Meat1" %}{{x["a"]["l"] }}{{ break }}{% endif %}{% endfor %}'
- platform: mqtt
name: Heatermeter meat1 temperatur (max)
state_topic: "heatermeter/hmstatus"
icon: mdi:fire
unit_of_measurement: "Celsius"
device_class: temperature
value_template: '{% for x in value_json.temps %}{% if x["n"] == "Meat1" %}{{x["a"]["h"] }}{{ break }}{% endif %}{% endfor %}'
- platform: mqtt
name: Heatermeter meat2 temperatur
state_topic: "heatermeter/hmstatus"
icon: mdi:pig
unit_of_measurement: "Celsius"
device_class: temperature
value_template: '{% for x in value_json.temps %}{% if x["n"] == "Meat2" %}{{x["c"] }}{{ break }}{% endif %}{% endfor %}'
- platform: mqtt
name: Heatermeter meat2 temperatur (min)
state_topic: "heatermeter/hmstatus"
icon: mdi:fire
unit_of_measurement: "Celsius"
device_class: temperature
value_template: '{% for x in value_json.temps %}{% if x["n"] == "Meat2" %}{{x["a"]["l"] }}{{ break }}{% endif %}{% endfor %}'
- platform: mqtt
name: Heatermeter meat2 temperatur (max)
state_topic: "heatermeter/hmstatus"
icon: mdi:fire
unit_of_measurement: "Celsius"
device_class: temperature
value_template: '{% for x in value_json.temps %}{% if x["n"] == "Meat2" %}{{x["a"]["h"] }}{{ break }}{% endif %}{% endfor %}'
- platform: mqtt
name: Heatermeter meat3 temperatur (min)
state_topic: "heatermeter/hmstatus"
icon: mdi:fire
unit_of_measurement: "Celsius"
device_class: temperature
value_template: '{% for x in value_json.temps %}{% if x["n"] == "Meat3" %}{{x["a"]["l"] }}{{ break }}{% endif %}{% endfor %}'
- platform: mqtt
name: Heatermeter meat3 temperatur (max)
state_topic: "heatermeter/hmstatus"
icon: mdi:fire
unit_of_measurement: "Celsius"
device_class: temperature
value_template: '{% for x in value_json.temps %}{% if x["n"] == "Meat3" %}{{x["a"]["h"] }}{{ break }}{% endif %}{% endfor %}'
- platform: mqtt
name: Heatermeter meat3 temperatur
state_topic: "heatermeter/hmstatus"
icon: mdi:pig
unit_of_measurement: "Celsius"
device_class: temperature
value_template: '{% for x in value_json.temps %}{% if x["n"] == "Meat3" %}{{x["c"] }}{{ break }}{% endif %}{% endfor %}'
binary_sensor:
- platform: mqtt
name: "Heatermeter lid (open)"
state_topic: "heatermeter/hmstatus"
value_template: '{{ value_json.lid }}'
- platform: mqtt
name: Heatermeter Pit alarm (min)
state_topic: "heatermeter/hmstatus"
value_template: '{% for x in value_json.temps %}{% if x["n"] == "Pit" %}{{x["a"]["r"] == "L" }}{{ break }}{% endif %}{% endfor %}'
- platform: mqtt
name: Heatermeter Pit alarm (max)
state_topic: "heatermeter/hmstatus"
value_template: '{% for x in value_json.temps %}{% if x["n"] == "Pit" %}{{x["a"]["r"] == "H" }}{{ break }}{% endif %}{% endfor %}'
- platform: mqtt
name: Heatermeter meat1 alarm (min)
state_topic: "heatermeter/hmstatus"
value_template: '{% for x in value_json.temps %}{% if x["n"] == "Meat1" %}{{x["a"]["r"] == "L" }}{{ break }}{% endif %}{% endfor %}'
- platform: mqtt
name: Heatermeter meat1 alarm (max)
state_topic: "heatermeter/hmstatus"
value_template: '{% for x in value_json.temps %}{% if x["n"] == "Meat1" %}{{x["a"]["r"] == "H" }}{{ break }}{% endif %}{% endfor %}'
- platform: mqtt
name: Heatermeter meat2 alarm (min)
state_topic: "heatermeter/hmstatus"
value_template: '{% for x in value_json.temps %}{% if x["n"] == "Meat2" %}{{x["a"]["r"] == "L" }}{{ break }}{% endif %}{% endfor %}'
- platform: mqtt
name: Heatermeter meat2 alarm (max)
state_topic: "heatermeter/hmstatus"
value_template: '{% for x in value_json.temps %}{% if x["n"] == "Meat2" %}{{x["a"]["r"] == "H" }}{{ break }}{% endif %}{% endfor %}'
- platform: mqtt
name: Heatermeter meat3 alarm (min)
state_topic: "heatermeter/hmstatus"
value_template: '{% for x in value_json.temps %}{% if x["n"] == "Meat3" %}{{x["a"]["r"] == "L" }}{{ break }}{% endif %}{% endfor %}'
- platform: mqtt
name: Heatermeter meat3 alarm (max)
state_topic: "heatermeter/hmstatus"
value_template: '{% for x in value_json.temps %}{% if x["n"] == "Meat3" %}{{x["a"]["r"] == "H" }}{{ break }}{% endif %}{% endfor %}'
lmclient @lmss,1 | mosquitto_pub -h 192.168.1.174 -p 1883 -u āsomeuserā -P āsomepassā -i āheatermeterā -t āheatermeter/hmstatusā -l
Do I need to put this under the startup tab in home assistant? But change the address to my mqtt address and the user/pass to the mqtt user/pass?
This is exciting. Iām trying to add to my HA and when clicking āCheck Configurationā, I get the following, āComponent error: heatermeter - Integration āheatermeterā not found.ā
Iām using this one and it works for me, but I have 2 and wondering how to get 2 enabled into Home assistant.
You guys have any idea on how to integrate 2 into Home Assistant?
Figured out how to have 2 in there. Just changed the names to heatermeter2ā¦ LOLā¦ Now Iām trying to get the alarms to have a set feature like the Setpoint. i see that i can call the service and change the individual alarmsā¦ alarms: ā-190,-250,-100,-205,-100,-100,-100,-100āā¦ But how do i just expose one alarm instead of doing all 8?
Sorry for the late response, I havenāt had much time lately to work on this integration.
Unfortunately the HeaterMeter API doesnāt provide a method to update an individual alarm value.
Iāve created an Entities Card and am working on a script to read the input numbers and send them to the set_alarms service. The HeaterMeter API interprets negative values as a disabled alarm.
entities:
- type: section
label: Pit
- entity: input_number.probe0_hi
name: 'Hi:'
- entity: input_number.probe0_lo
name: 'Lo:'
- type: section
label: Food-1
- entity: input_number.probe1_hi
name: 'Hi:'
- entity: input_number.probe1_lo
name: 'Lo:'
- type: section
label: Food-2
- entity: input_number.probe2_hi
name: 'Hi:'
- entity: input_number.probe2_lo
name: 'Lo:'
- type: section
label: Ambient
- entity: input_number.probe3_hi
name: 'Hi:'
- entity: input_number.probe3_lo
name: 'Lo:'
- type: section
- action_name: Set
icon: 'mdi:blank'
name: ' '
service: script.heatermeter_set_alarms
type: call-service
title: Alarms (Incomplete)
type: entities
This is exciting, MQTT would be my preference to monitor sensors. I may add a config option that allows you to specify whether you want to use MQTT or API sensors.
Canāt wait to try it.
Thanks!!
Entities Card
entities:
- action_name: Refresh
icon: 'mdi:refresh'
name: ' '
service: script.update_heatermeter_input_numbers
type: call-service
- type: section
label: Pit
- entity: input_number.probe0_hi
name: 'Hi:'
- entity: input_number.probe0_lo
name: 'Lo:'
- type: section
label: Food-1
- entity: input_number.probe1_hi
name: 'Hi:'
- entity: input_number.probe1_lo
name: 'Lo:'
- type: section
label: Food-2
- entity: input_number.probe2_hi
name: 'Hi:'
- entity: input_number.probe2_lo
name: 'Lo:'
- type: section
label: Ambient
- entity: input_number.probe3_hi
name: 'Hi:'
- entity: input_number.probe3_lo
name: 'Lo:'
- type: section
- action_name: Set
icon: 'mdi:blank'
name: ' '
service: script.heatermeter_set_alarms
type: call-service
title: Alarms
type: entities
script.heatermeter_set_alarms
heatermeter_set_alarms:
alias: HeaterMeter Set Alarms
sequence:
- service: heatermeter.set_alarms
data_template:
alarms: '{{ states("input_number.probe0_lo") }},{{ states("input_number.probe0_hi") }},{{ states("input_number.probe1_lo") }},{{ states("input_number.probe1_hi") }}",{{ states("input_number.probe2_lo") }},{{ states("input_number.probe2_hi") }},{{ states("input_number.probe3_lo") }},{{ states("input_number.probe3_hi") }}'
mode: single
script.update_heatermeter_input_numbers
update_heatermeter_input_numbers:
alias: Update HeaterMeter Input Numbers
sequence:
- service: input_number.set_value
data_template:
value:
'{% if states("heatermeter.probe0_hi") == "-" %}
{{ -1 | int }}
{% else %}
{{ states("heatermeter.probe0_hi") | int }}
{% endif %}'
entity_id: input_number.probe0_hi
- service: input_number.set_value
data_template:
value:
'{% if states("heatermeter.probe0_lo") == "-" %}
{{ -1 | int }}
{% else %}
{{ states("heatermeter.probe0_lo") | int }}
{% endif %}'
entity_id: input_number.probe0_lo
- service: input_number.set_value
data_template:
value:
'{% if states("heatermeter.probe1_hi") == "-" %}
{{ -1 | int }}
{% else %}
{{ states("heatermeter.probe1_hi") | int }}
{% endif %}'
entity_id: input_number.probe1_hi
- service: input_number.set_value
data_template:
value:
'{% if states("heatermeter.probe1_lo") == "-" %}
{{ -1 | int }}
{% else %}
{{ states("heatermeter.probe1_lo") | int }}
{% endif %}'
entity_id: input_number.probe1_lo
- service: input_number.set_value
data_template:
value:
'{% if states("heatermeter.probe2_hi") == "-" %}
{{ -1 | int }}
{% else %}
{{ states("heatermeter.probe2_hi") | int }}
{% endif %}'
entity_id: input_number.probe2_hi
- service: input_number.set_value
data_template:
value:
'{% if states("heatermeter.probe2_lo") == "-" %}
{{ -1 | int }}
{% else %}
{{ states("heatermeter.probe2_lo") | int }}
{% endif %}'
entity_id: input_number.probe2_lo
- service: input_number.set_value
data_template:
value:
'{% if states("heatermeter.probe3_hi") == "-" %}
{{ -1 | int }}
{% else %}
{{ states("heatermeter.probe3_hi") | int }}
{% endif %}'
entity_id: input_number.probe3_hi
- service: input_number.set_value
data_template:
value:
'{% if states("heatermeter.probe3_lo") == "-" %}
{{ -1 | int }}
{% else %}
{{ states("heatermeter.probe3_lo") | int }}
{% endif %}'
entity_id: input_number.probe3_lo
mode: single
Iāll update the Github Readme tomorrow. Done. I also added an example automation to announce when your food is ready.
So awesome!!
Iāll check it out tomorrow.
Thanks for all your work with this. Really appreciate it.
Updated everything to the new scriptsā¦ Works great!!
alias: Update Heatermeater (No/Therm) Alarms
description: ''
trigger:
- platform: state
entity_id: heatermeter.probe0_hi
- platform: state
entity_id: heatermeter.probe0_lo
- platform: state
entity_id: heatermeter.probe1_hi
- platform: state
entity_id: heatermeter.probe1_lo
- platform: state
entity_id: heatermeter.probe2_hi
- platform: state
entity_id: heatermeter.probe2_lo
- platform: state
entity_id: heatermeter.probe3_hi
- platform: state
entity_id: heatermeter.probe3_lo
condition: []
action:
- service: script.turn_on
data:
entity_id: script.update_heatermeter_input_numbers
mode: single
I added an automation to update the alarms from the interface in the Native Heatermeter page. So now all is in sync if I update from there.
I was doing it when probe0_temperature changed from Unknown, which basically updated the alarm values when the HM was first turned on after being off for a period of time.
Yours is better since any change to any alarm value will cause an update. Excellent!!!
Do you mind if I add it to the GitHub Readme?
Absolutely!!