Auto power off your Bambu Lab P1S after printing and cooldown via Smart Life.
120
Automatically trigger a Smart Life power-off automation after your Bambu Lab P1S finishes printing and cools down. Runs as a lightweight Docker container—no Home Assistant required.
docker pull joel85/bambu-turn-off-safe:latest
For a fixed version:
docker pull joel85/bambu-turn-off-safe:v0.0.1
Defaults to demo mode. Live operation requires Bambu and TuyaLink credentials.
The application sends an automation signal; Smart Life controls the plug. Cloud delays and outages can affect execution. Test with a notification before enabling power-off, and avoid starting another print while shutdown is pending.
The dashboard has no authentication and is intended for trusted private networks.
Set MODE=live to enable cloud connections. The default demo mode uses simulated printer data and sends no cloud signals.
| Variable | Description |
|---|---|
MODE | demo or live. Default: demo. |
BAMBU_REGION | Bambu account region: global or china. Default: global. |
BAMBU_SERIAL | Printer serial number. Required in live mode. |
BAMBU_USERNAME | Bambu MQTT username (u_…), not your email address. Required in live mode. |
BAMBU_ACCESS_TOKEN | Bambu Cloud access token, not the printer LAN access code. Required in live mode. |
TUYA_DEVICE_ID | ID of your dedicated TuyaLink device. Required in live mode. |
TUYA_DEVICE_SECRET | Secret of your dedicated TuyaLink device. Required in live mode. |
TUYA_MQTT_HOST | MQTT endpoint matching your TuyaLink data center. Default: m1.tuyaeu.com. |
TUYA_PROPERTY_CODE | Boolean property used as the Smart Life trigger. Default: bambu_off. |
SAFE_NOZZLE_TEMPERATURE | Maximum nozzle temperature before triggering, in °C. Allowed: 1–50. |
STABLE_SECONDS | Time all shutdown conditions must remain satisfied. Default: 30; allowed: 30–3600 seconds. |
PULSE_SECONDS | Duration of the local ON signal. Default: 30; allowed: 1–120 seconds. |
MAX_DATA_AGE_SECONDS | Maximum nozzle reading age and gap between relevant printer reports. Default: 60; allowed: 5–120 seconds. |
Use TuyaLink credentials for the virtual trigger device, not credentials for your physical power plug.
.envMODE=live
BAMBU_REGION=global
BAMBU_SERIAL=your_printer_serial
BAMBU_USERNAME=u_your_mqtt_username
BAMBU_ACCESS_TOKEN='your_bambu_cloud_token'
TUYA_DEVICE_ID=your_tuyalink_device_id
TUYA_DEVICE_SECRET='your_tuyalink_device_secret'
TUYA_MQTT_HOST=m1.tuyaeu.com
TUYA_PROPERTY_CODE=bambu_off
SAFE_NOZZLE_TEMPERATURE=38
STABLE_SECONDS=30
PULSE_SECONDS=30
MAX_DATA_AGE_SECONDS=60
BIND_IP=127.0.0.1
PORT=8080
BIND_IP and PORT are settings for the project's Compose file. To access the dashboard from your trusted LAN, set BIND_IP to your NAS LAN address.
Set the temperature explicitly: the application and example file default to 38 °C, while the Compose fallback is 30 °C.
Keep .env private. Persist /data in a Docker volume to retain duplicate-trigger protection across container replacements.
Content type
Image
Digest
sha256:b8e63810f…
Size
41.2 MB
Last updated
about 1 month ago
docker pull joel85/bambu-turn-off-safe