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

Raspberry Pi 4 - Server configuration error #24

Closed
mullanasruddin opened this issue Oct 14, 2024 · 6 comments
Closed

Raspberry Pi 4 - Server configuration error #24

mullanasruddin opened this issue Oct 14, 2024 · 6 comments
Labels
help wanted Extra attention is needed question Further information is requested unverified bug Unverified bug

Comments

@mullanasruddin
Copy link

Hi,
and thanks for this component.

After typing in "python3 client.py 192.168.178.6"
following error occurs:

Traceback (most recent call last):
File "/homeassistant/home-assistant-alexa-shopping-list-main/client/client.py", line 288, in
asyncio.run(client.run_console())
File "/usr/lib/python3.12/asyncio/runners.py", line 194, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/asyncio/base_events.py", line 687, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/homeassistant/home-assistant-alexa-shopping-list-main/client/client.py", line 259, in run_console
await self._check_server()
File "/homeassistant/home-assistant-alexa-shopping-list-main/client/client.py", line 82, in _check_server
if await self._server_authenticated() == False:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/homeassistant/home-assistant-alexa-shopping-list-main/client/client.py", line 118, in _server_authenticated
response = await self._send_command("authenticated")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/homeassistant/home-assistant-alexa-shopping-list-main/client/client.py", line 39, in _send_command
response = await websocket.recv()
^^^^^^^^^^^^^^^^^^^^^^
File "/root/.local/lib/python3.12/site-packages/websockets/legacy/protocol.py", line 564, in recv
await self.ensure_open()
File "/root/.local/lib/python3.12/site-packages/websockets/legacy/protocol.py", line 940, in ensure_open
raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedError: received 1011 (internal error); then sent 1011 (internal error)

....and that's it. It doesn't ask for username password and so on.
I tried with amazon.de and amazon.co.uk.
Both same error.

thanks in advance!

@madmachinations
Copy link
Owner

Can you be more specific about your steps please?

After you ran python3 client.py 192.168.178.6, did it ask you anything? I assume it asked you for the amazon address?

If so what exactly did you type? And then when you pressed enter, what happened? It threw these errors? Or did it just throw these errors as soon as you ran python3 client.py 192.168.178.6?

Please can you also describe what kind of setup you have running home assistant? How did you install the server for this component?

Is it the HASS OS extension? Are you just running the docker container yourself? Have you manually installed the server with systemd?

@madmachinations madmachinations added the unverified bug Unverified bug label Oct 14, 2024
@mullanasruddin
Copy link
Author

After running python3 client.py 192.168.178.6 it asked for the amazon address.
Then I typed: amazon.de -> enter. After that it throws this error.

After trying again, it doesn't ask for the address no more, and throws the same error directly.

Home assistant on rasperry pi 4b.
Core
2024.10.2
Supervisor
2024.10.2
Operating System
13.1

I installed hass os addon for the server, as described here:

Hass Add-on

There is a HASS OS Add-on of the server.

Add this repository to your installation, and install the alexa shopping list add on:

https://gitlab.com/home-assistant-components/hass-addons_

@madmachinations
Copy link
Owner

It has never actually been tested on a raspberry pi, and i'm wondering if it might be too much for it.

Would it be possible for you to run the server on your main PC, just to test it and see if you are able to use it there?

Because that would help isolate if the problem is something to do with German amazon, or something to do with the device it is running on.

I'm sure someone else posted recently who is using it with German amazon.

@madmachinations madmachinations changed the title Server configuration error Raspberry Pi 4 - Server configuration error Oct 14, 2024
@madmachinations madmachinations added help wanted Extra attention is needed question Further information is requested labels Oct 14, 2024
@mullanasruddin
Copy link
Author

Thanks for your answer.

I probably misunderstand the functioning of this component, and overlooked the part where you mention that it is a "selenium based application".
I don't know selenium, never heard of before.

I just installed the server addon on my HA installation on a raspi. Then I used "advanced ssh & web terminal" addon to try to configure the server, which ends up with the error mentioned.

@madmachinations
Copy link
Owner

Thanks for your answer.

I probably misunderstand the functioning of this component, and overlooked the part where you mention that it is a "selenium based application". I don't know selenium, never heard of before.

I just installed the server addon on my HA installation on a raspi. Then I used "advanced ssh & web terminal" addon to try to configure the server, which ends up with the error mentioned.

So after installing the server add-on to hass, you don't configure it on the hass device.

The computer you're sat typing on now, is the one you run the client on. And then the client on your PC talks to the server on your HASS device.

I saw someone else trying to configure it on the hass device and it caused all sorts of weird problems.

@mullanasruddin
Copy link
Author

As you said, I configured the client from PC and was now able to authenticate the server.

But now I have the same problem as gargahcerk in issue #25.
If I type "list" and enter it says "not authenticated", although it was authenticated few seconds before.

Therefore this issue can be closed, and we can continue in issue #25.

Thanks for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested unverified bug Unverified bug
Projects
None yet
Development

No branches or pull requests

2 participants