adorobis / hacomfoairmqtt

Home Assistant integration for ComfoAir 350 device via serial communication and MQTT
MIT License
37 stars 16 forks source link

Feature request: implement switch to enable intake fan only, exhaust fan only, none or both #16

Closed adorobis closed 1 year ago

adorobis commented 3 years ago

This feature is not described in the protocol documentation but someone has reverse engineered it in the RS485 versions and documented it here: https://matsab.de/images/comfoair/Protokoll_CA500_Avignon.pdf image

So we need to identify respective command to be sent and the return message.

PimDoos commented 3 years ago

This could be implemented via the MQTT Select integration, introduced in 2021.7

adorobis commented 3 years ago

Thanks, but the HA and MQTT part is not an issue. The missing part is the RS232 commands to switch those options. They are missing in the available protocol documentation.

ItsEcholot commented 1 year ago

How I solved this in esphome-comfoair is by (ab-)using the 0x00 0xCF command:

image

And setting the values to 0 for the supply and/or the exhaust side to turn them off and setting them back to the original values when turning them back on.

adorobis commented 1 year ago

@ItsEcholot Great, thanks! Could you post (or in your repo) a list of all the entities that your esphome-comfoair exposes to HA?

ItsEcholot commented 1 year ago

It exposes the following sensors as entities:

  sensor::Sensor *fan_supply_air_percentage{nullptr};
  sensor::Sensor *fan_exhaust_air_percentage{nullptr};
  sensor::Sensor *fan_speed_supply{nullptr};
  sensor::Sensor *fan_speed_exhaust{nullptr};
  binary_sensor::BinarySensor *is_bypass_valve_open{nullptr};
  binary_sensor::BinarySensor *is_preheating{nullptr};
  sensor::Sensor *outside_air_temperature{nullptr};
  sensor::Sensor *supply_air_temperature{nullptr};
  sensor::Sensor *return_air_temperature{nullptr};
  sensor::Sensor *exhaust_air_temperature{nullptr};
  sensor::Sensor *enthalpy_temperature{nullptr};
  sensor::Sensor *enthalpy_humidity{nullptr};
  sensor::Sensor *ewt_temperature{nullptr};
  sensor::Sensor *reheating_temperature{nullptr};
  sensor::Sensor *kitchen_hood_temperature{nullptr};
  sensor::Sensor *return_air_level{nullptr};
  sensor::Sensor *supply_air_level{nullptr};
  binary_sensor::BinarySensor *is_supply_fan_active{nullptr};
  binary_sensor::BinarySensor *is_filter_full{nullptr};
  sensor::Sensor *bypass_factor{nullptr};
  sensor::Sensor *bypass_step{nullptr};
  sensor::Sensor *bypass_correction{nullptr};
  binary_sensor::BinarySensor *is_summer_mode{nullptr};

The following service, which allows turning the fans on or off: register_service(&ComfoAirComponent::control_set_operation_mode, "climate_set_operation_mode", {"exhaust_fan", "supply_fan"});

And finally it implements most features of a HA "climate" entity, like setting fan level (low, med, high) and setting the target temperature.

adorobis commented 1 year ago

OK, thanks! Looks quite complete. Maybe one day I'll get rid of the cable from the unit to my NAS.

euDominic commented 1 year ago

Is there already a positive development on this? would be very happy about this function.

adorobis commented 1 year ago

No progress really :) I was not seeing it as a priority so far but I have a clarity how this can be achieved so I'll try to pick it up in the next days.

euDominic commented 1 year ago

No progress really :) I was not seeing it as a priority so far but I have a clarity how this can be achieved so I'll try to pick it up in the next days.

That would be great, I definitely have a good use for it.

adorobis commented 1 year ago

So here it is. Implemented and working ok in my system. https://github.com/adorobis/hacomfoairmqtt/pull/53 New select entity will show up in HA enabling control of both fans. In order for it to work properly a new section in config.ini is required - it defines the fan speed % for each ventilation level. There are no defaults so the program will most likely fail without it. image

PimDoos commented 1 year ago

Works like a charm!