MC6 Thermostat

I wanted to work the MC6 thermostat with openhab since it only works with an English google home account.
I unlocked the device in wifi modbus tcp mode, now I have to make it communicate with the modbus blinding.

termostato.Items
Number termostato "Termostato" <temperature> { channel="modbus:data:siemensplc:holding:termostato:number" }

Are you having some difficulty, may we know what that is?

I have seen talk that MC6 Modbus implementation is broken before firmware version 3

I’m new, I don’t understand how to compose the string to read the temperature data

Okay. Modbus is quite technical nuts and bolts, there is no way round that. You will not be able to do this by copy and paste, and will have to learn some.

First you need to install the oipenHAB Modbus binding

Then you create a TCP Bridge thing, with parameters to match your MC6 - IP address, id, etc.

You can choose to do that either with PaperUI or with a xxx.things file. These are general openHAB concepts you will have to master .

Then you find out what Modbus register you want to read from your MC6 - address, type.
With that information you can create a poller Thing to fetch the data, and one or more data Things to interpret that data.

Finally, you create one or more Items of suitable type and link them to your channels belonging to your new data Things.

I’m interest in this topic.
So my mc6 thermostat have the ipaddress 192.168.1.92 with the id 1 then I do:

Bridge modbus:tcp:thermostat [ host="192.168.1.92", port=502, id=1 ] {
}

But based in https://community-assets.home-assistant.io/original/3X/4/e/4eaa34ed01a08c9b41eec8469d6fc465d6dd03ea.jpeg how I can get the address 0 and 1 (RoomTemp and FloorTemp) ?

Best Regards,
Fernando Gomes

Looks correct.

Next, if you want to read registers, you’d need to make a poller Thing, belonging to your tcp Bridge.
For this poller you would need to know your modbus register addresses and types, and how many registers to fetch.
Address is given in your table, but not type.
Maybe the mysterious “code 3” means to read with Modbus function FC03? That would mean these are holding register types.

Try it out. That’s enough to read-poll your device from openHAB. If there is a problem, you’ll get error reports in your openhab.log

You’re right “code 3” is FC03 :slight_smile:. To write to 3/16 (“Set Temperature”), address 64 do you’ve a good suggestion?

Who knows. Let’s guess they mean this register is read with FC03 and writeable with FC16. That would make it a holding type register.

You’d make a poller Thing belonging to your tcp Bridge, that polled the address and count of the holding registers you are interested in.

You’d make data Things, let’s guess one for register of interest, specifying read address and format.
For the ones you want to write, you add write details to the data Thing. There is a parameter to select FC16 for write mode.

Then you link a channel of each data Thing to some Item of your choice, probably a Number type.

To write to the register, issue a command ito the Item from rule or UI in openHAB.

I don’t see a register 64 or temperature setpoint in the image that you shared, though.

Hi @rossko57,

thanks for your help. The first “Code 3” it’s working, I can read the data. But in the code “3/16” I can’t read neither wirte. For start see the image:

To get the status and start and stop I put this:

Thing data Status   [ readStart="61", readValueType="bit", writeStart="61", writeValueType="bit", writeType="holding",  writeMultipleEvenWithSingleRegisterOrCoil="true" ]

Based on your guess :slight_smile:
But I don’t have a reading value neither can write.

Remember that the poller that I’m using (and work for reading the first table with the “code 3”) is:

 Bridge poller hall [ start=0, length=3, refresh=1000, type="holding" ] {

Can you give me another help? :slight_smile:

Look in your openhab.log and events.log for reports from your binding.

This poller reads registers 0, 1, and 2
That’s what you told it to do.- start at register 0 and read 3 registers.

This data Thing may or may not belong to that poller. Please show us the whole context when posting configurations.

This Thing will try to read register 61.
If this Thing belongs to the poller shown, it cannot work.
Register 61 is not included in the polled registers 0-2.

You might want to make another poller that includes the registers 60-6x that you are interested in.
A poller Thing defines a block of registers to read.
A data Thing defines how to select from that block. Any registers for reading must be included in the poller’s block.

Why did you choose “bit” ?
If you must use bit, then you must define which bit in the readStart= part, there are sixteen to choose from in a holding register.

But so far as I can see your device is treating register 61 as a 16-bit register in the usual way, with expected numeric values of 1 or 0
I’d treat it as a 16-bit integer register.

Dahh :slight_smile: I’m sleeping on that… thank you very much.

Yes I created another poller to the 60-6x.

It’s working, thank you very much.

If someone have interest in put working MC6 thermostat through modbus, tell me, that I can post all thing configuration here. I expect finish it tomorrow.

@rossko57 thank you very much.

I think that would be helpful, once you have it all working. might be more to fix upyet! Modbus configuring is not easy and we often have to guess what maker’s data sheets mean. :smiley:

Yeah, but all your guesses were right :upside_down_face:

Hi,

Here is my working thing:

Bridge modbus:tcp:thermostathallentrada [ host="192.168.1.92", port=502, id=2 ] {

    Bridge poller hallentrada [ start=0, length=3, refresh=10000, type="holding" ] {
        Thing data RoomTemp @ "Piso 1"                          [ readStart="0", readValueType="int16", readTransform="JS(divide10.js)" ]
        Thing data FloorTemp @ "Piso 1"                         [ readStart="1", readValueType="int16" ]
        Thing data Humdity @ "Piso 1"                           [ readStart="2", readValueType="int16" ]
    }
    Bridge poller hallentradawrite [ start=61, length=4, refresh=5000, type="holding" ] {
        Thing data Status @ "Piso 1"                            [ readStart="61", readValueType="int16", writeStart="61", writeValueType="int16", writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil="true", autoupdate="false" ]
        Thing data SystemMode @ "Piso 1"                        [ readStart="62", readValueType="int16", writeStart="62", writeValueType="int16", writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil="true", autoupdate="false"]
        Thing data FanSpeed @ "Piso 1"                          [ readStart="63", readValueType="int16", writeStart="63", writeValueType="int16", writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil="true", autoupdate="false" ]
        Thing data SetTemp @ "Piso 1"                           [ readStart="64", readValueType="int16", writeStart="64", writeValueType="int16", writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil="true", readTransform="JS(divide10.js)", writeTransform="JS(multiply10.js)" ]
    }
}
1 Like

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.