diff --git a/README.md b/README.md index be7c323..58ea1eb 100644 --- a/README.md +++ b/README.md @@ -125,7 +125,15 @@ This downloads all required software (takes a few minutes the first time). ### Step 5a: First-Time Authentication -The first time you connect, Bambu Lab requires email verification. You need to run the collector **interactively** (not in the background) so you can enter the 6-digit code: +The first time you connect, Bambu Lab requires email verification. You need to run the collector **interactively** (not in the background) so you can enter the 6-digit code. + +First, set up the database: + +```bash +docker compose run --rm bambu-run python standalone/manage.py migrate --noinput +``` + +Then run the collector (this is what triggers Bambu Lab to send the verification email): ```bash docker compose run --rm bambu-run python standalone/manage.py bambu_collector --once diff --git a/bambu_run/mqtt_client.py b/bambu_run/mqtt_client.py index 3f231a4..3fb7286 100644 --- a/bambu_run/mqtt_client.py +++ b/bambu_run/mqtt_client.py @@ -687,23 +687,24 @@ class BambuPrinter: print("BambuLab Authentication") print("=" * 60) print(f"Authenticating as: {self.username}") - print("This may require email verification (2FA)...") + print() + print(">>> ACTION MAY BE REQUIRED <<<") + print("Bambu Lab will send a 6-digit verification code to your") + print("registered email. Watch this terminal — if a prompt") + print(f"appears below, enter the code and press Enter.") + print(f"(You have {verification_code_timeout} seconds to respond.)") + print("=" * 60) print() auth = BambuAuthenticator() try: - if self._silent: - with suppress_stdout(): - token = auth.get_or_create_token( - username=self.username, - password=self.password - ) - else: - token = auth.get_or_create_token( - username=self.username, - password=self.password - ) + # Always show stdout during auth — suppress_stdout would hide + # interactive prompts from the library (e.g. verification code input). + token = auth.get_or_create_token( + username=self.username, + password=self.password + ) self._token = token print("Authentication successful!")