Pool Heater Configuration With Multiple States (MQTT, Nodejs)

I have NodeJS Pool controller setup on a Raspberry Pi to talk to my Pentair Intellicenter control panel to handle functions for my pool. I am working to integrate this into home assistant using MQTT but have ran into a problem. I have a heatpump that has a heat and cool function in it and as such does not have only an “On” or “Off” state it actually has a Heating/Cooling/Off state. I am struggling with trying to figure out how to get this to work with home assistant to handle the mode as well as the heat status and setting the temperature. I’m assuming to gather the “state” it can be done with a simple if statement based on the value returned however, I suppose I have multiple problems here…

  1. I am struggling with trying to figure out how to get HA to set the mode for the heater between Off and Ultratemp
  2. How can I setup the heat and cool setpoints if I wanted to control temperature?

Information from one of the developers of the NodeJs Pool Controller

"UltraTemp throws some wrinkles that I am sure the HASS folks didn’t code for. This is because there isn’t a simple on/off status for the heater. It can be Heating/Cooling/Off. The mode is another store since it can have Heater, UltraTemp, UltraTemp Pref, and Off depending on whether you have a gas heater and an UltraTemp installed together.

The setPoint topic has been preserved so that we do not break all the other interfaces out there and it is assumed to be the heatSetpoint. In fact you can use these monikers interchangeably in the API. A coolSetpoint was added to extend the topics but it is the only way to set the coolSetpoint in the API.

The off heatMode can be either one of two values 0 or 1. This is because of the way it is reported and commanded in the Pentair OCPs. You should treat either mode as off.

heatModes in IntelliCenter
1 = Off
2 = Heater (Gas)
3 = Solar
4 = Solar Preference
5 = UltraTemp
6 = UltraTemp Preference
9 = Heat Pump
11 = MasterTemp
25 = Heat Pump Preference

heatStatus in IntelliCenter
0 = Off
1 = Heater (Gas)
2 = Solar
3 = Solar Cooling
4 = Heat Pump Heat
6 = MasterTemp Heat
8 = Heat Pump Cooling"

platform: mqtt
name: "Pool Heatpump"
min_temp: 40
max_temp: 104
modes:
"off"
"ultratemp"
current_temperature_topic: "intellicenter-i8ps/state/temps/bodies/1/pool/temp"
value_template: "{{ value_json.temp }}"
mode_state_topic: "intellicenter-i8ps/state/temps/bodies/1/pool/heatMode"
mode_state_template: >-
{% if value_json.heatMode.val == 0 %}
off
{% elif value_json.heatMode.val == 1 %}
off
{% elif value_json.heatMode.val == 5 %}
ultratemp
{% endif %}
mode_command_topic: "intellicenter-i8ps/state/body/heatMode"
mode_command_template: >-
{% set values = { 'ultratemp':'{"heatMode":5, "id":1}', 'off':'{"heatMode":1, "id":1}'} %}
{{ values[value] if value in values.keys() else '{"heatMode":1, "id":1}' }}
action_topic: "intellicenter-i8ps/state/temps/bodies/1/pool/heatStatus"
action_template: >-
{% if value_json.heatStatus.val == 0 %}
off
{% elif value_json.heatStatus.val == 4 %}
heating
{% elif value_json.heatStatus.val == 8 %}
cooling
{% endif %}
temperature_command_topic: pool/heatsetpoint #REQUIRES AN AUTOMATION - SEE BELOW
temperature_state_topic: "intellicenter-i8ps/state/temps/bodies/1/pool/heatsetPoint"
temperature_state_template: "{{ value_json.heatsetPoint }}"`

Well I got the mode switch working it would appear only “heat” and “off” are acceptable modes and I was trying to use “Ultratemp”… Still working the coolingsetpoint thing

@tegguy Hello Dustin, came across your posting and would like to collaborate on this project. Can I get a best email to reach you at?

Thanks,

  • A -

I actually think I figured out how to do it using the “heat_cool” mode