parent
16d03ceacf
commit
3c96bde015
1 changed files with 48 additions and 0 deletions
|
|
@ -118,6 +118,34 @@ const config : Config = {
|
||||||
command: "/service/openhab/in/pca301_infoscreen/command",
|
command: "/service/openhab/in/pca301_infoscreen/command",
|
||||||
defaultValue: "OFF",
|
defaultValue: "OFF",
|
||||||
values: { on: "ON", off: "OFF" }
|
values: { on: "ON", off: "OFF" }
|
||||||
|
},
|
||||||
|
printer_3d_status: {
|
||||||
|
state: "/service/ultimaker/state",
|
||||||
|
command: "",
|
||||||
|
defaultValue: "unavailable",
|
||||||
|
values: {},
|
||||||
|
parseState: msg => {
|
||||||
|
switch (msg.toString()) {
|
||||||
|
case "unreachable":
|
||||||
|
case "booting":
|
||||||
|
return "unavailable"
|
||||||
|
|
||||||
|
case "pausing":
|
||||||
|
case "paused":
|
||||||
|
case "resuming":
|
||||||
|
case "wait_cleanup":
|
||||||
|
case "maintenance":
|
||||||
|
return "awaiting_interaction"
|
||||||
|
|
||||||
|
case "pre_print":
|
||||||
|
case "post_print":
|
||||||
|
case "printing":
|
||||||
|
return "printing"
|
||||||
|
|
||||||
|
default:
|
||||||
|
return msg.toString()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
utils.esper_topics("afba40", "flyfry"),
|
utils.esper_topics("afba40", "flyfry"),
|
||||||
|
|
@ -405,6 +433,26 @@ const config : Config = {
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
printer_3d: {
|
||||||
|
name: "Ultimaker 3",
|
||||||
|
position: [754, 560],
|
||||||
|
icon: "printer-3d",
|
||||||
|
iconColor: ({printer_3d_status}) =>
|
||||||
|
({
|
||||||
|
awaiting_interaction: "#b3b300",
|
||||||
|
printing: "#00ff00",
|
||||||
|
idle: "#000000",
|
||||||
|
unavailable: "#888888",
|
||||||
|
error: "#ff0000"
|
||||||
|
})[printer_3d_status],
|
||||||
|
ui: [
|
||||||
|
{
|
||||||
|
type: "link",
|
||||||
|
link: "http://ultimaker.rzl/",
|
||||||
|
text: "Open Webinterface"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
partkeepr: {
|
partkeepr: {
|
||||||
name: "Partkeepr",
|
name: "Partkeepr",
|
||||||
position: [48, 450],
|
position: [48, 450],
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue