MC6 Thermostat

Hi all,

I bought the following thermostat called MC6:

MC6

It works with its own app, Google Home and Alexa. It seems that also has modbusTCP but I cannot find suitable information.

Is there any option to integrate it into Home Assistant?

Thanks,

Many thanks! I found the PDF with the ModBus codes but I dind’t find the process to activate it. That really helped!

I am currenty dealing with the configuration in Home Assistant. For the moment, I am not able to get the data from the thermostat. If I get it I will publish it

Hi again,

I added this to my configuration.yaml:

modbus:
  name: hub1
  type: tcp
  host: 192.168.1.101
  port: 502
  
climate:
  - platform: modbus
    name: termostato_salon
    hub: hub1
    slave: 1
    data_type: uint
    data_count: 1
    scale: 0.1
    offset: 0
    precision: 1
    max_temp: 30
    min_temp: 15
    temp_step: 1
    target_temp_register: 64
    current_temp_register: 0

and this is the error I am getting:

2020-05-02 01:06:08 DEBUG (MainThread) [pymodbus.client.asynchronous.asyncio] send: 0x0 0x1 0x0 0x0 0x0 0x6 0x1 0x3 0x0 0x40 0x0 0x1
2020-05-02 01:06:08 DEBUG (MainThread) [pymodbus.transaction] Adding transaction 1
2020-05-02 01:06:09 DEBUG (MainThread) [pymodbus.client.asynchronous.asyncio] recv: 0x0 0x1 0x0 0x0 0x0 0x6 0x1 0x3 0x2 0x0 0xaa
2020-05-02 01:06:09 DEBUG (MainThread) [pymodbus.framer.socket_framer] Processing: 0x0 0x1 0x0 0x0 0x0 0x6 0x1 0x3 0x2 0x0 0xaa
2020-05-02 01:06:09 DEBUG (MainThread) [pymodbus.framer.socket_framer] Frame check failed, ignoring!!

For any reason the CRC of the frame is invalid.

I’ve the same problem. I think is a pymodbus problem.
Now i use for testing nodered with a modified modbus nodered component

see

I have found a bug in the MC6 thermostate that explains why the frames received are rejected.

After every request of information about 1 or more registers, the MC6 units always reply with a length of 0x06:

I will contact the manufacturer in order to know if it has been fixed in an upper firmware version.

I’ve a newer firmware version, but is no simple to upgrade. No ota update system. Only with a segger j-link hardware. I’ve not already tryed because i cant find a small 5x2 pin header to use for flash it. The mains must be on during the flashing process (dangerous operation…)

We wrote at the same time! :rofl:
I noticed that you also detected the bug on the communications. The bug is on the MC6 unit, not in the pymodbus, so I hope they fix it.

I have already share it with someone of the manufacturer (I don’t know if is aftersales department, sales or whatever). In any case, if they fix it I will let you know. If they don’t I will try the solution with Node-RED. I have never used it, so it would be a good introduction.

I currently have version 2.98, and my contact from manufacturer or seller has told me that latest version is 3.17 but requires new hadware.
The bug commented is independent to the hardware, it is just firmware, so I hope they solve it.

Hi Tiziano,

I am still waiting for the latest firmware from the manufacturer.

Meanwhile, I would like to modify the ModBus code as you did. How can I get access to the files in Hassio? Did you do your own branch/modification to your home assistant? In that case, where the new files have to be located?

Thanks for your help!

No I didn’t create any branch. I’ve only test with nodered standalone install not in home assistant Hassio.
I’m sorry.
But i think you can login in to shell command , docker exec -t -i homeassistant /bin/bash
and modify the modbus code. To make the hassio change permanent I have never done it and I should understand how

Thanks a lot for your help.

I will check with standalone as well and, thereafter I will try with Home assistant modbus module.

I have received the latest firmware. Seems to be v3.09, at least it says the file name. I am not sure if it is hardware compatible.

In any case, the point is that the JLink tool is necessary for updating and I do not have it.

Thanks a lot
I think this firmware is ok the mc6_app.jflash file is the same of my older firmware, and the chip name is the same ChipName = ST STM32F103ZE

Now i can try to flash .
I’m looking for a quick way to connect the wires

I confirm, whit the new firmware modbus is work

020-05-06 01:45:45 DEBUG (SyncWorker_18) [pymodbus.transaction] Current transaction state - IDLE
2020-05-06 01:45:45 DEBUG (SyncWorker_18) [pymodbus.transaction] Running transaction 1
2020-05-06 01:45:45 DEBUG (SyncWorker_18) [pymodbus.transaction] SEND: 0x0 0x1 0x0 0x0 0x0 0x6 0x1 0x3 0x0 0x2 0x0 0x1
2020-05-06 01:45:45 DEBUG (SyncWorker_18) [pymodbus.client.sync] New Transaction state 'SENDING'
2020-05-06 01:45:45 DEBUG (SyncWorker_18) [pymodbus.transaction] Changing transaction state from 'SENDING' to 'WAITING FOR REPLY'
2020-05-06 01:45:45 DEBUG (SyncWorker_18) [pymodbus.transaction] Changing transaction state from 'WAITING FOR REPLY' to 'PROCESSING REPLY'
2020-05-06 01:45:45 DEBUG (SyncWorker_18) [pymodbus.transaction] RECV: 0x0 0x1 0x0 0x0 0x0 0x5 0x1 0x3 0x2 0x0 0x31
2020-05-06 01:45:45 DEBUG (SyncWorker_18) [pymodbus.framer.socket_framer] Processing: 0x0 0x1 0x0 0x0 0x0 0x5 0x1 0x3 0x2 0x0 0x31
2020-05-06 01:45:45 DEBUG (SyncWorker_18) [pymodbus.factory] Factory Response[ReadHoldingRegistersResponse: 3]
2020-05-06 01:45:45 DEBUG (SyncWorker_18) [pymodbus.transaction] Adding transaction 1
2020-05-06 01:45:45 DEBUG (SyncWorker_18) [pymodbus.transaction] Getting transaction 1
2020-05-06 01:45:45 DEBUG (SyncWorker_18) [pymodbus.transaction] Changing transaction state from 'PROCESSING REPLY' to 'TRANSACTION_COMPLETE'
2020-05-06 01:46:16 DEBUG (SyncWorker_14) [pymodbus.transaction] Current transaction state - TRANSACTION_COMPLETE
2020-05-06 01:46:16 DEBUG (SyncWorker_14) [pymodbus.transaction] Running transaction 2
2020-05-06 01:46:16 DEBUG (SyncWorker_14) [pymodbus.transaction] SEND: 0x0 0x2 0x0 0x0 0x0 0x6 0x1 0x3 0x0 0x2 0x0 0x1
2020-05-06 01:46:16 DEBUG (SyncWorker_14) [pymodbus.client.sync] New Transaction state 'SENDING'
2020-05-06 01:46:16 DEBUG (SyncWorker_14) [pymodbus.transaction] Changing transaction state from 'SENDING' to 'WAITING FOR REPLY'
2020-05-06 01:46:16 DEBUG (SyncWorker_14) [pymodbus.transaction] Changing transaction state from 'WAITING FOR REPLY' to 'PROCESSING REPLY'
2020-05-06 01:46:16 DEBUG (SyncWorker_14) [pymodbus.transaction] RECV: 0x0 0x2 0x0 0x0 0x0 0x5 0x1 0x3 0x2 0x0 0x31
2020-05-06 01:46:16 DEBUG (SyncWorker_14) [pymodbus.framer.socket_framer] Processing: 0x0 0x2 0x0 0x0 0x0 0x5 0x1 0x3 0x2 0x0 0x31
2020-05-06 01:46:16 DEBUG (SyncWorker_14) [pymodbus.factory] Factory Response[ReadHoldingRegistersResponse: 3]
2020-05-06 01:46:16 DEBUG (SyncWorker_14) [pymodbus.transaction] Adding transaction 2
2020-05-06 01:46:16 DEBUG (SyncWorker_14) [pymodbus.transaction] Getting transaction 2
2020-05-06 01:46:16 DEBUG (SyncWorker_14) [pymodbus.transaction] Changing transaction state from 'PROCESSING REPLY' to 'TRANSACTION_COMPLETE'

I used an old ata 2,5" hard disk, to get me a 2x5 pin header 1,27mm, build the cable and flash it.

All works. In the new firmware they have changed the position of menu

Thank’s a lot for the firmware

Sounds great!!
Do you have the JLink device to program it? How did you do?

Yes i’ve buyed at : https://www.ebay.it/itm/352773727313 but is not avaiable
but similar is ; https://www.ebay.it/itm/ARM7-ARM9-ARM11-J-link-V8-ARM-Emulator-Cortex-M3-IAR-STM32-JTAG-Interface-new-TW/114193015247?hash=item1a966f21cf:g:Ex4AAOSwYIxX-8DR

Bye

Hi Tiziano. I cannot enter the hidden menu or lets say when I enter it I got the specs window only and if a touch the screen, it reboots to the home menu(looking at your pics, it jumps from pic 3 to pic 5 missing the network menu. Any idea ?
Grazie

You need to push lock icon to confirm

Bye

Thanks. However the point is that I am able to enter the hidden menu but rather than giving me the network options, when I press the lock icon it jumps to the hardware checking page and no other option buttons are displaied. Any further screen touch, resets the thermostat and clear the original settings… My fw ir on rel. 2.0

Is the same for me.
But after reboot you must go to the wifi menu, and specify a fixed ip address for the modbustcp protocol and ssid/password

Bye