[App][Pro] Panasonic Comfort Cloud Alternative

Thanks, @NickM! I’ve accepted the PR, bumped version to 1.1, and asked for HCS to update.
However, note that HCS is still not working. For the time being, using the SDK is the only way to get this app installed.

@Martijn_C, I’ve not seen a similar issue.
So you’re saying the flow actually seems to works OK, but the error appears?
If you disable any Device Capabilities cards, does it still happen?
Can you share the flow?

@Arnold_vd_Linden, can you be more specific about what triggers the error you’re seeing?
(Are you turing the units on manually, via the Panasonic app, or the Homey app?)
I’ve turned my unit on/off both manually and via Homey flow several times this weekend, without issue.

Hi @Robert_Schmidt ,

Yes, the error occurs in any flow, with any card. Doesn’t matter if the card is from Device Capabilities or your app. It always works, but also always returns this error. So also just testing the card “turn on AC” gives the error. My flow is very simple. If time is 20.30 and temperature is higher than 23 degrees, then set AC to 17 degrees and turn on AC.

When I change the airco setting with the remote controll. For example to Eco Mode and Flow Direction UD. And turn it off with the remote controll.
The next day turning the airco on manually via the Homey app I get these errors.
It is not when changing settings settings in the Homey app.

It looks like the error is only occured when settings are made outside the Homey app. Is the airco turned off with the Homey app it will turn on without errors the next time.

by the way.
Most times I get an Air Swing LR error and my units don’t have this option.

@Robert_Schmidt Thanks for making an alternative app, the ‘official’ one isn’t working for me on Homey Pro 2023. I hope to be able to try yours soon.

I understand the old Homey Community Store is no longer supported and doesn’t work anymore, and as a consequence I can’t install your version of the app. A change in ownership is now in progress and the new Homey Community Space is in development. When that’s done I should be able to try it again, correct?

Here’s an Article about the old/new HCS.

tried to install the app with my macbook pro.

  1. I installed node.js 18.16.1 LTS

  2. open terminal

  3. run npm install -g homey

  4. run homey login and authorized my login
    MBPvanLeon227:~ MrICW$ homey login
    ✓ Logging in…
    To log in with your Athom Account, please visit Athom CLI | Log-in
    ? Paste the code: 3***********************6
    ✓ You are now logged in as Leon Rl <i@
    .nl>

  5. downloaded the zip file from GitHub - ugumba/homey-panasonic-comfort-cloud-alt and extracted the file in a map in the downloads folder and run homey app install
    MBPvanLeon227:homey-panasonic-comfort-cloud-alt-master MrICW$ homey app install
    ? Choose an active Homey: Homey Pro van Leon
    You have selected Homey Pro van Leon as your active Homey.
    ✓ Pre-processing app…
    Added FlowCard change-air-swing-leftright for type actions
    Added FlowCard change-air-swing-updown for type actions
    Added FlowCard change-eco-mode for type actions
    Added FlowCard change-fan-speed for type actions
    Added FlowCard change-operation-mode for type actions
    Added Driver aircon
    Added Capability air_swing_lr
    Added Capability air_swing_ud
    Added Capability eco_mode
    Added Capability fan_auto_mode
    Added Capability fan_speed
    Added Capability nanoe_mode
    Added Capability operation_mode
    Command failed: npm ls --parseable --all --only=prod
    npm WARN config only Use --omit=dev to omit dev dependencies from the install.
    npm ERR! code ELSPROBLEMS
    npm ERR! missing: panasonic-comfort-cloud-client@1.2.0, required by net.schmidt-cisternas.pcc-alt@1.0.5
    npm ERR! A complete log of this run can be found in:
    npm ERR! /Users/MrICW/.npm/_logs/2023-06-29T15_30_09_863Z-debug-0.log
    This error may be fixed by running npm install in your app.

Have no idea what the problem could be is the panasonic comfort cloud client a mandatory part of the installation???

You need to run npm install before homey app install.

1 Like

I ran the npm install command and npm install -g homey and after a reboot of the laptop the homey app install installed properly the panasonic cloud alternative app:
✓ Typescript detected. Compiling…
✓ Typescript compilation successful
✓ Validating app…
✓ App validated successfully against level debug
✓ Packing Homey App…
— App archive size: 3.04 MB, 1170 files
✓ Installing Homey App on Homey Pro van Leon (https://192-168-1-3.homey.homeylocal.com)…
✓ Homey App net.schmidt-cisternas.pcc-alt successfully installed

but when I open the panasonic app en try to authenticate with my secondary username and password (only use is the homey app), I see in the log the next notification and cannot add any of my airco devices.

2023-06-29T18:54:10.603Z [log] [MyApp] MyApp has been initialized
2023-06-29T18:54:10.828Z [err] [ManagerDrivers] Error Initializing Driver aircon: Error: Cannot find module ‘/node_modules/follow-redirects/node_modules/debug/src/index.js’. Please verify that the package.json has a valid “main” entry
at tryPackage (node:internal/modules/cjs/loader:353:19)
at Function.Module._findPath (node:internal/modules/cjs/loader:566:18)
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:919:27)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at Module.require (/opt/homey-client/system/manager/ManagerApps/AppProcess/node_modules/@athombv/homey-apps-sdk-v3/index.js:1:183)
at require (node:internal/modules/cjs/helpers:102:18)
at Object. (/node_modules/follow-redirects/index.js:6:13)
at Module._compile (node:internal/modules/cjs/loader:1103:14)
at Object.Module._extensions…js (node:internal/modules/cjs/loader:1157:10) {
code: ‘MODULE_NOT_FOUND’,
path: ‘/node_modules/follow-redirects/node_modules/debug/package.json’,
requestPath: ‘debug’
}

Hi @Robert_Schmidt

Any clue about the errors? None of the cards run without error (although the action is executed).

The Panasonic comfort cloud alternative app works now. Instead of installing the app through node.js on my MacBook Pro I installed node.js on a windows machine and installed the app and this goes without errors and the app is working now.

1 Like

@Robert_Schmidt nicely done. Works perfectly. It really was a super simple install with NodeJS, if you understand the basic jist of it. Took me less than 2 minutes to get it all up and running!

1 Like

Sorry (also to the rest of you guys) for not checking in for a long while.

Still no idea for your errors, I’m afraid, @Martijn_C. I tried switching my Homey from English to Norwegian, in case the error was triggered by non-English - but no luck. A long shot, but could I ask you to switch temporarily to English, and send me the English error message?

Is the error always referring to air_swing_lr? My own unit doesn’t have this feature, so it appears to be silently ignored. Maybe the web service behaves differently for other models…

A little heads-up: I noticed today that my pump was not responding to Homey, and the app log was full of 401 HTTP errors. Restarting the app didn’t help.

I first tried to use my Homey credentials in the official Android PCC app. It prompted me to accept an updated T&C. Restarting the PCC-alt app still resulted in a 401 error.

Next, I clicked “Authenticate”, to force a new login and a fresh token. Seems to work fine from then on.

Not sure which of these were required - but maybe this helps someone else.

I noticed this as well. However I still keep getting a lot of this:

2023-08-28T15:34:48.457Z [log] [ManagerDrivers] [Driver:aircon] [Device:20033682-c7e0-4c79-af5d-df9dcbaab2c7] setCapabilityValue(onoff, false)
2023-08-28T15:34:48.525Z [log] [ManagerDrivers] [Driver:aircon] [Device:20033682-c7e0-4c79-af5d-df9dcbaab2c7] setCapabilityValue(measure_temperature, -255)
2023-08-28T15:34:48.588Z [log] [ManagerDrivers] [Driver:aircon] [Device:20033682-c7e0-4c79-af5d-df9dcbaab2c7] setCapabilityValue(target_temperature, -255)
2023-08-28T15:34:48.650Z [log] [ManagerDrivers] [Driver:aircon] [Device:20033682-c7e0-4c79-af5d-df9dcbaab2c7] setCapabilityValue(operation_mode, undefined)
unhandledRejection:
Error: Invalid capability (homey:app:net.schmidt-cisternas.pcc-alt:operation_mode) value type. Expected: string. Got: undefined
    at Remote Process
    at HomeyClient.emit (/node_modules/@athombv/homey-apps-sdk-v3/lib/HomeyClient.js:44:23)
    at Object.emit (/node_modules/@athombv/homey-apps-sdk-v3/manager/drivers.js:78:54)
    at Object.emit (/node_modules/@athombv/homey-apps-sdk-v3/lib/Driver.js:126:50)
    at /node_modules/@athombv/homey-apps-sdk-v3/lib/Device.js:570:27
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at MyDevice.setCapabilityValue (/node_modules/@athombv/homey-apps-sdk-v3/lib/Device.js:562:23)
    at MyDevice.setCap (/app/drivers/aircon/device.js:26:20)
    at MyDevice.fetchFromService (/app/drivers/aircon/device.js:47:20)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

as well as this:

unhandledRejection:
ServiceError: Request failed with status code 502
    at new ServiceError (/app/node_modules/panasonic-comfort-cloud-client/dist/src/model/ServiceError.js:20:28)
    at ComfortCloudClient.handleError (/app/node_modules/panasonic-comfort-cloud-client/dist/src/ComfortCloudClient.js:183:15)
    at ComfortCloudClient.<anonymous> (/app/node_modules/panasonic-comfort-cloud-client/dist/src/ComfortCloudClient.js:170:30)
    at step (/app/node_modules/panasonic-comfort-cloud-client/dist/src/ComfortCloudClient.js:33:23)
    at Object.throw (/app/node_modules/panasonic-comfort-cloud-client/dist/src/ComfortCloudClient.js:14:53)
    at rejected (/app/node_modules/panasonic-comfort-cloud-client/dist/src/ComfortCloudClient.js:6:65)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2023-08-28T07:51:43.918Z [err] [ManagerDrivers] [Driver:aircon] [Device:20033682-c7e0-4c79-af5d-df9dcbaab2c7] getDevice failed: ServiceError: Request failed with status code 502
    at new ServiceError (/app/node_modules/panasonic-comfort-cloud-client/dist/src/model/ServiceError.js:20:28)
    at ComfortCloudClient.handleError (/app/node_modules/panasonic-comfort-cloud-client/dist/src/ComfortCloudClient.js:183:15)
    at ComfortCloudClient.<anonymous> (/app/node_modules/panasonic-comfort-cloud-client/dist/src/ComfortCloudClient.js:170:30)
    at step (/app/node_modules/panasonic-comfort-cloud-client/dist/src/ComfortCloudClient.js:33:23)
    at Object.throw (/app/node_modules/panasonic-comfort-cloud-client/dist/src/ComfortCloudClient.js:14:53)
    at rejected (/app/node_modules/panasonic-comfort-cloud-client/dist/src/ComfortCloudClient.js:6:65)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  _code: undefined,
  _httpCode: 502
}

Thanks Robert, your tip to ‘Authenticate’ and restarting the app after this helped me out with the 401 error too.

It looks like Panasonic Comfort Cloud went down for server maintenance overnight, and now the app isn’t able to authenticate. I’ve triple-checked credentials, tried alternate credentials, tried using the official iOS app (works fine), and a variety of combinations of restarting and re-authenticating, without luck.

In this case it looks like the error I’m getting is HTTP 400, which makes me think Panasonic have changed the underlying API. Anyone else seeing the same issue?

2023-09-14T11:17:02.088Z [err] [ManagerDrivers] [Driver:aircon] login failed: ServiceError: Request failed with status code 400
    at new ServiceError (/app/node_modules/panasonic-comfort-cloud-client/dist/src/model/ServiceError.js:20:28)
    at ComfortCloudClient.handleError (/app/node_modules/panasonic-comfort-cloud-client/dist/src/ComfortCloudClient.js:183:15)
    at ComfortCloudClient.<anonymous> (/app/node_modules/panasonic-comfort-cloud-client/dist/src/ComfortCloudClient.js:105:30)
    at step (/app/node_modules/panasonic-comfort-cloud-client/dist/src/ComfortCloudClient.js:33:23)
    at Object.throw (/app/node_modules/panasonic-comfort-cloud-client/dist/src/ComfortCloudClient.js:14:53)
    at rejected (/app/node_modules/panasonic-comfort-cloud-client/dist/src/ComfortCloudClient.js:6:65)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  _code: undefined,
  _httpCode: 400
}

I have the same issue as you have.

Yep, same issue as NickM.

I did some digging and it looks like the underlying library can’t log in after whatever Panasonic did. I’ve raised an issue in their repo: Login fails with HTTP 400 after server updates · Issue #13 · marc2016/panasonic-comfort-cloud-client · GitHub

The underlying library appears to have been fixed, so I’ve put in a pull request to update the app.

I see Panasonic are planning another round of server maintenance on the 26th. Hopefully they don’t plan to break the API again…

2 Likes