Integrating My Pool Heater with OpenHAB: A Smooth Success Story

I’ve recently taken on a fun project to integrate my pool heater into my OpenHAB setup, and I wanted to share my journey and findings with the community. My heater is a Madimack model from Australia, but it’s essentially a Tuya device under the hood. After some research, I discovered that it works seamlessly with the Tuya Smart app, which was a great starting point.

The main goal was to get this device communicating with OpenHAB without relying on the cloud. I came across the tuya-mqtt project, which turned out to be exactly what I needed. The process involved a few key steps:

  1. Adding the Heater to Tuya Smart App: This was straightforward. I unlocked the control panel on the heater, pressed the power button for three seconds, and followed the prompts to connect it via Wi-Fi.

  2. Obtaining the Local Key: This was a bit tricky, but the documentation from tuya-mqtt and tuyapi was super helpful. I signed up on iot.tuya.com, created a cloud project, and linked the device through the app. From there, I could extract the local key needed for communication.

  3. Configuring tuya-mqtt: I set up the devices.conf file with the heater’s details, including the local key and relevant data points (DPS). This was crucial for mapping the heater’s functions within OpenHAB.

  4. Setting Up OpenHAB: I created a things file to define the MQTT topics for each function of the heater, such as power, current temperature, and boost mode. The items file then linked these topics to user-friendly switches and gauges in the OpenHAB interface.

One thing I’m still curious about is dynamically adjusting the MQTT min/max values based on temperature units. If anyone has a workaround for that, I’d love to hear about it!

The end result is fantastic. I can now monitor and control my pool heater directly from OpenHAB, even automating it based on excess PV power. It’s been a rewarding project, and I’m excited to see how far I can take this integration.

If anyone else is looking to do something similar, I’d be happy to share more details or troubleshoot any issues. Happy tinkering everyone!