Giter Site home page Giter Site logo

homebridge-panasonic-ac-platform / homebridge-panasonic-ac-platform Goto Github PK

View Code? Open in Web Editor NEW
48.0 7.0 5.0 1.22 MB

Homebridge platform plugin providing HomeKit support for Panasonic Comfort Cloud devices

License: Apache License 2.0

TypeScript 100.00%
homebridge homebridge-plugin homekit panasonic ac air-conditioner

homebridge-panasonic-ac-platform's Introduction

Homebridge Panasonic AC Platform

verified-by-homebridge Downloads GitHub version npm version

homebridge-panasonic-ac-platform is a dynamic platform plugin for Homebridge which provides HomeKit support for Panasonic Comfort Cloud devices (such as single and multi-split air conditioning systems).

How it works

The plugin communicates with your devices through the Comfort Cloud service. This means you must have a Comfort Cloud account (Panasonic ID) and your units must be registered and set up there before you can use this plugin.

All devices that are set up on your Comfort Cloud account will automaticaly appear in Homebridge and via HomeKit in your Home app (or other HomeKit app). You can also exclude one or more devices. For each device you can apply individual settings.

Comfort Cloud account (Panasonic ID)

  • Register and manage your Panasonic ID (used to manage Comfort Cloud) via app (iOS / Android) or browser - Panasonic ID.
  • From January 2024, Panasonic requires 2FA (Two Factor Authentication), you can choose: TOTP code or SMS - the recommended choice is the TOTP code (it could be available after clicking on the small link 'try another verification method').
  • Instructions on how to create a dual-account setup.

Install plugin

This plugin can be easily installed through Homebridge UI or via NPM "globally" by typing:

npm install -g homebridge-panasonic-ac-platform

Configure plugin

Configure the plugin through the settings UI or in the JSON editor.

config.json example
{
  "platforms": [
    {
      "platform": "Panasonic AC Platform",
      "name": "Homebridge Panasonic AC Platform",
      "email": "[email protected]",
      "password": "********",
      "key2fa": "GVZCKT2LLBLV2QBXMFAWFXKFKU5EWL2H",
      "suppressOutgoingUpdates": false, 
      "logsLevel": 1,
      "devices": [
        {
            "name": "CS-Z50VKEW+4942673181",
            "excludeDevice": true,
            "minHeatingTemperature": 8,
            "exposeOutdoorTemp": false,
            "exposeNanoe": true,
            "exposeInsideCleaning": false,
            "exposeEcoNavi": false,
            "exposeDryMode": false,
            "exposeQuietMode": true,
            "exposePowerfulMode": false,
            "swingDefaultUD": "CENTER",
            "swingDefaultLR": "CENTER"
        },
        {
            "name": "Bedroom AC",
            "excludeDevice": false,
            "exposeOutdoorTemp": true,
            "exposeNanoe": false,
            "exposeInsideCleaning": true,
        },
      ]
    }
  ]
}

General

  • platform (string): Tells Homebridge which platform this config belongs to. Leave as is.

  • name (string): Name of the plugin displayed in Homebridge log and as plugin bridge name.

  • email (string): The username of your Comfort Cloud (Panasonic ID) account.

  • password (string): The password of your Comfort Cloud (Panasonic ID) account.

  • key2fa (string): 2FA key received from Panasonic (32 characters). Example: GVZCKT2LLBLV2QBXMFAWFXKFKU5EWL2H. Note: This field is currently not required to make this plugin work, but Panasonic already requires 2FA (code or SMS, recommended code) to log in to Comfort Cloud, so it may be required soon.

  • suppressOutgoingUpdates (boolean): When enabled, changes in the Home app will not be sent to Comfort Cloud. Useful for testing your installation without constantly switching the state of your AC.

  • logsLevel (integer): Logs level. 0 - only errors and important info, 1 - standard, 2 - all (including debug). Note: to see debug messages in logs it is also required to enable Debug in Homebridge Settings.

Individual for each device

  • name (string): Device name (as it is in Comfort Cloud account) or serial (E.G.: CS-Z50VKEW+2462503161). Devices names and serial numbers are displayed in Homebridge log after restart, names can be also found in Panasonic Comfort Cloud app, serial numbers can be also found on the stickers on the devices.

  • excludeDevice (boolean): Exclude device from Homebridge and HomeKit (it will stay in Comfort Cloud).

  • minHeatingTemperature (integer): The default heating temperature range is 16-30°C. Some Panasonic ACs have an additional heating mode for the range of 8-15°C. You can use this setting to adjust the minimum value. Leave it empty to use the default value.

  • exposeInsideTemp (boolean): When enabled it will create a virtual temperature sensor which will display the temperature from inside unit. This can be used for monitoring or automation purposes. Note: It is recomended to use external temperature sensor (not built-in in AC).

  • exposeOutdoorTemp (boolean): When enabled it will create a dummy temperature sensor which will display the temperature from outdoor unit. This can be used for monitoring or automation purposes. Note: It may be required for the device to be turned on to retrieve the current temperature from the outdoor unit.

  • exposePower (boolean): When enabled it will create a switch to control Power (on/off).

  • exposeNanoe (boolean): When enabled it will create a switch to control Nanoe.

  • exposeInsideCleaning (boolean): When enabled it will create a switch to control Inside Cleaning.

  • exposeEcoNavi (boolean): When enabled it will create a switch to control Eco Navi.

  • exposeEcoFunction (boolean): When enabled it will create a switch to control Eco Function.

  • exposeCoolMode (boolean): When enabled it will create a switch to control Cool Mode.

  • exposeHeayMode (boolean): When enabled it will create a switch to control Heat Mode.

  • exposeDryMode (boolean): When enabled it will create a switch to control Dry Mode.

  • exposeFanMode (boolean): When enabled it will create a switch to control Fan Mode.

  • exposeNanoeStandAloneMode (boolean): When enabled it will create a switch to control Nanoe Stand Alone Mode.

  • exposeQuietMode (boolean): When enabled it will create a switch to control Quiet Mode. Quiet Mode can also be enabled by setting the speed slider (rotation) to 1.

  • exposePowerfulMode (boolean): When enabled it will create a switch to control Powerful Mode. Powerful Mode can also be enabled by setting the speed slider (rotation) to 7.

  • exposeSwingUpDown (boolean): When enabled it will create a switch to control Swing Up Down.

  • exposeSwingLeftRight (boolean): When enabled it will create a switch to control Swing Left Right.

  • exposeFanSpeed (boolean): When enabled it will create a switch to control Fan Speed. Value 0 will turn device off, value from 1 to 20 = speed 1, value from 21 to 40 = speed 2, value from 41 to 60 = speed 3, value from 61 to 80 = speed 4, value from 81 to 99 = speed 5 and value 100 = speed auto. Note: changing value will turn off Quiet / Powerful mode.

  • swingDefaultUD (string): Desired position of the Up-Down flaps when swing is switched off.

  • swingDefaultLR (string): Desired position of the Left-Right flaps when swing is switched off.

Device control

HomeKit has a limited number of switches, which is much less than the number of available options in Panasonic Comfort Cloud. Therefore, in the plugin settings you can choose what controls what and add additional sensors and switches. You can apply individual settings for each device.

Additional sensors and switches
  • Enable additional sensor for outdoor temp. and/or switches for: Nanoe, Inside Cleaning, Eco Navi, Cool Mode, Heat Mode, Dry Mode, Fan mode, Quiet Mode, Powerful Mode, Swing Up Down, Swing Left Right, Fan Speed, etc.
  • Sensor / Switch will work only if device support this function.
  • Some values can be changed only when device is turned on (E.G.: Quiet Mode, Powerful mode, Swing Up Down, Swing Left Right).
  • These sensors / switches will be available in HomeKit, directly in your main device or in device / settings (wheel icon) / accessories.
  • If you add at least one sensor or switch, the appearance of the air conditioning in HomeKit will change to accessory group (rotation speed and swing will be available after entering the device / settings (wheel icon) / accessories / device / settings (wheel icon)). You can also use the option 'show as separate tiles' to separate the accessories.
Fan speed (including Quiet and Powerful Mode)

For the built-in slider (not additional), the following mapping applies:

Home app slider position Comfort Cloud setting
(leftmost) 0 Device off
1 Quiet mode
2 Fan speed: 1
3 Fan speed: 2
4 Fan speed: 3
5 Fan speed: 4
6 Fan speed: 5
7 Powerful mode
(rightmost) 8 Auto
Oscilate switch (swing)
  • Activation of Oscilate switch from HomeKit will set swing to auto (for up-down and left-right).
  • Deactivation of the Oscilate switch from HomeKit will set desired positions - you can set them in plugin config.
  • When refreshing data, it will activate switch if at least one of the swing modes be enabled (up-down or left-right or both), otherwise it will be turned off.
  • For more control you can add additional switches for up-down swing and left-right swing.
Refreshing data of devices
  • The data is refreshed automatically: every 10 minutes when the device is turned on and every 60 minutes when it is turned off. Data is also refreshed every time the state of the device is changed using HomeKit / Apple Home.
  • Temperature from outdoor unit is only available when device is on.

Troubleshooting

Plugin doesn't work
  • Make sure that you can successfully log in and control each device via Panasonic Comfort Cloud application.
  • Accept all terms, conditions, etc in Panasonic Comfort Cloud app.
  • Update plugin, Homebridge and all its components and Apple hubs to the newest versions.
  • Disconnect each Comfort Cloud device (like AC) from the power and turn it on again (or restart WiFi in them).
  • Restart Internet routers.
  • Restart Homebridge or plugin bridge.
  • Remove one or move device from Homebridge cache (Homebridge settings > remove one device from cache).
  • Set Logs Level to all (in plugin config) and enable debug mode (in Homebridge settings) - this will include more detailed information in the log.
Incorrect display or name of device, sensor or switch

Remove device from Homebridge cache (Homebridge settings > remove one device from cache).

Wrong temperature
  • Built-in temperature sensors (in the internal and external unit) give only approximate values (as the manufacturer himself indicates).
  • Values from outdoor sensors are shown and updated only when the device is turned on.
  • Comfort Cloud updates data only from time to time, the same plugin, which is why the temperature in the Panasonic Comfort Cloud application may be different than in HomeKit / Apple Home. You can force refresh in Panasonic app by pulling down the screen.
  • For these reasons, it is not recommended to use built-in sensors for automation. Instead, it is advisable to use an external sensor.
  • So what are these built-in sensors for? Internal sensor is for two simple automations that every AC have built-in: for cooling mode turn off cooling when the room temperature (internal sensor) is equal to or lower than the set, and for heating mode when it is equal or higher. Outdoor sensor is for detecting when AC should run defrost.
Siri and voice commands

If everything works properly and you can control devices using the Apple Home application, you can also control it using Siri. Commands fully depend on Apple.

Examples of commands:

  • Hey Siri, turn on [device name]
  • Hey Siri, [device name] , turn off
  • Hey Siri, [device name] , set [auto, heat, cool] mode
  • Hey Siri, [device name] , set rotation speed to [value from 1 to 8]

You can also combine several commands into one:

  • Hey Siri, [device name] , set [auto, heat, cool] mode and rotation speed to [value from 1 to 8]
Child bridge
Comfort Cloud manual

https://www.panasonic.com/global/hvac/products/comfort-cloud/how-to-set-up-comfort-cloud.html

Contributing and support

  • Test/use the plugin and report issues and share feedback: Issues.
  • Contribute with your own bug fixes, code clean-ups, or additional features: Pull Requests.
  • Develop: developers.md.
  • Check Comfort Cloud app, how it works and how it comunicates with server: app.md.

Acknowledgements

  • Thanks to embee8 for creating this plugin.
  • Thanks to everyone helping in the development of this plugin and obtaining new Comfort Cloud API.
  • Thanks to the team behind Homebridge. Your efforts do not go unnoticed.

Disclaimer

  • This is not the official Panasonic plugin. It uses the official Panasonic API used to support official applications for iOS and Android. Panasonic has not provided an official API to support external plugins, so this method may stop working at any time.
  • Homebridge connect via Internet with Comfort Cloud (Panasonic platform), this solution does not work locally.
  • Despite the efforts made, the operation of the plugin is without any guarantees.
  • All actions are at your own risk.
  • All product and company names are trademarks™ or registered® trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them.
Alternatives to this plugin
  • Link Comfort Cloud to Google Assistant (manual).

  • Link Comfort Cloud to Amazon Alexa (manual).

  • Official Panasonic Comfort Cloud app for iOS / Android

  • Dedicated remote controller.

  • Local access, but this requires reworking of the equipment, which will lose the warranty, so rather not recommended (manual).

  • Control by IR (imitates an IR remote control), but it only allows you to send commands (not possible to read the state). Examples:

    • Aqara Hub M2 or M3. This Hub will directly exposes IR to Homekit. For Hub M2 you need to create scene in Aqara app for every IR command, for IR commands scenes are the only way to sync to HomeKit.

    • Broadlink RM4 Mini or Pro. They work as WiFi devices. You need to install Homebridge plugin (homebridge-broadlink-rm) to work with this. For every command there will be separate accessory in HomeKit.

    • Any Zigbee IR blaster. You can easily add Zigbee support to Homebridge. Just connect the Conbee stick, enable the support in hb-config (Extra packages / deCONZ), install the appropriate plugin (E.G.: homebridge-deconz) and add the selected IR blaster.

Changelog

Most important changes from version 4.0.0

  • Completely new Comfort Cloud API. All versions below 4.0.0 will not work.
  • Option to add additional sensors, switches and sliders to check and control: Inside temp., Outside temp., Nanoe, Inside Cleaning, Eco Navi, Dry Mode, Fan Mode, Quiet Mode, Powerful Mode, Swing Up Down, Swing Left Right, Fan speed, and many more.
  • A new way to send parameters to Comfort Cloud, from now on all commands set at short interval of time are collected together and sent as one, not separately as was the case before. This will reduce the number of requests to the server.
  • Workaround for changes in API - values for fanSpeed and ecoMode (Quiet and Powerful modes) are no longer stored in the API after turning off the device.
  • Update App Version to 1.21.1.
  • Fixed small bugs, dependency updates, etc.

homebridge-panasonic-ac-platform's People

Contributors

dependabot[bot] avatar embee8 avatar jandersonhill avatar mkz212 avatar nanos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

homebridge-panasonic-ac-platform's Issues

Random activation of airco

Hi,
Not sure whether this is something that happens to others as well. I have 6 airco units in HomeKit via this plugin. I can control them perfectly, but sometimes (e.g. at night, when I’m away) I notice that the airco’s are turned on. Even the ones we do not use currently. It seems that they are turning on on their own, while there is no automation in HomeKit. Any idea what might cause this?
Regards,
Sven

No connection possible after holiday

Hi,
I got back from holiday (two weeks) and my airco units do not respond to homekit commands anymore. The error I get in Hoobs:

31-7-2022 22:58:27Panasonic Ac Platform BridgeConfiguration change
31-7-2022 22:58:27panasonicacplatformbridge stopping
31-7-2022 22:58:32Panasonic Ac Platform Bridge starting
31-7-2022 22:58:41Panasonic Ac Platform BridgeLoaded plugin 'homebridge-panasonic-ac-platform'
31-7-2022 22:58:41Panasonic Ac Platform BridgeLoading 1 platforms...
31-7-2022 22:58:41Panasonic Ac Platform BridgeHomebridge Panasonic AC PlatformLoading accessory 'Master Bedroom' from cache.
31-7-2022 22:58:41Panasonic Ac Platform BridgeHomebridge Panasonic AC PlatformLoading accessory 'Slaapkamer 1e Garage' from cache.
31-7-2022 22:58:41Panasonic Ac Platform BridgeHomebridge Panasonic AC PlatformLoading accessory 'Slaapkamer 1e Hoek' from cache.
31-7-2022 22:58:41Panasonic Ac Platform BridgeHomebridge Panasonic AC PlatformLoading accessory 'Slaapkamer 2e Hoek' from cache.
31-7-2022 22:58:41Panasonic Ac Platform BridgeHomebridge Panasonic AC PlatformLoading accessory 'Slaapkamer 2e Garage' from cache.
31-7-2022 22:58:41Panasonic Ac Platform BridgeHomebridge Panasonic AC PlatformLoading accessory 'Mancave' from cache.
31-7-2022 22:58:41Panasonic Ac Platform BridgeHomebridge Panasonic AC PlatformAttempting to log into Comfort Cloud.
31-7-2022 22:58:41Panasonic Ac Platform BridgeBridge is running on port 51886.
31-7-2022 22:58:43Panasonic Ac Platform BridgeHomebridge Panasonic AC PlatformERRORLogin failed. The Comfort Cloud server might be experiencing issues at the moment. Bridge will try to log in again in 360 seconds. If the issue persists, make sure you configured the correct email and password and run the latest version of the plugin. Restart Bridge when you change your config, as it will probably not have an effect on its own. If the error still persists, please report to https://github.com/embee8/homebridge-panasonic-ac-platform/issues.
31-7-2022 22:58:43Panasonic Ac Platform BridgeHomebridge Panasonic AC PlatformSuccessfully logged in.
31-7-2022 22:58:43Panasonic Ac Platform BridgeHomebridge Panasonic AC PlatformConfiguring outdoor unit.
31-7-2022 22:58:43Panasonic Ac Platform BridgeHomebridge Panasonic AC PlatformDiscovering devices on Comfort Cloud.
31-7-2022 22:58:43Panasonic Ac Platform BridgeHomebridge Panasonic AC PlatformERRORAn error occurred during device discovery. Turn on debug mode for more information.

I tried rebooting hoobs, the bridge, and changing the version to 1.15.1 (latest according to App Store) but no change.

Any ideas what might cause this? Before it worked perfectly for multiple months, really is a great plugin!

Sven

Fan speed to auto

Hello

As far as I can see, HomeKit does not support setting fan speed to auto.

Currently, this plugin turns off the air con when setting fan speed to 0%, which offers no benefit to user. Would it be possible to change plugin behaviour such that fan speed 0% = auto?

Connection issues not handled well - excessive logging

Connection to Comfort Cloud seems to be shaky sometimes, I think due to problems on Panasonic's side. There can be multiple of these issues a day.
Whenever resolution of the IP address fails, or there is a '502 Bad Gateway' or a '504 Gateway Time-out' error, a very lengthy error message is logged, which is is overflowing the Homebridge log file.

Example:

[17/01/2022, 17:01:13] [Homebridge Panasonic AC Platform] getaddrinfo ENOTFOUND accsmart.panasonic.com
[17/01/2022, 17:02:18] [Homebridge Panasonic AC Platform] <ref *2> Writable {
  _writableState: WritableState {
    objectMode: false,
    highWaterMark: 16384,
    finalCalled: false,
    needDrain: false,
    ending: false,
    ended: false,
    finished: false,
    destroyed: false,
    decodeStrings: true,
    defaultEncoding: 'utf8',
    length: 0,
    writing: false,
    corked: 0,
    sync: true,
    bufferProcessing: false,
    onwrite: [Function: bound onwrite],
    writecb: null,
    writelen: 0,
    afterWriteTickInfo: null,
    buffered: [],
    bufferedIndex: 0,
    allBuffers: true,
    allNoop: true,
    pendingcb: 0,
    constructed: true,
    prefinished: false,
    errorEmitted: false,
    emitClose: true,
    autoDestroy: true,
    errored: null,
    closed: false,
    closeEmitted: false,
    [Symbol(kOnFinished)]: []
  },
  _events: [Object: null prototype] {
    response: [Function: handleResponse],
    error: [Function: handleRequestError]
  },
  _eventsCount: 2,
  _maxListeners: undefined,
  _options: {
    maxRedirects: 21,
    maxBodyLength: 10485760,
    protocol: 'https:',
    path: '/deviceStatus/now/CS-Z25XKEW+488680xxxx',
    method: 'GET',
    headers: {
      Accept: 'application/json; charset=UTF-8',
      'Content-Type': 'application/json',
      'User-Agent': 'G-RAC',
      'X-APP-TYPE': '0',
      'X-APP-VERSION': '1.14.0',
      'X-User-Authorization': 'xxxxxxxxxxxxxxxxxxxxxxxx'
    },
    agent: undefined,
    agents: { http: undefined, https: undefined },
    auth: undefined,
    hostname: 'accsmart.panasonic.com',
    port: null,
    nativeProtocols: { 'http:': [Object], 'https:': [Object] },
    pathname: '/deviceStatus/now/CS-Z25XKEW+488680xxxx'
  },
  _ended: true,
  _ending: true,
  _redirectCount: 0,
  _redirects: [],
  _requestBodyLength: 0,
  _requestBodyBuffers: [],
  _onNativeResponse: [Function (anonymous)],
  _currentRequest: <ref *1> ClientRequest {
    _events: [Object: null prototype] {
      response: [Function],
      abort: [Function (anonymous)],
      aborted: [Function (anonymous)],
      connect: [Function (anonymous)],
      error: [Function (anonymous)],
      socket: [Function (anonymous)],
      timeout: [Function (anonymous)]
    },
    _eventsCount: 7,
    _maxListeners: undefined,
    outputData: [],
    outputSize: 0,
    writable: true,
    destroyed: false,
    _last: true,
    chunkedEncoding: false,
    shouldKeepAlive: false,
    maxRequestsOnConnectionReached: false,
    _defaultKeepAlive: true,
    useChunkedEncodingByDefault: false,
    sendDate: false,
    _removedConnection: false,
    _removedContLen: false,
    _removedTE: false,
    _contentLength: 0,
    _hasBody: true,
    _trailer: '',
    finished: true,
    _headerSent: true,
    _closed: false,
    socket: TLSSocket {
      _tlsOptions: [Object],
      _secureEstablished: true,
      _securePending: false,
      _newSessionPending: false,
      _controlReleased: true,
      secureConnecting: true,
      _SNICallback: null,
      servername: 'accsmart.panasonic.com',
      alpnProtocol: false,
      authorized: false,
      authorizationError: 'UNSPECIFIED',
      encrypted: true,
      _events: [Object: null prototype],
      _eventsCount: 10,
      connecting: false,
      _hadError: true,
      _parent: null,
      _host: 'accsmart.panasonic.com',
      _readableState: [ReadableState],
      _maxListeners: undefined,
      _writableState: [WritableState],
      allowHalfOpen: false,
      _sockname: null,
      _pendingData: null,
      _pendingEncoding: '',
      server: undefined,
      _server: null,
      ssl: null,
      _requestCert: true,
      _rejectUnauthorized: true,
      parser: null,
      _httpMessage: [Circular *1],
      [Symbol(res)]: [TLSWrap],
      [Symbol(verified)]: false,
      [Symbol(pendingSession)]: <Buffer xx xx xx xx xx xx xx xx xx xx xx xx ... 990 more bytes>,
      [Symbol(async_id_symbol)]: 97036383,
      [Symbol(kHandle)]: null,
      [Symbol(kSetNoDelay)]: false,
      [Symbol(lastWriteQueueSize)]: 291,
      [Symbol(timeout)]: null,
      [Symbol(kBuffer)]: null,
      [Symbol(kBufferCb)]: null,
      [Symbol(kBufferGen)]: null,
      [Symbol(kCapture)]: false,
      [Symbol(kBytesRead)]: 0,
      [Symbol(kBytesWritten)]: 291,
      [Symbol(connect-options)]: [Object]
    },
    _header: 'GET /deviceStatus/now/CS-Z25XKEW+488680xxxx HTTP/1.1\r\n' +
      'Accept: application/json; charset=UTF-8\r\n' +
      'Content-Type: application/json\r\n' +
      'User-Agent: G-RAC\r\n' +
      'X-APP-TYPE: 0\r\n' +
      'X-APP-VERSION: 1.14.0\r\n' +
      'X-User-Authorization: xxxxxxxxxxxxxxxxxxxxxxxx\r\n' +
      'Host: accsmart.panasonic.com\r\n' +
      'Connection: close\r\n' +
      '\r\n',
    _keepAliveTimeout: 0,
    _onPendingData: [Function: nop],
    agent: Agent {
      _events: [Object: null prototype],
      _eventsCount: 2,
      _maxListeners: undefined,
      defaultPort: 443,
      protocol: 'https:',
      options: [Object: null prototype],
      requests: [Object: null prototype] {},
      sockets: [Object: null prototype],
      freeSockets: [Object: null prototype] {},
      keepAliveMsecs: 1000,
      keepAlive: false,
      maxSockets: Infinity,
      maxFreeSockets: 256,
      scheduling: 'lifo',
      maxTotalSockets: Infinity,
      totalSocketCount: 2,
      maxCachedSessions: 100,
      _sessionCache: [Object],
      [Symbol(kCapture)]: false
    },
    socketPath: undefined,
    method: 'GET',
    maxHeaderSize: undefined,
    insecureHTTPParser: undefined,
    path: '/deviceStatus/now/CS-Z25XKEW+488680xxxx',
    _ended: false,
    res: null,
    aborted: false,
    timeoutCb: null,
    upgradeOrConnect: false,
    parser: null,
    maxHeadersCount: null,
    reusedSocket: false,
    host: 'accsmart.panasonic.com',
    protocol: 'https:',
    _redirectable: [Circular *2],
    [Symbol(kCapture)]: false,
    [Symbol(kNeedDrain)]: false,
    [Symbol(corked)]: 0,
    [Symbol(kOutHeaders)]: [Object: null prototype] {
      accept: [Array],
      'content-type': [Array],
      'user-agent': [Array],
      'x-app-type': [Array],
      'x-app-version': [Array],
      'x-user-authorization': [Array],
      host: [Array]
    }
  },
  _currentUrl: 'https://accsmart.panasonic.com/deviceStatus/now/CS-Z25XKEW+488680xxxx',
  [Symbol(kCapture)]: false
}
[17/01/2022, 17:02:18] [Homebridge Panasonic AC Platform] CA certificate key too weak

Login failing today but nothing changed in setup?

Any ideas?

14:21:31Panasonic AC BridgeHomebridge Panasonic AC PlatformLoading accessory 'Upstairs' from cache.
14:21:31Panasonic AC BridgeHomebridge Panasonic AC PlatformLoading accessory 'Garage' from cache.
14:21:31Panasonic AC BridgeHomebridge Panasonic AC PlatformAttempting to fetch latest Comfort Cloud version from the App Store.
14:21:32Panasonic AC BridgeBridge is running on port 51856.
14:21:33Panasonic AC BridgeHomebridge Panasonic AC PlatformThe latest app version is 1.18.0.
14:21:33Panasonic AC BridgeHomebridge Panasonic AC PlatformAttempting to log into Comfort Cloud.
14:21:34Panasonic AC BridgeHomebridge Panasonic AC PlatformERRORLogin failed. Skipping device discovery.
14:21:34Panasonic AC BridgeHomebridge Panasonic AC PlatformERRORThe Comfort Cloud server might be experiencing issues at the moment. The plugin will try to log in again in 360 seconds. If the issue persists, make sure you configured the correct email and password and run the latest version of the plugin. Restart Bridge when you change your config.

Message of unavailable temeprature appears every minute when AC is switched off

Hi,

Actually, when AC is switched off (or at least when homebridge starts with AC switched off) two messages appears on homebridge's log every minute:

[17/1/2022 12:54:46] [Homebridge Panasonic AC Platform] Temperature state is not available
[17/1/2022 12:54:46] [Homebridge Panasonic AC Platform] Outdoor temperature is not available
[17/1/2022 12:55:46] [Homebridge Panasonic AC Platform] Temperature state is not available
[17/1/2022 12:55:46] [Homebridge Panasonic AC Platform] Outdoor temperature is not available
[17/1/2022 12:56:47] [Homebridge Panasonic AC Platform] Temperature state is not available
[17/1/2022 12:56:47] [Homebridge Panasonic AC Platform] Outdoor temperature is not available
[17/1/2022 12:57:46] [Homebridge Panasonic AC Platform] Temperature state is not available
[17/1/2022 12:57:46] [Homebridge Panasonic AC Platform] Outdoor temperature is not available
[17/1/2022 12:58:46] [Homebridge Panasonic AC Platform] Temperature state is not available
[17/1/2022 12:58:46] [Homebridge Panasonic AC Platform] Outdoor temperature is not available
[17/1/2022 12:59:46] [Homebridge Panasonic AC Platform] Temperature state is not available
[17/1/2022 12:59:46] [Homebridge Panasonic AC Platform] Outdoor temperature is not available

It's like.. OK man, I know it, AC is off! Keep calm!

Can these two messages be showed only on debug mode? I don't need a log full of these messages that can't let me see other messages from other pluggins because log is full of these messages

I've tried to change this.platform.log.error by this.platform.log.debug on my installation for these two messages, but won't work (or I don't doing it well...)

Thanks!!

Dry Mode instead of Heat

Wondering if switching out Heat from the config with Dry will enable homekit to set it to dry. I can use Homekit to set the AC to auto, but i have to go back to the panasonic app to set it to dry.

Might also be related to the eco navi option i saw with another related inquiry here.

from the left, cool, dry, nanoex, auto
@
IMG_5204

Eco mode

Are there anyway can expose eco mode?

AC always turns on to Heating at 22º

Hey!
Quite often when I turn on one of my ACs, it defaults to Heating at 22º... even if its last use was Cooling at 21º. It doesn't seem to happen all the time - for example, if I turn it back on after turning it off only a short time ago (like, 15 minutes maybe), it remembers.

When it does turn itself on at Heating 22º, when I then go into the Home app to change it to cooling at 21º, it then doesn't seem to alter the main Home app tile - even though it has definitely changed on the AC (confirmed in the Cloud Comfort app).

Potentially this is a HomeKit bug more than a plugin bug... but wanted to flag it / ask about it still...

Sudden "Login failed" despite credentials being correct

Everything was working perfectly, until a few days ago, whereupon I see:

Login failed. Skipping device discovery.

The Comfort Cloud server might be experiencing issues at the moment. The plugin will try to log in again in 360 seconds. If the issue persists, make sure you configured the correct email and password and run the latest version of the plugin. Restart Homebridge when you change your config.

The credentials haven't changed, and I can use them to log in succesfully on Panasonic's mobile app still.

What else can I try?

Show changes in logs

I suggest adding to logs info about every device status change. Look every this.platform.log.info() in the code below:

/**
     * Handle 'SET' requests from HomeKit
     * These are sent when the user changes the state of an accessory,
     * for example, turning on a Light bulb.
     */
    async setActive(value) {
        this.platform.log.debug(`Accessory: setActive() for device '${this.accessory.displayName}'`);
        const parameters = {
            operate: value === this.platform.Characteristic.Active.ACTIVE ? 1 : 0,
        };
        this.sendDeviceUpdate(this.accessory.context.device.deviceGuid, parameters);
		this.platform.log.info(`${this.accessory.displayName}: ${value === 1 ? "On" : "Off"}`);
    }
    async setTargetHeaterCoolerState(value) {
        this.platform.log.debug(`Accessory: setTargetHeaterCoolerState() for device '${this.accessory.displayName}'`);
        const parameters = {
            operate: 1,
        };
        switch (value) {
            case this.platform.Characteristic.TargetHeaterCoolerState.AUTO:
                parameters.operationMode = 0;
				this.platform.log.info(`${this.accessory.displayName}: Mode Auto`);
                break;
            case this.platform.Characteristic.TargetHeaterCoolerState.COOL:
                parameters.operationMode = 2;
				this.platform.log.info(`${this.accessory.displayName}: Mode Cool`);
                break;
            case this.platform.Characteristic.TargetHeaterCoolerState.HEAT:
                parameters.operationMode = 3;
				this.platform.log.info(`${this.accessory.displayName}: Mode Heat`);
                break;
            default:
                this.platform.log.error('Unknown TargetHeaterCoolerState', value);
                return;
        }
        this.sendDeviceUpdate(this.accessory.context.device.deviceGuid, parameters);
    }
    async setRotationSpeed(value) {
        this.platform.log.debug(`Accessory: setRotationSpeed() for device '${this.accessory.displayName}'`);
        const parameters = {};
        switch (value) {
            // See README for the mapping of slider position to Comfort Cloud payload.
            case 0:
                // HomeKit independently switches off the accessory
                // in this case, which triggers setActive().
                // Nothing to handle here, but documenting for clarity.
                break;
            case 1:
                parameters.ecoMode = enums_1.ComfortCloudEcoMode.Quiet;
				this.platform.log.info(`${this.accessory.displayName}: Quiet Mode`);
                break;
            case 2:
                parameters.ecoMode = enums_1.ComfortCloudEcoMode.AutoOrManual;
                parameters.fanSpeed = enums_1.ComfortCloudFanSpeed.One;
				this.platform.log.info(`${this.accessory.displayName}: Fan speed 1`);
                break;
            case 3:
                parameters.ecoMode = enums_1.ComfortCloudEcoMode.AutoOrManual;
                parameters.fanSpeed = enums_1.ComfortCloudFanSpeed.Two;
				this.platform.log.info(`${this.accessory.displayName}: Fan speed 2`);
                break;
            case 4:
                parameters.ecoMode = enums_1.ComfortCloudEcoMode.AutoOrManual;
                parameters.fanSpeed = enums_1.ComfortCloudFanSpeed.Three;
				this.platform.log.info(`${this.accessory.displayName}: Fan speed 3`);
                break;
            case 5:
                parameters.ecoMode = enums_1.ComfortCloudEcoMode.AutoOrManual;
                parameters.fanSpeed = enums_1.ComfortCloudFanSpeed.Four;
				this.platform.log.info(`${this.accessory.displayName}: Fan speed 4`);
                break;
            case 6:
                parameters.ecoMode = enums_1.ComfortCloudEcoMode.AutoOrManual;
                parameters.fanSpeed = enums_1.ComfortCloudFanSpeed.Five;
				this.platform.log.info(`${this.accessory.displayName}: Fan speed 5`);
                break;
            case 7:
                parameters.ecoMode = enums_1.ComfortCloudEcoMode.Powerful;
				this.platform.log.info(`${this.accessory.displayName}: Powerful Mode`);
                break;
            case 8:
                parameters.ecoMode = enums_1.ComfortCloudEcoMode.AutoOrManual;
                parameters.fanSpeed = enums_1.ComfortCloudFanSpeed.Auto;
				this.platform.log.info(`${this.accessory.displayName}: Fan speed Auto`);
                break;
        }
        this.sendDeviceUpdate(this.accessory.context.device.deviceGuid, parameters);
    }
    async setSwingMode(value) {
        this.platform.log.debug(`Accessory: setSwingMode() for device '${this.accessory.displayName}'`);
        const parameters = {};
        if (value === this.platform.Characteristic.SwingMode.SWING_ENABLED) {
            // Activate swing mode
            // and (if needed) reset one set of fins to their default position.
            switch (this.platform.platformConfig.swingModeDirections) {
                case enums_1.SwingModeDirection.LeftRightAndUpDown:
                    parameters.fanAutoMode = enums_1.ComfortCloudFanAutoMode.AirSwingAuto;
					this.platform.log.info(`${this.accessory.displayName}: Swing mode Left/Right and Up/Down`);
                    break;
                case enums_1.SwingModeDirection.LeftRightOnly:
                    parameters.fanAutoMode = enums_1.ComfortCloudFanAutoMode.AirSwingLR;
                    parameters.airSwingUD = this.swingModeUpDownToComfortCloudPayloadValue(this.platform.platformConfig.swingModeDefaultPositionUpDown);
					this.platform.log.info(`${this.accessory.displayName}: Swing mode Left/Right`);
                    break;
                case enums_1.SwingModeDirection.UpDownOnly:
                    parameters.fanAutoMode = enums_1.ComfortCloudFanAutoMode.AirSwingUD;
                    parameters.airSwingLR = this.swingModeLeftRightToComfortCloudPayloadValue(this.platform.platformConfig.swingModeDefaultPositionLeftRight);
					this.platform.log.info(`${this.accessory.displayName}: Swing mode Up/Down`);
                    break;
                default:
                    parameters.fanAutoMode = enums_1.ComfortCloudFanAutoMode.AirSwingAuto;
					this.platform.log.info(`${this.accessory.displayName}: Swing mode Auto`);
                    break;
            }
        }
        else if (value === this.platform.Characteristic.SwingMode.SWING_DISABLED) {
            // Deactivate swing mode and reset fins to default positions.
            parameters.fanAutoMode = enums_1.ComfortCloudFanAutoMode.Disabled;
            parameters.airSwingLR = this.swingModeLeftRightToComfortCloudPayloadValue(this.platform.platformConfig.swingModeDefaultPositionLeftRight);
            parameters.airSwingUD = this.swingModeUpDownToComfortCloudPayloadValue(this.platform.platformConfig.swingModeDefaultPositionUpDown);
			this.platform.log.info(`${this.accessory.displayName}: Swing mode Off`);
        }
        this.sendDeviceUpdate(this.accessory.context.device.deviceGuid, parameters);
    }
    /**
     * Maps the internal left-right swing mode position enum to the corresponding
     * Comfort Cloud value.
     *
     * @param position The internal value for the left-right position.
     * @returns The corresponding Comfort Cloud value for the given position.
     */
    swingModeLeftRightToComfortCloudPayloadValue(position) {
        switch (position) {
            case enums_1.SwingModePositionLeftRight.Left:
                return enums_1.ComfortCloudAirSwingLR.Left;
            case enums_1.SwingModePositionLeftRight.CenterLeft:
                return enums_1.ComfortCloudAirSwingLR.CenterLeft;
            case enums_1.SwingModePositionLeftRight.Center:
                return enums_1.ComfortCloudAirSwingLR.Center;
            case enums_1.SwingModePositionLeftRight.CenterRight:
                return enums_1.ComfortCloudAirSwingLR.CenterRight;
            case enums_1.SwingModePositionLeftRight.Right:
                return enums_1.ComfortCloudAirSwingLR.Right;
            default:
                return enums_1.ComfortCloudAirSwingLR.Center;
        }
    }

Login Problems

Plugin been working great for a month or so, but started receiving login error messages today. Not had a change of password or email. Controls work fine locally, on the comfort cloud app and also on google home.

Hoobs log below:

19/07/2022, 11:02:26Panasonic AC Bridge starting
19/07/2022, 11:02:29Panasonic AC BridgeLoaded plugin 'homebridge-panasonic-ac-platform'
19/07/2022, 11:02:29Panasonic AC BridgeLoading 1 platforms...
19/07/2022, 11:02:29Panasonic AC BridgeHomebridge Panasonic AC PlatformLoading accessory 'Upstairs' from cache.
19/07/2022, 11:02:29Panasonic AC BridgeHomebridge Panasonic AC PlatformAttempting to log into Comfort Cloud.
19/07/2022, 11:02:30Panasonic AC BridgeHomebridge Panasonic AC PlatformERRORLogin failed. The Comfort Cloud server might be experiencing issues at the moment. Bridge will try to log in again in 360 seconds. If the issue persists, make sure you configured the correct email and password and run the latest version of the plugin. Restart Bridge when you change your config, as it will probably not have an effect on its own. If the error still persists, please report to https://github.com/embee8/homebridge-panasonic-ac-platform/issues.
19/07/2022, 11:02:30Panasonic AC BridgeHomebridge Panasonic AC PlatformSuccessfully logged in.
19/07/2022, 11:02:30Panasonic AC BridgeHomebridge Panasonic AC PlatformConfiguring outdoor unit.
19/07/2022, 11:02:30Panasonic AC BridgeHomebridge Panasonic AC PlatformDiscovering devices on Comfort Cloud.
19/07/2022, 11:02:30Panasonic AC BridgeHomebridge Panasonic AC PlatformERRORAn error occurred during device discovery. Turn on debug mode for more information.

Fetching device status: 504 Gateway Timeout

with the latest version I get;
status: 504,
statusText: 'Gateway Time-out',

status: 502,
statusText: 'Bad Gateway',

I have 3 devices.
So are we pulling to fast from te server or do you think there is something else wrong ?

[23/10/2022, 11:43:14] [Homebridge Panasonic AC Platform] Comfort Cloud - getDeviceStatus() for GUID 'CS-Z35VKEW+4962414538': Error [23/10/2022, 11:43:14] [Homebridge Panasonic AC Platform] { status: 502, statusText: 'Bad Gateway', headers: { date: 'Sun, 23 Oct 2022 09:43:13 GMT', 'content-type': 'text/html; charset=utf-8', 'content-length': '150', connection: 'close', server: 'nginx' }, config: { transitional: { silentJSONParsing: true, forcedJSONParsing: true, clarifyTimeoutError: false }, adapter: [Function: httpAdapter], transformRequest: [ [Function: transformRequest] ], transformResponse: [ [Function: transformResponse] ], timeout: 0, xsrfCookieName: 'XSRF-TOKEN', xsrfHeaderName: 'X-XSRF-TOKEN', maxContentLength: -1, maxBodyLength: -1, validateStatus: [Function: validateStatus], headers: { Accept: 'application/json; charset=UTF-8', 'Content-Type': 'application/json', 'User-Agent': 'G-RAC', 'X-APP-TYPE': '0', 'X-APP-VERSION': '1.16.0', 'X-User-Authorization': '' }, method: 'get', url: 'https://accsmart.panasonic.com/deviceStatus/no', data: undefined }, request: <ref *1> ClientRequest { _events: [Object: null prototype] { abort: [Function (anonymous)], aborted: [Function (anonymous)], connect: [Function (anonymous)], error: [Function (anonymous)], socket: [Function (anonymous)], timeout: [Function (anonymous)], finish: [Function: requestOnFinish] }, _eventsCount: 7, _maxListeners: undefined, outputData: [], outputSize: 0, writable: true, destroyed: false, _last: true, chunkedEncoding: false, shouldKeepAlive: false, maxRequestsOnConnectionReached: false, _defaultKeepAlive: true, useChunkedEncodingByDefault: false, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, _contentLength: 0, _hasBody: true, _trailer: '', finished: true, _headerSent: true, _closed: false, socket: TLSSocket { _tlsOptions: [Object], _secureEstablished: true, _securePending: false, _newSessionPending: false, _controlReleased: true, secureConnecting: false, _SNICallback: null, servername: 'accsmart.panasonic.com', alpnProtocol: false, authorized: true, authorizationError: null, encrypted: true, _events: [Object: null prototype], _eventsCount: 10, connecting: false, _hadError: false, _parent: null, _host: 'accsmart.panasonic.com', _closeAfterHandlingError: false, _readableState: [ReadableState], _maxListeners: undefined, _writableState: [WritableState], allowHalfOpen: false, _sockname: null, _pendingData: null, _pendingEncoding: '', server: undefined, _server: null, ssl: [TLSWrap], _requestCert: true, _rejectUnauthorized: true, parser: null, _httpMessage: [Circular *1], [Symbol(res)]: [TLSWrap], [Symbol(verified)]: true, [Symbol(pendingSession)]: null, [Symbol(async_id_symbol)]: 78677, [Symbol(kHandle)]: [TLSWrap], [Symbol(lastWriteQueueSize)]: 0, [Symbol(timeout)]: null, [Symbol(kBuffer)]: null, [Symbol(kBufferCb)]: null, [Symbol(kBufferGen)]: null, [Symbol(kCapture)]: false, [Symbol(kSetNoDelay)]: false, [Symbol(kSetKeepAlive)]: true, [Symbol(kSetKeepAliveInitialDelay)]: 60, [Symbol(kBytesRead)]: 0, [Symbol(kBytesWritten)]: 0, [Symbol(connect-options)]: [Object] }, _header: 'GET /deviceStatus/now/' + 'Accept: application/json; charset=UTF-8\r\n' + 'Content-Type: application/json\r\n' + 'User-Agent: G-RAC\r\n' + 'X-APP-TYPE: 0\r\n' + 'X-APP-VERSION: 1.16.0\r\n' + 'X-User-Authorization: ' + 'Host: accsmart.panasonic.com\r\n' + 'Connection: close\r\n' + '\r\n', _keepAliveTimeout: 0, _onPendingData: [Function: nop], agent: Agent { _events: [Object: null prototype], _eventsCount: 2, _maxListeners: undefined, defaultPort: 443, protocol: 'https:', options: [Object: null prototype], requests: [Object: null prototype] {}, sockets: [Object: null prototype], freeSockets: [Object: null prototype] {}, keepAliveMsecs: 1000, keepAlive: false, maxSockets: Infinity, maxFreeSockets: 256, scheduling: 'lifo', maxTotalSockets: Infinity, totalSocketCount: 1, maxCachedSessions: 100, _sessionCache: [Object], [Symbol(kCapture)]: false }, socketPath: undefined, method: 'GET', maxHeaderSize: undefined, insecureHTTPParser: undefined, path: '/deviceStatus/now/, _ended: true, res: IncomingMessage { _readableState: [ReadableState], _events: [Object: null prototype], _eventsCount: 4, _maxListeners: undefined, socket: [TLSSocket], httpVersionMajor: 1, httpVersionMinor: 1, httpVersion: '1.1', complete: true, rawHeaders: [Array], rawTrailers: [], aborted: false, upgrade: false, url: '', method: null, statusCode: 502, statusMessage: 'Bad Gateway', client: [TLSSocket], _consuming: false, _dumped: false, req: [Circular *1], responseUrl: 'https://accsmart.panasonic.com/deviceStatus/now/', redirects: [], [Symbol(kCapture)]: false, [Symbol(kHeaders)]: [Object], [Symbol(kHeadersCount)]: 10, [Symbol(kTrailers)]: null, [Symbol(kTrailersCount)]: 0 }, aborted: false, timeoutCb: null, upgradeOrConnect: false, parser: null, maxHeadersCount: null, reusedSocket: false, host: 'accsmart.panasonic.com', protocol: 'https:', _redirectable: Writable { _writableState: [WritableState], _events: [Object: null prototype], _eventsCount: 3, _maxListeners: undefined, _options: [Object], _ended: true, _ending: true, _redirectCount: 0, _redirects: [], _requestBodyLength: 0, _requestBodyBuffers: [], _onNativeResponse: [Function (anonymous)], _currentRequest: [Circular *1], _currentUrl: 'https://accsmart.panasonic.com/deviceStatus/', [Symbol(kCapture)]: false }, [Symbol(kCapture)]: false, [Symbol(kNeedDrain)]: false, [Symbol(corked)]: 0, [Symbol(kOutHeaders)]: [Object: null prototype] { accept: [Array], 'content-type': [Array], 'user-agent': [Array], 'x-app-type': [Array], 'x-app-version': [Array], 'x-user-authorization': [Array], host: [Array] }, [Symbol(kUniqueHeaders)]: null }, data: '<html>\r\n' + '<head><title>502 Bad Gateway</title></head>\r\n' + '<body>\r\n' + '<center><h1>502 Bad Gateway</h1></center>\r\n' + '<hr><center>nginx</center>\r\n' + '</body>\r\n' + '</html>\r\n' } [23/10/2022, 11:43:14] [Homebridge Panasonic AC Platform] An error occurred while refreshing the device status. Turn on debug mode for more information.

[23/10/2022, 11:51:43] [Homebridge Panasonic AC Platform] Accessory: Refresh status for device 'Living' [23/10/2022, 11:51:43] [Homebridge Panasonic AC Platform] Comfort Cloud: getDeviceStatus() for device GUID 'CS-Z35VKEW+4962414538' [23/10/2022, 11:51:43] [Homebridge Panasonic AC Platform] Accessory: Refresh status for device 'Speelkamer' [23/10/2022, 11:51:43] [Homebridge Panasonic AC Platform] Comfort Cloud: getDeviceStatus() for device GUID 'CS-Z25VKEW+4962312857' [23/10/2022, 11:51:44] [Homebridge Panasonic AC Platform] Comfort Cloud - getDeviceStatus() for GUID 'CS-Z35VKEW+4962414538': Error [23/10/2022, 11:51:44] [Homebridge Panasonic AC Platform] { status: 504, statusText: 'Gateway Time-out', headers: { server: 'awselb/2.0', date: 'Sun, 23 Oct 2022 09:51:44 GMT', 'content-type': 'text/html', 'content-length': '132', connection: 'close' }, config: { transitional: { silentJSONParsing: true, forcedJSONParsing: true, clarifyTimeoutError: false }, adapter: [Function: httpAdapter], transformRequest: [ [Function: transformRequest] ], transformResponse: [ [Function: transformResponse] ], timeout: 0, xsrfCookieName: 'XSRF-TOKEN', xsrfHeaderName: 'X-XSRF-TOKEN', maxContentLength: -1, maxBodyLength: -1, validateStatus: [Function: validateStatus], headers: { Accept: 'application/json; charset=UTF-8', 'Content-Type': 'application/json', 'User-Agent': 'G-RAC', 'X-APP-TYPE': '0', 'X-APP-VERSION': '1.16.0', 'X-User-Authorization': '' }, method: 'get', url: 'https://accsmart.panasonic.com/', data: undefined }, request: <ref *1> ClientRequest { _events: [Object: null prototype] { abort: [Function (anonymous)], aborted: [Function (anonymous)], connect: [Function (anonymous)], error: [Function (anonymous)], socket: [Function (anonymous)], timeout: [Function (anonymous)], finish: [Function: requestOnFinish] }, _eventsCount: 7, _maxListeners: undefined, outputData: [], outputSize: 0, writable: true, destroyed: false, _last: true, chunkedEncoding: false, shouldKeepAlive: false, maxRequestsOnConnectionReached: false, _defaultKeepAlive: true, useChunkedEncodingByDefault: false, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, _contentLength: 0, _hasBody: true, _trailer: '', finished: true, _headerSent: true, _closed: false, socket: TLSSocket { _tlsOptions: [Object], _secureEstablished: true, _securePending: false, _newSessionPending: false, _controlReleased: true, secureConnecting: false, _SNICallback: null, servername: 'accsmart.panasonic.com', alpnProtocol: false, authorized: true, authorizationError: null, encrypted: true, _events: [Object: null prototype], _eventsCount: 10, connecting: false, _hadError: false, _parent: null, _host: 'accsmart.panasonic.com', _closeAfterHandlingError: false, _readableState: [ReadableState], _maxListeners: undefined, _writableState: [WritableState], allowHalfOpen: false, _sockname: null, _pendingData: null, _pendingEncoding: '', server: undefined, _server: null, ssl: [TLSWrap], _requestCert: true, _rejectUnauthorized: true, parser: null, _httpMessage: [Circular *1], [Symbol(res)]: [TLSWrap], [Symbol(verified)]: true, [Symbol(pendingSession)]: null, [Symbol(async_id_symbol)]: 92269, [Symbol(kHandle)]: [TLSWrap], [Symbol(lastWriteQueueSize)]: 0, [Symbol(timeout)]: null, [Symbol(kBuffer)]: null, [Symbol(kBufferCb)]: null, [Symbol(kBufferGen)]: null, [Symbol(kCapture)]: false, [Symbol(kSetNoDelay)]: false, [Symbol(kSetKeepAlive)]: true, [Symbol(kSetKeepAliveInitialDelay)]: 60, [Symbol(kBytesRead)]: 0, [Symbol(kBytesWritten)]: 0, [Symbol(connect-options)]: [Object] }, _header: 'GET /deviceStatus/now/ HTTP/1.1\r\n' + 'Accept: application/json; charset=UTF-8\r\n' + 'Content-Type: application/json\r\n' + 'User-Agent: G-RAC\r\n' + 'X-APP-TYPE: 0\r\n' + 'X-APP-VERSION: 1.16.0\r\n' + 'X-User-Authorization: + 'Host: accsmart.panasonic.com\r\n' + 'Connection: close\r\n' + '\r\n', _keepAliveTimeout: 0, _onPendingData: [Function: nop], agent: Agent { _events: [Object: null prototype], _eventsCount: 2, _maxListeners: undefined, defaultPort: 443, protocol: 'https:', options: [Object: null prototype], requests: [Object: null prototype] {}, sockets: [Object: null prototype], freeSockets: [Object: null prototype] {}, keepAliveMsecs: 1000, keepAlive: false, maxSockets: Infinity, maxFreeSockets: 256, scheduling: 'lifo', maxTotalSockets: Infinity, totalSocketCount: 3, maxCachedSessions: 100, _sessionCache: [Object], [Symbol(kCapture)]: false }, socketPath: undefined, method: 'GET', maxHeaderSize: undefined, insecureHTTPParser: undefined, path: '', _ended: true, res: IncomingMessage { _readableState: [ReadableState], _events: [Object: null prototype], _eventsCount: 4, _maxListeners: undefined, socket: [TLSSocket], httpVersionMajor: 1, httpVersionMinor: 1, httpVersion: '1.1', complete: true, rawHeaders: [Array], rawTrailers: [], aborted: false, upgrade: false, url: '', method: null, statusCode: 504, statusMessage: 'Gateway Time-out', client: [TLSSocket], _consuming: false, _dumped: false, req: [Circular *1], responseUrl: '', redirects: [], [Symbol(kCapture)]: false, [Symbol(kHeaders)]: [Object], [Symbol(kHeadersCount)]: 10, [Symbol(kTrailers)]: null, [Symbol(kTrailersCount)]: 0 }, aborted: false, timeoutCb: null, upgradeOrConnect: false, parser: null, maxHeadersCount: null, reusedSocket: false, host: 'accsmart.panasonic.com', protocol: 'https:', _redirectable: Writable { _writableState: [WritableState], _events: [Object: null prototype], _eventsCount: 3, _maxListeners: undefined, _options: [Object], _ended: true, _ending: true, _redirectCount: 0, _redirects: [], _requestBodyLength: 0, _requestBodyBuffers: [], _onNativeResponse: [Function (anonymous)], _currentRequest: [Circular *1], _currentUrl: '', [Symbol(kCapture)]: false }, [Symbol(kCapture)]: false, [Symbol(kNeedDrain)]: false, [Symbol(corked)]: 0, [Symbol(kOutHeaders)]: [Object: null prototype] { accept: [Array], 'content-type': [Array], 'user-agent': [Array], 'x-app-type': [Array], 'x-app-version': [Array], 'x-user-authorization': [Array], host: [Array] }, [Symbol(kUniqueHeaders)]: null }, data: '<html>\r\n' + '<head><title>504 Gateway Time-out</title></head>\r\n' + '<body>\r\n' + '<center><h1>504 Gateway Time-out</h1></center>\r\n' + '</body>\r\n' + '</html>\r\n' } [23/10/2022, 11:51:44] [Homebridge Panasonic AC Platform] An error occurred while refreshing the device status. Turn on debug mode for more information. [23/10/2022, 11:51:44] [Homebridge Panasonic AC Platform] Comfort Cloud - getDeviceStatus() for : Success [23/10/2022, 11:51:44] [Homebridge Panasonic AC Platform] { fanMode: false, modeAvlList: { autoMode: 1, fanMode: 1 }, coolMode: true, airSwingLR: false, summerHouse: 0, nanoe: false, permission: 2, dryMode: true, nanoeList: { visualizationShow: 0 }, autoMode: true, nanoeStandAlone: false, heatMode: true, autoSwingUD: false, ecoNavi: false, temperatureUnit: 0, iAutoX: false, quietMode: true, ecoFunction: 0, powerfulMode: true, timestamp: , pairedFlg: false, parameters: { ecoFunctionData: 0, airSwingLR: 1, nanoe: 1, lastSettingMode: 0, ecoNavi: 0, ecoMode: 0, operationMode: 3, fanAutoMode: 1, errorStatus: -255, temperatureSet: 22, fanSpeed: 3, iAuto: 0, airQuality: 0, insideTemperature: 19, outTemperature: 16, nanoeDevice: -255, operate: 0, airDirection: 0, actualNanoe: 1, airSwingUD: 0 } }

Error. Restarting HB. SIGTERM

Hi.

I found that my hb reboots several times a day.

[01/05/2023, 03:30:05] UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "undefined".
[01/05/2023, 03:30:05] UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "undefined".
[01/05/2023, 03:30:05] Got SIGTERM, shutting down Homebridge...
[01/05/2023, 03:30:10] [HB Supervisor] Homebridge Process Ended. Code: 143, Signal: null
[01/05/2023, 03:30:15] [HB Supervisor] Restarting Homebridge...
[01/05/2023, 03:30:15] [HB Supervisor] Starting Homebridge with extra flags: -I

Plugin maintenance update

The time has come for me to pass the baton to a new maintainer or group of maintainers. I initiated this project in late 2021, building upon @codyc1515's original work, and maintained it with the support of an engaged community.

In recent months, I haven't had the time to actively participate in discussions or implement new features and bug fixes. Nonetheless, I am proud of having made a meaningful contribution to the Homebridge community in the form of this plugin. Many hours went into building it, and I hope that the future maintainers will be able to build upon a well-documented code base and a sturdy release process.

I want to express my gratitude to everyone who contributed with ideas and suggestions, and to the two collaborators who supported the project with a donation.

I would have proposed to transfer the repository to another individual or to a GitHub organization dedicated to maintaining the project. However, I've noticed that @sdamasoc already created a fork, so I could also archive this repository for the project to live on over there. The downside of this approach is that people need to reinstall the plugin as the package name would be different. But I'll happily consider all alternatives.

DEBUG mode not working

I turned on the debug mode option at the advanced options of the plugin settings, however, the log is full with the entry:
[15/12/2022, 02:18:48] [Homebridge Panasonic AC Platform] An error occurred while refreshing the device status. Turn on debug mode for more information.
So it is impossible to find out what the actual problem is.

"characteristic was supplied illegal value" errors

Started getting these errors today out of the blue:

[16/09/2022, 2:43:24 pm] [homebridge-panasonic-ac-platform] This plugin generated a warning from the characteristic 'Cooling Threshold Temperature': characteristic was supplied illegal value: number 10 exceeded minimum of 16. See https://homebridge.io/w/JtMGR for more info.
[16/09/2022, 2:43:24 pm] [homebridge-panasonic-ac-platform] This plugin generated a warning from the characteristic 'Heating Threshold Temperature': characteristic was supplied illegal value: number 0 exceeded minimum of 1. See https://homebridge.io/w/JtMGR for more info.

Tried manually setting the minimum temperature to 0 via the plugin settings but that didn't work.

Only get On/Off functionality

Hi,

wonder what is wrong here as I can only turn my Panasonic ACs on or off, but not adjust any temperature etc.
Further more, they don't appear in Apple Homekit at all, only in the Homebridge accessories menu.

Show fan speed in homekit controls

Is it possible to integrate the fan speed into the homekit control? I know you can adjust the fan speed in the settings if you go to the settings page but I've seen that its possible on some ac units to have a slider directly below the temperature dial like in the image below.
image

Swing Mode detection

Hi.

I have Panasonic CS-Z50VKEW. And Your code works well except for one thing - it reads the swing mode wrong.

But it works well when I change just one line in indoor-unit.js. First line in this part:

// Swing Mode (optional)
if (deviceStatus.fanAutoMode === 0 || deviceStatus.fanAutoMode === 2 || deviceStatus.fanAutoMode === 3 ) {
    this.service.getCharacteristic(this.platform.Characteristic.SwingMode)
        .updateValue(this.platform.Characteristic.SwingMode.SWING_ENABLED);
}
else {
    this.service.getCharacteristic(this.platform.Characteristic.SwingMode)
        .updateValue(this.platform.Characteristic.SwingMode.SWING_DISABLED);
}

Maybe you need to enter the Swing mode selection in the configuration? Or based on the model?

Regards,
Michal

Support for +8-15 Heat mode

My AC has a +8-15 Heat mode for use in winter. This mode is not accessible in the plugin. When set to this mode in the app and 11 degrees, the plugin shows Heat and 16 degrees.

8AE800AE-0D61-4C5E-B204-C8B333929C6D
5D3A7BB7-095D-495E-9FB9-40943791C4C7

Debug doesn't work

Hi.

Debug from E.G comfort-cloud.js works well but from src/accessories/indoor-unit.ts doesn't work. None of them doesn't show in homebridge log:

this.platform.log.error(`Show me`);
this.platform.log.debug(`Show me`);
this.platform.log.info(`Show me`);
this.log.error(`Show me`);
this.log.debug(`Show me`);
this.log.info(`Show me`);

Siri not Recognizing turn off mode

Hey 👋🏻
I’ve encountered a problem since the latest iOS update. I can normally turn on my units but when I want to turn it off it says the same message as when it turns it on and won’t turn the units off.
is it linked to the plug-in ?
Thanks

Too many logins error

After installing this homebridge plugin in a few days I got kicked out of the Panasonic Cloud Comfort app. Every time I try to login I get E0011 Internal Server Error, which apparently corresponds to too many logins. Through homebridge logs I see that Homebrdige plugin cannot login to Panasonic Cloud Comfort either. And before when it was successfully logging in it would do that every 2-3 mins, which is what I guess led to getting kicked out of the Panasonic Cloud Comfort. Until I got kicked out, both the app and Homebridge Plugin worked well.

Any idea how to limit frequency at which this plugin pings and tries to login to Panasonic Cloud Comfort or any other suggestion how to resolve this issue?

Status Bar and Cooling Icon

I was using the previous plug-in which used to provide a cooling or heating status in the status bar of each room/level but I am not getting this function with this plug-in. I would also get a change in the colour icon of each unit based on activity from Green to Blue when Cooling and to Orange when Heating. Is this option available with this plug-in.
Thanks

An error occurred while refreshing the device status.

Hi there,
I am constantly getting the following error. Any idea what's causing that?

[2/28/2023, 5:57:17 PM] [Homebridge Panasonic AC Platform] <ref *2> Writable {
  _writableState: WritableState {
    objectMode: false,
    highWaterMark: 16384,
    finalCalled: false,
    needDrain: false,
    ending: false,
    ended: false,
    finished: false,
    destroyed: false,
    decodeStrings: true,
    defaultEncoding: 'utf8',
    length: 0,
    writing: false,
    corked: 0,
    sync: true,
    bufferProcessing: false,
    onwrite: [Function: bound onwrite],
    writecb: null,
    writelen: 0,
    afterWriteTickInfo: null,
    buffered: [],
    bufferedIndex: 0,
    allBuffers: true,
    allNoop: true,
    pendingcb: 0,
    prefinished: false,
    errorEmitted: false,
    emitClose: true,
    autoDestroy: true,
    errored: null,
    closed: false
  },
  _events: [Object: null prototype] {
    response: [Function: handleResponse],
    error: [Function: handleRequestError],
    socket: [Function: handleRequestSocket]
  },
  _eventsCount: 3,
  _maxListeners: undefined,
  _options: {
    maxRedirects: 21,
    maxBodyLength: 10485760,
    protocol: 'https:',
    path: '/deviceStatus/now/C062758718',
    method: 'GET',
    headers: {
      Accept: 'application/json; charset=UTF-8',
      'Content-Type': 'application/json',
      'User-Agent': 'G-RAC',
      'X-APP-TYPE': '0',
      'X-APP-VERSION': '1.17.0',
      'X-User-Authorization': '---'
    },
    agent: undefined,
    agents: { http: undefined, https: undefined },
    auth: undefined,
    hostname: 'accsmart.panasonic.com',
    port: null,
    nativeProtocols: { 'http:': [Object], 'https:': [Object] },
    pathname: '/deviceStatus/now/C062758718'
  },
  _ended: true,
  _ending: true,
  _redirectCount: 0,
  _redirects: [],
  _requestBodyLength: 0,
  _requestBodyBuffers: [],
  _onNativeResponse: [Function (anonymous)],
  _currentRequest: <ref *1> ClientRequest {
    _events: [Object: null prototype] {
      response: [Function],
      socket: [Function (anonymous)],
      abort: [Function (anonymous)],
      aborted: [Function (anonymous)],
      connect: [Function (anonymous)],
      error: [Function (anonymous)],
      timeout: [Function (anonymous)]
    },
    _eventsCount: 7,
    _maxListeners: undefined,
    outputData: [],
    outputSize: 0,
    writable: true,
    destroyed: false,
    _last: true,
    chunkedEncoding: false,
    shouldKeepAlive: false,
    _defaultKeepAlive: true,
    useChunkedEncodingByDefault: false,
    sendDate: false,
    _removedConnection: false,
    _removedContLen: false,
    _removedTE: false,
    _contentLength: 0,
    _hasBody: true,
    _trailer: '',
    finished: true,
    _headerSent: true,
    socket: TLSSocket {
      _tlsOptions: [Object],
      _secureEstablished: false,
      _securePending: false,
      _newSessionPending: false,
      _controlReleased: true,
      secureConnecting: true,
      _SNICallback: null,
      servername: null,
      alpnProtocol: null,
      authorized: false,
      authorizationError: null,
      encrypted: true,
      _events: [Object: null prototype],
      _eventsCount: 11,
      connecting: false,
      _hadError: true,
      _parent: null,
      _host: 'accsmart.panasonic.com',
      _readableState: [ReadableState],
      _maxListeners: undefined,
      _writableState: [WritableState],
      allowHalfOpen: false,
      _sockname: null,
      _pendingData: 'GET /deviceStatus/now/C062758718 HTTP/1.1\r\n' +
        'Accept: application/json; charset=UTF-8\r\n' +
        'Content-Type: application/json\r\n' +
        'User-Agent: G-RAC\r\n' +
        'X-APP-TYPE: 0\r\n' +
        'X-APP-VERSION: 1.17.0\r\n' +
        'X-User-Authorization: ---\r\n' +
        'Host: accsmart.panasonic.com\r\n' +
        'Connection: close\r\n' +
        '\r\n',
      _pendingEncoding: 'latin1',
      server: undefined,
      _server: null,
      ssl: null,
      _requestCert: true,
      _rejectUnauthorized: true,
      parser: null,
      _httpMessage: [Circular *1],
      [Symbol(res)]: [TLSWrap],
      [Symbol(verified)]: false,
      [Symbol(pendingSession)]: null,
      [Symbol(async_id_symbol)]: 372726,
      [Symbol(kHandle)]: null,
      [Symbol(kSetNoDelay)]: false,
      [Symbol(lastWriteQueueSize)]: 0,
      [Symbol(timeout)]: null,
      [Symbol(kBuffer)]: null,
      [Symbol(kBufferCb)]: null,
      [Symbol(kBufferGen)]: null,
      [Symbol(kCapture)]: false,
      [Symbol(kBytesRead)]: 0,
      [Symbol(kBytesWritten)]: 0,
      [Symbol(connect-options)]: [Object]
    },
    _header: 'GET /deviceStatus/now/C062758718 HTTP/1.1\r\n' +
      'Accept: application/json; charset=UTF-8\r\n' +
      'Content-Type: application/json\r\n' +
      'User-Agent: G-RAC\r\n' +
      'X-APP-TYPE: 0\r\n' +
      'X-APP-VERSION: 1.17.0\r\n' +
      'X-User-Authorization: ---\r\n' +
      'Host: accsmart.panasonic.com\r\n' +
      'Connection: close\r\n' +
      '\r\n',
    _keepAliveTimeout: 0,
    _onPendingData: [Function: noopPendingOutput],
    agent: Agent {
      _events: [Object: null prototype],
      _eventsCount: 2,
      _maxListeners: undefined,
      defaultPort: 443,
      protocol: 'https:',
      options: [Object],
      requests: {},
      sockets: [Object],
      freeSockets: {},
      keepAliveMsecs: 1000,
      keepAlive: false,
      maxSockets: Infinity,
      maxFreeSockets: 256,
      scheduling: 'fifo',
      maxTotalSockets: Infinity,
      totalSocketCount: 1,
      maxCachedSessions: 100,
      _sessionCache: [Object],
      [Symbol(kCapture)]: false
    },
    socketPath: undefined,
    method: 'GET',
    maxHeaderSize: undefined,
    insecureHTTPParser: undefined,
    path: '/deviceStatus/now/C062758718',
    _ended: false,
    res: null,
    aborted: false,
    timeoutCb: null,
    upgradeOrConnect: false,
    parser: null,
    maxHeadersCount: null,
    reusedSocket: false,
    host: 'accsmart.panasonic.com',
    protocol: 'https:',
    _redirectable: [Circular *2],
    [Symbol(kCapture)]: false,
    [Symbol(kNeedDrain)]: false,
    [Symbol(corked)]: 0,
    [Symbol(kOutHeaders)]: [Object: null prototype] {
      accept: [Array],
      'content-type': [Array],
      'user-agent': [Array],
      'x-app-type': [Array],
      'x-app-version': [Array],
      'x-user-authorization': [Array],
      host: [Array]
    }
  },
  _currentUrl: 'https://accsmart.panasonic.com/deviceStatus/now/C062758718',
  [Symbol(kCapture)]: false
}
[2/28/2023, 5:57:17 PM] [Homebridge Panasonic AC Platform] An error occurred while refreshing the device status. Turn on debug mode for more information.

still getting An error occurred while refreshing the device status

can't find a re-open button, so I created a new issue ...

          Sorry for the late reply, tried the latest version of the plugin but I still get the same error
  status: 404,
  statusText: '',
  headers: AxiosHeaders {
    date: 'Thu, 07 Sep 2023 09:31:59 GMT',
    'content-type': 'text/html;charset=ISO-8859-1',
    'content-length': '618',
    connection: 'close',
    server: 'nginx'
  },
  config: {
    transitional: {
      silentJSONParsing: true,
      forcedJSONParsing: true,
      clarifyTimeoutError: false
    },
    adapter: [ 'xhr', 'http' ],
    transformRequest: [ [Function: transformRequest] ],
    transformResponse: [ [Function: transformResponse] ],
    timeout: 0,
    xsrfCookieName: 'XSRF-TOKEN',
    xsrfHeaderName: 'X-XSRF-TOKEN',
    maxContentLength: -1,
    maxBodyLength: -1,
    env: { FormData: [Function], Blob: [class Blob] },
    validateStatus: [Function: validateStatus],
    headers: AxiosHeaders {
      Accept: 'application/json; charset=UTF-8',
      'Content-Type': 'application/json',
      'User-Agent': 'G-RAC',
      'X-APP-TYPE': '0',
      'X-APP-VERSION': '1.18.0',
      'X-User-Authorization': '',
      'Accept-Encoding': 'gzip, compress, deflate, br'
    },
    method: 'get',
    url: 'https://accsmart.panasonic.com/deviceStatus/now/CS-A73C5092/20190826/M100025#',
    data: undefined
  },
  request: <ref *1> ClientRequest {
    _events: [Object: null prototype] {
      abort: [Function (anonymous)],
      aborted: [Function (anonymous)],
      connect: [Function (anonymous)],
      error: [Function (anonymous)],
      socket: [Function (anonymous)],
      timeout: [Function (anonymous)],
      finish: [Function: requestOnFinish]
    },
    _eventsCount: 7,
    _maxListeners: undefined,
    outputData: [],
    outputSize: 0,
    writable: true,
    destroyed: false,
    _last: true,
    chunkedEncoding: false,
    shouldKeepAlive: false,
    maxRequestsOnConnectionReached: false,
    _defaultKeepAlive: true,
    useChunkedEncodingByDefault: false,
    sendDate: false,
    _removedConnection: false,
    _removedContLen: false,
    _removedTE: false,
    strictContentLength: false,
    _contentLength: 0,
    _hasBody: true,
    _trailer: '',
    finished: true,
    _headerSent: true,
    _closed: false,
    socket: TLSSocket {
      _tlsOptions: [Object],
      _secureEstablished: true,
      _securePending: false,
      _newSessionPending: false,
      _controlReleased: true,
      secureConnecting: false,
      _SNICallback: null,
      servername: 'accsmart.panasonic.com',
      alpnProtocol: false,
      authorized: true,
      authorizationError: null,
      encrypted: true,
      _events: [Object: null prototype],
      _eventsCount: 10,
      connecting: false,
      _hadError: false,
      _parent: null,
      _host: 'accsmart.panasonic.com',
      _closeAfterHandlingError: false,
      _readableState: [ReadableState],
      _maxListeners: undefined,
      _writableState: [WritableState],
      allowHalfOpen: false,
      _sockname: null,
      _pendingData: null,
      _pendingEncoding: '',
      server: undefined,
      _server: null,
      ssl: [TLSWrap],
      _requestCert: true,
      _rejectUnauthorized: true,
      parser: null,
      _httpMessage: [Circular *1],
      [Symbol(res)]: [TLSWrap],
      [Symbol(verified)]: true,
      [Symbol(pendingSession)]: null,
      [Symbol(async_id_symbol)]: 7428,
      [Symbol(kHandle)]: [TLSWrap],
      [Symbol(lastWriteQueueSize)]: 0,
      [Symbol(timeout)]: null,
      [Symbol(kBuffer)]: null,
      [Symbol(kBufferCb)]: null,
      [Symbol(kBufferGen)]: null,
      [Symbol(kCapture)]: false,
      [Symbol(kSetNoDelay)]: false,
      [Symbol(kSetKeepAlive)]: true,
      [Symbol(kSetKeepAliveInitialDelay)]: 60,
      [Symbol(kBytesRead)]: 0,
      [Symbol(kBytesWritten)]: 0,
      [Symbol(connect-options)]: [Object]
    },
    _header: 'GET /deviceStatus/now/CS-A73C5092/20190826/M100025 HTTP/1.1\r\n' +
      'Accept: application/json; charset=UTF-8\r\n' +
      'Content-Type: application/json\r\n' +
      'User-Agent: G-RAC\r\n' +
      'X-APP-TYPE: 0\r\n' +
      'X-APP-VERSION: 1.18.0\r\n' +
      'X-User-Authorization: TDYFmelN768MQLfrmXrp4240sKdbNzuA\r\n' +
      'Accept-Encoding: gzip, compress, deflate, br\r\n' +
      'Host: accsmart.panasonic.com\r\n' +
      'Connection: close\r\n' +
      '\r\n',
    _keepAliveTimeout: 0,
    _onPendingData: [Function: nop],
    agent: Agent {
      _events: [Object: null prototype],
      _eventsCount: 2,
      _maxListeners: undefined,
      defaultPort: 443,
      protocol: 'https:',
      options: [Object: null prototype],
      requests: [Object: null prototype] {},
      sockets: [Object: null prototype],
      freeSockets: [Object: null prototype] {},
      keepAliveMsecs: 1000,
      keepAlive: false,
      maxSockets: Infinity,
      maxFreeSockets: 256,
      scheduling: 'lifo',
      maxTotalSockets: Infinity,
      totalSocketCount: 1,
      maxCachedSessions: 100,
      _sessionCache: [Object],
      [Symbol(kCapture)]: false
    },
    socketPath: undefined,
    method: 'GET',
    maxHeaderSize: undefined,
    insecureHTTPParser: undefined,
    path: '/deviceStatus/now/CS-A73C5092/20190826/M100025',
    _ended: true,
    res: IncomingMessage {
      _readableState: [ReadableState],
      _events: [Object: null prototype],
      _eventsCount: 4,
      _maxListeners: undefined,
      socket: [TLSSocket],
      httpVersionMajor: 1,
      httpVersionMinor: 1,
      httpVersion: '1.1',
      complete: true,
      rawHeaders: [Array],
      rawTrailers: [],
      aborted: false,
      upgrade: false,
      url: '',
      method: null,
      statusCode: 404,
      statusMessage: '',
      client: [TLSSocket],
      _consuming: false,
      _dumped: false,
      req: [Circular *1],
      responseUrl: 'https://accsmart.panasonic.com/deviceStatus/now/CS-A73C5092/20190826/M100025',
      redirects: [],
      [Symbol(kCapture)]: false,
      [Symbol(kHeaders)]: [Object],
      [Symbol(kHeadersCount)]: 10,
      [Symbol(kTrailers)]: null,
      [Symbol(kTrailersCount)]: 0
    },
    aborted: false,
    timeoutCb: null,
    upgradeOrConnect: false,
    parser: null,
    maxHeadersCount: null,
    reusedSocket: false,
    host: 'accsmart.panasonic.com',
    protocol: 'https:',
    _redirectable: Writable {
      _writableState: [WritableState],
      _events: [Object: null prototype],
      _eventsCount: 3,
      _maxListeners: undefined,
      _options: [Object],
      _ended: true,
      _ending: true,
      _redirectCount: 0,
      _redirects: [],
      _requestBodyLength: 0,
      _requestBodyBuffers: [],
      _onNativeResponse: [Function (anonymous)],
      _currentRequest: [Circular *1],
      _currentUrl: 'https://accsmart.panasonic.com/deviceStatus/now/CS-A73C5092/20190826/M100025',
      [Symbol(kCapture)]: false
    },
    [Symbol(kCapture)]: false,
    [Symbol(kBytesWritten)]: 0,
    [Symbol(kEndCalled)]: true,
    [Symbol(kNeedDrain)]: false,
    [Symbol(corked)]: 0,
    [Symbol(kOutHeaders)]: [Object: null prototype] {
      accept: [Array],
      'content-type': [Array],
      'user-agent': [Array],
      'x-app-type': [Array],
      'x-app-version': [Array],
      'x-user-authorization': [Array],
      'accept-encoding': [Array],
      host: [Array]
    },
    [Symbol(errored)]: null,
    [Symbol(kUniqueHeaders)]: null
  },
  data: '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">\r\n' +
    '<html>\r\n' +
    ' <head>\r\n' +
    '  <title>404 Not found</title>\r\n' +
    '  <style type="text/css">\r\n' +
    '    <!--\r\n' +
    '    BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;font-size:12px;}\r\n' +
    '    H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}\r\n' +
    '    PRE, TT {border: 1px dotted #525D76}\r\n' +
    '    A {color : black;}A.name {color : black;}\r\n' +
    '    -->\r\n' +
    '  </style>\r\n' +
    ' </head>\r\n' +
    ' <body>\r\n' +
    '   <h1>404 Not found</h1>\r\n' +
    '   <p>\r\n' +
    '    The page you tried to access does not exist.\r\n' +
    '   </p>\r\n' +
    ' </body>\r\n' +
    '</html>\r\n'
}
[9/7/2023, 11:31:59 AM] [xxx] An error occurred while refreshing the device status. Turn on debug mode for more information.

Originally posted by @benjaminfrombe in #39 (comment)

Failed and repeat logins

Hi.

Plugin stop working today. I have correct version of Comfort Cloud in plugin settings. Comfort Cloud app is working ok.

0A6BA2BB-B943-4DE4-9C7F-5BB63CD398D2

App Version from App Store

There is a little bug in comfort-cloud.js.

There should be:

'X-APP-VERSION': this.config.latestAppVersion || this.config.appVersionOverride || settings_1.APP_VERSION,

In this order! this.config.latestAppVersion at the first place!

And replace every X-APP-VERSION in every function.

Why? Because this.config.latestAppVersion || this.config.appVersionOverride || settings_1.APP_VERSION; take first non empty value. In current code this.config.appVersionOverride is on first place and another values will not be ever used, even when there will be new version of app. So the function getAppVersion() don't have sence.

502 Bad Gateway during login

[14/04/2023, 10:20:37] [Homebridge Panasonic AC Platform] {
  status: 502,
  statusText: 'Bad Gateway',
  headers: {
    date: 'Fri, 14 Apr 2023 08:20:37 GMT',
    'content-type': 'text/html; charset=utf-8',
    'content-length': '150',
    connection: 'close',
    server: 'nginx'
  },
  config: {
    transitional: {
      silentJSONParsing: true,
      forcedJSONParsing: true,
      clarifyTimeoutError: false
    },
    adapter: [Function: httpAdapter],
    transformRequest: [ [Function: transformRequest] ],
    transformResponse: [ [Function: transformResponse] ],
    timeout: 0,
    xsrfCookieName: 'XSRF-TOKEN',
    xsrfHeaderName: 'X-XSRF-TOKEN',
    maxContentLength: -1,
    maxBodyLength: -1,
    validateStatus: [Function: validateStatus],
    headers: {
      Accept: 'application/json; charset=UTF-8',
      'Content-Type': 'application/json',
      'User-Agent': 'G-RAC',
      'X-APP-TYPE': '0',
      'X-APP-VERSION': '1.18.0',
      'X-User-Authorization': 'XXX (Censored by me)'
    },
    method: 'get',
    url: 'https://accsmart.panasonic.com/device/group',
    data: undefined
  },
  request: <ref *1> ClientRequest {
    _events: [Object: null prototype] {
      abort: [Function (anonymous)],
      aborted: [Function (anonymous)],
      connect: [Function (anonymous)],
      error: [Function (anonymous)],
      socket: [Function (anonymous)],
      timeout: [Function (anonymous)],
      finish: [Function: requestOnFinish]
    },
    _eventsCount: 7,
    _maxListeners: undefined,
    outputData: [],
    outputSize: 0,
    writable: true,
    destroyed: false,
    _last: true,
    chunkedEncoding: false,
    shouldKeepAlive: false,
    maxRequestsOnConnectionReached: false,
    _defaultKeepAlive: true,
    useChunkedEncodingByDefault: false,
    sendDate: false,
    _removedConnection: false,
    _removedContLen: false,
    _removedTE: false,
    strictContentLength: false,
    _contentLength: 0,
    _hasBody: true,
    _trailer: '',
    finished: true,
    _headerSent: true,
    _closed: false,
    socket: TLSSocket {
      _tlsOptions: [Object],
      _secureEstablished: true,
      _securePending: false,
      _newSessionPending: false,
      _controlReleased: true,
      secureConnecting: false,
      _SNICallback: null,
      servername: 'accsmart.panasonic.com',
      alpnProtocol: false,
      authorized: true,
      authorizationError: null,
      encrypted: true,
      _events: [Object: null prototype],
      _eventsCount: 10,
      connecting: false,
      _hadError: false,
      _parent: null,
      _host: 'accsmart.panasonic.com',
      _closeAfterHandlingError: false,
      _readableState: [ReadableState],
      _maxListeners: undefined,
      _writableState: [WritableState],
      allowHalfOpen: false,
      _sockname: null,
      _pendingData: null,
      _pendingEncoding: '',
      server: undefined,
      _server: null,
      ssl: [TLSWrap],
      _requestCert: true,
      _rejectUnauthorized: true,
      parser: null,
      _httpMessage: [Circular *1],
      [Symbol(res)]: [TLSWrap],
      [Symbol(verified)]: true,
      [Symbol(pendingSession)]: null,
      [Symbol(async_id_symbol)]: 7116,
      [Symbol(kHandle)]: [TLSWrap],
      [Symbol(lastWriteQueueSize)]: 0,
      [Symbol(timeout)]: null,
      [Symbol(kBuffer)]: null,
      [Symbol(kBufferCb)]: null,
      [Symbol(kBufferGen)]: null,
      [Symbol(kCapture)]: false,
      [Symbol(kSetNoDelay)]: false,
      [Symbol(kSetKeepAlive)]: true,
      [Symbol(kSetKeepAliveInitialDelay)]: 60,
      [Symbol(kBytesRead)]: 0,
      [Symbol(kBytesWritten)]: 0,
      [Symbol(connect-options)]: [Object]
    },
    _header: 'GET /device/group HTTP/1.1\r\n' +
      'Accept: application/json; charset=UTF-8\r\n' +
      'Content-Type: application/json\r\n' +
      'User-Agent: G-RAC\r\n' +
      'X-APP-TYPE: 0\r\n' +
      'X-APP-VERSION: 1.18.0\r\n' +
      'X-User-Authorization: XXX (Censored by me) \r\n' +
      'Host: accsmart.panasonic.com\r\n' +
      'Connection: close\r\n' +
      '\r\n',
    _keepAliveTimeout: 0,
    _onPendingData: [Function: nop],
    agent: Agent {
      _events: [Object: null prototype],
      _eventsCount: 2,
      _maxListeners: undefined,
      defaultPort: 443,
      protocol: 'https:',
      options: [Object: null prototype],
      requests: [Object: null prototype] {},
      sockets: [Object: null prototype],
      freeSockets: [Object: null prototype] {},
      keepAliveMsecs: 1000,
      keepAlive: false,
      maxSockets: Infinity,
      maxFreeSockets: 256,
      scheduling: 'lifo',
      maxTotalSockets: Infinity,
      totalSocketCount: 1,
      maxCachedSessions: 100,
      _sessionCache: [Object],
      [Symbol(kCapture)]: false
    },
    socketPath: undefined,
    method: 'GET',
    maxHeaderSize: undefined,
    insecureHTTPParser: undefined,
    joinDuplicateHeaders: undefined,
    path: '/device/group',
    _ended: true,
    res: IncomingMessage {
      _readableState: [ReadableState],
      _events: [Object: null prototype],
      _eventsCount: 4,
      _maxListeners: undefined,
      socket: [TLSSocket],
      httpVersionMajor: 1,
      httpVersionMinor: 1,
      httpVersion: '1.1',
      complete: true,
      rawHeaders: [Array],
      rawTrailers: [],
      joinDuplicateHeaders: undefined,
      aborted: false,
      upgrade: false,
      url: '',
      method: null,
      statusCode: 502,
      statusMessage: 'Bad Gateway',
      client: [TLSSocket],
      _consuming: false,
      _dumped: false,
      req: [Circular *1],
      responseUrl: 'https://accsmart.panasonic.com/device/group',
      redirects: [],
      [Symbol(kCapture)]: false,
      [Symbol(kHeaders)]: [Object],
      [Symbol(kHeadersCount)]: 10,
      [Symbol(kTrailers)]: null,
      [Symbol(kTrailersCount)]: 0
    },
    aborted: false,
    timeoutCb: null,
    upgradeOrConnect: false,
    parser: null,
    maxHeadersCount: null,
    reusedSocket: false,
    host: 'accsmart.panasonic.com',
    protocol: 'https:',
    _redirectable: Writable {
      _writableState: [WritableState],
      _events: [Object: null prototype],
      _eventsCount: 3,
      _maxListeners: undefined,
      _options: [Object],
      _ended: true,
      _ending: true,
      _redirectCount: 0,
      _redirects: [],
      _requestBodyLength: 0,
      _requestBodyBuffers: [],
      _onNativeResponse: [Function (anonymous)],
      _currentRequest: [Circular *1],
      _currentUrl: 'https://accsmart.panasonic.com/device/group',
      [Symbol(kCapture)]: false
    },
    [Symbol(kCapture)]: false,
    [Symbol(kBytesWritten)]: 0,
    [Symbol(kEndCalled)]: true,
    [Symbol(kNeedDrain)]: false,
    [Symbol(corked)]: 0,
    [Symbol(kOutHeaders)]: [Object: null prototype] {
      accept: [Array],
      'content-type': [Array],
      'user-agent': [Array],
      'x-app-type': [Array],
      'x-app-version': [Array],
      'x-user-authorization': [Array],
      host: [Array]
    },
    [Symbol(errored)]: null,
    [Symbol(kUniqueHeaders)]: null
  },
  data: '<html>\r\n' +
    '<head><title>502 Bad Gateway</title></head>\r\n' +
    '<body>\r\n' +
    '<center><h1>502 Bad Gateway</h1></center>\r\n' +
    '<hr><center>nginx</center>\r\n' +
    '</body>\r\n' +
    '</html>\r\n'
}
[14/04/2023, 10:20:37] [Homebridge Panasonic AC Platform] An error occurred during device discovery. Turn on debug mode for more information.

Login failure

Hi, comfort cloud was down for me yesterday and would not work through the Panasonic app either. It is not working through homebridge today, I checked in the App Store and the new version of the app is version 1.17.0, I have updated version in the plug-in to 1.17.0 but comfort cloud is still not working today.

I have no idea if it’s relevant, but I’ve noticed that the time zone in my HomeBridge UI is an hour off from the correct time zone, could that make any difference?

Panasonic CONEX Zone Controller support

I am looking to purchase a Panasonic ducted system with zone controls.
I may be able to contribute to this project but wanted to check if zone control would be possible with the integration method or if it may already work with the current release of this project?

Can't connect issue

Please help with the issue below,
tried these method but still not working: 1. create new panasonic account. 2. reset everything

02/10/2023, 16:15:26Panasonic Ac Platform BridgeHomebridge Panasonic AC PlatformERRORLogin failed. Skipping device discovery.
02/10/2023, 16:15:26Panasonic Ac Platform BridgeHomebridge Panasonic AC PlatformERRORThe Comfort Cloud server might be experiencing issues at the moment. The plugin will try to log in again in 360 seconds. If the issue persists, make sure you configured the correct email and password and run the latest version of the plugin. Restart Bridge when you change your config.

Another login fail

Same issue as previous, doesn't help changing to v1.16.0

Homebridge Panasonic AC Platform] Login failed. The Comfort Cloud server might be experiencing issues at the moment. Homebridge will try to log in again in 360 seconds. If the issue persists, make sure you configured the correct email and password and run the latest version of the plugin. Restart Homebridge when you change your config, as it will probably not have an effect on its own. If the error still persists, please report to https://github.com/embee8/homebridge-panasonic-ac-platform/issues.

Login Failed

today I notice a login failure from this homebridge-panasonic-ac-platform

[Homebridge Panasonic AC Platform] Login failed. The Comfort Cloud server might be experiencing issues at the moment. Homebridge will try to log in again in 360 seconds. If the issue persists, make sure you configured the correct email and password and run the latest version of the plugin. Restart Homebridge when you change your config, as it will probably not have an effect on its own. If the error still persists, please report to https://github.com/embee8/homebridge-panasonic-ac-platform/issues.

when I login in the app there is a privacy declaration to be acepted.
I accepted this but now the error is;

[11/10/2022, 19:31:57] [Homebridge Panasonic AC Platform] Successfully logged in. [11/10/2022, 19:31:57] [Homebridge Panasonic AC Platform] Configuring outdoor unit. [11/10/2022, 19:31:57] [Homebridge Panasonic AC Platform] Restoring accessory 'Panasonic AC Outdoor Unit' (2f989c86-944b-4b28-a779-7fc872e15ba2) from cache. [11/10/2022, 19:31:57] [Homebridge Panasonic AC Platform] Discovering devices on Comfort Cloud. [11/10/2022, 19:31:57] [Homebridge Panasonic AC Platform] Comfort Cloud: getDevices() [11/10/2022, 19:31:57] [Homebridge Panasonic AC Platform] An error occurred during device discovery. Turn on debug mode for more information. [11/10/2022, 19:31:57] [Homebridge Panasonic AC Platform] No auth token available (login probably failed). Check your credentials and restart Homebridge.

it stated "successfully logged in" and my credentials are not changed.

After changing the versionnumber to 1.16.0 all is working again.

kind regards,

Since today homebridge is crashing when the airco is turned on or of

[11/9/2022, 9:02:08 PM] UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "undefined".
[11/9/2022, 9:02:08 PM] Got SIGTERM, shutting down Homebridge...

airDirection?

Hi,

I love this plugin!

I wonder if it's possible to set the airDirection somehow?

I use other sensors in my house to trigger on/off behaviour, and no matter if I choose "oscillate" or not in the automation, the airDirection is either in 0% or 100% of the range.

Can I somehow set it like this?
image

Br,
Oscar

edit: I found the properties airSwingLR and airSwingUD, so if I get it running locally I can hard code the values.
edit 2: I removed the swing functionality and always set the values of airSwingLR/UD to the wanted values.

Quiet and Powerful Mode

Hi.

Please provide support for Quiet and Powerful mode. So that after selecting 1 rotation speed level there would be Quiet mode, and after selecting 5 rotation speed it would be Powerful mode. This may be an option to enable in the settings.

It is relatively easy. In indoor-unit.js:

/// Rotation Speed (optional)
if (deviceStatus.ecoMode === 2) {this.service.getCharacteristic(this.platform.Characteristic.RotationSpeed).updateValue(1);}
else if (deviceStatus.ecoMode === 1) {this.service.getCharacteristic(this.platform.Characteristic.RotationSpeed).updateValue(5);}
else if (deviceStatus.fanSpeed === 0) {this.service.getCharacteristic(this.platform.Characteristic.RotationSpeed).updateValue(6);} 
else {
   this.service.getCharacteristic(this.platform.Characteristic.RotationSpeed)
   .updateValue(deviceStatus.fanSpeed);
}

and

async setRotationSpeed(value) {
        this.platform.log.debug(`Accessory: setRotationSpeed() for device '${this.accessory.displayName}'`);
        if (value === 6) {
            value = 0;
        }
        
        var ecoMode = 0;
        if (value == 1) {ecoMode = 2}
	else if (value == 5) {ecoMode = 1}
				
        
        const parameters = {
            fanSpeed: value,
            ecoMode: ecoMode,
        };
        this.sendDeviceUpdate(this.accessory.context.device.deviceGuid, parameters);
}

and in typse.ts add ecoMode in export interface ComfortCloudDeviceUpdatePayload and export interface ComfortCloudDeviceStatus

Regards,
Michal

Compatibility with units that do now show indoor temperature

Hi, would you be able to make this work more nicely with units that do not support the indoor temperature, as this now both creates and error in the log over an over again, as well as shows 0C as the indoor temerature, which off course is false.

Duplicate serial outdoor unit

Hi

For the outdoor temp unit the default serial number is used. This makes my setup having it double used because another plugin which has it not configurable also makes it double used now ;-)
Maybe making it a config option?

Just small improvement, not urgent at all...

Thx!

Swing Mode still doesn't work

After todays update swing mode still doesn't work as it should. When I change Oscilate in Home App it change setting in Panasonic Comfort Cloud app. But when I change setting in Comfort Cloud app it doesn't change in Home app. I have default settings in config.

"swingModeDirections": "LEFT-RIGHT-UP-DOWN",
"swingModeDefaultPositionLeftRight": "CENTER",
"swingModeDefaultPositionUpDown": "CENTER",

when I remove second part from:

deviceStatus.fanAutoMode === ComfortCloudFanAutoMode.AirSwingAuto
          && this.platform.platformConfig.swingModeDirections
          === SwingModeDirection.LeftRightAndUpDown

so it be:

deviceStatus.fanAutoMode === ComfortCloudFanAutoMode.AirSwingAuto

it works.

So problem is with:

this.platform.platformConfig.swingModeDirections
          === SwingModeDirection.LeftRightAndUpDown

Unable to do automation with indoor temperature

When trying to make an automation. It only shows "turns on" of "turns off" as state change automation on each unit instead of exposing a current indoor value for each unit.

It seems the indoor temperature of each unit is not exposed properly as the current indoor temperature does show in the Home app on the dashboard.

Scrape latest app version from AppStore

Fetching the latest version from the App Store via API is a nice idea. However, the endpoint requires credentials and very likely has a rate limit. Both aspects could be managed (with some complexity), but there is no guarantee that simply using the latest available version number will be enough to keep the plugin running, because there might be additional changes in the app that we would miss.

To keep things simple and flexible, you can update the value immediately and as desired without waiting for a plugin update - see appVersionOverride in the advanced configuration of the settings.

I aim to bump the app version as soon as I notice it and find time. Besides that, I encourage community members to send pull requests which I am happy to review.

Hi embee8,
Fetching the latest app version does not require Apple developer access. It could be scraped off the public AppStore page:
https://apps.apple.com/de/app/panasonic-comfort-cloud/id1348640525
(note: don’t open link on idevice or you’ll be forwarded to the AppStore app and can’t see the HTML page)

Originally posted by @xyz667 in #33 (comment)

Feature request: automatically fetch the latest app version to provide to comfort cloud API.

An error occurred while refreshing the device status.

I get an error loading the status of my device, any idea?

[8/2/2022, 10:31:10 PM] [Homebridge Panasonic AC Platform] Comfort Cloud - getDeviceStatus() for GUID 'CS-A73C5092/20190826/M100025#': Error
[8/2/2022, 10:31:10 PM] [Homebridge Panasonic AC Platform] {
  status: 404,
  statusText: '',
  headers: {
    date: 'Tue, 02 Aug 2022 20:31:10 GMT',
    'content-type': 'text/html;charset=ISO-8859-1',
    'content-length': '618',
    connection: 'close',
    server: 'nginx'
  },
  config: {
    transitional: {
      silentJSONParsing: true,
      forcedJSONParsing: true,
      clarifyTimeoutError: false
    },
    adapter: [Function: httpAdapter],
    transformRequest: [ [Function: transformRequest] ],
    transformResponse: [ [Function: transformResponse] ],
    timeout: 0,
    xsrfCookieName: 'XSRF-TOKEN',
    xsrfHeaderName: 'X-XSRF-TOKEN',
    maxContentLength: -1,
    maxBodyLength: -1,
    validateStatus: [Function: validateStatus],
    headers: {
      Accept: 'application/json; charset=UTF-8',
      'Content-Type': 'application/json',
      'User-Agent': 'G-RAC',
      'X-APP-TYPE': '0',
      'X-APP-VERSION': '1.15.1',
      'X-User-Authorization': 'zVd4RqULvogZO5AW7b3mw7tMH9jmYTCi'
    },
    method: 'get',
    url: 'https://accsmart.panasonic.com/deviceStatus/now/CS-A73C5092/20190826/M100025#',
    data: undefined
  },
  request: <ref *1> ClientRequest {
    _events: [Object: null prototype] {
      abort: [Function (anonymous)],
      aborted: [Function (anonymous)],
      connect: [Function (anonymous)],
      error: [Function (anonymous)],
      socket: [Function (anonymous)],
      timeout: [Function (anonymous)],
      prefinish: [Function: requestOnPrefinish]
    },
    _eventsCount: 7,
    _maxListeners: undefined,
    outputData: [],
    outputSize: 0,
    writable: true,
    destroyed: false,
    _last: true,
    chunkedEncoding: false,
    shouldKeepAlive: false,
    maxRequestsOnConnectionReached: false,
    _defaultKeepAlive: true,
    useChunkedEncodingByDefault: false,
    sendDate: false,
    _removedConnection: false,
    _removedContLen: false,
    _removedTE: false,
    _contentLength: 0,
    _hasBody: true,
    _trailer: '',
    finished: true,
    _headerSent: true,
    _closed: false,
    socket: TLSSocket {
      _tlsOptions: [Object],
      _secureEstablished: true,
      _securePending: false,
      _newSessionPending: false,
      _controlReleased: true,
      secureConnecting: false,
      _SNICallback: null,
      servername: 'accsmart.panasonic.com',
      alpnProtocol: false,
      authorized: true,
      authorizationError: null,
      encrypted: true,
      _events: [Object: null prototype],
      _eventsCount: 10,
      connecting: false,
      _hadError: false,
      _parent: null,
      _host: 'accsmart.panasonic.com',
      _readableState: [ReadableState],
      _maxListeners: undefined,
      _writableState: [WritableState],
      allowHalfOpen: false,
      _sockname: null,
      _pendingData: null,
      _pendingEncoding: '',
      server: undefined,
      _server: null,
      ssl: [TLSWrap],
      _requestCert: true,
      _rejectUnauthorized: true,
      parser: null,
      _httpMessage: [Circular *1],
      [Symbol(res)]: [TLSWrap],
      [Symbol(verified)]: true,
      [Symbol(pendingSession)]: null,
      [Symbol(async_id_symbol)]: 17381,
      [Symbol(kHandle)]: [TLSWrap],
      [Symbol(lastWriteQueueSize)]: 0,
      [Symbol(timeout)]: null,
      [Symbol(kBuffer)]: null,
      [Symbol(kBufferCb)]: null,
      [Symbol(kBufferGen)]: null,
      [Symbol(kCapture)]: false,
      [Symbol(kSetNoDelay)]: false,
      [Symbol(kSetKeepAlive)]: true,
      [Symbol(kSetKeepAliveInitialDelay)]: 60,
      [Symbol(kBytesRead)]: 0,
      [Symbol(kBytesWritten)]: 0,
      [Symbol(connect-options)]: [Object],
      [Symbol(RequestTimeout)]: undefined
    },
    _header: 'GET /deviceStatus/now/CS-A73C5092/20190826/M100025 HTTP/1.1\r\n' +
      'Accept: application/json; charset=UTF-8\r\n' +
      'Content-Type: application/json\r\n' +
      'User-Agent: G-RAC\r\n' +
      'X-APP-TYPE: 0\r\n' +
      'X-APP-VERSION: 1.15.1\r\n' +
      'X-User-Authorization: zVd4RqULvogZO5AW7b3mw7tMH9jmYTCi\r\n' +
      'Host: accsmart.panasonic.com\r\n' +
      'Connection: close\r\n' +
      '\r\n',
    _keepAliveTimeout: 0,
    _onPendingData: [Function: nop],
    agent: Agent {
      _events: [Object: null prototype],
      _eventsCount: 2,
      _maxListeners: undefined,
      defaultPort: 443,
      protocol: 'https:',
      options: [Object: null prototype],
      requests: [Object: null prototype] {},
      sockets: [Object: null prototype],
      freeSockets: [Object: null prototype] {},
      keepAliveMsecs: 1000,
      keepAlive: false,
      maxSockets: Infinity,
      maxFreeSockets: 256,
      scheduling: 'lifo',
      maxTotalSockets: Infinity,
      totalSocketCount: 1,
      maxCachedSessions: 100,
      _sessionCache: [Object],
      [Symbol(kCapture)]: false
    },
    socketPath: undefined,
    method: 'GET',
    maxHeaderSize: undefined,
    insecureHTTPParser: undefined,
    path: '/deviceStatus/now/CS-A73C5092/20190826/M100025',
    _ended: true,
    res: IncomingMessage {
      _readableState: [ReadableState],
      _events: [Object: null prototype],
      _eventsCount: 4,
      _maxListeners: undefined,
      socket: [TLSSocket],
      httpVersionMajor: 1,
      httpVersionMinor: 1,
      httpVersion: '1.1',
      complete: true,
      rawHeaders: [Array],
      rawTrailers: [],
      aborted: false,
      upgrade: false,
      url: '',
      method: null,
      statusCode: 404,
      statusMessage: '',
      client: [TLSSocket],
      _consuming: false,
      _dumped: false,
      req: [Circular *1],
      responseUrl: 'https://accsmart.panasonic.com/deviceStatus/now/CS-A73C5092/20190826/M100025',
      redirects: [],
      [Symbol(kCapture)]: false,
      [Symbol(kHeaders)]: [Object],
      [Symbol(kHeadersCount)]: 10,
      [Symbol(kTrailers)]: null,
      [Symbol(kTrailersCount)]: 0,
      [Symbol(RequestTimeout)]: undefined
    },
    aborted: false,
    timeoutCb: null,
    upgradeOrConnect: false,
    parser: null,
    maxHeadersCount: null,
    reusedSocket: false,
    host: 'accsmart.panasonic.com',
    protocol: 'https:',
    _redirectable: Writable {
      _writableState: [WritableState],
      _events: [Object: null prototype],
      _eventsCount: 3,
      _maxListeners: undefined,
      _options: [Object],
      _ended: true,
      _ending: true,
      _redirectCount: 0,
      _redirects: [],
      _requestBodyLength: 0,
      _requestBodyBuffers: [],
      _onNativeResponse: [Function (anonymous)],
      _currentRequest: [Circular *1],
      _currentUrl: 'https://accsmart.panasonic.com/deviceStatus/now/CS-A73C5092/20190826/M100025',
      [Symbol(kCapture)]: false
    },
    [Symbol(kCapture)]: false,
    [Symbol(kNeedDrain)]: false,
    [Symbol(corked)]: 0,
    [Symbol(kOutHeaders)]: [Object: null prototype] {
      accept: [Array],
      'content-type': [Array],
      'user-agent': [Array],
      'x-app-type': [Array],
      'x-app-version': [Array],
      'x-user-authorization': [Array],
      host: [Array]
    }
  },
  data: '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">\r\n' +
    '<html>\r\n' +
    ' <head>\r\n' +
    '  <title>404 Not found</title>\r\n' +
    '  <style type="text/css">\r\n' +
    '    <!--\r\n' +
    '    BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;font-size:12px;}\r\n' +
    '    H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}\r\n' +
    '    PRE, TT {border: 1px dotted #525D76}\r\n' +
    '    A {color : black;}A.name {color : black;}\r\n' +
    '    -->\r\n' +
    '  </style>\r\n' +
    ' </head>\r\n' +
    ' <body>\r\n' +
    '   <h1>404 Not found</h1>\r\n' +
    '   <p>\r\n' +
    '    The page you tried to access does not exist.\r\n' +
    '   </p>\r\n' +
    ' </body>\r\n' +
    '</html>\r\n'
}
[8/2/2022, 10:31:10 PM] [Homebridge Panasonic AC Platform] An error occurred while refreshing the device status. Turn on debug mode for more information.

Better way to handle login failure

Hi.

I think I have better solution for failed logins. Instead of making only 5 atempts to login, increase delay on every try, so first try will be after 5 minutes, second after 10, third after 30 and every next after hour. In this situation You don't need restart homebridge. I also add info to accept Panasonic terms to log.

.catch(() => {
      this.log.error('Login failed. Skipping device discovery.');
      this.noOfFailedLoginAttempts++;
      
 	 if this.noOfFailedLoginAttempts == 1 {
 		 this.loginDelay = 300 * 1000;
 	 }
  	 else if this.noOfFailedLoginAttempts == 2 {
 	 	this.loginDelay = 600 * 1000;	
 	 }
  	 else if this.noOfFailedLoginAttempts == 3 {
 	 	this.loginDelay = 1800 * 1000;	
 	 }
  	 else {
 	 	this.loginDelay = 3600 * 1000;	
 	 }
  
 	
      this.log.error('The Comfort Cloud server might be experiencing issues at the moment. ' +
              `The plugin will try to log in again in ${this.loginDelay / 60000} minutes. ` +
              'If the issue persists, make sure you configured the correct email and password ' +
              'and run the latest version of the plugin. ' +
 	 'If you run into login errors despite using the correct login details,' +
          'make sure you accepted the latest terms and conditions after logging into the Comfort Cloud app.' +
              'Restart Homebridge when you change your config.');
          
 	this._loginRetryTimeout = setTimeout(this.loginAndDiscoverDevices.bind(this), this.loginDelay);

}

Can't find on HOOBS?

Hi

Do you have any idea why I can't find this plugin on hoobs?

(I would rather not have to switch over to homebridge-config-ui).

Thanks

Can't change temperature

If i ask for changing the temperature in Homekit, the phone can't find any devices that support temperature control.
No Problem with changing to automatic-mode, cooling-mode, heating-mode. Everithing else is really good. Thanks

(Edit: removed file download link)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.