Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Login failing today but nothing changed in setup? #75

Closed
clw123456 opened this issue Sep 14, 2023 · 95 comments
Closed

Login failing today but nothing changed in setup? #75

clw123456 opened this issue Sep 14, 2023 · 95 comments

Comments

@clw123456
Copy link

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.

@clw123456
Copy link
Author

Comfort cloud app works ok

@arkadicolson
Copy link

arkadicolson commented Sep 14, 2023 via email

@ajimix
Copy link

ajimix commented Sep 14, 2023

Same issue happening for me 😢

@1homebridge
Copy link

1homebridge commented Sep 14, 2023

Comfort Cloud App was down for 7 hours last night (01:00-08:00 UTC) for maintenance and this issue has arisen since. I’m not sure if they’ve updated the software version number which would mean either having to update the plug in or manually correct/insert the new build number in the plug in settings.

@mkz212
Copy link
Contributor

mkz212 commented Sep 14, 2023

Same here. I tried to restart homebridge and change the app version to 1.19.0. Without success.

@1homebridge
Copy link

Yes, I restarted too with no success but didn’t get round to changing app number as I wasn’t sure if it was 1.19.0 or 1.20.0.

@mkz212
Copy link
Contributor

mkz212 commented Sep 14, 2023

In the App Store newest version is still 1.18.0.

@mkz212
Copy link
Contributor

mkz212 commented Sep 14, 2023

@hajar97
Copy link

hajar97 commented Sep 14, 2023

Same issue here. Stopped working with:
[14/09/2023, 21:56:47] [Homebridge Panasonic AC Platform] Login failed. Skipping device discovery.
[14/09/2023, 21:56:47] [Homebridge Panasonic AC Platform] 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.

Cloud Comfort App working perfectly fine.

@mkz212
Copy link
Contributor

mkz212 commented Sep 14, 2023

I already have a solution and it works. I'll write soon. :)

@mkz212
Copy link
Contributor

mkz212 commented Sep 14, 2023

  1. Go to plugin folder - it should be: /var/lib/homebridge/node_modules/homebridge-panasonic-ac-platform.

  2. In plugin folder in dist/comfort-cloud.js file add this to headers (4 times):

'X-APP-NAME':'Comfort Cloud',
'X-CFC-API-KEY':'0',
'X-APP-TIMESTAMP':(new Date()).toISOString().replace(/-/g, "").replace("T", " ").slice(0, 17),
  1. Change app version in plugin settings to 1.19.0 (without dot at the end).

  2. After that restart homebridge.

If You don't know how to edit file here is example tutorial for Raspberry Pi: https://pimylifeup.com/raspberry-pi-ftp/. For other devices you need search tutorials.

@Mani1082
Copy link

in dist/comfort-cloud.js file add this to headers (4 times):

'X-APP-NAME':'Comfort Cloud',
'X-CFC-API-KEY':'0',
'X-APP-TIMESTAMP':(new Date()).toISOString().slice(0, 17).replace(/-/g, "").replace("T", " "),

Hi
Thanks for taking the time to share.
I was wondering how do you access to the config file to modify it ?
Thanks

@jandersonhill
Copy link
Contributor

jandersonhill commented Sep 14, 2023

Just ran into this issue myself - a huge thank you to @mkz212 for finding a fix so quickly.

You’ll find the file you need is at ‘/var/lib/homebridge/node_modules/homebridge-panasonic-ac-platform/dist/comfort-cloud.js’. To edit the file, type ‘nano /var/lib/homebridge/node_modules/homebridge-panasonic-ac-platform/dist/comfort-cloud.js’.

Use ‘Ctrl W’ to search for ‘headers’ and immediately after each of the ‘headers:’ line insert a new line and copy/paste the code from the post above, followed by another new line. You need to do this four times for each of the headers. If you’re trying to keep things neat, you might want to indent the lines to match the existing code :-)

Use ‘Ctrl O’ to save the changes and ‘Ctrl X’ to exit. Then restart the home bridge used by your Panasonic ac (likely your Raspberry Pi), followed by the Apple device that controls your home (such as your Apple TV).

Hope this helps,
Jeremy

@mkz212
Copy link
Contributor

mkz212 commented Sep 15, 2023

I'm using ftp editor to connect to my raspberry pi and edit files. But i don't remember how to setup - there are tutorials on net.

E.G.:
https://pimylifeup.com/raspberry-pi-ftp/

@alvin188
Copy link

alvin188 commented Sep 15, 2023

Thank you for the quick solution all @mkz212 @jandersonhill

@stevenmarq
Copy link

Thanks a lot for your effort @mkz212
Unfortunately, it does not fix the issue for me. I have made the changes to all four headers and it looks like below. Still getting the same error though. Any idea what I am doing wrong?

async login() {
    this.log.debug('Comfort Cloud: login()');
    clearInterval(this._loginRefreshInterval);
    return axios_1.default.request({
        method: 'post',
        url: 'https://accsmart.panasonic.com/auth/login',
        headers: {
            'X-APP-NAME': 'Comfort Cloud',
            'X-CFC-API-KEY': '0',
            'X-APP-TIMESTAMP': (new Date()).toISOString().slice(0, 17).replace(/-/g, "").replace("T", " "),
            'Accept': 'application/json; charset=UTF-8',
            'Content-Type': 'application/json',
            'User-Agent': settings_1.COMFORT_CLOUD_USER_AGENT,
            'X-APP-TYPE': '0',
            'X-APP-VERSION': this.config.appVersionOverride
                || this.config.latestAppVersion || settings_1.APP_VERSION,
        },
        data: {
            'loginId': this.config.email,
            'language': '0',
            'password': this.config.password,
        },
    })

@BaskaraR
Copy link

When I type the above ‘/var/lib/homebridge/node_modules/homebridge-panasonic-ac-platform/dist/comfort-cloud.js’. I’m getting permission denied. ??

@mkz212
Copy link
Contributor

mkz212 commented Sep 15, 2023

@stevenmarq Did you restart homebridge after changing the code?

@stevenmarq
Copy link

@stevenmarq Did you restart homebridge after changing the code?

Yes, I did. Still getting the same error.

@mkz212
Copy link
Contributor

mkz212 commented Sep 15, 2023

@BaskaraR if you have raspberry pi, type in homebridge terminal:

sudo chown -R pi /usr/local/lib/node_modules

then try.

If you have other device replace "pi" with your default username.

@mkz212
Copy link
Contributor

mkz212 commented Sep 15, 2023

@stevenmarq Did you restart homebridge after changing the code?

Yes, I did. Still getting the same error.

Past me here all your code (comfort-cloud.js).

In settings you have app version 1.18.0?

@BaskaraR
Copy link

@BaskaraR if you have raspberry pi, type in homebridge terminal:

sudo chown -R pi /usr/local/lib/node_modules

then try.

If you have other device replace "pi" with your default username.

Still no joy. 🙁

@BaskaraR
Copy link

Any new plugin update to resolve this issue?

@mkz212
Copy link
Contributor

mkz212 commented Sep 15, 2023

@BaskaraR I'm not the author of the plugin so this is only I can do - until @embee8 update plugin you need manually edit code. You can try edit file by FTP (I pos above link to tutorial).

@stevenmarq
Copy link

In settings you have app version 1.18.0?
Yes, I do. I also tried removing the app version so that the latest version is pulled from the App Store, but that did no work either. I have attached a copy of my comfort-cloud.js file. I couldn't copy/paste it without entirely messing up the formatting. Thanks a lot for trying to help me. Really appreciate it!

comfort-cloud.js.zip

@ciceroii
Copy link

@BaskaraR if you have raspberry pi, type in homebridge terminal:
sudo chown -R pi /usr/local/lib/node_modules
then try.
If you have other device replace "pi" with your default username.

Still no joy. 🙁

Try "sudo nano /var/lib/homebridge/node_modules/homebridge-panasonic-ac-platform/dist/comfort-cloud.js"

@mkz212
Copy link
Contributor

mkz212 commented Sep 15, 2023

In settings you have app version 1.18.0?
Yes, I do. I also tried removing the app version so that the latest version is pulled from the App Store, but that did no work either. I have attached a copy of my comfort-cloud.js file. I couldn't copy/paste it without entirely messing up the formatting. Thanks a lot for trying to help me. Really appreciate it!

comfort-cloud.js.zip

The original public code does not overwrite the version from the app store - only shows information in the logs. If you would like to automate this here is my solution #70

Maybe try change order - move my 3 lines of code to the end (in every of four headers).

@ciceroii
Copy link

In settings you have app version 1.18.0?
Yes, I do. I also tried removing the app version so that the latest version is pulled from the App Store, but that did no work either. I have attached a copy of my comfort-cloud.js file. I couldn't copy/paste it without entirely messing up the formatting. Thanks a lot for trying to help me. Really appreciate it!

comfort-cloud.js.zip

The original public code does not overwrite the version from the app store - only shows information in the logs. If you would like to automate this here is my solution #70

Maybe try change order - move my 3 lines of code to the end (in every of four headers).

I don't know if this makes a difference, but the only difference between my file that works and your one is you've put a space after 'X-APP-NAME' etc. that wasn't in mkz212's original code.
Correct code:

'X-APP-NAME':'Comfort Cloud',
'X-CFC-API-KEY':'0',
'X-APP-TIMESTAMP':(new Date()).toISOString().slice(0, 17).replace(/-/g, "").replace("T", " "),

Your code:

'X-APP-NAME': 'Comfort Cloud',
'X-CFC-API-KEY': '0',
'X-APP-TIMESTAMP': (new Date()).toISOString().slice(0, 17).replace(/-/g, "").replace("T", " "),

@mkz212
Copy link
Contributor

mkz212 commented Sep 15, 2023

@ciceroii in code that @BaskaraR posted space is after every line of code not only mine 3 lines. In my code there are lines with space and lines without space - so it doesn't matter (space has meaning only between quotation marks).

@xyz667
Copy link

xyz667 commented Sep 15, 2023

After applying the fix login to Comfort Cloud is successful again, but no devices can be found (except the outdoor unit):
[15.9.2023, 10:28:39] [Homebridge Panasonic AC Platform] Attempting to log into Comfort Cloud. [15.9.2023, 10:28:41] [Homebridge Panasonic AC Platform] Successfully logged in. [15.9.2023, 10:28:41] [Homebridge Panasonic AC Platform] Configuring outdoor unit. [15.9.2023, 10:28:41] [Homebridge Panasonic AC Platform] Restoring accessory 'Panasonic AC Outdoor Unit' (xxxxxx) from cache. [15.9.2023, 10:28:41] [Homebridge Panasonic AC Platform] Discovering devices on Comfort Cloud. [15.9.2023, 10:28:41] [Homebridge Panasonic AC Platform] An error occurred during device discovery. Turn on debug mode for more information.
(This log already is with debug turned on, no more info though)

@Zobbi69
Copy link

Zobbi69 commented Oct 7, 2023

IMG_5666

I apologise for the absolute rookie questions!

I realised there’s an option for JSON config working homebridge, this is what it shows. Is there a way I can fix it with this?

@jandersonhill
Copy link
Contributor

I realised there’s an option for JSON config working homebridge, this is what it shows. Is there a way I can fix it with this?

I'm afraid not

@Zobbi69
Copy link

Zobbi69 commented Oct 8, 2023

I realised there’s an option for JSON config working homebridge, this is what it shows. Is there a way I can fix it with this?

I'm afraid not

Is it technically possible then for someone to upload a new plugin with the patch? Seeing as the original creator hasn't put out a fix

@nastypenman
Copy link

Don’t work :(

It looks like you may have combined consecutive lines into a single line. I'll number the lines to make it clearer:

  1. cd /home/pi
  2. wget https://github.com/embee8/homebridge-panasonic-ac-platform/files/12616869/comfort-cloud.js.zip
  3. unzip comfort-cloud.js.zip
  4. cd /var/lib/homebridge/node_modules/homebridge-panasonic-ac-platform/dist/
  5. mv comfort-cloud.js comfort-cloud.js.old
  6. sudo cp /home/pi/comfort-cloud.js .

[Leave out the line numbers and the last part of line 6 (a space followed by a full stop) is required]

If you login into your Raspberry Pi under a username other than ‘pi’ you’ll need to change ‘pi’ in the paths above to your own username.

If you still get an error and report the details here, I may be able to help further. I'm also looking forward to this being updated in the app.

I've tried for days but still can't get this to work. I can't find the homebridge-panasonic-ac-platform/dist/ folder in the mentioned path. All I have in the /var/lib/homebridge/node_modules/ are listed below:
Screenshot 2023-10-08 at 11 42 08 PM

Am I missed something?

Once again, thanks everyone for all the contributions.

@jandersonhill
Copy link
Contributor

I realised there’s an option for JSON config working homebridge, this is what it shows. Is there a way I can fix it with this?

I'm afraid not

Is it technically possible then for someone to upload a new plugin with the patch? Seeing as the original creator hasn't put out a fix

The best way would likely be for @mkz212 to fork this project with the fix until it is fixed upstream. With his permission, I could also have a go at this.

@jandersonhill
Copy link
Contributor

I've tried for days but still can't get this to work. I can't find the homebridge-panasonic-ac-platform/dist/ folder in the mentioned path. All I have in the /var/lib/homebridge/node_modules/ are listed below: Screenshot 2023-10-08 at 11 42 08 PM

Once again, thanks everyone for all the contributions.

Hi @nastypenman

Could you enter:

find / -name "comfort-cloud.js" 2>/dev/null

That should tell you where the file is stored on your machine.

Jeremy

@mkz212
Copy link
Contributor

mkz212 commented Oct 8, 2023

Unfortunately, the author @embee8 seems to have abandoned this plugin. And it's a pity because I wrote a few new improvements (in other opened issues posts). If someone wants can introduce them all.

@nastypenman
Copy link

I've tried for days but still can't get this to work. I can't find the homebridge-panasonic-ac-platform/dist/ folder in the mentioned path. All I have in the /var/lib/homebridge/node_modules/ are listed below: Screenshot 2023-10-08 at 11 42 08 PM
Once again, thanks everyone for all the contributions.

Hi @nastypenman

Could you enter:

find / -name "comfort-cloud.js" 2>/dev/null

That should tell you where the file is stored on your machine.

Jeremy

Found it with your help and now it's all fixed. Thanks a million @jandersonhill !

@jandersonhill
Copy link
Contributor

jandersonhill commented Oct 8, 2023

Unfortunately, the author @embee8 seems to have abandoned this plugin. And it's a pity because I wrote a few new improvements (in other opened issues posts). If someone wants can introduce them all.

That would be fantastic :-) Would it make sense to have a version with just this fix and another version which adds the additional improvements?

@jandersonhill
Copy link
Contributor

jandersonhill commented Oct 8, 2023

Found it with your help and now it's all fixed. Thanks a million @jandersonhill !

It's a pleasure :-) For future reference, where was the file on your machine?

@Mani1082
Copy link

Mani1082 commented Oct 8, 2023 via email

@mkz212
Copy link
Contributor

mkz212 commented Oct 8, 2023

@jandersonhill I don't see the point of sharing it. My suggestions are either to fix the error or something that is more useful to everyone or something that everyone can set in the settings.

@mkz212
Copy link
Contributor

mkz212 commented Oct 8, 2023

@Mani1082 I completely don't know anything about github. If anyone wants, they can use all the corrections or suggestions I have written.

@Mani1082
Copy link

Mani1082 commented Oct 8, 2023 via email

@sdamasoc
Copy link

sdamasoc commented Oct 8, 2023

I can make a fork of it if there is no one to do it.
I’m the author of the Panasonic Domoticz plugin and I’m already maintaining the Panasonic API

@Mani1082
Copy link

Mani1082 commented Oct 8, 2023 via email

@CBHomekitCrazy
Copy link

CBHomekitCrazy commented Oct 8, 2023 via email

@sdamasoc
Copy link

sdamasoc commented Oct 8, 2023

Ok, the issue is merged on my forked repository https://github.com/sdamasoc/homebridge-panasonic-ac-platform

@Mani1082
Copy link

Mani1082 commented Oct 8, 2023 via email

@1homebridge
Copy link

Ok, the issue is merged on my forked repository https://github.com/sdamasoc/homebridge-panasonic-ac-platform

Hi, I was using the previous plug in Cody had created which is what embee based this plug in on, but as many have already stated, it does not seem to be maintained anymore, I even donated to the plug in but haven’t had any luck. Is there any way for someone else to either maintain or take over or does this require his permission. I had also started another issue regarding the fact that I get a 0C reading for my units which causes the Home App to display the units as Idle when Cooling as 0C is a lower temperature than 16*C. Cody had resolved this by allowing the Outdoor Unit temperature to be displayed. Would be great if a new plug in could resolve these issues. Would be willing to donate.

Thanks

@sdamasoc
Copy link

sdamasoc commented Oct 8, 2023

You can start creating issues on the new repository. I will try to make this the official homebridge plugin.

But I will need your help for that. I'm mainly a JAVA developer, I have some knowledge with typescript and python but I'm still not familiar with this code.

Actually I'm working on the domoticz to integrate heatpumps which are using the same panasonic comfort cloud app but which uses a completely different api.

@1homebridge
Copy link

You can start creating issues on the new repository. I will try to make this the official homebridge plugin.

But I will need your help for that. I'm mainly a JAVA developer, I have some knowledge with typescript and python but I'm still not familiar with this code.

Actually I'm working on the domoticz to integrate heatpumps which are using the same panasonic comfort cloud app but which uses a completely different api.

That would be great. I will start a new issue once you have setup the updated plug in and more than willing to regularly donate in order to have a plug in that is maintained and functional. Thanks again!

@sdamasoc
Copy link

sdamasoc commented Oct 8, 2023

You maybe can comment this homebridge/verified#576 to try to make this official.

@novamax89
Copy link

Many thanks to everyone for your work. I just tried the new plugin and it’s working correctly 🙏👏👏👏🎉🎉

@jandersonhill
Copy link
Contributor

You maybe can comment this homebridge/verified#576 to try to make this official.

Done :-)

@jandersonhill
Copy link
Contributor

@jandersonhill I don't see the point of sharing it. My suggestions are either to fix the error or something that is more useful to everyone or something that everyone can set in the settings.

I really like the idea of incorporating your suggestions into the settings

@jandersonhill
Copy link
Contributor

jandersonhill commented Oct 8, 2023

You maybe can comment this homebridge/verified#576 to try to make this official.

@sdamasoc It appears publishing the updated plugin to npm including the keyword 'homebridge-plugin' might be enough for homebridge to list it. As @embee8 is suggesting the original repo is transferred to you, it would seem to make sense to take ownership of the oiginal repo, pull the changes into this and increment the version number.

Once the updated version is published to npm, it looks like this will be picked up by homebridge - I'm on a learning curve here, but I'll try to help where I can :-)

J.

@embee8
Copy link
Contributor

embee8 commented Oct 9, 2023

Thanks for all the inputs, everyone. The fix for this issue is part of the v1.6.1 release that just went out.

@blackcodefr
Copy link

Just updated. It works again thanks!

@embee8 embee8 closed this as completed Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests