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

Should this project work? #1

Open
ImAleeexx opened this issue Nov 19, 2023 · 14 comments
Open

Should this project work? #1

ImAleeexx opened this issue Nov 19, 2023 · 14 comments
Assignees

Comments

@ImAleeexx
Copy link

Hello, i tried setting up this project in HACS but after doing the login process the integration fails and shows this error
image

@ImAleeexx
Copy link
Author

ImAleeexx commented Nov 19, 2023

When i click on configure at the 3 dot menu shows this error
image

@ImAleeexx
Copy link
Author

I have edited the oauth credentials json file wich was empty with the correct data and i got 1 device with 3 sensors but i dont know if something more should show up in the device
image

@jitheshvijayakumar
Copy link

I have edited the oauth credentials json file wich was empty with the correct data and i got 1 device with 3 sensors but i dont know if something more should show up in the device image

Hi Alex, Can you provide a the format / sample credentials json file ?

@ImAleeexx
Copy link
Author

ImAleeexx commented Dec 4, 2023

{"access_token": "<accessToken>", "expires_on": "2023-12-05T17:41:48.656517"}
Thats for oauth file, credentials is empty i cannot make it fill by itself

@AfonsoFGarcia
Copy link
Owner

Hey! Sorry, didn't really have time to progress much further with this. I've only tested it with my setup (running on docker) and for me it works just fine. Can you let me know how you're running HA? Perhaps it's something related with permissions on the file editing that is causing the credentials.json file to not be created properly.

Regarding the entities, you're missing 2 entities: one lock and one camera. Can you provide the logs for the initialisation of the integration?

@ImAleeexx
Copy link
Author

The files have the correct permissions, i cannot find where the logs are. Could you guide me to send them?

@viseniv
Copy link

viseniv commented Feb 28, 2024

I have the same problem.
How i can manually edit the credentials an the oauth files?
I am running Home Assistant Supervised on a Debian machine

@cvc90
Copy link

cvc90 commented Mar 20, 2024

The oauth_token.json, credentials.json and persistent_ids.txt files do not seem to be created properly as they are created but empty.

Could you put a copy of these files as a sample so I can create them manually?

There seems to be as I commented in this issue some error when parsing the information to the files, could you check it?

thank you.

@viseniv
Copy link

viseniv commented Apr 17, 2024

I think this project is abandoned, for me it does not create any files.

@pchaves1
Copy link

Could you put a copy of these files as a sample so we can create them manually?

thank you.

@hugo1906
Copy link

When i click on configure at the 3 dot menu shows this error image

I have the same problem
runing HomeAssistant on a mini pc

@pchaves1
Copy link

Afonso,

pode dar aqui uma ajuda rápida?

@AfonsoFGarcia
Copy link
Owner

Hi all!

I am really sorry I haven't been able to help you guys. I would love to do it but with all that's going on with my work the last thing I want to do after leaving work is continue coding on something else. I can't really promise anything and I don't want to but I'll try to check it as there are some error logs on the latest versions of Haas related with blocking calls on the event loop.

Providing you with the files would not be useful as they cannot be created manually. If you're willing to execute the communication library locally on your machines, if you follow the quickstart on https://bluecon.afonsogarcia.dev/quickstart/ then you will be able to get both the credentials.json and persistent_ids.txt files that you can use in Haas.

As for the oauth_token.json you can use the example provided by @ImAleeexx as is, since the date is in the past it will request a new oauth token.

Let me know if all this helps.

@pchaves1
Copy link

Hello Afonso,
thank you for your reply.

on the HA log we see this error:

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 604, in async_setup
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/bluecon/init.py", line 26, in async_setup_entry
bluecon = BlueConAPI.create_already_authed(notification_callback, ConfigFolderOAuthTokenStorage(hass, entry), ConfigFolderNotificationInfoStorage(hass, entry))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/bluecon/BlueConAPI.py", line 53, in create_already_authed
if oAuthTokenStorage.retrieveOAuthToken() is not None:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/bluecon/ConfigFolderOAuthTokenStorage.py", line 17, in retrieveOAuthToken
return OAuthToken.fromJson(f.read())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/bluecon/oauth/OAuthToken.py", line 38, in fromJson
return OAuthToken(loads(json))
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/bluecon/oauth/OAuthToken.py", line 8, in init
self.refreshToken = oauth_response['refresh_token']
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
KeyError: 'refresh_token

But no idea how to fix it

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