Sign up for your FREE personalized newsletter featuring insights, trends, and news for America's aging Baby Boomers

Newsletter
New

Hcalory Ble--control A Hcalory Diesel Heater From Ha

Card image cap

tl;dr I wrote this custom integration to control Bluetooth-enabled Hcalory diesel heaters.

My partner and I built a greenhouse this summer. It’s great and we love it, but it doesn’t stay warm enough on cold winter nights. I threw an electric heater out there and set up a generic thermostat to control it, but 1500 watts of heat output could only generate a 15 °F temperature delta. That’s fine if it’s 40 °F outside, but less fine when it’s 20 °F. We only have 120V power out there and I didn’t feel like trenching out a 240V line.

Instead, I bought a diesel heater. I did this because I already had some experience with these things (I have a small machine shop that I heat with one), they can pump out a lot of heat (I don’t know if I believe the 8kW rating, but they’re substantially more powerful than a 1500 watt electric heater), and they don’t use much electrical power (they use 1-200 watts to heat up a glow plug, and then they drop down to ~30 watts). With the diesel heater + electric heater, we’re able to hit 40 °F temperature deltas in a drafty, uninsulated greenhouse, meaning we should be able to keep the it above freezing.

I was pretty happy with my heater, but I had two issues with it:

  • The thermostat sucks
    • The temperature sensor is right next to the thing that’s on fire
    • If you want to have your room heated to 60 °F, you’d better set the thermostat to 80 °F or higher, because you’ll end up with a bubble of hot air that’ll throw everything off
  • When using the thermostat, the heater never turns off
    • Instead, the heater drops to its lowest power mode when the thermostat setpoint is reached. This means that the heater is always burning fuel
    • This makes a lot of sense if you’re powering the heater off of a battery, because it takes much more electrical power to heat up a cold glow plug than it does to keep a glow plug warm using flame juice
    • It’s terrible for me because I run my heater off of kerosene which is $7 a gallon at a pump that’s 15 minutes away

These two issues were so aggravating that they drove me to reverse engineer the Bluetooth protocol used by Hcalory and write the custom integration linked above. It unaccountably works! It’s still pretty flakey, but this is my first experience with reverse engineering a Bluetooth protocol, with writing code to interact with devices over Bluetooth, and with writing any sort of code for Home Assistant. A bit of flakiness is to be expected, and I’m pretty pleased with the results.

In retrospect, I do kinda wish I had bought a heater that was compatible with the excellent Afterburner diesel heater controller. It would have taken a lot less time, and an Afterburner board + MQTT is probably muuuuch more reliable than my baling-wire and bubblegum mess. Still, it was fun to learn how to RE Bluetooth stuff, and going this route meant I didn’t have to do any disassembly of my heater.

For any Bluetooth experts out there, I’d love advice on how to improve the reliability of this thing. I have to maintain an active Bluetooth connection to read data off of the heater (the notify channel doesn’t send any data unless you poke the heater, and there are no BLE broadcasts), and that’s proven to be a bit of an issue. Connection reestablishment is mostly handled in the underlying hcalory-control library, but some of it is also done in the integration itself. I’m already using bleak_retry_connector with some really long timeouts, but every now and then the heater just goes dead to the world from the POV of my BLE proxies.

I’d also love to hear people’s thoughts on climate entities. I’m currently using this heater with a generic thermostat that uses the average of 6 H/T sensors to get a more accurate temperature. The thermostat just toggles the switch entity provided by the integration, running the heater at its max power. I came across some other integrations that create a climate entity using external sensors, but those devices seem to be built expecting the external input for what the temperature is. The thermostat built into this heater only reads from the built-in thermometer, so I didn’t think a climate entity made much sense. Am I wrong in thinking that? Or is telling people to just use a generic thermostat fine?

Anyways, this is getting way too long, so I’ll cut myself off here.

1 post - 1 participant

Read full topic


Recent