rospogrigio / localtuya

local handling for Tuya devices
GNU General Public License v3.0
2.71k stars 531 forks source link

Support for Magnum MRC electric floor heating thermostat #1190

Open rrooggiieerr opened 1 year ago

rrooggiieerr commented 1 year ago

The problem

I have a Magnum MRC electric floor heating thermostat which uses the Tuya platform.

Configuring the thermostat using Local Tuya does not make it fully functional. It would be great if support could be added.

Environment

Steps to reproduce

Add the device to Local Tuya and not all options to configure the device are available.

For HVAC mode (DP 2) my thermostat has the options AUTO/FROST/HOLIDAY/MANUAL/SLOW and none of the options in Local Tuya match my thermostat options

For HVAC Current Option (DP 3) my thermostat has the options heating/warming for on/off and none of the options in Local Tuya match my thermostat options

For Presets I guess DP 2 could also apply here

Configuration configuration.yaml or config_flow

Literally nothing in my configuration.yaml has anything to do with Tuya.

DP dump

{'2': 'MANUAL', '3': 'heating', '16': 222, '24': 189, '101': 'time_date_temp', '102': '0', '103': 5, '104': 0, '107': False, '108': False, '109': 0, '110': '2', '111': '1', '112': 0, '114': '0_5', '115': 5, '117': 30, '123': 0, '124': 'other', '125': '12k', '126': True, '127': True}
{'2': 'MANUAL', '3': 'warming', '16': 170, '24': 187, '101': 'time_date_temp', '102': '0', '103': 5, '104': 0, '107': False, '108': False, '109': 0, '110': '2', '111': '1', '112': 0, '114': '0_5', '115': 5, '117': 30, '123': 0, '124': 'other', '125': '12k', '126': True, '127': True}
{'2': 'MANUAL', '3': 'warming', '16': 170, '24': 189, '101': 'time_date_temp', '102': '0', '103': 5, '104': 0, '107': False, '108': False, '109': 0, '110': '2', '111': '1', '112': 0, '114': '0_5', '115': 5, '117': 25, '123': 0, '124': 'other', '125': '12k', '126': True, '127': True}
{'2': 'MANUAL', '3': 'warming', '16': 170, '24': 184, '101': 'time_date_temp', '102': '0', '103': 5, '104': 0, '107': False, '108': False, '109': 0, '110': '3', '111': '1', '112': 0, '114': '0_5', '115': 5, '117': 30, '123': 0, '124': 'other', '125': '12k', '126': True, '127': True}
{'2': 'MANUAL', '3': 'warming', '16': 170, '24': 187, '101': 'time_date_temp', '102': '0', '103': 5, '104': 0, '107': False, '108': False, '109': 0, '110': '2', '111': '1', '112': 0, '114': '0_5', '115': 5, '117': 30, '123': 0, '124': 'wood', '125': '12k', '126': True, '127': True}
{'2': 'MANUAL', '3': 'heating', '16': 170, '24': 150, '101': 'time_date_temp', '102': '0', '103': 5, '104': 0, '107': False, '108': False, '109': 0, '110': '2', '111': '0', '112': 0, '114': '0_5', '115': 5, '117': 30, '123': 0, '124': 'other', '125': '12k', '126': True, '127': True}
{'2': 'MANUAL', '3': 'warming', '16': 170, '24': 188, '101': 'time_date_temp', '102': '0', '103': 5, '104': 0, '107': False, '108': False, '109': 0, '110': '2', '111': '1', '112': 0, '114': '0_5', '115': 5, '117': 30, '123': 0, '124': 'other', '125': '12k', '126': True, '127': False}
{'2': 'MANUAL', '3': 'warming', '16': 170, '24': 187, '101': 'time_date_temp', '102': '0', '103': 5, '104': 0, '107': False, '108': False, '109': 0, '110': '2', '111': '1', '112': 0, '114': '0_5', '115': 5, '117': 30, '123': 0, '124': 'other', '125': '12k', '126': False, '127': True}
{'2': 'MANUAL', '3': 'warming', '16': 170, '24': 186, '101': 'time_date_temp', '102': '0', '103': 5, '104': 0, '107': False, '108': False, '109': 0, '110': '2', '111': '1', '112': 1, '114': '0_5', '115': 5, '117': 30, '123': 0, '124': 'other', '125': '12k', '126': True, '127': True}
{'2': 'MANUAL', '3': 'warming', '16': 170, '24': 185, '101': 'time_date_temp', '102': '0', '103': 5, '104': 0, '107': False, '108': False, '109': 0, '110': '2', '111': '1', '112': -1, '114': '0_5', '115': 5, '117': 30, '123': 0, '124': 'other', '125': '12k', '126': True, '127': True}
{'2': 'MANUAL', '3': 'warming', '16': 170, '24': 185, '101': 'time_date_temp', '102': '1', '103': 5, '104': 0, '107': False, '108': False, '109': 0, '110': '2', '111': '1', '112': 0, '114': '0_5', '115': 5, '117': 30, '123': 0, '124': 'other', '125': '12k', '126': True, '127': True}
{'2': 'MANUAL', '3': 'heating', '16': 170, '24': 147, '101': 'time_date_temp', '102': '0', '103': 5, '104': 0, '107': False, '108': False, '109': 0, '110': '2', '111': '0', '112': 0, '114': '0_5', '115': 5, '117': 30, '123': 0, '124': 'other', '125': '12k', '126': True, '127': True}
{'2': 'MANUAL', '3': 'heating', '16': 170, '24': 147, '101': 'time_date_temp', '102': '0', '103': 5, '104': 0, '107': False, '108': False, '109': 0, '110': '2', '111': '2', '112': 0, '114': '0_5', '115': 5, '117': 30, '123': 0, '124': 'other', '125': '12k', '126': True, '127': True}
{'2': 'MANUAL', '3': 'warming', '16': 170, '24': 182, '101': 'time_date_temp', '102': '0', '103': 4, '104': 0, '107': False, '108': False, '109': 0, '110': '2', '111': '1', '112': 0, '114': '0_5', '115': 5, '117': 30, '123': 0, '124': 'other', '125': '12k', '126': True, '127': True}
{'2': 'MANUAL', '3': 'warming', '16': 170, '24': 182, '101': 'time_date_temp', '102': '0', '103': 5, '104': 0, '107': False, '108': True, '109': 0, '110': '2', '111': '1', '112': 0, '114': '0_5', '115': 5, '117': 30, '123': 0, '124': 'other', '125': '12k', '126': True, '127': True}
{'2': 'MANUAL', '3': 'warming', '16': 170, '24': 182, '101': 'time_date_temp', '102': '0', '103': 5, '104': 0, '107': False, '108': False, '109': 0, '110': '2', '111': '1', '112': 0, '114': '0_5', '115': 5, '117': 30, '123': 0, '124': 'other', '125': '12k', '126': True, '127': True}```

where

2: Program AUTO/FROST/HOLIDAY/MANUAL/SLOW
3: State: heating/warming for on/off
16: Target Temperature, 10th of degrees C
24: Current Temperature, 10th of degrees C
101: Night Screen time_date_temp/time_temp/time_only
102: ?
103: Setback Finetuning, 2-8
104: ?
107: ?
108: Lock/unlock, True/False
109: ?
110: Program - Number of Periods, 1/2/3
111: Temp Control by 0=room 1=floor 2=Room.limit
112: Calibration, -50-50, each int is 1/10th
114: ?
115: Screen brightness, 1-10
117: Backlight delay, 5/10/15/20/25/30/35/40/45/50/55/60 seconds
123: ?
124: Floor covering, wood/other
125: Type of temperature sensor, 10k/12k
126: Intelligence, True/False for on/off
127: Open Window detection, True/False for on/off

Provide Home Assistant taceback/logs

Additional information

SkyThes commented 1 year ago

I have the same thermostat and issues and would love support for it! :)

henrykuijpers commented 1 year ago

I also have this thermostat, it would be so nice to have support for it! I don't have the time right now to dig into it, however, it would be good to gather some information here about what is missing, what is not understood yet etc.

I see various posts on the HA message boards where people say they are able to use it from HA with a bit of fiddling with localtuya.

Are there some messages / IDs that are unclear still?

Would like to start on this soon and also share my findings. :)

eturfboer commented 1 year ago

I have a Magnum MRC connected to Home Assistant with LocalTuya. It isn't 100% operational. The actual and set temperature are correct. But the heating/warming isn't neither is switching between ON/OFF.

I'm using protocol 3.3. Target temp = 16, current temp = 24.

eturfboer commented 1 year ago

Looking at debug output, the following is reported by the device: DP 2 = HVAC Mode = AUTO/MANUAL (all upper case) DP 3 = HVAC Current Action = warming/heating (all lower case)

The wizard does not provide the exact (upper/lower case) options for either setting. And I believe that is important.

For example, I selected the [heating/no_heating] option. Since [heating] is available from the device and the [no_heating] isn't, the device (for home assistant) is 'stuck' in [heating].

Seems to me that the two options need to be case sensitive added to the LocalTuya options.

I am not sure how to do that. I think I saw somewhere that this can be done by manually scripting the options somewhere. But haven't had the time to investigate.

eturfboer commented 1 year ago

Created pull request #1351.