Compare commits

3 Commits

Author SHA1 Message Date
Dreaded_X 3cc606da45 feat: Sync printer light with room light
Build and deploy / build (push) Successful in 18m21s
Build and deploy / Deploy container (push) Has been skipped
2026-06-19 06:10:36 +02:00
Dreaded_X 903887a149 feat: Add basic support for bambu printer 2026-06-19 06:02:03 +02:00
Dreaded_X 79ac49041d feat: Build fully static binary 2026-06-19 06:01:44 +02:00
4 changed files with 5 additions and 6 deletions
+1 -1
View File
@@ -21,7 +21,7 @@ ENV RELEASE_VERSION=${RELEASE_VERSION}
RUN cargo auditable build --release
FROM gcr.io/distroless/static-debian13:nonroot AS runtime
FROM scratch AS runtime
COPY --from=builder /app/target/release/automation /app/automation
ENV AUTOMATION__ENTRYPOINT=/app/config/config.lua
ENV LUA_PATH="/app/?.lua;;"
+1 -2
View File
@@ -12,7 +12,7 @@ use bambulab::{Command, Message};
use google_home::errors::{self};
use google_home::traits::OnOff;
use lua_typed::Typed;
use tracing::{debug, trace};
use tracing::trace;
use crate::{DebugWrap, LuaDeviceCreate};
@@ -104,7 +104,6 @@ impl LuaDeviceCreate for Bambu {
bambu.config.callbacks.state.call(bambu.clone()).await;
}
Message::Connected => {
debug!(id = bambu.config.device_id, "Connected");
client.publish(Command::PushAll).await.unwrap();
bambu.config.callbacks.connected.call(bambu.clone()).await;
+2 -2
View File
@@ -10,12 +10,12 @@ return {
openid_url = "https://login.huizinga.dev/api/oidc",
},
mqtt = {
host = ((host == "zeus" or host == "hephaestus") and "olympus.huizinga.lan") or "mosquitto",
host = ((host == "zeus" or host == "hephaestus") and "olympus.lan.huizinga.dev") or "mosquitto",
port = 8883,
client_name = "automation-" .. host,
username = "mqtt",
password = secrets.mqtt_password,
tls = false,
tls = host == "zeus" or host == "hephaestus",
},
modules = {
require("config.battery"),
+1 -1
View File
@@ -13,7 +13,7 @@ function module.setup(mqtt_client)
local light = nil
local bambu = devices.Bambu.new({
host = "10.0.0.108",
host = "thalia.huizinga.lan",
device_id = secrets.printer_device_id,
access_code = secrets.printer_access_code,
callbacks = {