[App][Pro] Panasonic Comfort Cloud Alternative

Yes. It stopped working sometime yesterday. Now i get:

2024-07-10T12:33:42.277Z [log] [MyApp] has been initialized
2024-07-10T12:33:42.826Z [log] [ManagerDrivers] [Driver:aircon] Driver has been initialized
2024-07-10T12:35:53.877Z [err] [ManagerDrivers] [Driver:aircon] [Device:ef07481f-3cc3-4da4-afb3-131a5ab735f3] getDevice failed: FetchError: request to https://itunes.apple.com/lookup?id=1348640525 failed, reason: connect ETIMEDOUT 2a02:26f0:116:18c::2a1:443
at ClientRequest. (/app/node_modules/node-fetch/lib/index.js:1501:11)
at ClientRequest.emit (node:events:517:28)
at TLSSocket.socketErrorListener (node:_http_client:501:9)
at TLSSocket.emit (node:events:517:28)
at emitErrorNT (node:internal/streams/destroy:151:8)
at emitErrorCloseNT (node:internal/streams/destroy:116:3)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
type: ‘system’,
errno: ‘ETIMEDOUT’,
code: ‘ETIMEDOUT’
}
2024-07-10T12:35:53.903Z [log] [ManagerDrivers] [Driver:aircon] [Device:ef07481f-3cc3-4da4-afb3-131a5ab735f3] Device ‘CS-HZ25WKE-5+4849405701’ has been initialized
2024-07-10T12:36:19.743Z [log] [ManagerDrivers] [Driver:aircon] [Device:ef07481f-3cc3-4da4-afb3-131a5ab735f3] postToService: { nanoe_mode: ‘On’ }

Strange - does the URL not work in your browser either?
Could you think of anything on your local network which could block/intercept that URL?

I’ve pushed 1.1.8 which handles the exception and falls back to impersonating PCC version “1.21.0”.

You nailed it…

I got new WiFi boxes yesterday, and although my Homey is attached via Ethernet, it still tried to route traffic via WiFi.

Once I got it into setup mode, disabled WiFi, and cleared the DHCP table, it started working.

Thanks…

1 Like

I don’t know if you “take requests”, but the outside temperature sensor would be really good to have :wink:

I would just like to say thank you for putting in the work. The Panasonic Cloud API seems finicky since Tibber has an issue with it as well but now I at least have access from Homey. Appreciated man! Best, El

1 Like

Pull request created for issue #18

1 Like

Requests are welcome - preferrably directly on the Issues page.

I think the outside temperature is available from the API - it should be straight forward to expose it as a new property on the Homey device.

Thanks - merged!

Since today I’m getting

Request failed with status code 400
Missing required header parameter or bad request for header

2024-08-24T20:15:13.484Z [err] [ManagerDrivers] [Driver:aircon] [Device:5783c27d-1b06-439a-ad41-2915dbd9504c] getDevice failed: ServiceError: Request failed with status code 401
Token expires
at ComfortCloudClient.handleError (/app/node_modules/panasonic-comfort-cloud-client/dist/src/ComfortCloudClient.js:147:31)
at ComfortCloudClient.getDevice (/app/node_modules/panasonic-comfort-cloud-client/dist/src/ComfortCloudClient.js:130:18)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async MyDriver.invokeClient (/app/drivers/aircon/driver.js:102:24)
at async MyDevice.fetchFromService (/app/drivers/aircon/device.js:32:22)
at async MyDevice.fetchAndRestartTimer (/app/drivers/aircon/device.js:58:9)
at async MyDevice.onInit (/app/drivers/aircon/device.js:126:13)
at async MyDevice._onInit (/node_modules/@athombv/homey-apps-sdk-v3/lib/Device.js:148:7) {
_code: ‘4100’,
_httpCode: -1
}
2024-08-24T20:15:13.510Z [log] [ManagerDrivers] [Driver:aircon] [Device:5783c27d-1b06-439a-ad41-2915dbd9504c] Device ‘C784626698’ has been initialized
2024-08-24T20:15:13.542Z [log] [ManagerDrivers] [Driver:aircon] authenticated
2024-08-24T20:15:13.601Z [log] [ManagerDrivers] [Driver:aircon] authenticated
2024-08-24T20:15:13.901Z [err] [ManagerDrivers] [Driver:aircon] [Device:43d85ba4-4456-435c-b6f6-d82c050434c3] getDevice failed: ServiceError: Request failed with status code 400
Missing required header parameter or bad request for header
at ComfortCloudClient.handleError (/app/node_modules/panasonic-comfort-cloud-client/dist/src/ComfortCloudClient.js:147:31)
at ComfortCloudClient.getDevice (/app/node_modules/panasonic-comfort-cloud-client/dist/src/ComfortCloudClient.js:130:18)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async MyDriver.invokeClient (/app/drivers/aircon/driver.js:102:24)
at async MyDevice.fetchFromService (/app/drivers/aircon/device.js:32:22)
at async MyDevice.fetchAndRestartTimer (/app/drivers/aircon/device.js:58:9)
at async MyDevice.onInit (/app/drivers/aircon/device.js:126:13)
at async MyDevice._onInit (/node_modules/@athombv/homey-apps-sdk-v3/lib/Device.js:148:7) {
_code: ‘4000’,
_httpCode: -1
}

Thanks Robert - I have just managed to set this up and can now automate my mornings so the aircon only comes on if it is needed. I struggled for a while with an authentication issue when trying to add the device, but re-powering the Homey Pro resolved that. I appreciate the work you have put into this. Using it in New Zealand.

1 Like

Does the app write something to the timeline? It seems it makes entries without text so homey doesn’t show them. However Hdashboard crasht (update on it’s way) because of entries coming from this app without text.

The app doesn’t write to the timeline as far as I’m aware! I’m not even sure which API to use for that.

From the times it happens - are you able to guess what the app does to cause it?

Another forum post indicated that changes to boolean capabilities are automatically logged in the timeline.
The app’s only boolean capability is “onoff” - could this be related?

The app is currently failing to authenticate with Panasonic - sorry for the inconvenience.
I’ve registered an issue with the panasonic-comfort-cloud-client repo.

You may want to switch to a “dumb” schedule in the official mobile app…

2 Likes

I not use the homey comfort i wait till there is a app for it.
But i had the same problems.
U have de service cloud and the comfort cloud.
I used the same email adres for it.
And sinds the update last weekend i had problems.
So i changed the service cloud email to a other email adres and now it’s fine.

I get the same error message now. Seems to have been a issue the last week or so.

I’ve pushed version 1.1.10 with the upstream package fix for authentication. Please try it out!

2 Likes

Deployed 1.1.10 on my Homey. Worked perfect the first time (deploy+activate+authenticate 4 devices), but second time I activated the app in Homey and thus re-authenticated, only 3 of my 4 devices got activated. Tried multiple times (with minutes apart), but still fails for some of my devices:

2024-11-09T15:20:52.989Z [log] [MyApp] MyApp has been initialized
2024-11-09T15:20:56.433Z [log] [ManagerDrivers] [Driver:aircon] Driver has been initialized
2024-11-09T15:20:57.380Z [log] [ManagerDrivers] [Driver:aircon] initializing client (1.22.0)
2024-11-09T15:20:57.414Z [log] [ManagerDrivers] [Driver:aircon] authenticating xxx[at]yyy.com
2024-11-09T15:20:58.895Z [log] [ManagerDrivers] [Driver:aircon] initializing client (1.22.0)
2024-11-09T15:20:58.916Z [log] [ManagerDrivers] [Driver:aircon] authenticating xxx[at]yyy.com
2024-11-09T15:20:59.067Z [log] [ManagerDrivers] [Driver:aircon] initializing client (1.22.0)
2024-11-09T15:20:59.104Z [log] [ManagerDrivers] [Driver:aircon] authenticating xxx[at]yyy.com
2024-11-09T15:20:59.515Z [log] [ManagerDrivers] [Driver:aircon] initializing client (1.22.0)
2024-11-09T15:20:59.536Z [log] [ManagerDrivers] [Driver:aircon] authenticating xxx[at]yyy.com
2024-11-09T15:21:07.024Z [log] [ManagerDrivers] [Driver:aircon] authenticated
2024-11-09T15:21:07.069Z [log] [ManagerDrivers] [Driver:aircon] authenticated
2024-11-09T15:21:07.205Z [log] [ManagerDrivers] [Driver:aircon] authenticated
2024-11-09T15:21:07.524Z [err] [ManagerDrivers] [Driver:aircon] [Device:2db22bf5-…] getDevice failed: ServiceError: Request failed with status code 400
Missing required header parameter or bad request for header
at ComfortCloudClient.handleError (/node_modules/panasonic-comfort-cloud-client/dist/src/ComfortCloudClient.js:149:31)
at ComfortCloudClient.getDevice (/node_modules/panasonic-comfort-cloud-client/dist/src/ComfortCloudClient.js:132:18)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async MyDriver.invokeClient (/drivers/aircon/driver.js:102:24)
at async MyDevice.fetchFromService (/drivers/aircon/device.js:32:22)
at async MyDevice.fetchAndRestartTimer (/drivers/aircon/device.js:58:9)
at async MyDevice.onInit (/drivers/aircon/device.js:126:13)
at async MyDevice._onInit (/opt/homey-client/system/manager/ManagerApps/AppProcess/node_modules/@athombv/homey-apps-sdk-v3/lib/Device.js:1:1682) {
_code: ‘4000’,
_httpCode: 400
}

Works perfect. Many thanks.

Works perfect :raised_hands: Many Thanks :grinning:

Fails to add one of the 4 devices I have on every app restart. Instead of app restart, I tried removing and readding the device that failed initially on app restart. I now have all 4 devices working. But looks like authentication still is a bit shaky. I wonder why it authenticates 4 times on the API. Does the Homey app set up one client towards Panasonic API for each device?