After some testing and debugging I’m posting here also a MQTT “native” configuration for this thermostat.
I have a 2 pipes fancoil device with Modbus and MQTT settings available (MQTT OR Modbus, not both)
This config allow for HA to subscribe and publish relevant messages to read and write settings to the device.
The config has been only lightly tested so it may contain some errors, post here if you find some.
MQTT
PRO: all feature available by design (fan, modes), with a little patience it should be possible to also send scheduling programs
CONS: no direct connection from HA to MC6, so if a message is lost/gets error the feedback is missing and the climate entity revert to its previous state when MC6 publish a new message; missing power command options (needs separate MQTT switch, with the same problems as the climate entity)
MODBUS
PRO: direct connection with the thermostat, automation gets immediate response to action (or get immediately an error)
CONS: missing fan mode feature, ATM needs modification to HA modbus code to modify temp settings
mqtt:
- climate:
name: MC6 Climate
object_id: mc6_1
unique_id: mc6_1
# MC6 gets updates immediately but sends status messages only after some minutes, so it's better to update the UI optimistically
optimistic: true
# MC6 in MQTT config supports only 4 modes, cooling,heating,fan only and dehumidifying
# MC6 discard the dry mode when sent by mqtt, it may report it's status if the dehumid settings is enabled on the thermostat (not tested)
modes:
- "cool"
- "heat"
- "fan_only"
- "dry"
mode_state_topic: "updData/MACADDRESS-lowercase"
# from MC6 manual: mode(1 cool, 2 heat, 3 vent, 4 auto), but in my thermostat the Auto fnction is replaced by Dehumid
mode_state_template: >-
{% if value_json.mode == 1 %}
cool
{% elif value_json.mode == 2 %}
heat
{% elif value_json.mode == 3 %}
fan_only
{% elif value_json.mode == 4 %}
dry
{% endif %}
mode_command_topic: "MACADDRESS-lowercase"
mode_command_template: >-
{% if (value | string) == "cool" %}
{ "mode": 1 }
{% elif (value | string) == "heat" %}
{ "mode": 2 }
{% elif (value | string) == "fan_only" %}
{ "mode": 3 }
{% elif (value | string) == "dry" %}
{ "mode": 4 }
{% endif %}
# from MC6 manual: fan speed(1 high, 2 medium, 3 low, 4 auto)
fan_modes:
- "High"
- "Medium"
- "Low"
- "Auto"
fan_mode_state_topic: "updData/MACADDRESS-lowercase"
fan_mode_state_template: >-
{% if value_json.fan == 1 %}
High
{% elif value_json.fan == 2 %}
Medium
{% elif value_json.fan == 3 %}
Low
{% elif value_json.fan == 4 %}
Auto
{% endif %}
fan_mode_command_topic: "MACADDRESS-lowercase"
fan_mode_command_template: >-
{% if value == "High" %}
{ "fan":3 }
{% elif value == "Medium" %}
{ "fan":2 }
{% elif value == "Low" %}
{ "fan":1 }
{% elif value == "Auto" %}
{ "fan":4 }
{% endif %}
min_temp: 5
max_temp: 30
temp_step: 0.5
current_temperature_topic: "updData/MACADDRESS-lowercase"
# dividing by 10 when reading the settings
current_temperature_template: "{{ value_json.temp | float / 10 }}"
temperature_state_topic: "updData/MACADDRESS-lowercase"
# dividing by 10 when reading the settings
temperature_state_template: "{{ value_json.settemp | float / 10 }}"
temperature_command_topic: "MACADDRESS-lowercase"
# multiplying by 10 when writing the settings
temperature_command_template: "{ \"settemp\":{{ (value * 10) | int }} }"
current_humidity_topic: "updData/MACADDRESS-lowercase"
# dividing by 10 when reading the settings
current_humidity_template: "{{ value_json.humi | int / 10 }}"
precision: 0.1
retain: false
qos: 1
- switch:
unique_id: mc6_1_switch_onoff
object_id: mc6_1_switch_onoff
name: "MC6-1 Switch-onoff"
state_topic: "updData/MACADDRESS-lowercase"
optimistic: true
state_on: "ON"
state_off: "OFF"
value_template: >-
{% if value_json.onoff == 1 %}
"ON"
{% elif value_json.onoff == 2 %}
"OFF"
{% endif %}
command_topic: "MACADDRESS-lowercase"
payload_on: '{"onoff":1 }'
payload_off: '{"onoff":2 }'
template:
- sensor:
- name: "MC6-1-Humi"
device_class: humidity
unit_of_measurement: '%'
state: "{{ state_attr('climate.mc6_hvac', 'current_humidity') | float }}"
This IS my PCB but after few reads of the topics… Can be flashed without STLink? USB pinout work but only to get de bmp resources… Maybe SWDI with TTL USB?
Hello, I’m using the MC6 Thermostat with modbus integration. Everything was fine but the time synchronization of the device. Once settled to MODBUS the automatic time synchonization doesen’t work. Anyone knows how to fix it? Is the MC6 using the NTP protocol to the MODBUS server instead of the default one? Or is there any command to configure date and time via MODBUS?
Time sync doesen’t work in modbus only in mqtt , setting the time zone.
I’ve asked this in the past to YuQiang and this is reply:
for the Modbus register it has not time and date , we will add this later
For the time sync in MQTT you can use the topc “Timezone” , if you want to enable the time sync just modify the data to the time zone you want to set , please note the time zone range is -12 to 12, if you want to disable the Time sync just set the time zone data to be 13 ;
As you know the time sync only works in Coud server mode, so if thermostat works in Modbus TCP this time sync feature would not work.
We have released a new version MC6 , please check attached picture, this new version MC6 has different firmware and MCU with old MC6, it has all exist MC6 features and these new functions below :
1) LoRaWAN option (868mhz, 915mhz)
2) BACnet MSTP, IP
3) Tuya App option.
4) Seasonal auto changable ( the work mode auto change according to the external sensor in 2 pipes fan coil type thermostat )
5) Open window feature (Heating type thermostat)
6) Adaptive heating feature (Heating type thermostat)
7) Measuring the load current (Electric heating type thermostat) .
This new version MC6-v2 would be started to delivery early this month , we will mainly upgrade this new MC6 firmware, for the old version MC6 firmware we also upgrade it when we are not busy .
After all. The version 2.70 is not working properly. The reading of the temperature is very different from before. More than 2 degrees higher. But the main problema is that the brightness control doesn’t work.
Hi, I have the MC6, but not the Mch1, but Mch2 (CO2 sensor). Is it possible to also work with MQTT on this version? The software version is 3.44U(HA1). The login via screen lock code works, but asks for a server, not a MQTT server.