HeaterMeter integration

A couple more bugs. May be related to me having my units set to Metric.

The service to change the setpoint doesn’t seem to work at all. I tried manually calling it from the HASS dev tools and it gives a ‘set-cookie’ error message.

The other thing is the history graph. It says it’s in F but the actual temps shown are in C. Even weirder is that it will create a separate graph that’s in C when I plug a probe in. Both graphs show the exact same data, just the type one shows the °F symbol in the top right despite showing the temps in C.

Is this still working for anyone? I set it up but I’m getting an error when I restarted. Before I see if it was something that I did I thought I’d check to see if something has broken it since it was created.

I just installed it and it worked perfectly right out of the door! I did it during a slow cook in fact - so it was nice to see, track, and even make some Grafana graphs for it!

Hi,
I’ve forked fancygaphtrn component and made some changes.

Changed the degree to C’ (will add config value to allow both F and C).

Correct the “heatmeter” to “heatermeter”.

Support the newer rest API for HeaterMeter, use the API key from LinkMeter config page, see here:


That will fix the 'set-cookie’ error message.
The code should work on older versions too, but I can’t test it as I’m updated to to latest snapshot.

Get it here:

2 Likes

Hello,

Thanks for your work. I have been trying to find the time to make some of the changes that you already have. Do you have a list of your plans for developing this further? could you share those plans?

A short list of the stuff I would like to see added/going to attempt to add:

HACS support, to make it easier to maintain/upgrade as features are added.

SSDP support (as long as your on one of the newer snapshots, SSDP works) and would ideally eliminate the log spam when the device is not plugged in (I run mine on battery, but even if I didn’t - why would I keep it plugged in 24/7/365) - ZeroConf is also an option, but that requires someone to setup the Zeroconf integration vs SSDP is enabled out of the box.

Removal of the heatermeter domain. It would be nice if the probes could be identified as sensor.heatermeter_probeX or such. This would allow people using the Alexa/HA Cloud to activate these, where currently the heatermeter domain can not be added. (there are ways to work around it)

Adding support for setting temperatures for the probes/alarms.

I will try your version over the next few days to see how it works. I do use F; but can test everything and just ignore the temps for now.

Thank you,

Hi,
Unfortunately I’m not a real HA developer, not even close.

I did those modification with some basic python knowledge.

regarding your requests.
HACS should be straight forward as a custom repository, I’ll look into it.

I don’t know what’s SSDP, maybe in the long run if I keep modding this integration.

Removal of the heatermeter domain - not sure how to do it, if you have example of an component that uses that schema I’ll look it it’s source code.

support for setting temperatures for the probes/alarms -
I’m actully using some basic automation to send me telegram messages for the temps.
but I can add any setting set via the command in the link below very easily:

So to sum it up,
the next thing I’m going to add are:

  1. Selection for the unit (that’s only a visual effect, doesn’t have any effect on the behaviour).
  2. Implementing the scan interval

after that i’ll add the setting for the probes0-3 alarms and see about integrating with HACS.

Looks like the original integration developer responded with some README changes on my initial issue in github, so he’s alive and implies he’s up for more coding. You could try submitting a pull request (after you catch up to his readme changes) and suggest what things remain.

@idomp

I forked your fork. :wink:

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.

1 Like

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.

1 Like

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.

1 Like

New features added:

  • High/Low Alarm Sensors for each probe.
  • Added ‘set_alarms’ service to set probe alarms.

There’s MQTT support (readonly).
Setting stuff still neds the API.
But we do not need to poll the API when using MQTT :slight_smile:

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 %}'        
    

  

    
1 Like

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.”

ledhed-jgh/HAHeaterMeter

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?

@Chris8837

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.

1 Like