ESPEasy-HeatpumpIR + HA

Hey there, first post!

I’m trying to control my HVAC using ESPEasy loaded with P058 HeatpumpIR (that part works) but my issue is HeatpumpIR only accepts CURL or single MQTT topic containing all settings. Here’s a bit of documentation:


powerstate:

0 Power off

1 Power on

mode:

1 Automatic

2 Heat

3 Cool

4 Dry

5 Fan only

6 Maintenance heating (10 or 8 degrees Celcius)

fan: a value from 0 to 5, 0 is auto speed

temperature: temperature in degrees Celcius, 16-30

swingV: vertical swing position (not supported on most models)

swingH: horizontal swing position (not supported on most models)

Examples: Panasonic CKP on, automatic mode, automatic fan speed, 22 degrees C, automatic horizontal & vertical swing



 * Send commands through http, like this example (assuming the IP address of the ESP node is 192.168.0.61):
 * * **curl http://192.168.0.61/control?cmd=heatpumpir,panasonic_ckp,1,1,0,22,0,0**
 *
 * Send commands through OpenHAB MQTT with Mosquitto, like this example,
 * assuming the 'Name' of the ESP node in ESPEasy Main Settings page is 'ESP_Easy')
 * * **mosquitto_pub -t /ESP_Easy/cmd -m heatpumpir,panasonic_ckp,1,1,0,22,0,0**

HA MQTT Climate doesn’t offer an aggregate topic containing all settings I and would like to get some input on how to bridge that gap between my HVAC and HA. Should I build an automation to publish formatted settings, triggered when MQTT Climate update a topic? Should I use Generic Thermostat and craft a CURL command? Other paths?

Thanks

if you get this to work could you let me know how.

Yes! Using curl.

#Shell command
shell_command: 
  set_ac: "curl http://192.168.1.210/control?cmd=heatpumpir,greeyaa,{% if states.input_select.hvac_power.state == 'Off' %}0{% else %}1{% endif %},{% if states.input_select.hvac_mode.state == 'Auto' %}1{% elif states.input_select.hvac_mode.state == 'Heat' %}2{% elif states.input_select.hvac_mode.state == 'Cool' %}3{% elif states.input_select.hvac_mode.state == 'Dry' %}4{% elif states.input_select.hvac_mode.state == 'Fan' %}5{% endif %},{% if states.input_select.hvac_fanspeed.state == 'Auto' %}0{% elif states.input_select.hvac_fanspeed.state == 'Low' %}1{% elif states.input_select.hvac_fanspeed.state == 'Normal' %}2{% elif states.input_select.hvac_fanspeed.state == 'High' %}3{% elif states.input_select.hvac_fanspeed.state == 'Higher' %}4{% endif %},{{states.input_number.hvac_temp.state|int}},{% if states.input_select.hvac_vdir.state == 'Auto' %}0{% elif states.input_select.hvac_vdir.state == 'Swing' %}1{% elif states.input_select.hvac_vdir.state == 'Upper' %}2{% elif states.input_select.hvac_vdir.state == 'Up' %}3{% elif states.input_select.hvac_vdir.state == 'Center' %}4{% elif states.input_select.hvac_vdir.state == 'Down' %}5{% elif states.input_select.hvac_vdir.state == 'Downer' %}6{% endif %},0"