unixko / MitsuCon

Mitsubishi Heat Pump Controller for Home Assistant
Apache License 2.0
68 stars 12 forks source link

Home Assistant Configuration #8

Closed hernanjc closed 4 years ago

hernanjc commented 4 years ago

Which configuration should I use in HA with Native component?

unixko commented 4 years ago

Nothing. New controller will be auto discovered and added as new climate entity. You can check in HA by go to "Configuration->Integrations->MQTT".

hernanjc commented 4 years ago

Ok. I don't use sutoconfiguration. I introduce every device manually in config.yaml

Thanks anyway.

hernanjc commented 4 years ago

No way I can make it work. I guess nothing special has to be done in the module configuration...

Anyone knows how to configure the module manually?

hernanjc commented 4 years ago

I think it is has to do with "PubSubClient.h MQTT_MAX_PACKET_SIZE must set to 1280."

Where is that file?

Thanks!

unixko commented 4 years ago

It is possible to configure native module manually by MQTT HVAC component like:

climate:
  - platform: mqtt

Then you can map required parameters from MQTT broker. However, you will lost some discovery-specific features like Area function. If you are not explicitly disable discovery component in configuration.yaml this entity will be appeared anyway in Integrations.

PubSubClient.h file is usually located in your Arduino library like Documents\Arduino\libraries\PubSubClient\src. First please check in your MQTT broker that you received message properly in JSON format. If not message is probably truncated by MQTT_MAX_PACKET_SIZE.

I will update information in readme.md later.

hernanjc commented 4 years ago

No way entitities appear in Integrations... The MQTT server receives the config message but HA doesn't see the climate entities.

mqqt server

HA configuration seems ok....

discovery:

mqtt: broker: homeassistant # mqtt broker discovery: true discovery_prefix: homeassistant

So finally I've added them manually:

climate:

  • platform: mqtt name: "AA S" min_temp: 16 max_temp: 31 temp_step: 1 modes:
  • "heat_cool"
  • "cool"
  • "dry"
  • "heat"
  • "fan_only"
  • "off" fan_modes:
  • "auto"
  • "quiet"
  • "1"
  • "2"
  • "3"
  • "4" swing_modes:
  • "auto"
  • "1"
  • "2"
  • "3"
  • "4"
  • "5"
  • "swing" availability_topic: "AA-S/tele/lwt" current_temperature_topic: "AA-S/tele/temp" current_temperature_template: "{{ value_json.roomTemperature }}" mode_command_topic: "AA-S/cmnd/mode" mode_state_topic: "AA-S/tele/stat" mode_state_template: "{{ 'off' if value_json.power == 'OFF' else value_json.mode | lower | replace('auto', 'heat_cool') | replace('fan', 'fan_only') }}" temperature_command_topic: "AA-S/cmnd/temp" temperature_state_topic: "AA-S/tele/stat" temperature_state_template: "{{ value_json.temperature }}" fan_mode_command_topic: "AA-S/cmnd/fan" fan_mode_state_topic: "AA-S/tele/stat" fan_mode_state_template: "{{ value_json.fan | lower }}" swing_mode_command_topic: "AA-S/cmnd/vane" swing_mode_state_topic: "AA-S/tele/stat" swing_mode_state_template: "{{ value_json.vane | lower }}" json_attributes_topic: "AA-S/tele/attr"

Everything seems to work perfect. Thanks anyway!