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

"message":"New version app has been published" #103

Closed
majurgens opened this issue Nov 5, 2024 · 16 comments
Closed

"message":"New version app has been published" #103

majurgens opened this issue Nov 5, 2024 · 16 comments

Comments

@majurgens
Copy link

majurgens commented Nov 5, 2024

Something has changed again

--- Error finding meta_tag
Traceback (most recent call last):
  File "/opt/hvac/python-panasonic-comfort-cloud/pcomfortcloud.py", line 5, in <module>
    __main__.main()
  File "/opt/hvac/python-panasonic-comfort-cloud/pcomfortcloud/__main__.py", line 200, in main
    session.login()
  File "/opt/hvac/python-panasonic-comfort-cloud/pcomfortcloud/session.py", line 36, in login
    state = super().login()
            ^^^^^^^^^^^^^^^
  File "/opt/hvac/python-panasonic-comfort-cloud/pcomfortcloud/authentication.py", line 281, in login
    self._get_new_token()
  File "/opt/hvac/python-panasonic-comfort-cloud/pcomfortcloud/authentication.py", line 251, in _get_new_token
    check_response(response, 'get_acc_client_id', 200)
  File "/opt/hvac/python-panasonic-comfort-cloud/pcomfortcloud/authentication.py", line 25, in check_response
    raise exceptions.ResponseError(
pcomfortcloud.exceptions.ResponseError: (get_acc_client_id: Expected status code 200, received: 401: {
  "code":4106,
  "message":"New version app has been published"
}

Changing X_APP_VERSION to
X_APP_VERSION = "1.22.0"
just gives a different error of:

--- Error finding meta_tag
Traceback (most recent call last):
  File "/opt/hvac/python-panasonic-comfort-cloud/pcomfortcloud.py", line 5, in <module>
    __main__.main()
  File "/opt/hvac/python-panasonic-comfort-cloud/pcomfortcloud/__main__.py", line 200, in main
    session.login()
  File "/opt/hvac/python-panasonic-comfort-cloud/pcomfortcloud/session.py", line 36, in login
    state = super().login()
            ^^^^^^^^^^^^^^^
  File "/opt/hvac/python-panasonic-comfort-cloud/pcomfortcloud/authentication.py", line 281, in login
    self._get_new_token()
  File "/opt/hvac/python-panasonic-comfort-cloud/pcomfortcloud/authentication.py", line 251, in _get_new_token
    check_response(response, 'get_acc_client_id', 200)
  File "/opt/hvac/python-panasonic-comfort-cloud/pcomfortcloud/authentication.py", line 25, in check_response
    raise exceptions.ResponseError(
pcomfortcloud.exceptions.ResponseError: (get_acc_client_id: Expected status code 200, received: 412: {
  "code":41201,
  "message":"Precondition Failed"
}
@xkram15
Copy link

xkram15 commented Nov 5, 2024

Same here, starting today I am getting only mentioned error. :-(

@chamsters
Copy link

Same issue here. Trying anything over 1.22.0 also gives the "New version app has been published" error.

@chamsters
Copy link

Seems related - sockless-coding/panasonic_cc#331

@majurgens
Copy link
Author

majurgens commented Nov 6, 2024

Oh, they appear to have added another annoying feature which went live about 30 minutes ago. They now email me every time I login ie run the python script, or attempt to login with a message along the lines of "You have logged in to your Panasonic ID". Depending on how you use it, this could be multiple times per hour.

I've logged in at https://accountglb.digital.panasonic.com/ (the URL in the email) and I can't see how to disable this email notification at their end. I have created a rule on my mail server to discard them when they arrive. Eventually, presumably, they will notice the thousands and thousands of emails from us all.

@lostfields
Copy link
Owner

A login procedure shouldn't be necessary when using offline access with OAuth2, so, every time we actually use the username/password they will send an email? If we can actually always use the refresh token correctly we shouldn't receive an email, right?

If both cases sends an email this is an active way to get rid of third-parties.

Anyway, since they are blocking requets now, they have changed something again to detect third-party requests.

@majurgens
Copy link
Author

I also get emails when I login via their website

@xkram15
Copy link

xkram15 commented Nov 6, 2024

Hello,
out of curiosity - where and how do you "login via their website"?
I have three units "Panasonic Etherea" AC and so far I was aware only remote control by their "Panasonic Comfort Cloud App" from a mobile. I tried to Google but still cannot find what are you referring. From where I can control my units from a website?

Thanks

@majurgens
Copy link
Author

The "login via website" is only to manage the identity. Link is a few posts earlier

@chamsters
Copy link

Looks like there's a solution over at https://github.com/sockless-coding/panasonic_cc/releases/tag/2024.11.0, how can we incorporate into this project?

@Olifant1990
Copy link

Solved with sockless-coding/panasonic_cc#336.
I can confirm it is working again!

@mchacher
Copy link

mchacher commented Nov 8, 2024

good news. @Olifant1990 can you propose a pull request with the fix?

@Olifant1990
Copy link

@mchacher no sorry, not using this specific github, but confirmed the linked fix is working. So it shouldn't be difficult for you too ;)

@majurgens
Copy link
Author

If I use the code from this new PR I am getting the following error:

Traceback (most recent call last):
  File "/opt/hvac/python-panasonic-comfort-cloud/pcomfortcloud.py", line 5, in <module>
    __main__.main()
  File "/opt/hvac/python-panasonic-comfort-cloud/pcomfortcloud/__main__.py", line 200, in main
    session.login()
  File "/opt/hvac/python-panasonic-comfort-cloud/pcomfortcloud/session.py", line 36, in login
    state = super().login()
            ^^^^^^^^^^^^^^^
  File "/opt/hvac/python-panasonic-comfort-cloud/pcomfortcloud/authentication.py", line 307, in login
    self._get_new_token()
  File "/opt/hvac/python-panasonic-comfort-cloud/pcomfortcloud/authentication.py", line 271, in _get_new_token
    "x-cfc-api-key": self._get_api_key(timestamp, self._token["access_token"]),
                                                  ~~~~~~~~~~~^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not subscriptable

@xkram15
Copy link

xkram15 commented Nov 8, 2024

Exactly the same - with a change from @mortenf I am getting :
...
...
File "/home/pi/pc/python-panasonic-comfort-cloud/pcomfortcloud/authentication.py", line 271, in _get_new_token
"x-cfc-api-key": self._get_api_key(timestamp, self._token["access_token"]),
TypeError: 'NoneType' object is not subscriptable

@mortenf
Copy link
Contributor

mortenf commented Nov 9, 2024

I'm sorry, that should now be fixed in the PR. The error shows up when no token is saved/reused, which is why I didn't notice it.

@lostfields
Copy link
Owner

Fixed by #104

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

7 participants