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

Headless pi setup #63

Open
vih-rar opened this issue Apr 2, 2024 · 4 comments
Open

Headless pi setup #63

vih-rar opened this issue Apr 2, 2024 · 4 comments

Comments

@vih-rar
Copy link

vih-rar commented Apr 2, 2024

Hi,
I've had no issues running this module on a windows, but I'm trying to move this setup to a headless pi zero w, without a desktop interface. How can I go about doing the authorization in this case? I get the following message right now
image

Thank you

@randomBrainstormer
Copy link
Owner

Hi @vih-rar ,

Thank you for reaching out and for sharing the details of the issue you're facing. From the screenshot and the information you provided, it seems like the plugin is unable to locate token.json, which indicates that the authentication step hasn't been completed successfully. Typically, the process involves automatically launching a small browser window for user authentication. However, given that you're working on a headless Pi Zero W setup and presumably accessing it via SSH, this direct method of authorization won't work in this scenario, unfortunately.

Since the plugin doesn't support headless authorization out of the box, I would recommend a couple of workarounds:

  1. Using VNC: Establish a VNC connection to your Raspberry Pi. This will allow you to interact with a virtual desktop environment, making it possible to complete the browser-based authentication process as if you were working with a monitor attached directly to the Pi.

  2. Direct Connection: Alternatively, if setting up a VNC connection isn't feasible for you, connecting a keyboard and mouse directly to your Raspberry Pi could be another way to proceed. This, of course, requires that you temporarily connect your Pi to a display for the authentication process.

I understand these approaches might not be as straightforward as SSH, but due to the plugin's current limitations regarding headless environments, these are viable methods to complete the necessary authentication.

I hope this helps and you're able to get your setup running smoothly on the Pi Zero W. If you have any more questions or run into further issues, do not hesitate to ask.

@vih-rar
Copy link
Author

vih-rar commented Apr 3, 2024

Thank you for the tips! I had a raspbian lite installed so it could handle a server and browser at the same time, so I would still face the problem with VNC. But I'm switching to a zero 2 W now, and hopefully that should solve all the current problems.

@vih-rar vih-rar closed this as completed Apr 3, 2024
@vih-rar
Copy link
Author

vih-rar commented Apr 28, 2024

Hi again
The zero 2 W did not solve my problem, due to the same RAM and low swap space. Any desktop environment on it would not let me open a browser, and I only need the browser interface to log into the calendar API. Is there any way I can modify your files to output the link, and use the link on my host laptop rather than open it on the pi itself?

@vih-rar vih-rar reopened this Apr 28, 2024
@randomBrainstormer
Copy link
Owner

Hi @vih-rar ,

I understand the challenges you're facing regarding limited resources and the need to access the browser interface for authentication. Unfortunately, the current implementation of the authorization process for this plugin relies on a direct interaction with a web browser on the Raspberry Pi itself. As you mentioned, this can be problematic in headless setups or devices with resource constraints.

Regarding your suggestion about modifying the files to output a link for authentication on a separate device, this approach isn't supported by the current design of the plugin. The authentication process is inherently tied to the environment where the plugin is executed, requiring direct user interaction for security reasons.

I would recommend exploring alternative methods or tools that are specifically designed to handle authentication in headless or constrained environments. Researching Google's recommended approaches for limited tv and limited input device applications might provide insights into potential workarounds or solutions that align better with your setup. This plugin implements similar kind of authentication, perhaps you can find inspiration from there.

I appreciate your understanding of the plugin's limitations and encourage you to explore other approaches that align better with your setup.

If you have any further questions or if there's anything else I can assist you with, please feel free to reach out.

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

2 participants