sHedC/python-masterthermconnect

Some updates for Registry Mappings

Closed this issue · 22 comments

sHedC commented

For @johny-mnemonic installation the following mappings are observed, to update in the mappings.

pAD ON/OFF
"I_15": "2" -  ON
"I_15": "0" - permanently OFF

HC1 mode (requested water temp)
"D_215": "0" - auto
"D_215": "1" - manual

HC1 requested water temp value
"A_218" -  manual
"A_96" - current

HC0 mode (requested water temp)
"D_211": "0" - auto
"D_211": "1" - manual

HC0 requested water temp value
"A_214" - manual
"A_5" - current

I have no clue what is I_269, which you display as "HC1 Auto" if I understand the code correctly. No matter what I change on main control panel it still shows value "2"

sHedC commented

@johny-mnemonic
These settings you put they get updated based on information you set in the room thermostat? The only one i find in the App is A_5 which we have mapped to requested_temp.

sHedC commented

I_269 auto shows in the App its the third icon a circle with an A in it, I wonder if its to do with auto defrost? No idea will leave it in

@sHedC I have found all these values by changing stuff directly in the main control panel (not on the pAD) and making a diff of the reg values.
Interesting. I have found the circle with A in the mobile app as you say, but I was always checking just the web app on PC where it displays image of pAD instead (looks like it correctly detects I have a pAD) without any such icon.
So probably this is something which is not in use for my setup and hence I was unable to change the value of I_269 no matter what I tried. I am obviously just guessing here...

SeBsZ commented

Yeah, I_269 is called hcauto1_v in the JavaScript. There is also hcauto2_v - hcauto6_v. Unfortunately, this variable is not used in the Web App so I also have no idea what it is used for.

As it is showed on the heating circuit screen, not on the main heat pump screen I doubt it has anything to do with defrost.
It could be the auto detection of winter/summer when you don't have pAD active on the heating circuit.
I am quite sure it's the season on the HC level now as once when the app reloaded/updated I have seen "sun" icon there instead of A in circle.
Funny thing is, that when I tried to change the season/mode of the pAD to check if it changes this icon in the app, I have found it is wrongly mapped. When I select winter on the main control panel it shows as summer on the pAD :-D
There are also dehumidification, humidification and none values selectable for the pAD. I can try to find if some register on the API reflects this pAD mode selection, but not sure if it's of any use...
And as reported previously, changing the pAD mode doesn't change this icon.

sHedC commented

There is a mastertherm technical manual has some interesting info.

I am mostly just concerned with getting the structure right, so making ambient_requested and ambient_temp direct of the hcX then have a pad if its installed with other information such as humidity/ on/ off etc.

That's mainly why I am querying this now so I can get the structure straight as that is currently messing up my mind :)

sHedC commented

Adding I_15 to HC1 Pad, but ignoring the rest they seem duplicates of other registries.

I see in the install document that some registers are duplicated depending on what is installed.

Those mode selectors might be useful for someone who would want to set the requested water temp statically without letting the heat pump calculate it.
Or for someone who would want to calculate the requested water temp in HA or other home automation system instead of relying on heat pump itself.
Nice to have feature, I would say, but could be definitely useful for someone.

sHedC commented

I would rather not expose unless there is a specific use case, just feel its easy to mess up your heatpump settings :)
Maybe if in future we could have restore points but not sure how you would do that in HASS.

These registers are effectively boolean, so nothing to backup/restore. You either set it to auto and let HP to use it's internal calculation for requested water temp. Or you switch it to manual and use separate register to set the requested temp.
The manual requested temp stays intact when you switch to auto so you can easily switch back to manual and have your last requested temp back.
So I really don't see any danger exposing these. Just the use-case is probably niche, so no reason spending time on this in current stage of development...

sHedC commented

@johny-mnemonic
Looking into the PAD settings, as I can't test any of this:

HC1 - I have set in the system

"hc1": {
    "enabled": [Special(bool, Special.FIXED), False],
    "name": [
        Special(str, Special.NAMEARRAY),
        ["I_211", "I_212", "I_213", "I_214", "I_215", "I_216"],
    ],
    "on": [bool, "D_212"],
    "cooling": [bool, "D_213"],
    "circulation_valve": [bool, "D_68"],
    "water_temp": [float, "A_90"],
    "water_requested": [float, "A_96"],
    "auto": [int, "I_269"],
    "ambient_requested": [
        Special(float, Special.FORMULA),
        [
            "{1} if {0} else {2}",
            [[bool, "D_245"], [float, "A_219"], [float, "A_215"]],
        ],
    ],
    "ambient_temp": [float, "A_216"],
    "pad": {
        "enabled": [bool, "D_245"],
        "state": [int, "I_15"],  # 0 - Permanently Off, 1 - Scheduled Off, 2 - On
        "current_humidity": [float, "I_219"],
    },
    "control_curve_heating": {
        "setpoint_a_outside": [float, "A_101"],
        "setpoint_a_requested": [float, "A_106"],
        "setpoint_b_outside": [float, "A_102"],
        "setpoint_b_requested": [float, "A_107"],
    },
    "control_curve_cooling": {
        "setpoint_a_outside": [float, "A_314"],
        "setpoint_a_requested": [float, "A_315"],
        "setpoint_b_outside": [float, "A_316"],
        "setpoint_b_requested": [float, "A_317"],
    },
},

And what is writeable is:

"hc1": {
    "on": [bool, "D_212"],
    "ambient_requested": [
        Special(float, Special.FORMULA),
        [
            "'A_219' if {0} else 'A_215'",
            [[bool, "D_245"]],
        ],
    ],
    "control_curve_heating": {
        "setpoint_a_outside": [float, "A_101"],
        "setpoint_a_requested": [float, "A_106"],
        "setpoint_b_outside": [float, "A_102"],
        "setpoint_b_requested": [float, "A_107"],
    },
    "control_curve_cooling": {
        "setpoint_a_outside": [float, "A_314"],
        "setpoint_a_requested": [float, "A_315"],
        "setpoint_b_outside": [float, "A_316"],
        "setpoint_b_requested": [float, "A_317"],
    },
},

I would like to change state: I_15 to on and make it writeable but would it work, can you test with the alpha of masterthermconnct 2.0.0

masterthermconnect set --user xxxx --password --api-ver <v1 or v2> reg <module> <unit> I_15 <0,1 or 2>

I guess @SeBsZ could find the same On setting for Pad on HC0, but we would need someone with HC2 onwards to find the rest as everything is ZERO, I am guessing its in the range around I_15 but mostly the registry usage make little sense.

I do see the ability to set schedules and sleep times not sure if there is a reason to add, as you could disable them and just control the temp from HASS using ambient_requested and on/ off. These yet or what the settings are:

  • Sleep Time - Remaining time of the pAD sleep.
  • Setpoint Sleep - Room Temperature Setpoint for pAD sleep function
  • Pad Clock
  • Enable Scheduler
  • Mon-Fri Time and Set
  • Sat-Sun Time and Set

You mentioned some other stuff on the PAD you see like winter/ summer. I checked these are set from the main pump so just copied for displaying on the PAD.

For the Other Items for water temp I will leave unless there is a use case. I think most of what we would want to do in HASS is there now or we have an issue for.

@sHedC Seems like it works as in OP

pAD ON/OFF
"I_15": "2" -  ON
"I_15": "1" -  OFF
"I_15": "0" - permanently OFF

When set to 0 using API, main control unit says just OFF. But there is also option "permanently OFF" on the main control unit which is also shown as 0 on the API 🤷‍♂️
So I would say better to just use 2 and 1 from the integration.

My pAD is not showing time or any of those advanced options you mention so either these are disabled or there are better pAD models which do have these functions.
It has physical button with clock symbol but it basically does nothing. The clock button just shows clock symbol on the display, but I can't do anything with it. It's similar with the button with a humidity symbol. That one doesn't do anything at all. And the mode button just changes between summer and winter, while using the main control unit I can set the pAD to auto and other states.
So seems mine is dumbed down somehow...

The states I can set from main control unit for the pAD are summer/winter/auto/none/dehumidification/humidification and they are definitely not in sync with the HPs own season state. No clue what these are for.

sHedC commented

@johny-mnemonic - Thanks so yes as I read in the technical manual the main heatpump controls the season settings.

Can you check if you do a permanently OFF on the PAD whether any other settings change? There could be a registry that links to pAD1 enable scheduler, there is a variable for it. Maybe the permanently OFF also sets this to disabled?

@sHedC I tried comparing the output but I don't see any other register changing predictably with the "I_15". Sorry

sHedC commented

@johny-mnemonic
Ok done some testing on one of the PADs I don't use just in case:

  • Set pad on/off on the main control (heat pump) from perm off to on. These are the only two options. In this case the setting is 2.
  • set the reg to 1 - off (scheduled off). The control on the pump showed off
  • set the reg back to 0 - perm off, the control on the pump showed perm off.

So working at least if you view it on the terminal on the outside of the pump itself.

Happy to expose it but if going to the HVAC mode this allows the following

  • OFF - device is turned off (could be Perm Off)
  • HEAT
  • COOL
  • HEAT_COOL
  • AUTO
  • DRY - Not use
  • FAN_ONLY - Not Use

now the options in the manual for the pad are:

  1. PAD On/ Off - Permanent Off, Off and On
  2. PAD Mode - Winter/ Summer - it says for the PAD 11 to 16 this setting has no effect and takes the mode from the main function relating to cooling/ heating
  3. Scheduling - There is a scheduler but seems you can only access this if you have a terminal on the pump and advanced access but basically gives you the same control you can do from HASS

That is it, so maybe we have this enabled (if you have pad enabled) and allow HVAC MODES

  1. OFF - Perm Off
  2. AUTO - On

what is your registry set to , should be I_15 for Pad 11 (HC1) and I_16 for Pad 1 (HC0).

Also Schedule Enabled is D_243 for Pad 11 and D_241 for Pad1

Your findings corresponds with what I see on the main control unit for my pAD I would say.

  1. I have I_15 = 2 when pAD is ON and I_15 = 0 when pAD is OFF. I_16 is always zero.
  2. Yep, the pAD mode is not used at all. I had mine set to none before I started playing with this HA integration...
  3. Setting D_243 = 1 seems to do the same thing as pressing the button with a clock icon on the pAD. There appears a clock symbol in the bottom left corner of the display and above it is number 2. No clue what to do with that and whether it has any effect. At least we know this register works according to manual :-)

Would be nice to use the HVAC mode on the climate entity for something useful if we can't get rid of it but no clue what to put there :-)

sHedC commented

Your findings corresponds with what I see on the main control unit for my pAD I would say.

1. I have `I_15 = 2` when pAD is ON and  `I_15 = 0` when pAD is OFF. I_16 is always zero.

2. Yep, the pAD mode is not used at all. I had mine set to `none` before I started playing with this HA integration...

3. Setting `D_243 = 1` seems to do the same thing as pressing the button with a clock icon on the pAD. There appears a clock symbol in the bottom left corner of the display and above it is number `2`. No clue what to do with that and whether it has any effect. At least we know this register works according to manual :-)

Would be nice to use the HVAC mode on the climate entity for something useful if we can't get rid of it but no clue what to put there :-)

Added an initial HVAC mode to do Auto and off to turn the Pad On/Off (Scheduled) or Perm Off.
Also added an operating mode and some additional error correction logic, API's should be more simple :)

D_243 enables the scheduler hence the clock which sets when the pad is on or off, there are some settings that define Mon to Fri time 1 and 2 and setpoint 1 and 2 plus some for sat sun/ its rudimentary scheduling and if enabled causes the scheduler to control the requested temp and on/ off.

I have no idea what the variables are can't seem to find them going to check my pump config see if I can find it from there, but I think maybe using HASS for scheduling and ignoring the scheduler is an option as its very basic.

sHedC commented

I have no idea about scheduling, its not available on my heat pump controls so can't see it. It must be settable on your touch control or main control somewhere otherwise why could you have a button to enable it :)

Should be under the Room Terminal options somewhere. Wonder if its hidden under the Advanced settings?

I have no touch control and no scheduling on main control unit, so I guess I have it also disabled.
The pAD has a button for it as some other HP might support it.

I would update your statement to "using HASS for scheduling and ignoring the scheduler is a way to go" ;-)

sHedC commented

I have no touch control and no scheduling on main control unit, so I guess I have it also disabled. The pAD has a button for it as some other HP might support it.

I would update your statement to "using HASS for scheduling and ignoring the scheduler is a way to go" ;-)

Agreed, can you test HVAC mode on the latest beta it should allow turning on / off the pad I_15 also that should handle errors.

sHedC commented

So for D_29 - SHW On/Off, some strange findings but here:

my system - HC1 and HC2 are set for Hot water, D_29 is on.

  • If I increase the DHW above the water temp of HC1 then Hot water comes on
  • if I set D_29 to 0 and increase DHW hot water does not come on
  • Regardless of D_29 if HC1 or HC2 request hot water Hot water comes on.

Demo old system:

  • Solar is on permanently and D_29 is 0 so no idea if its set by the solar or manually disabled. I wonder if you use Solar feature and then disable D_29 so solar controls it, same as my system where I can disable D_29 because HC1 and HC2 control hot water.

Demo new system

  • D_29 does work and enabled it sets DHW. I think HC1 is set for the hot water. And also HC1 seems to trigger hot water request too.

But it does seem D_29 can be used to disable DHW for systems that use DHW, have no way of really testing what Solar does to the value at all.

Q: Shall I make D_29 available and settable as a switch?

sHedC commented

Added the things we want for this and released 2.1.0 Beta 2 ready for final release once we identify the remaining connection issues.