update instruction to do migration; mqtt login more verbose

This commit is contained in:
RNL
2026-02-19 10:16:17 +11:00
parent 5983d80293
commit 8ecf2864ef
2 changed files with 22 additions and 13 deletions

View File

@@ -125,7 +125,15 @@ This downloads all required software (takes a few minutes the first time).
### Step 5a: First-Time Authentication ### 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 ```bash
docker compose run --rm bambu-run python standalone/manage.py bambu_collector --once docker compose run --rm bambu-run python standalone/manage.py bambu_collector --once

View File

@@ -687,19 +687,20 @@ class BambuPrinter:
print("BambuLab Authentication") print("BambuLab Authentication")
print("=" * 60) print("=" * 60)
print(f"Authenticating as: {self.username}") 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() print()
auth = BambuAuthenticator() auth = BambuAuthenticator()
try: try:
if self._silent: # Always show stdout during auth — suppress_stdout would hide
with suppress_stdout(): # interactive prompts from the library (e.g. verification code input).
token = auth.get_or_create_token(
username=self.username,
password=self.password
)
else:
token = auth.get_or_create_token( token = auth.get_or_create_token(
username=self.username, username=self.username,
password=self.password password=self.password