Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support HitachiAirToAirHeatPump (hlrrwifi:HLinkMainController) in Overkiz integration #85781

Closed
Chris-NL opened this issue Jan 12, 2023 · 73 comments · Fixed by #103803 or #102159
Closed

Comments

@Chris-NL
Copy link

The problem

I'm using the overkiz integration to integrate my Somfy Tahoma Pro box (firmware 2018.24.4.7). This has 2 positionable horizontal awnings, 2 sensors and 4 split unit air conditioners of Hitachi connected to it.

The overkiz integration adds the airco units as HitachiAirToAirHeatPump devices, but I only see one disabled entity for each airco (button.airco_1_start_identify). I can't seem to use them on any of the dashboard or automations.

I'm not sure if I'm doing something wrong, maybe there is a solution for the problem.

What version of Home Assistant Core has the issue?

2023.1.2

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

overkiz

Link to integration documentation on our website

https://www.home-assistant.io/integrations/overkiz

Diagnostics information

config_entry-overkiz-9a960f4ff17ee791f14ce8da40a9d67d.json.txt

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

@home-assistant
Copy link

Hey there @iMicknl, @vlebourl, @tetienne, @nyroDev, mind taking a look at this issue as it has been labeled with an integration (overkiz) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of overkiz can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Change the title of the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign overkiz Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


overkiz documentation
overkiz source
(message by IssueLinks)

@iMicknl
Copy link
Contributor

iMicknl commented Jan 30, 2023

You have a very complex device unfortunately. I started porting the device a while ago (#81743), but wasn't able to test and finish it yet.

@iMicknl
Copy link
Contributor

iMicknl commented Feb 26, 2023

@home-assistant rename Support HitachiAirToAirHeatPump (hlrrwifi:HLinkMainController) in Overkiz integration

@home-assistant home-assistant bot changed the title Hitachi airco's connected to Somfy Tahoma Pro Box have no entities Support HitachiAirToAirHeatPump (hlrrwifi:HLinkMainController) in Overkiz integration Feb 26, 2023
@chabou-san
Copy link

Woot, just found out about this issue. I'm still using the custom_component ha-tahoma (deprecated as I saw the recent notice) just because I need this support, so I look forward to see it merged. Keep up the good work, thank you @iMicknl :).
If you ever need help testing since I have the necessary setup and devices, I may help you (but you might need to guide into how to do it). ;)

@iMicknl
Copy link
Contributor

iMicknl commented Mar 1, 2023

OVP

{
	"typeId": 1099513069579,
	"subsystemId": 0,
	"localPairing": true,
	"commands": [{
			"commandName": "getName",
			"description": "Refresh the device internal name\n",
			"nparams": 0
		},
		{
			"commandName": "identify",
			"description": "Ask the device to identify itself by doing a slight movement or blink or beep\n",
			"nparams": 0
		},
		{
			"commandName": "setAutoManu",
			"prototype": {
				"parameters": [{
					"optional": false,
					"sensitive": false,
					"valuePrototypes": [{
						"type": "STRING",
						"enumValues": [
							"auto",
							"manu"
						],
						"description": "string value (auto, manu)"
					}]
				}]
			},
			"description": "Set device mode to auto or manual mode\n",
			"nparams": 1
		},
		{
			"commandName": "setHolidays",
			"prototype": {
				"parameters": [{
					"optional": false,
					"sensitive": false,
					"valuePrototypes": [{
						"type": "STRING",
						"enumValues": [
							"off",
							"on"
						],
						"description": "string value (off, on)"
					}]
				}]
			},
			"description": "Set holidays mode\n",
			"nparams": 1
		},
		{
			"commandName": "setName",
			"prototype": {
				"parameters": [{
					"optional": false,
					"sensitive": false,
					"valuePrototypes": [{
						"type": "STRING",
						"description": "string value"
					}]
				}]
			},
			"description": "Change the device internal name. Name length may be subject to restrictions depending on the device and underlying protocol.\n",
			"nparams": 1
		},
		{
			"commandName": "globalControl",
			"prototype": {
				"parameters": [{
						"optional": false,
						"sensitive": false,
						"valuePrototypes": [{
								"type": "STRING",
								"enumValues": [
									"On",
									"Off"
								],
								"description": "string value (On, Off)"
							},
							{
								"type": "STRING",
								"enumValues": [
									"off",
									"on"
								],
								"description": "string value (off, on)"
							}
						]
					},
					{
						"optional": false,
						"sensitive": false,
						"valuePrototypes": [{
							"type": "INT",
							"description": "integer value"
						}]
					},
					{
						"optional": false,
						"sensitive": false,
						"valuePrototypes": [{
							"type": "STRING",
							"enumValues": [
								"auto",
								"hi",
								"med",
								"lo",
								"silent"
							],
							"description": "string value (auto, hi, med, lo, silent)"
						}]
					},
					{
						"optional": false,
						"sensitive": false,
						"valuePrototypes": [{
							"type": "STRING",
							"enumValues": [
								"auto",
								"heating",
								"dehumidify",
								"cooling",
								"fan",
								"circulator"
							],
							"description": "string value (auto, heating, dehumidify, cooling, fan, circulator)"
						}]
					},
					{
						"optional": true,
						"sensitive": false,
						"valuePrototypes": [{
							"type": "STRING",
							"enumValues": [
								"timer",
								"manu",
								"holidays"
							],
							"description": "string value (timer, manu, holidays)"
						}]
					}
				]
			},
			"description": "Manage device\n",
			"nparams": 5
		},
		{
			"commandName": "setMainOperation",
			"prototype": {
				"parameters": [{
					"optional": false,
					"sensitive": false,
					"valuePrototypes": [{
							"type": "STRING",
							"enumValues": [
								"On",
								"Off"
							],
							"description": "string value (On, Off)"
						},
						{
							"type": "STRING",
							"enumValues": [
								"off",
								"on"
							],
							"description": "string value (off, on)"
						}
					]
				}]
			},
			"description": "Set device main operating mode\n",
			"nparams": 1
		}
	],
	"states": [{
			"name": "AutoManuModeState",
			"type": "DiscreteState",
			"eventBased": false,
			"persistent": false
		},
		{
			"name": "HolidaysModeState",
			"type": "DiscreteState",
			"eventBased": false,
			"persistent": false
		},
		{
			"name": "NameState",
			"type": "DataState",
			"eventBased": false,
			"persistent": false
		},
		{
			"name": "StatusState",
			"type": "DiscreteState",
			"eventBased": false,
			"persistent": false
		},
		{
			"name": "TargetTemperatureState",
			"type": "ContinuousState",
			"eventBased": false,
			"persistent": false,
			"prototype": {
				"valuePrototypes": [{
					"type": "FLOAT",
					"minValue": 12.0,
					"maxValue": 30.0,
					"description": "float value between 12.0 and 30.0"
				}]
			}
		},
		{
			"name": "DiagnosticCodeState",
			"type": "DataState",
			"eventBased": false,
			"persistent": false
		},
		{
			"name": "FanSpeedState",
			"type": "DiscreteState",
			"eventBased": false,
			"persistent": false
		},
		{
			"name": "FilterConditionState",
			"type": "DiscreteState",
			"eventBased": false,
			"persistent": false
		},
		{
			"name": "FilterResetState",
			"type": "DiscreteState",
			"eventBased": false,
			"persistent": false
		},
		{
			"name": "HLinkVirtualOperatingModeState",
			"type": "DiscreteState",
			"eventBased": false,
			"persistent": true
		},
		{
			"name": "MainOperationState",
			"type": "DiscreteState",
			"eventBased": false,
			"persistent": false
		},
		{
			"name": "ModeChangeState",
			"type": "DiscreteState",
			"eventBased": false,
			"persistent": false
		},
		{
			"name": "OutdoorTemperatureState",
			"type": "ContinuousState",
			"eventBased": false,
			"persistent": false
		},
		{
			"name": "RemoconControlState",
			"type": "DiscreteState",
			"eventBased": false,
			"persistent": false
		},
		{
			"name": "RoomTemperatureState",
			"type": "ContinuousState",
			"eventBased": false,
			"persistent": false
		},
		{
			"name": "TemperatureChangeState",
			"type": "ContinuousState",
			"eventBased": false,
			"persistent": false
		},
		{
			"name": "ThermoStatusState",
			"type": "DiscreteState",
			"eventBased": false,
			"persistent": false
		}
	],
	"controllableName": "ovp:HLinkMainController",
	"uiClass": "HitachiHeatingSystem",
	"uiProfiles": [
		"ThermostatTargetReader"
	],
	"uiWidget": "HitachiAirToAirHeatPump",
	"controllableType": "ACTUATOR",
	"protocolType": "OVP"
}

HLRRWIFI

{
  "allResult": true,
  "devicesTypes": [
    {
      "typeId": 655360,
      "subsystemId": 0,
      "localPairing": false,
      "commands": [
        {
          "commandName": "globalControl",
          "prototype": {
            "parameters": [
              {
                "optional": false,
                "sensitive": false,
                "valuePrototypes": [
                  {
                    "type": "STRING",
                    "enumValues": [
                      "off",
                      "on"
                    ],
                    "description": "string value (off, on)"
                  }
                ]
              },
              {
                "optional": false,
                "sensitive": false,
                "valuePrototypes": [
                  {
                    "type": "INT",
                    "description": "integer value"
                  }
                ]
              },
              {
                "optional": false,
                "sensitive": false,
                "valuePrototypes": [
                  {
                    "type": "STRING",
                    "enumValues": [
                      "auto",
                      "high",
                      "low",
                      "medium",
                      "silent"
                    ],
                    "description": "string value (auto, high, low, medium, silent)"
                  }
                ]
              },
              {
                "optional": false,
                "sensitive": false,
                "valuePrototypes": [
                  {
                    "type": "STRING",
                    "enumValues": [
                      "auto",
                      "circulator",
                      "cooling",
                      "dehumidify",
                      "fan",
                      "heating"
                    ],
                    "description": "string value (auto, circulator, cooling, dehumidify, fan, heating)"
                  }
                ]
              },
              {
                "optional": false,
                "sensitive": false,
                "valuePrototypes": [
                  {
                    "type": "STRING",
                    "enumValues": [
                      "both",
                      "horizontal",
                      "stop",
                      "vertical"
                    ],
                    "description": "string value (both, horizontal, stop, vertical)"
                  }
                ]
              },
              {
                "optional": false,
                "sensitive": false,
                "valuePrototypes": [
                  {
                    "type": "STRING",
                    "enumValues": [
                      "off",
                      "on"
                    ],
                    "description": "string value (off, on)"
                  }
                ]
              }
            ]
          },
          "description": "p1: Main operation => on|off\np2: Temperature in Celsius\np3: Fan speed => auto|high|medium|low|silent\np4: Mode => auto|heating|dehumidify|cooling|fan|circulator|leaveHome\np5: Swing => stop|vertical|horizontal|both\np6: Leave home => on|off\n",
          "nparams": 6
        }
      ],
      "states": [
        {
          "name": "FilterConditionState",
          "type": "DiscreteState",
          "eventBased": false,
          "persistent": false
        },
        {
          "name": "ProductModelNameState",
          "type": "DataState",
          "eventBased": false,
          "persistent": false
        },
        {
          "name": "RSSILevelState",
          "type": "ContinuousState",
          "eventBased": false,
          "persistent": false
        },
        {
          "name": "TargetTemperatureState",
          "type": "ContinuousState",
          "eventBased": false,
          "persistent": false,
          "prototype": {
            "valuePrototypes": [
              {
                "type": "FLOAT",
                "minValue": 12,
                "maxValue": 30,
                "description": "float value between 12.0 and 30.0"
              }
            ]
          }
        },
        {
          "name": "DiagnosticCodeState",
          "type": "DataState",
          "eventBased": false,
          "persistent": false
        },
        {
          "name": "FanSpeedState",
          "type": "DiscreteState",
          "eventBased": false,
          "persistent": false
        },
        {
          "name": "LeaveHomeState",
          "type": "DiscreteState",
          "eventBased": false,
          "persistent": false
        },
        {
          "name": "MainOperationState",
          "type": "DiscreteState",
          "eventBased": false,
          "persistent": false
        },
        {
          "name": "ModeChangeState",
          "type": "DiscreteState",
          "eventBased": false,
          "persistent": false
        },
        {
          "name": "OutdoorTemperatureState",
          "type": "ContinuousState",
          "eventBased": false,
          "persistent": false
        },
        {
          "name": "RemoconControlState",
          "type": "DiscreteState",
          "eventBased": false,
          "persistent": false
        },
        {
          "name": "RoomTemperatureState",
          "type": "ContinuousState",
          "eventBased": false,
          "persistent": false
        },
        {
          "name": "SwingState",
          "type": "DiscreteState",
          "eventBased": false,
          "persistent": false
        },
        {
          "name": "TemperatureChangeState",
          "type": "ContinuousState",
          "eventBased": false,
          "persistent": false
        }
      ],
      "controllableName": "hlrrwifi:HLinkMainController",
      "uiClass": "HitachiHeatingSystem",
      "uiProfiles": [
        "ThermostatTargetReader"
      ],
      "uiWidget": "HitachiAirToAirHeatPump",
      "controllableType": "ACTUATOR",
      "protocolType": "HLRR_WIFI"
    },
    {
      "typeId": 8589934592,
      "subsystemId": 0,
      "localPairing": false,
      "commands": [
        {
          "commandName": "getName",
          "description": "Refresh the device internal name\n",
          "nparams": 0
        },
        {
          "commandName": "setName",
          "prototype": {
            "parameters": [
              {
                "optional": false,
                "sensitive": false,
                "valuePrototypes": [
                  {
                    "type": "STRING",
                    "description": "string value"
                  }
                ]
              }
            ]
          },
          "description": "Change the device internal name. Name length may be subject to restrictions depending on the device and underlying protocol.\n",
          "nparams": 1
        }
      ],
      "states": [
        {
          "name": "LocalModeState",
          "type": "DiscreteState",
          "eventBased": false,
          "persistent": false
        },
        {
          "name": "NameState",
          "type": "DataState",
          "eventBased": false,
          "persistent": false
        }
      ],
      "controllableName": "hlrrwifi:HLRRWifiBridge",
      "uiClass": "ProtocolGateway",
      "uiProfiles": [
        "Specific"
      ],
      "uiWidget": "HLRRWifiBridge",
      "controllableType": "PROTOCOL_GATEWAY",
      "protocolType": "HLRR_WIFI"
    }
  ]
}

@Chris-NL
Copy link
Author

Chris-NL commented Apr 9, 2023

Hi Mick,

What is the status of this change? When can I start using it?

Best regards,

Chris

@iMicknl
Copy link
Contributor

iMicknl commented Apr 9, 2023

@Chris-NL no ETA. I currently don't have time.

@Chris-NL
Copy link
Author

Chris-NL commented Apr 9, 2023

Ok, no worries. I'll wait. Thanks for the support.

@iMicknl
Copy link
Contributor

iMicknl commented May 21, 2023

@chabou-san which device do you own? I am looking for users of the hlrrwifi:HLinkMainController, not the OVP version.

@chabou-san
Copy link

I believe I have the HLRR version. How can I be sure ?

@iMicknl
Copy link
Contributor

iMicknl commented May 21, 2023

@chabou-san on your device page, it should list 'hardware'. You can there also download your diagnostics.

@chabou-san
Copy link

chabou-san commented May 21, 2023

@iMicknl Thanks for the info, I can confirm that I have Hardware: hlrrwifi:HLinkMainController.

@iMicknl
Copy link
Contributor

iMicknl commented Jul 4, 2023

Do we have anyone here with the ovp hardware version?

@Chris-NL, do you want to help testing some stuff?

@Manu0742
Copy link

Manu0742 commented Aug 3, 2023

Do we have anyone here with the ovp hardware version?

@Chris-NL, do you want to help testing some stuff?

Hi there, I have 4 units with hardware name "ovp:HLinkMainController"

@iMicknl
Copy link
Contributor

iMicknl commented Aug 6, 2023

@Manu0742 / @rbrackel are you on Discord by any chance? Or do you know how to run a dev version of Home Assistant? This PR #95706 has changes for your device.

@Chris-NL
Copy link
Author

Chris-NL commented Aug 6, 2023

Hi iMicknl,

I have a test-instance of HA where I can install something like this. Can you please tell me the steps on how to download and install your testversion in my test-instance?

P.S. I don't use discord.

@iMicknl
Copy link
Contributor

iMicknl commented Aug 6, 2023

Perhaps you can use https://github.com/alandtse/pr_custom_component (see instructions) and use https://github.com/home-assistant/core/pull/95706 as the link.

@Chris-NL
Copy link
Author

Chris-NL commented Aug 6, 2023

I've installed the PR Custom Component and added an integration with the PR link. I can't seem to find where it asks me for my Tahoma username and password, only configuration items are Binary Sensor enabled, Sensor enabled and Switch enabled. Am I missing something?

@iMicknl
Copy link
Contributor

iMicknl commented Aug 6, 2023

@Chris-NL, if you remove your current Overkiz entry, you should be able add a new one which is called something like custom Overkiz.

I haven't used this method myself, but many other did use this with success.

@Chris-NL
Copy link
Author

Chris-NL commented Aug 6, 2023

That was the last step was missing. Thanks it works. I can also now see the airco's with all options. But clicking on one of the options (eg. cooling icon for example) gives me the following message:
"Kan service climate/set_hvac_mode niet aanroepen. {'errorCode': 'INCOMPATIBLE_VALUE', 'error': 'globalControl() : Invalid value for command parameter p5 : expected (optional) string value (timer, manu, holidays) but got stop (String)'}"

@iMicknl
Copy link
Contributor

iMicknl commented Aug 7, 2023

@dotvav FYI

@dotvav
Copy link
Contributor

dotvav commented Aug 7, 2023

Great, thanks for testing this. I will look into that error it this week. Could you download the logs of the component and share?

@Chris-NL
Copy link
Author

Chris-NL commented Aug 7, 2023

config_entry-overkiz-89823676d993f69d576c3e9340ae1ec4.json.txt

Attached file contains the downloaded diagnostics of the "Custom Overkiz PR#95706" integration.

@dotvav
Copy link
Contributor

dotvav commented Aug 12, 2023

The error message is confusing:

  1. What we pass to globalControl as param 5 is the swing mode, but the API seems to be expecting hvac_mode
  2. According to the diagnostic file, there are no states that expect (timer, manu, holidays).

Testing with my device I find that API error responses are not reliable: when an unexpected value is passed to one of the parameters, the API may complain about another parameter which was correct. So I am not too worried about point 1. Point 2 might similarly be a bad error reporting from the remote API.

@Chris-NL when you operate your AC unit from the remote controller or mobile app, do you see the state change in HomeAssistant? Can you put it on and, then, test the HomeAssistantcontrols one by one until you find which one is having a bug? Otherwise, what may help is if you use the hi-kumo web app and record the network traffic with your browser's developer tools so I can compare it with what HomeAssistant is producing.

@Chris-NL
Copy link
Author

Hi Dotvav,

Thanks for your investigation. I did some tests as you requested. All changes to the AC with the remote are reflected in HomeAssistant except for the Auto mode (the one I onle use ;)). Trying to change something to the AC via HomeAssistant at any stage gives me the same error message (or at least they look the same).

I don't have the hi-kumo app. I'm using these AC's on the Somfy Tahoma box with the Somfy App.

Hope this helps. Let me know if I need to test more.

@dotvav
Copy link
Contributor

dotvav commented Aug 12, 2023

OK, that's helpful. Comparing your diagnostic and mine is showing something that is aligned with what you say. It looks like the operation mode on the OVP protocol (your device) has one less possible value than on the HLLRWIFI (my device) and the ones in common have slightly different spellings.

OVP:

              {
                "type": "DiscreteState",
                "values": [
                  "auto cooling",
                  "auto heating",
                  "circulator",
                  "cooling",
                  "dehumidify",
                  "fan",
                  "heating"
                ],
                "qualifiedName": "ovp:ModeChangeState"
              }

HLLRWIFI:

              {
                "type": "DiscreteState",
                "values": [
                  "auto",
                  "autoCooling",
                  "autoHeating",
                  "circulator",
                  "cooling",
                  "dehumidify",
                  "fan",
                  "heating"
                ],
                "qualifiedName": "hlrrwifi:ModeChangeState"
OVP HLLRWIFI
"auto"
"auto cooling" "autoCooling"
"auto heating" "autoHeating"
"circulator" "circulator"
"cooling" "cooling"
"dehumidify" "dehumidify"
"fan" "fan"
"heating" "heating"

I am going to double check the rest of the parameters and then I'll update the CR in the coming days. I will need you to test again when I am done.

@Chris-NL
Copy link
Author

There are a lot of options on the device, most of them I don't really use. So I've seen that the Somfy App for the Tahoma Box that currently drives the Airco units do have a Timer and Holiday function, but they don't seem to work. The remote (Hitachi RAR-6N2) is very complex (see pictures on https://nl.aliexpress.com/item/32813227923.html) and we only use them to turn airco on (on auto mode at certain temperature) of off again. In winter sometimes on heating mode.

So to answer your questions:

  1. I can select swing mode. It basically sets the flap in fron of the blower to move up and down or fixes it at a certain point. So this only works vertically, there doesn't seem to be a horizontal mode
  2. I can't seem to get the holiday mode working (or don't know how). It also not in this manual: https://www.manualslib.com/manual/2109912/Hitachi-Rar-6ne2.html?page=20#manual (not 100% correct remote number, but it looks damn the same ;)

Maybe an option to leave the holidays function out of it? What should that do anyway? Any logic related to holiday would come from HA right? Just as the timer. Als long as I can turn the units on and off, set the mode,, set the temperature, maybe also control the swing and strength of the blower I have all I need.

Hope this helps.

@dotvav
Copy link
Contributor

dotvav commented Sep 16, 2023

It does help. Though, Hitachi/Overkiz have made things extremely confusing.

I've got pretty much the same remote controller. It has 2 swing mode buttons, 1 for horizontal and 1 for vertical. If your unit does only vertical, then I wonder what the horizontal button does. Also, your diagnostic file says nothing about swing mode.

If you enable the swing mode, does it reflect on HomeAssistant?

@Chris-NL
Copy link
Author

See below a photo of my remote. I only have a swing button. The unit does have something to direct the air horizontal, but that seems to be fixed inside the airco. Don't see any option to change the horizontal airflow.

Don't see the swing reflected in HA when I turn it on or off. These are the attributes according to HA (dont know what supported_features: 25 mean)
image

This is a photo of my remote.
image

@dotvav
Copy link
Contributor

dotvav commented Sep 17, 2023

Hi @Chris-NL, I feel like I have a fix. If it works, the code will probably need a clean-up before it is merged into HomeAssistant, but at least we will know. Feel free to refresh the PR again and test whenever. Thanks.

@Chris-NL
Copy link
Author

There's some serious improvement! Hopefully we're getting closer each time :)

When I clicked the auto mode button I got the error (I included the details from the log below):
[140240945708224] {'errorCode': 'UNSPECIFIED_ERROR', 'error': 'Managed action group is invalid : When setting auto ModeChangeState, TemperatureChangeState should be an integer, included in [-5;5]'}

But clicking on cooling, dehumidify, fans, heat or off all work now. I also tested the fan speed: also works. There's also a function called "preset" with the values none or holiday mode. I can select holiday mode and I can also see a change in the Somfy app. I turned it on while the airco was cooling, nothing else happened, so I don't know what this function does.

So if you could get the auto mode to work I think we're there.

One other minor thing I wanted to mention is the screenshot below. Don't know if it has anything to do with testing, but the labels for the fields are some placeholders:
image

From the logs:
Logger: homeassistant.components.websocket_api.http.connection
Source: custom_components/overkiz/executor.py:91
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 09:10:29 (3 occurrences)
Last logged: 09:18:19

[140240945708224] {'errorCode': 'UNSPECIFIED_ERROR', 'error': 'Managed action group is invalid : When setting auto ModeChangeState, TemperatureChangeState should be an integer, included in [-5;5]'}
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 227, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1969, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2006, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 235, in handle_service
return await service.entity_service_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 870, in entity_service_call
response_data = await _handle_entity_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 942, in _handle_entity_call
result = await task
^^^^^^^^^^
File "/config/custom_components/overkiz/climate_entities/hitachi_air_to_air_heat_pump.py", line 210, in async_set_hvac_mode
await self._global_control(
File "/config/custom_components/overkiz/climate_entities/hitachi_air_to_air_heat_pump.py", line 449, in _global_control
await self._global_control_ovp(
File "/config/custom_components/overkiz/climate_entities/hitachi_air_to_air_heat_pump.py", line 373, in _global_control_ovp
await self.executor.async_execute_command(
File "/config/custom_components/overkiz/executor.py", line 91, in async_execute_command
exec_id = await self.coordinator.client.execute_command(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/backoff/_async.py", line 151, in retry
ret = await target(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/backoff/_async.py", line 151, in retry
ret = await target(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pyoverkiz/client.py", line 620, in execute_command
response: str = await self.execute_commands(device_url, [command], label)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/backoff/_async.py", line 151, in retry
ret = await target(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pyoverkiz/client.py", line 648, in execute_commands
response: dict = await self.__post("exec/apply", payload)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pyoverkiz/client.py", line 789, in __post
await self.check_response(response)
File "/usr/local/lib/python3.11/site-packages/pyoverkiz/client.py", line 899, in check_response
raise OverkizException(result)
pyoverkiz.exceptions.OverkizException: {'errorCode': 'UNSPECIFIED_ERROR', 'error': 'Managed action group is invalid : When setting auto ModeChangeState, TemperatureChangeState should be an integer, included in [-5;5]'}

@dotvav
Copy link
Contributor

dotvav commented Sep 17, 2023

It is encouraging and enraging at the same time. It looks like one of the parameters is the "target tempereature" in most of the modes, but when you swith to auto, this parameter becomes "temperature change" and needs to be an integer between -5 and +5. Do you have any idea what this value range could mean, is there any operation property that you can set to something beween -5 and +5?

I think I can find a way to keep the current operating "temperature change" hidden, but I wonder if this is something that can/should be controllable in HomeAssistant.

@chabou-san
Copy link

I know I'm kind of intervening from nowhere but I'm actually following actively this PR. :)

This "temperature change" range kind of makes sense regarding the behaviour we're getting from the remote controller @Chris-NL mentioned (that I also have).
When using the "auto" mode, the system automatically target a temperature (I believe its 23°C, as seen as the target temperature from hi-kumo.com website), but I'm actually surprised by the range, as from the hi-kumo webapp, you can only change within 22 - 28°C (so the range is [-1;5]).

As a side note at home, I have 2 kind of remotes :

  • the newer ones are those @Chris-NL also have, for newer units.
  • older ones (not connected, but interesting to understand things here, for older units) : and from those remotes, the auto mode doesn't inform me which target temperature is set, but I can change with a range of [-3;3].

So I guess the behaviour you seem to try to understand is based on old devices from Hitachi where the range was different.

Regarding your last question, I have my opinion on this, but I'm not one to decide : HomeAssistant may not have to mimic exactly the behaviour of the devices it controls.

@dotvav
Copy link
Contributor

dotvav commented Sep 17, 2023

Excellent @chabou-san. Thanks for commenting, that helps a lot.

I have just pushed an update that may (or may not) fix the issue. I am curious what HomeAssistant is going to show in the temperature gauge in case it works 🤞

@Chris-NL
Copy link
Author

When I look at the Somfy App, there is a difference in temperature range between the auto mode and the other modes.

The auto mode allows me to select a temperature between 22 and 28 degrees. The other modes (except fans only mode, no range there) have a range between 16 and 32. Hope this helps.

What I also don't understand in the Auto mode is this: let's say the room temp is around 23 degrees and I want to cool it around this temperature. It could happen that the Airco switches itself into heating. I can turn the temperature down, but the airco doesn't switch from heating to cooling (only indicator for me when this happens is that the Somfy App shows me a red dot instead of a darkblue dot). To resolve this issue I have to switch the airco off. Set a lower desired temperature (21 degrees for example), turn is back on in auto mode and increase the temp back to 23. I think this defeats the whole idea of auto function, but apparently this is how Hitachi designed it. And it's even worse if another one of the split units is still on, then I have to turn them all of first to switch the unit from heating to cooling. But I'm so used to set it to auto, don't know why though :)

For your update. Still doesn't work. No functional change, still an error on the Auto function. The logs give me:
Logger: homeassistant.components.websocket_api.http.connection
Source: custom_components/overkiz/executor.py:91
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 12:47:07 (1 occurrences)
Last logged: 12:47:07

[140620537931200] {'errorCode': 'UNSPECIFIED_ERROR', 'error': 'Managed action group is invalid : When setting auto ModeChangeState, TemperatureChangeState should be an integer, included in [-5;5]'}
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 227, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1969, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2006, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 235, in handle_service
return await service.entity_service_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 870, in entity_service_call
response_data = await _handle_entity_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 942, in _handle_entity_call
result = await task
^^^^^^^^^^
File "/config/custom_components/overkiz/climate_entities/hitachi_air_to_air_heat_pump.py", line 210, in async_set_hvac_mode
await self._global_control(
File "/config/custom_components/overkiz/climate_entities/hitachi_air_to_air_heat_pump.py", line 449, in _global_control
await self._global_control_ovp(
File "/config/custom_components/overkiz/climate_entities/hitachi_air_to_air_heat_pump.py", line 373, in _global_control_ovp
await self.executor.async_execute_command(
File "/config/custom_components/overkiz/executor.py", line 91, in async_execute_command
exec_id = await self.coordinator.client.execute_command(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/backoff/_async.py", line 151, in retry
ret = await target(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/backoff/_async.py", line 151, in retry
ret = await target(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pyoverkiz/client.py", line 620, in execute_command
response: str = await self.execute_commands(device_url, [command], label)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/backoff/_async.py", line 151, in retry
ret = await target(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pyoverkiz/client.py", line 648, in execute_commands
response: dict = await self.__post("exec/apply", payload)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pyoverkiz/client.py", line 789, in __post
await self.check_response(response)
File "/usr/local/lib/python3.11/site-packages/pyoverkiz/client.py", line 899, in check_response
raise OverkizException(result)
pyoverkiz.exceptions.OverkizException: {'errorCode': 'UNSPECIFIED_ERROR', 'error': 'Managed action group is invalid : When setting auto ModeChangeState, TemperatureChangeState should be an integer, included in [-5;5]'}

@dotvav
Copy link
Contributor

dotvav commented Sep 17, 2023

Apologies, I had not properly synced my change. You can try again now.

@Chris-NL
Copy link
Author

No luck, same status.

Logbook:
Logger: homeassistant.components.websocket_api.http.connection
Source: custom_components/overkiz/executor.py:91
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 17:10:00 (1 occurrences)
Last logged: 17:10:00

[140538794265408] {'errorCode': 'UNSPECIFIED_ERROR', 'error': 'Managed action group is invalid : When setting auto ModeChangeState, TemperatureChangeState should be an integer, included in [-5;5]'}
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 227, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1969, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2006, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 235, in handle_service
return await service.entity_service_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 870, in entity_service_call
response_data = await _handle_entity_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 942, in _handle_entity_call
result = await task
^^^^^^^^^^
File "/config/custom_components/overkiz/climate_entities/hitachi_air_to_air_heat_pump.py", line 211, in async_set_hvac_mode
await self._global_control(
File "/config/custom_components/overkiz/climate_entities/hitachi_air_to_air_heat_pump.py", line 465, in _global_control
await self._global_control_ovp(
File "/config/custom_components/overkiz/climate_entities/hitachi_air_to_air_heat_pump.py", line 389, in _global_control_ovp
await self.executor.async_execute_command(
File "/config/custom_components/overkiz/executor.py", line 91, in async_execute_command
exec_id = await self.coordinator.client.execute_command(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/backoff/_async.py", line 151, in retry
ret = await target(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/backoff/_async.py", line 151, in retry
ret = await target(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pyoverkiz/client.py", line 620, in execute_command
response: str = await self.execute_commands(device_url, [command], label)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/backoff/_async.py", line 151, in retry
ret = await target(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pyoverkiz/client.py", line 648, in execute_commands
response: dict = await self.__post("exec/apply", payload)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pyoverkiz/client.py", line 789, in __post
await self.check_response(response)
File "/usr/local/lib/python3.11/site-packages/pyoverkiz/client.py", line 899, in check_response
raise OverkizException(result)
pyoverkiz.exceptions.OverkizException: {'errorCode': 'UNSPECIFIED_ERROR', 'error': 'Managed action group is invalid : When setting auto ModeChangeState, TemperatureChangeState should be an integer, included in [-5;5]'}

@dotvav
Copy link
Contributor

dotvav commented Sep 17, 2023

OK. I am not able to debug this here. It would help if you (@Chris-NL or @chabou-san) could join the Discord server and/or ping me there (username dotvav). I can let you know how and what http traffic to capture with your browser and then share with me, and we can make a few tests. That would allow me to observe the real command parameters instead of trying to guess (and failing).

@chabou-san
Copy link

I could, but I’m on hlrr protocol, not ovp. So I can’t reproduce the errors @Chris-NL is having.

@dotvav
Copy link
Contributor

dotvav commented Sep 19, 2023

I could, but I’m on hlrr protocol, not ovp. So I can’t reproduce the errors @Chris-NL is having.

Alright. I have hlrr too and I can test my own devices. Don't hesitate to test yours too and let me know if you find any bug.

I have talked with @iMicknl and we think these 2 protocols are too different, after all, and they don't belong together in the same class file. It makes development and support unnecessarily complex. We can deliver support for hlrr earlier without clubbing it with ovp, and we can work on ovp support shortly. I'll keep this thread informed on the progress, but it might take some time (because I need to travel for work) and I don't think it will be done in time for the October release of HA.

@Chris-NL if Discord doesn't work for you, please let me know if there is a medium (instant messaging, bulletin board) where we can connect privately to share information that don't belong in this thread.

@Chris-NL
Copy link
Author

All sounds plausable.

I had to create an account with discord and I've send you a friendship invite through it last Sunday, no response yet. Not familiar with Discord, maybe I'm doing something wrong.

@dotvav
Copy link
Contributor

dotvav commented Sep 21, 2023

Updating this thread. @Chris-NL and I have made a lot of progress "offline". I think we have the protocol almost figured out, and a version of the component that doesn't crash. But it is still missing an important feature: changing the temperature in HA when the mode is AUTO. In particular, we might be able to figure out what the "pivot" temperature is on his device (seems to be 23), but I don't know if it is the same on all the (OVP) devices.

@dotvav
Copy link
Contributor

dotvav commented Oct 1, 2023

Hi @Chris-NL. When you have a moment, please test this integration again on your device and let me know if you find an issue.

@jkrasinger
Copy link

Hi, thank you to all which are actively working to solve or better, add some additional features to the "overkiz" implementation for HA.
Until now i am using the aasivak add-on, but as i prefer using the integrations in HomeAssistant i tried overkiz again and found, that it does not create a climate entry in HomeAssistant for my RAK-50PEDC. After finding this issue i tried again with the latest fix #95706 and, hurray, a climate entry was created successfully and is working for HLRR. Great.
As i can now compare "aasivak" with "overkiz" i found one interesting difference. if the heater is turned off and I change the target temperature, then the heater is also turned on in "overkiz", but not in "aasivak". In aasivak only the target temperature changes. @dotvav : Is this intentional, coincidence or a bug?

@dotvav
Copy link
Contributor

dotvav commented Oct 6, 2023

Thanks for the feedback @jkrasinger. The difference that you are observing is totally unintentional from my part. It is hard to tell right now if one option is better than the other, or if there are solid expectations. It makes me curious so I'll have a look and see if that could be the sign of a hidden bug.

Regarding the HA integration, I'd love to have it in the next release cycle. I'm pretty confident about HLRR so I'll try to get that out. OVP needs more work and if I don't finish it in the next few days, I will extract it from this PR and submit it again later when it works.

@jkrasinger
Copy link

@dotvav : Thank you for the quick reply. I am curious if the code will be implemented in the next release cycle, would be very nice, then I could remove the add-on again and use overkiz. As for the difference between overkiz and aasivak it would be good for me personally if the behavior was the same, but is not really important. I would then have to change a little code in my ESP32 remote control (via MQTT and HA) for the air conditioning. Thanks again for your work!

@dotvav
Copy link
Contributor

dotvav commented Oct 6, 2023

@jkrasinger I have found the root cause of the discrepancy. The code is a little bit more consistent with the fix, so it's a good thing.

@Chris-NL I have refactored the code and possibly elminated the bug you have encountered. Feel free to test again.

@jkrasinger
Copy link

@dotvav I agree with you that this is a good thing. But there is one more question to this behaviour: if the heater is off and i change the target-temperature, what (mode) will be switched on, the "heater", the "cooler" or the "dryer"? Is there a specification for this, is this depending on temperature (like any automatic state) or whatever? Do you have an answer? As i'm only using the heater and never the cooler this is of real interest for me. Thanks

@dotvav
Copy link
Contributor

dotvav commented Oct 7, 2023

Hi @jkrasinger, there is no specification. And there is no reason that the unit should change state (ON/OFF) or mode (cool, heat, dry...) when someone changes the target temperature. There was a bug in the overkiz integration that was forcing the unit to ON when one would change any other value. I have fixed it.

Now, there is a major difference between the way HA and Overkiz are managing climate entities. Overkiz allows the main operation state (ON/OFF) and the hvac mode (cool, heat, dry...) to be managed independently, while HA considers both a single sate (off, cool, heat, dry...). But that doesn't force us cut too many corners, and changes to the target temperature, fan speed or swing mode should not turn the unit ON anymore.

@jkrasinger
Copy link

Hi @dotvav thank you for the good news, sounds perfect. I will again take a closer look for me on the behavior with my ESP32 Box and my "pyscripts" 👍

@jkrasinger
Copy link

Hi @dotvav .... i just reloaded the integration with #95706 and now it behaves exactly as before with "aasivak". Thank you very much for the perfect and quick work and responses. Now i will wait for the release of this patch without any hurry. 👍 👍

@dotvav
Copy link
Contributor

dotvav commented Oct 16, 2023

Hi there,

The first PR, that will bring support for HLRRWIFI devices, is in review here: PR 95706. Hopefully, we manage to get it in the next release.

I have also been working on the OVP protocol on a separate branch: https://github.com/dotvav/home-assistant-core/tree/overkiz-hitachi-air-heat-pump-ovp . It still requires some testing, but I should be able to make another PR soon out of it.

@dotvav
Copy link
Contributor

dotvav commented Nov 1, 2023

Hi @Chris-NL, we spoke on Discord and thank you for the testing. For tracking purpose and for clarity, can you confirm if the OVP devices are working as expected with this PR #102159 ? If you have found some issues, can you summarize what the behavior is that you observe versus what you expect?

@github-actions github-actions bot locked and limited conversation to collaborators Dec 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.