Closed joeyjojo747 closed 1 month ago
@joeyjojo747 I can't find this in my app. can you create some screenshots as pointers?
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.
@joeyjojo747 I can't find this in my app. can you create some screenshots as pointers?
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?
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.
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.
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:
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.
you'll need
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 :-)
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.
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.
(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)
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.
I think they just open/close the shutters for the selected duct end system
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?
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
I finally got the emulator working. Attached are the results of 3 actions
Is this the kind of info required? 1. Clicked ZONES.txt 2. Clicked ZONE 1 ON.txt 3. Clicked ZONE 1 OFF.txt
That should be enough to add some zone support
@joeyjojo747 I've added basic Zone control (on/off) in v1.0.52 I have no way of testing it :)
Thanks. Ive installed 1.0.52 but I dont see any zone controls. Screenshots attached.
@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?
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
Found some issues try v1.0.53
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.
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 setdevice = 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 setdevice = 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')>
Try v1.0.54 the parameters didn't get forwarded all the way
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 setdevice = 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 setdevice = 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 could you try v1.0.56 there should be an additional error log post with some info on what got posted
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 setdevice = 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 setdevice = 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')>
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 setdevice = 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 setdevice = 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: @.***>
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
Is there anything specific you guys require to check this?
I just noticed that the _load_zones method wasn't being called, I'll fix that :)
@vesikk give v1.1.4 a try
Hi @sockless-coding thanks for all your help and this integration - its really good and we use it all the time. We have a five zone ducted system and am eagerly waiting for the zone fix for these systems. We have a S-180PE4R system 18kw and zone controller, 5 zones.
Happy to help test when you get it working.
Back around 1.0.56 the zones would show up but got Error 200 etc as above in this thread.
I am on v1.1.5 and deleted the entity and re-added, zones are all missing.
I have also noticed that the daily power statistics are also missing (were available in earlier releases).
Again, happy to test :)
Cheers, Adam
@adamk125 Hi, There seems to be a lot of things missing, are there any error/warnings being logged?
@adamk125 Hi, There seems to be a lot of things missing, are there any error/warnings being logged?
Hi Mate,
No errors or warnings when I look at the integration but just turned on debug logging and reloaded the integration and this is the output below. I had deleted the old integration and re-added it, that's why the "Entity not available" is showing up on my dashboard as they were entities that had been the before.
024-08-08 18:05:31.571 DEBUG (MainThread) [custom_components.panasonic_cc.pcomfortcloud.panasonicsession] Starting Session 2024-08-08 18:05:31.577 DEBUG (MainThread) [custom_components.panasonic_cc.pcomfortcloud.panasonicsettings] Loaded settings from '/root/.panasonic-settings' 2024-08-08 18:05:31.578 DEBUG (MainThread) [custom_components.panasonic_cc.pcomfortcloud.panasonicsession] Access token is valid 2024-08-08 18:05:32.091 DEBUG (MainThread) [custom_components.panasonic_cc.pcomfortcloud.panasonicsession] GET url: https://accsmart.panasonic.com/device/group, response: {"uiFlg":false,"groupCount":1,"groupList":[{"groupId":1237608,"groupName":"My House","pairingList":[],"deviceList":[{"deviceGuid":"CZ-RTC6Z+E8C7CFB79B39","deviceType":"6","deviceName":"Todd Court AC","permission":3,"temperatureUnit":0,"summerHouse":0,"nanoeStandAlone":true,"autoMode":true,"modeAvlList":{"autoMode":1},"parameters":{"operate":0,"operationMode":3,"temperatureSet":19,"fanSpeed":0,"fanAutoMode":1,"airSwingLR":2,"airSwingUD":4,"ecoFunctionData":0,"ecoMode":0,"ecoNavi":0,"nanoe":2,"iAuto":0,"airDirection":3,"lastSettingMode":0},"deviceModuleNumber":"S-180PE4R","deviceHashGuid":"9fa1a8b4fc2fa0d84f6df2cf06a2e4d7c5f81b9c0b44b2b60c5cf32fe784fb3d"}]}]} 2024-08-08 18:05:32.091 INFO (MainThread) [custom_components.panasonic_cc] Got 1 devices 2024-08-08 18:05:33.152 DEBUG (MainThread) [custom_components.panasonic_cc.pcomfortcloud.panasonicsession] GET url: https://accsmart.panasonic.com/deviceStatus/CZ-RTC6Z%2BE8C7CFB79B39, response: {"timestamp":1723104333061,"permission":3,"summerHouse":0,"iAutoX":true,"nanoe":true,"nanoeStandAlone":true,"autoMode":true,"heatMode":true,"fanMode":true,"dryMode":true,"coolMode":true,"ecoNavi":false,"powerfulMode":true,"quietMode":true,"airSwingLR":true,"autoSwingUD":false,"ecoFunction":0,"temperatureUnit":0,"modeAvlList":{"autoMode":1},"nanoeList":{"visualizationShow":0},"clothesDrying":false,"insideCleaning":false,"fireplace":false,"autoTempMax":27,"autoTempMin":17,"dryTempMax":30,"dryTempMin":18,"coolTempMax":30,"coolTempMin":18,"heatTempMax":30,"heatTempMin":18,"fanSpeedMode":5,"fanDirectionMode":5,"parameters":{"ecoFunctionData":0,"insideCleaning":0,"fireplace":0,"lastSettingMode":0,"zoneStatus":0,"zoneType":0,"operate":0,"operationMode":3,"temperatureSet":19,"fanSpeed":0,"fanAutoMode":1,"airSwingLR":2,"airSwingUD":4,"ecoMode":0,"ecoNavi":0,"nanoe":2,"iAuto":0,"airDirection":3,"insideTemperature":18,"outTemperature":13,"airQuality":0,"zoneParameters":[{"zoneOnOff":0,"zoneLevel":100,"zoneTemperature":-255,"zoneSpill":0,"zoneId":1,"zoneName":"Garage"},{"zoneOnOff":1,"zoneLevel":100,"zoneTemperature":-255,"zoneSpill":0,"zoneId":2,"zoneName":"Master"},{"zoneOnOff":1,"zoneLevel":100,"zoneTemperature":-255,"zoneSpill":0,"zoneId":3,"zoneName":"Kids Room"},{"zoneOnOff":1,"zoneLevel":100,"zoneTemperature":-255,"zoneSpill":0,"zoneId":4,"zoneName":"Study"}]},"deviceNanoe":3} 2024-08-08 18:05:33.152 DEBUG (MainThread) [custom_components.panasonic_cc.pcomfortcloud.panasonicdevice] Loading device parameters, has data: True 2024-08-08 18:05:33.152 DEBUG (MainThread) [custom_components.panasonic_cc.coordinator] Todd Court AC Device features Nanoe: True Eco Navi: False AI Eco: False 2024-08-08 18:05:33.152 DEBUG (MainThread) [custom_components.panasonic_cc.coordinator] Finished fetching Panasonic Device Coordinator data in 1.061 seconds (success: True) 2024-08-08 18:05:33.152 INFO (MainThread) [custom_components.panasonic_cc.climate] Registing Climate entity: '9fa1a8b4fc2fa0d84f6df2cf06a2e4d7c5f81b9c0b44b2b60c5cf32fe784fb3d-climate' 2024-08-08 18:05:33.154 ERROR (MainThread) [homeassistant.components.switch] Error while setting up panasonic_cc platform for switch Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 364, in _async_setup_platform await asyncio.shield(awaitable) File "/config/custom_components/panasonic_cc/switch.py", line 71, in async_setup_entry devices.append(PanasonicSwitchEntity( ^^^^^^^^^^^^^^^^^^^^^^ TypeError: PanasonicSwitchEntity.init() takes 3 positional arguments but 4 were given
I've found the problem.
When it comes to zones, there seem to be a temperature value and when I look at their promotional info about "zoning" there is a temp shown in the app and there seem to be a way to change the duct opening...
All the api dumps with zones I've gotten have had the zoneTemperature
set to -255 so it doesn't seem to be universal
How about zoneLevel
can you always control the duct level in the CFC app?
From the docs:
The only thing zone wise I can do through the comfort cloud app is turn on/off zones and set the damper position. There's no zone temperature sensor
I've found the problem. When it comes to zones, there seem to be a temperature value and when I look at their promotional info about "zoning" there is a temp shown in the app and there seem to be a way to change the duct opening... All the api dumps with zones I've gotten have had the
zoneTemperature
set to -255 so it doesn't seem to be universal How aboutzoneLevel
can you always control the duct level in the CFC app?From the docs:
No the only thing I can do with the ducted system is to turn a zone on or off. Maybe there’s different zone controllers that can adjust the damper positions so it’s not 100% on or off but not in our setup.
Give v1.1.6 a try I've added some more zone features
Give v1.1.6 a try I've added some more zone features
I can now see lots of options for zones and damper settings and zone temperatures (but those entities are not working). When I try to set the zone on or off I get this error.
Failed to call service switch/turn_off. (set_device: Expected status code 200, received: 400: {"code":4008,"message":"Bad request")
Sorry correction - it allows me to turn ON a zone if that zone was off on the app (and replicated in the CFC app) but throws that error when turning OFF a zone.
@adamk125 could you enable debug logging and provide the logs generated when you turn off a zone.
@adamk125 could you enable debug logging and provide the logs generated when you turn off a zone.
I have used the kids room zone to turn off, heres the debug log:
024-08-08 19:56:51.492 ERROR (MainThread) [custom_components.panasonic_cc.pcomfortcloud.helpers] Error in set_device Expected status code '200' but received '400' Payload: {'deviceGuid': 'CZ-RTC6Z+E8C7CFB79B39', 'parameters': {'zoneParameters': [{'zoneId': <ZoneMode.Off: 0>, 'zoneOnOff': 0}]}} Response body: {"code":4008,"message":"Bad request"} 2024-08-08 19:56:51.492 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [139647098285232] Unexpected exception 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 2731, in async_call response_data = await coro ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2774, in _execute_service return await target(service_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 999, in entity_service_call single_response = await _handle_entity_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1071, in _handle_entity_call result = await task ^^^^^^^^^^ File "/config/custom_components/panasonic_cc/switch.py", line 125, in async_turn_off await self.coordinator.async_apply_changes(builder) File "/config/custom_components/panasonic_cc/coordinator.py", line 62, in async_apply_changes await self._api_client.set_device_raw(self._device, request_builder.build()) File "/config/custom_components/panasonic_cc/pcomfortcloud/apiclient.py", line 247, in set_device_raw await self.execute_post(self._get_device_status_control_url(), payload, "set_device", 200) File "/config/custom_components/panasonic_cc/pcomfortcloud/panasonicsession.py", line 117, in execute_post await check_response(response, function_description, expected_status_code, payload=json_data) File "/config/custom_components/panasonic_cc/pcomfortcloud/helpers.py", line 32, in check_response raise exceptions.ResponseError( custom_components.panasonic_cc.pcomfortcloud.exceptions.ResponseError: (set_device: Expected status code 200, received: 400: {"code":4008,"message":"Bad request"} 2024-08-08 20:01:55.613 ERROR (MainThread) [custom_components.panasonic_cc.pcomfortcloud.helpers] Error in set_device Expected status code '200' but received '400' Payload: {'deviceGuid': 'CZ-RTC6Z+E8C7CFB79B39', 'parameters': {'zoneParameters': [{'zoneId': <ZoneMode.Off: 0>, 'zoneOnOff': 0}]}} Response body: {"code":4008,"message":"Bad request"} 2024-08-08 20:01:55.613 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [139647486975072] Unexpected exception 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 2731, in async_call response_data = await coro ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2774, in _execute_service return await target(service_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 999, in entity_service_call single_response = await _handle_entity_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1071, in _handle_entity_call result = await task ^^^^^^^^^^ File "/config/custom_components/panasonic_cc/switch.py", line 125, in async_turn_off await self.coordinator.async_apply_changes(builder) File "/config/custom_components/panasonic_cc/coordinator.py", line 62, in async_apply_changes await self._api_client.set_device_raw(self._device, request_builder.build()) File "/config/custom_components/panasonic_cc/pcomfortcloud/apiclient.py", line 247, in set_device_raw await self.execute_post(self._get_device_status_control_url(), payload, "set_device", 200) File "/config/custom_components/panasonic_cc/pcomfortcloud/panasonicsession.py", line 117, in execute_post await check_response(response, function_description, expected_status_code, payload=json_data) File "/config/custom_components/panasonic_cc/pcomfortcloud/helpers.py", line 32, in check_response raise exceptions.ResponseError( custom_components.panasonic_cc.pcomfortcloud.exceptions.ResponseError: (set_device: Expected status code 200, received: 400: {"code":4008,"message":"Bad request"} 2024-08-09 10:30:05.147 ERROR (MainThread) [custom_components.panasonic_cc.pcomfortcloud.helpers] Error in set_device Expected status code '200' but received '400' Payload: {'deviceGuid': 'CZ-RTC6Z+E8C7CFB79B39', 'parameters': {'zoneParameters': [{'zoneId': <ZoneMode.Off: 0>, 'zoneOnOff': 0}]}} Response body: {"code":4008,"message":"Bad request"} 2024-08-09 10:30:05.147 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [139646817424656] Unexpected exception 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 2731, in async_call response_data = await coro ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2774, in _execute_service return await target(service_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 999, in entity_service_call single_response = await _handle_entity_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1071, in _handle_entity_call result = await task ^^^^^^^^^^ File "/config/custom_components/panasonic_cc/switch.py", line 125, in async_turn_off await self.coordinator.async_apply_changes(builder) File "/config/custom_components/panasonic_cc/coordinator.py", line 62, in async_apply_changes await self._api_client.set_device_raw(self._device, request_builder.build()) File "/config/custom_components/panasonic_cc/pcomfortcloud/apiclient.py", line 247, in set_device_raw await self.execute_post(self._get_device_status_control_url(), payload, "set_device", 200) File "/config/custom_components/panasonic_cc/pcomfortcloud/panasonicsession.py", line 117, in execute_post await check_response(response, function_description, expected_status_code, payload=json_data) File "/config/custom_components/panasonic_cc/pcomfortcloud/helpers.py", line 32, in check_response raise exceptions.ResponseError( custom_components.panasonic_cc.pcomfortcloud.exceptions.ResponseError: (set_device: Expected status code 200, received: 400: {"code":4008,"message":"Bad request"}
@adamk125 I see the problem and I will issue a fix (#276)
v1.1.8 should send the correct zone id
It's working! zone on/off and damper position are responding correctly!
Hi there! This issue has been marked as stale due to inactivity. If you believe this is still relevant, please let us know. Otherwise, it will be closed soon.
This issue has been automatically closed due to inactivity. If you still need help, feel free to reopen or create a new issue. Thank you!
Is there any possibility of getting zone control. The comfort cloud app does have functionality to control zones.