panasonic_cc icon indicating copy to clipboard operation
panasonic_cc copied to clipboard

Zone control

Open joeyjojo747 opened this issue 1 year ago • 46 comments

Is there any possibility of getting zone control. The comfort cloud app does have functionality to control zones.

joeyjojo747 avatar Mar 22 '24 03:03 joeyjojo747

@joeyjojo747 I can't find this in my app. can you create some screenshots as pointers?

heldchen avatar Jun 26 '24 08:06 heldchen

At the risk of intruding: the request made me think of the below: https://www.panasonic.com/global/hvac/products/comfort-cloud/how-to-use-comfort-cloud/turn-on-off-all-air-conditioners-simultaneously.html

Personally I just made a device group of all my AC's to control them all from one thermostat card. That works well for me.

pdm1976 avatar Jun 26 '24 08:06 pdm1976

@joeyjojo747 I can't find this in my app. can you create some screenshots as pointers?

imageimage

joeyjojo747 avatar Jun 26 '24 08:06 joeyjojo747

this seems specific to your device, @joeyjojo747, you'd have to provide logs of the api calls used by the app when showing the main device details, when selecting the Zone button and when operating the different devices within the zone. these can currently only be logged by patching the android app, running it in an emulator and intercepting the traffic on the host device...

I guess in HA you currently only see the 1 main device, and not the 5 end devices in the rooms, right?

heldchen avatar Jun 26 '24 08:06 heldchen

this seems specific to your device, @joeyjojo747, you'd have to provide logs of the api calls used by the app when showing the main device details, when selecting the Zone button and when operating the different devices within the zone. these can currently only be logged by patching the android app, running it in an emulator and intercepting the traffic on the host device...

I guess in HA you currently only see the 1 main device, and not the 5 end devices in the rooms, right?

Thanks @heldchen, I wish I had the knowledge to do that. I also don't have any android devices. It is a ducted system so it is only 1 device with zone control. HA only sees one device.

joeyjojo747 avatar Jun 26 '24 22:06 joeyjojo747

At the risk of intruding: the request made me think of the below: https://www.panasonic.com/global/hvac/products/comfort-cloud/how-to-use-comfort-cloud/turn-on-off-all-air-conditioners-simultaneously.html

Personally I just made a device group of all my AC's to control them all from one thermostat card. That works well for me.

Hi @pdm1976, It is a ducted system so it is only 1 device with zone control. HA only sees one device. Its not multiple devices unfortunately.

joeyjojo747 avatar Jun 26 '24 22:06 joeyjojo747

this seems specific to your device, @joeyjojo747, you'd have to provide logs of the api calls used by the app when showing the main device details, when selecting the Zone button and when operating the different devices within the zone. these can currently only be logged by patching the android app, running it in an emulator and intercepting the traffic on the host device... I guess in HA you currently only see the 1 main device, and not the 5 end devices in the rooms, right?

Thanks @heldchen, I wish I had the knowledge to do that. I also don't have any android devices. It is a ducted system so it is only 1 device with zone control. HA only sees one device.

you don't need a physical device, but there's quite a few technical steps involved unfortunately: https://github.com/sockless-coding/panasonic_cc/issues/191#issuecomment-2174505567 - once you have the setup running it's simple though, you start the app, log into the panasonic account, then browse the sections you're interested. the traffic is then shown in the interceptor. if you feel like giving it a try, we will need the following information for each request to the accsmart.panasonic.com:

  • action done ("I clicked the Zone button in the navigation bar", "I enabled a zone", "I disabled a zone")
  • url
  • request body
  • response body

heldchen avatar Jun 26 '24 22:06 heldchen

this seems specific to your device, @joeyjojo747, you'd have to provide logs of the api calls used by the app when showing the main device details, when selecting the Zone button and when operating the different devices within the zone. these can currently only be logged by patching the android app, running it in an emulator and intercepting the traffic on the host device... I guess in HA you currently only see the 1 main device, and not the 5 end devices in the rooms, right?

Thanks @heldchen, I wish I had the knowledge to do that. I also don't have any android devices. It is a ducted system so it is only 1 device with zone control. HA only sees one device.

you don't need a physical device, but there's quite a few technical steps involved unfortunately: #191 (comment) - once you have the setup running it's simple though, you start the app, log into the panasonic account, then browse the sections you're interested. the traffic is then shown in the interceptor. if you feel like giving it a try, we will need the following information for each request to the accsmart.panasonic.com:

  • action done ("I clicked the Zone button in the navigation bar", "I enabled a zone", "I disabled a zone")
  • url
  • request body
  • response body

@heldchen I definitely give it a go. Always keen to learn something new! I let you know how I go.

joeyjojo747 avatar Jun 26 '24 22:06 joeyjojo747

you'll need

  • a recent java sdk
  • https://apkpure.com/panasonic-comfort-cloud/com.panasonic.ACCsmart
  • https://bitbucket.org/iBotPeaches/apktool/downloads/
  • https://github.com/patrickfav/uber-apk-signer/releases/tag/v1.3.0
  • https://developer.android.com/studio
  • https://httptoolkit.com/docs/getting-started/installing/
  • https://apkpure.com/http-toolkit/tech.httptoolkit.android.v1

good luck :-)

heldchen avatar Jun 26 '24 23:06 heldchen

I can try to give this a go too if that helps? I recently had a ducted system installed and the zone control is the only thing I'm really missing from HA that would help with some automations I have set up for each morning. Currently we have to control the zones from the panasonic app but if I could do it through HA that would be amazing.

vesikk avatar Jun 27 '24 01:06 vesikk

I can try to give this a go too if that helps? I recently had a ducted system installed and the zone control is the only thing I'm really missing from HA that would help with some automations I have set up for each morning. Currently we have to control the zones from the panasonic app but if I could do it through HA that would be amazing.

@vesikk That would be great. I might not get to this for a few days.

joeyjojo747 avatar Jun 27 '24 01:06 joeyjojo747

(providing the api logs is just the first step, implementing the zone functionality in the plugin will be another challenge. but at least then the api calls are known which is the prerequisite)

heldchen avatar Jun 27 '24 14:06 heldchen

Wouldn't surprise me if the zone control in the app is just using the normal api calls but sending them to all the devices in the zone.

sockless-coding avatar Jun 27 '24 15:06 sockless-coding

I think they just open/close the shutters for the selected duct end system

heldchen avatar Jun 27 '24 15:06 heldchen

Thought I was making progress, successfully decompiled, edited xml, recompiled. I have constant issues with Android Studio and the emulator freezing and crashing on Windows. I have tried two machines and similar issues. Any recommended alternative Android Studio or other tips?

joeyjojo747 avatar Jun 28 '24 09:06 joeyjojo747

it's very solid in my ubuntu machine - I have the emulater running for days now :-) - so I never looked into an alternative. maybe someone else has some ideas

heldchen avatar Jun 28 '24 09:06 heldchen

I finally got the emulator working. Attached are the results of 3 actions

  1. Clicked Zones
  2. Clicked Zone 1 on
  3. Clicked Zone 1 off

Is this the kind of info required? 1. Clicked ZONES.txt 2. Clicked ZONE 1 ON.txt 3. Clicked ZONE 1 OFF.txt

joeyjojo747 avatar Jun 29 '24 02:06 joeyjojo747

That should be enough to add some zone support

sockless-coding avatar Jun 29 '24 07:06 sockless-coding

@joeyjojo747 I've added basic Zone control (on/off) in v1.0.52 I have no way of testing it :)

sockless-coding avatar Jun 29 '24 08:06 sockless-coding

Thanks. Ive installed 1.0.52 but I dont see any zone controls. Screenshots attached. 2024-06-29_19-59-29 2024-06-29_19-59-45 2024-06-29_20-01-53

joeyjojo747 avatar Jun 29 '24 10:06 joeyjojo747

@joeyjojo747 something didn't work, you have a new toggle called "None" there should have been a toggle for each zone and with the name of the zone... are there any error logs?

sockless-coding avatar Jun 29 '24 10:06 sockless-coding

Logger: homeassistant.components.switch Source: helpers/entity_platform.py:766 integration: Switch (documentation, issues) First occurred: 7:56:06 PM (8 occurrences) Last logged: 8:02:55 PM

Platform panasonic_cc does not generate unique IDs. ID c9afbd0c58be8c6b0762865de6a117ee679a7baa32fe07d14a490d9a1d6b46aa-zone-None already exists - ignoring switch.chepy_wood_none

joeyjojo747 avatar Jun 29 '24 10:06 joeyjojo747

Found some issues try v1.0.53

sockless-coding avatar Jun 29 '24 10:06 sockless-coding

They are appearing now. They appeared with the state matching the APP. I turned a zone of with the iOS APP but the switch state did not change in HA. I then turned the switch off in HA and got the attached and below error.

switch_error zones_appear

Logger: homeassistant.components.websocket_api.http.connection Source: components/websocket_api/commands.py:241 integration: Home Assistant WebSocket API (documentation, issues) First occurred: 8:46:39 PM (1 occurrences) Last logged: 8:46:39 PM

[548013828144] Unexpected exception Traceback (most recent call last): File "/config/custom_components/panasonic_cc/panasonic.py", line 519, in set_device await self._api.set_device( File "/config/custom_components/panasonic_cc/pcomfortcloud/apiclient.py", line 210, in set_device _ = await self.execute_post(self._get_device_status_control_url(), payload, "set_device", 200) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/panasonic_cc/pcomfortcloud/panasonicsession.py", line 98, in execute_post check_response(response, function_description, expected_status_code) File "/config/custom_components/panasonic_cc/pcomfortcloud/panasonicsession.py", line 24, in check_response raise exceptions.ResponseError( custom_components.panasonic_cc.pcomfortcloud.exceptions.ResponseError: (set_device: Expected status code 200, received: 500: <bound method ClientResponse.text of <ClientResponse(https://accsmart.panasonic.com/deviceStatus/control) [500 Internal Server Error]> <CIMultiDictProxy('Content-Type': 'application/json', 'Content-Length': '48', 'Connection': 'keep-alive', 'Date': 'Sat, 29 Jun 2024 10:46:37 GMT', 'x-amzn-RequestId': 'c34a6d18-a079-4dc9-abcf-d2983fdc5b64', 'x-amz-apigw-id': 'aIDiGF-NNjMEs0Q=', 'X-Amzn-Trace-Id': 'Root=1-667fe60d-084bbd44201db2185c7928c1;Parent=2aac0bbd1f5a3623;Sampled=0;lineage=4d740725:0|ea34267d:0', 'X-Cache': 'Error from cloudfront', 'Via': '1.1 dc5b7b7a6895b629c6cb8eef5910309e.cloudfront.net (CloudFront)', 'X-Amz-Cf-Pop': 'SYD3-P2', 'Alt-Svc': 'h3=":443"; ma=86400', 'X-Amz-Cf-Id': 'iDGOee2xsl_M0rosRpJRlVYJ5gvKQ-wJj1TKz5BWbR7wMggEdDP-1A==', 'X-XSS-Protection': '1; report=1;mode=block', 'X-Frame-Options': 'DENY', 'Content-Security-Policy': "script-src 'self' 'unsafe-inline'", 'X-Content-Type-Options': 'nosniff', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains')>

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 241, in handle_call_service response = await hass.services.async_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2741, in async_call response_data = await coro ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2784, in _execute_service return await target(service_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 977, in entity_service_call single_response = await _handle_entity_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1049, in _handle_entity_call result = await task ^^^^^^^^^^ File "/config/custom_components/panasonic_cc/switch.py", line 167, in async_turn_off await self._api.set_zone(self._zone.id, mode=constants.ZoneMode.Off) File "/config/custom_components/panasonic_cc/panasonic.py", line 511, in set_zone await self.set_device( File "/config/custom_components/panasonic_cc/panasonic.py", line 525, in set_device await self._api.set_device( File "/config/custom_components/panasonic_cc/pcomfortcloud/apiclient.py", line 210, in set_device _ = await self.execute_post(self._get_device_status_control_url(), payload, "set_device", 200) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/panasonic_cc/pcomfortcloud/panasonicsession.py", line 98, in execute_post check_response(response, function_description, expected_status_code) File "/config/custom_components/panasonic_cc/pcomfortcloud/panasonicsession.py", line 24, in check_response raise exceptions.ResponseError( custom_components.panasonic_cc.pcomfortcloud.exceptions.ResponseError: (set_device: Expected status code 200, received: 500: <bound method ClientResponse.text of <ClientResponse(https://accsmart.panasonic.com/deviceStatus/control) [500 Internal Server Error]> <CIMultiDictProxy('Content-Type': 'application/json', 'Content-Length': '48', 'Connection': 'keep-alive', 'Date': 'Sat, 29 Jun 2024 10:46:39 GMT', 'x-amzn-RequestId': '609ff50e-54fd-4101-8161-e1ee83e26870', 'x-amz-apigw-id': 'aIDiVErTNjMEKGA=', 'X-Amzn-Trace-Id': 'Root=1-667fe60e-6ce0e3fa2d7c5f6717873756;Parent=544523cef793749e;Sampled=0;lineage=4d740725:0|ea34267d:0', 'X-Cache': 'Error from cloudfront', 'Via': '1.1 dc5b7b7a6895b629c6cb8eef5910309e.cloudfront.net (CloudFront)', 'X-Amz-Cf-Pop': 'SYD3-P2', 'Alt-Svc': 'h3=":443"; ma=86400', 'X-Amz-Cf-Id': 'KYLSdkYYyTvZiJhk-dSEXYtV-dZL47YnoB17nSNlOda9_jLYL9uuKQ==', 'X-XSS-Protection': '1; report=1;mode=block', 'X-Frame-Options': 'DENY', 'Content-Security-Policy': "script-src 'self' 'unsafe-inline'", 'X-Content-Type-Options': 'nosniff', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains')>

joeyjojo747 avatar Jun 29 '24 10:06 joeyjojo747

Try v1.0.54 the parameters didn't get forwarded all the way

sockless-coding avatar Jun 29 '24 11:06 sockless-coding

Updated to 1.0.54 Error when switching zone off

Logger: homeassistant.components.websocket_api.http.connection Source: components/websocket_api/commands.py:241 integration: Home Assistant WebSocket API (documentation, issues) First occurred: 9:42:28 PM (2 occurrences) Last logged: 9:43:20 PM

[546977508096] Unexpected exception Traceback (most recent call last): File "/config/custom_components/panasonic_cc/panasonic.py", line 519, in set_device await self._api.set_device( File "/config/custom_components/panasonic_cc/pcomfortcloud/apiclient.py", line 216, in set_device _ = await self.execute_post(self._get_device_status_control_url(), payload, "set_device", 200) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/panasonic_cc/pcomfortcloud/panasonicsession.py", line 98, in execute_post check_response(response, function_description, expected_status_code) File "/config/custom_components/panasonic_cc/pcomfortcloud/panasonicsession.py", line 24, in check_response raise exceptions.ResponseError( custom_components.panasonic_cc.pcomfortcloud.exceptions.ResponseError: (set_device: Expected status code 200, received: 400: <bound method ClientResponse.text of <ClientResponse(https://accsmart.panasonic.com/deviceStatus/control) [400 Bad Request]> <CIMultiDictProxy('Content-Type': 'application/json', 'Content-Length': '53', 'Connection': 'keep-alive', 'Date': 'Sat, 29 Jun 2024 11:42:27 GMT', 'x-amzn-RequestId': 'b82f4f68-5d73-4f3f-9187-8e946f4d9c32', 'x-amz-apigw-id': 'aILtlEIEtjMEQDg=', 'X-Amzn-Trace-Id': 'Root=1-667ff323-45b4a12b68487a0b50024660;Parent=63e0b47bc12b5598;Sampled=0;lineage=4d740725:0|ea34267d:0', 'X-Cache': 'Error from cloudfront', 'Via': '1.1 9478009849c2f6b9551c4c5c23842910.cloudfront.net (CloudFront)', 'X-Amz-Cf-Pop': 'SYD3-P2', 'Alt-Svc': 'h3=":443"; ma=86400', 'X-Amz-Cf-Id': 'gKqNOoCzrstEWKFveUHjID_d_qkdm7vZoeUr8DkE8WhZSGk9G_XpmQ==', 'X-XSS-Protection': '1; report=1;mode=block', 'X-Frame-Options': 'DENY', 'Content-Security-Policy': "script-src 'self' 'unsafe-inline'", 'X-Content-Type-Options': 'nosniff', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains')>

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 241, in handle_call_service response = await hass.services.async_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2741, in async_call response_data = await coro ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2784, in _execute_service return await target(service_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 977, in entity_service_call single_response = await _handle_entity_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1049, in _handle_entity_call result = await task ^^^^^^^^^^ File "/config/custom_components/panasonic_cc/switch.py", line 167, in async_turn_off await self._api.set_zone(self._zone.id, mode=constants.ZoneMode.Off) File "/config/custom_components/panasonic_cc/panasonic.py", line 511, in set_zone await self.set_device( File "/config/custom_components/panasonic_cc/panasonic.py", line 525, in set_device await self._api.set_device( File "/config/custom_components/panasonic_cc/pcomfortcloud/apiclient.py", line 216, in set_device _ = await self.execute_post(self._get_device_status_control_url(), payload, "set_device", 200) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/panasonic_cc/pcomfortcloud/panasonicsession.py", line 98, in execute_post check_response(response, function_description, expected_status_code) File "/config/custom_components/panasonic_cc/pcomfortcloud/panasonicsession.py", line 24, in check_response raise exceptions.ResponseError( custom_components.panasonic_cc.pcomfortcloud.exceptions.ResponseError: (set_device: Expected status code 200, received: 400: <bound method ClientResponse.text of <ClientResponse(https://accsmart.panasonic.com/deviceStatus/control) [400 Bad Request]> <CIMultiDictProxy('Content-Type': 'application/json', 'Content-Length': '53', 'Connection': 'keep-alive', 'Date': 'Sat, 29 Jun 2024 11:42:28 GMT', 'x-amzn-RequestId': 'd014d711-ee87-4d9c-9bb9-0bfd41941c64', 'x-amz-apigw-id': 'aILtrGz8NjMEhJg=', 'X-Amzn-Trace-Id': 'Root=1-667ff324-774b2bc043f9bafb717e373f;Parent=24019b0454ae5de3;Sampled=0;lineage=4d740725:0|ea34267d:0', 'X-Cache': 'Error from cloudfront', 'Via': '1.1 9478009849c2f6b9551c4c5c23842910.cloudfront.net (CloudFront)', 'X-Amz-Cf-Pop': 'SYD3-P2', 'Alt-Svc': 'h3=":443"; ma=86400', 'X-Amz-Cf-Id': 'cJmpMHrjU1ervHRx6wtL4O-ZFb_FkeDvXVpfNAsnjSj5lfLioKNRQQ==', 'X-XSS-Protection': '1; report=1;mode=block', 'X-Frame-Options': 'DENY', 'Content-Security-Policy': "script-src 'self' 'unsafe-inline'", 'X-Content-Type-Options': 'nosniff', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains')>

joeyjojo747 avatar Jun 29 '24 11:06 joeyjojo747

@joeyjojo747 could you try v1.0.56 there should be an additional error log post with some info on what got posted

sockless-coding avatar Jun 30 '24 09:06 sockless-coding

Logger: homeassistant.components.websocket_api.http.connection Source: components/websocket_api/commands.py:241 integration: Home Assistant WebSocket API (documentation, issues) First occurred: 8:38:01 AM (1 occurrences) Last logged: 8:38:01 AM

[547269265008] Unexpected exception Traceback (most recent call last): File "/config/custom_components/panasonic_cc/panasonic.py", line 530, in set_device await self._api.set_device( File "/config/custom_components/panasonic_cc/pcomfortcloud/apiclient.py", line 215, in set_device _ = await self.execute_post(self._get_device_status_control_url(), payload, "set_device", 200) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/panasonic_cc/pcomfortcloud/panasonicsession.py", line 112, in execute_post check_response(response, function_description, expected_status_code) File "/config/custom_components/panasonic_cc/pcomfortcloud/panasonicsession.py", line 25, in check_response raise exceptions.ResponseError( custom_components.panasonic_cc.pcomfortcloud.exceptions.ResponseError: (set_device: Expected status code 200, received: 400: <bound method ClientResponse.text of <ClientResponse(https://accsmart.panasonic.com/deviceStatus/control) [400 Bad Request]> <CIMultiDictProxy('Content-Type': 'application/json', 'Content-Length': '53', 'Connection': 'keep-alive', 'Date': 'Sun, 30 Jun 2024 22:38:00 GMT', 'x-amzn-RequestId': '4fc62106-a3bd-46f9-bf95-c72c814e411c', 'x-amz-apigw-id': 'aM-rWHHXtjMEqPQ=', 'X-Amzn-Trace-Id': 'Root=1-6681de48-322187a00d80de2205dbfbca;Parent=4caa3d88cb6ac4ca;Sampled=0;lineage=4d740725:0|ea34267d:0', 'X-Cache': 'Error from cloudfront', 'Via': '1.1 00625c2aa02f6876cd9570486ac98924.cloudfront.net (CloudFront)', 'X-Amz-Cf-Pop': 'SYD3-P2', 'Alt-Svc': 'h3=":443"; ma=86400', 'X-Amz-Cf-Id': 'v6CaP06BDaBJ_PCzH_pd77LNqWR9v5R0z_DHYfc0hgFaF5NJuwsxHg==', 'X-XSS-Protection': '1; report=1;mode=block', 'X-Frame-Options': 'DENY', 'Content-Security-Policy': "script-src 'self' 'unsafe-inline'", 'X-Content-Type-Options': 'nosniff', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains')>

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 241, in handle_call_service response = await hass.services.async_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2741, in async_call response_data = await coro ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2784, in _execute_service return await target(service_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 977, in entity_service_call single_response = await _handle_entity_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1049, in _handle_entity_call result = await task ^^^^^^^^^^ File "/config/custom_components/panasonic_cc/switch.py", line 167, in async_turn_on await self._api.set_zone(self._zone.id, mode=constants.ZoneMode.On) File "/config/custom_components/panasonic_cc/panasonic.py", line 522, in set_zone await self.set_device( File "/config/custom_components/panasonic_cc/panasonic.py", line 536, in set_device await self._api.set_device( File "/config/custom_components/panasonic_cc/pcomfortcloud/apiclient.py", line 215, in set_device _ = await self.execute_post(self._get_device_status_control_url(), payload, "set_device", 200) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/panasonic_cc/pcomfortcloud/panasonicsession.py", line 112, in execute_post check_response(response, function_description, expected_status_code) File "/config/custom_components/panasonic_cc/pcomfortcloud/panasonicsession.py", line 25, in check_response raise exceptions.ResponseError( custom_components.panasonic_cc.pcomfortcloud.exceptions.ResponseError: (set_device: Expected status code 200, received: 400: <bound method ClientResponse.text of <ClientResponse(https://accsmart.panasonic.com/deviceStatus/control) [400 Bad Request]> <CIMultiDictProxy('Content-Type': 'application/json', 'Content-Length': '53', 'Connection': 'keep-alive', 'Date': 'Sun, 30 Jun 2024 22:38:01 GMT', 'x-amzn-RequestId': 'eccb8e82-f116-4140-84da-6f2a9ee35d84', 'x-amz-apigw-id': 'aM-reEAZNjMEm8Q=', 'X-Amzn-Trace-Id': 'Root=1-6681de49-0eca954257de99d81c6402e0;Parent=01d8431e5628bc21;Sampled=0;lineage=4d740725:0|ea34267d:0', 'X-Cache': 'Error from cloudfront', 'Via': '1.1 00625c2aa02f6876cd9570486ac98924.cloudfront.net (CloudFront)', 'X-Amz-Cf-Pop': 'SYD3-P2', 'Alt-Svc': 'h3=":443"; ma=86400', 'X-Amz-Cf-Id': 'L2fm3Rhp494PBZpIyAGSN2uRUHTkv5PveLhgc2wU6F37C7yno4FUlQ==', 'X-XSS-Protection': '1; report=1;mode=block', 'X-Frame-Options': 'DENY', 'Content-Security-Policy': "script-src 'self' 'unsafe-inline'", 'X-Content-Type-Options': 'nosniff', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains')>

joeyjojo747 avatar Jun 30 '24 22:06 joeyjojo747

Logger: homeassistant.components.websocket_api.http.connection Source: components/websocket_api/commands.py:241 integration: Home Assistant WebSocket API (documentation, issues) First occurred: 8:38:01 AM (1 occurrences) Last logged: 8:38:01 AM

[547269265008] Unexpected exception Traceback (most recent call last): File "/config/custom_components/panasonic_cc/panasonic.py", line 530, in set_device await self._api.set_device( File "/config/custom_components/panasonic_cc/pcomfortcloud/apiclient.py", line 215, in set_device _ = await self.execute_post(self._get_device_status_control_url(), payload, "set_device", 200)

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/panasonic_cc/pcomfortcloud/panasonicsession.py", line 112, in execute_post check_response(response, function_description, expected_status_code) File "/config/custom_components/panasonic_cc/pcomfortcloud/panasonicsession.py", line 25, in check_response raise exceptions.ResponseError( custom_components.panasonic_cc.pcomfortcloud.exceptions.ResponseError: (set_device: Expected status code 200, received: 400: <bound method ClientResponse.text of <ClientResponse( https://accsmart.panasonic.com/deviceStatus/control) [400 Bad Request]> <CIMultiDictProxy('Content-Type': 'application/json', 'Content-Length': '53', 'Connection': 'keep-alive', 'Date': 'Sun, 30 Jun 2024 22:38:00 GMT', 'x-amzn-RequestId': '4fc62106-a3bd-46f9-bf95-c72c814e411c', 'x-amz-apigw-id': 'aM-rWHHXtjMEqPQ=', 'X-Amzn-Trace-Id': 'Root=1-6681de48-322187a00d80de2205dbfbca;Parent=4caa3d88cb6ac4ca;Sampled=0;lineage=4d740725:0|ea34267d:0', 'X-Cache': 'Error from cloudfront', 'Via': '1.1 00625c2aa02f6876cd9570486ac98924.cloudfront.net (CloudFront)', 'X-Amz-Cf-Pop': 'SYD3-P2', 'Alt-Svc': 'h3=":443"; ma=86400', 'X-Amz-Cf-Id': 'v6CaP06BDaBJ_PCzH_pd77LNqWR9v5R0z_DHYfc0hgFaF5NJuwsxHg==', 'X-XSS-Protection': '1; report=1;mode=block', 'X-Frame-Options': 'DENY', 'Content-Security-Policy': "script-src 'self' 'unsafe-inline'", 'X-Content-Type-Options': 'nosniff', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains')>

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 241, in handle_call_service response = await hass.services.async_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2741, in async_call response_data = await coro ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2784, in _execute_service return await target(service_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 977, in entity_service_call single_response = await _handle_entity_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1049, in _handle_entity_call result = await task ^^^^^^^^^^ File "/config/custom_components/panasonic_cc/switch.py", line 167, in async_turn_on await self._api.set_zone(self._zone.id, mode=constants.ZoneMode.On) File "/config/custom_components/panasonic_cc/panasonic.py", line 522, in set_zone await self.set_device( File "/config/custom_components/panasonic_cc/panasonic.py", line 536, in set_device await self._api.set_device( File "/config/custom_components/panasonic_cc/pcomfortcloud/apiclient.py", line 215, in set_device _ = await self.execute_post(self._get_device_status_control_url(), payload, "set_device", 200)

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/panasonic_cc/pcomfortcloud/panasonicsession.py", line 112, in execute_post check_response(response, function_description, expected_status_code) File "/config/custom_components/panasonic_cc/pcomfortcloud/panasonicsession.py", line 25, in check_response raise exceptions.ResponseError( custom_components.panasonic_cc.pcomfortcloud.exceptions.ResponseError: (set_device: Expected status code 200, received: 400: <bound method ClientResponse.text of <ClientResponse( https://accsmart.panasonic.com/deviceStatus/control) [400 Bad Request]> <CIMultiDictProxy('Content-Type': 'application/json', 'Content-Length': '53', 'Connection': 'keep-alive', 'Date': 'Sun, 30 Jun 2024 22:38:01 GMT', 'x-amzn-RequestId': 'eccb8e82-f116-4140-84da-6f2a9ee35d84', 'x-amz-apigw-id': 'aM-reEAZNjMEm8Q=', 'X-Amzn-Trace-Id': 'Root=1-6681de49-0eca954257de99d81c6402e0;Parent=01d8431e5628bc21;Sampled=0;lineage=4d740725:0|ea34267d:0', 'X-Cache': 'Error from cloudfront', 'Via': '1.1 00625c2aa02f6876cd9570486ac98924.cloudfront.net (CloudFront)', 'X-Amz-Cf-Pop': 'SYD3-P2', 'Alt-Svc': 'h3=":443"; ma=86400', 'X-Amz-Cf-Id': 'L2fm3Rhp494PBZpIyAGSN2uRUHTkv5PveLhgc2wU6F37C7yno4FUlQ==', 'X-XSS-Protection': '1; report=1;mode=block', 'X-Frame-Options': 'DENY', 'Content-Security-Policy': "script-src 'self' 'unsafe-inline'", 'X-Content-Type-Options': 'nosniff', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains')>

Thanks

Brad

On Sun, 30 Jun 2024 at 19:18, Jimmy Everling @.***> wrote:

@joeyjojo747 https://github.com/joeyjojo747 could you try v1.0.56 there should be an additional error log post with some info on what got posted

— Reply to this email directly, view it on GitHub https://github.com/sockless-coding/panasonic_cc/issues/181#issuecomment-2198493913, or unsubscribe https://github.com/notifications/unsubscribe-auth/AM5GBSYXYFTK7YYXMKL7BDTZJ7EPTAVCNFSM6AAAAABFCTN7H2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJYGQ4TGOJRGM . You are receiving this because you were mentioned.Message ID: @.***>

joeyjojo747 avatar Jun 30 '24 22:06 joeyjojo747

I've updated to the latest release and now the zones are showing as no longer being provided. To be fair, they weren't working properly before the update. clicking on them would not actually change anything and an error code (I can't remember which one sorry) would appear in the logs image

Is there anything specific you guys require to check this?

vesikk avatar Aug 07 '24 12:08 vesikk