mirror of
https://github.com/RunLit/Bambu-Run.git
synced 2026-06-22 14:09:04 +01:00
update instruction to do migration; mqtt login more verbose
This commit is contained in:
10
README.md
10
README.md
@@ -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
|
||||||
|
|||||||
@@ -687,23 +687,24 @@ 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(
|
token = auth.get_or_create_token(
|
||||||
username=self.username,
|
username=self.username,
|
||||||
password=self.password
|
password=self.password
|
||||||
)
|
)
|
||||||
else:
|
|
||||||
token = auth.get_or_create_token(
|
|
||||||
username=self.username,
|
|
||||||
password=self.password
|
|
||||||
)
|
|
||||||
|
|
||||||
self._token = token
|
self._token = token
|
||||||
print("Authentication successful!")
|
print("Authentication successful!")
|
||||||
|
|||||||
Reference in New Issue
Block a user