Merge branch 'master' into patch-10
This commit is contained in:
commit
4388de10c8
20 changed files with 288 additions and 261 deletions
132
config/rzl.js
132
config/rzl.js
|
|
@ -2,6 +2,7 @@
|
|||
import type { Config } from "config/flowtypes";
|
||||
import * as types from "config/types";
|
||||
import { hex, rgb, rgba, rainbow } from "config/colors";
|
||||
import { mdi, raw_mdi } from "config/icon";
|
||||
import { esper_topics, esper_statistics, floalt, tradfri_remote } from "./utils";
|
||||
|
||||
const config : Config = {
|
||||
|
|
@ -48,6 +49,12 @@ const config : Config = {
|
|||
defaultValue: "OFF",
|
||||
values: { on: "ON", off: "OFF" }
|
||||
},
|
||||
olymp_printer: {
|
||||
state: "stat/sonoff2/POWER",
|
||||
command: "cmnd/sonoff2/power",
|
||||
defaultValue: "OFF",
|
||||
values: { on: "ON", off: "OFF" }
|
||||
},
|
||||
flyfry: {
|
||||
state: "/service/openhab/out/wifi_flyfry/state",
|
||||
command: "/service/openhab/in/wifi_flyfry/command",
|
||||
|
|
@ -204,63 +211,64 @@ const config : Config = {
|
|||
led_stahltrager: {
|
||||
name: "LED Stahlträger",
|
||||
position: [380, 590],
|
||||
icon: "white-balance-iridescent",
|
||||
icon: mdi("white-balance-iridescent"),
|
||||
iconColor: ({led_stahltraeger}) => led_stahltraeger == "on" ? rainbow : hex("#000000"),
|
||||
ui: [
|
||||
{
|
||||
type: "toggle",
|
||||
text: "Stahlträger LED",
|
||||
topic: "led_stahltraeger",
|
||||
icon: "power"
|
||||
icon: mdi("power")
|
||||
},
|
||||
]
|
||||
},
|
||||
snackbar: {
|
||||
name: "Snackbar",
|
||||
position: [510, 500],
|
||||
icon: "fridge",
|
||||
icon: mdi("fridge"),
|
||||
iconColor: ({snackbar}) => snackbar == "on" ? hex("#E20074") : hex("#000000"),
|
||||
ui: [
|
||||
{
|
||||
type: "toggle",
|
||||
text: "Snackbar",
|
||||
topic: "snackbar",
|
||||
icon: "power"
|
||||
icon: mdi("power")
|
||||
}
|
||||
]
|
||||
},
|
||||
twinkle: {
|
||||
name: "Twinkle",
|
||||
position: [530, 560],
|
||||
icon: ({twinkle}) => twinkle == "on" ? "led-on flip-v" : "led-off flip-v",
|
||||
icon: ({twinkle}) =>
|
||||
twinkle == "on" ? raw_mdi("led-on flip-v") : raw_mdi("led-off flip-v"),
|
||||
iconColor: ({twinkle}) => twinkle == "on" ? rainbow : hex("#000000"),
|
||||
ui: [
|
||||
{
|
||||
type: "toggle",
|
||||
text: "Twinkle",
|
||||
topic: "twinkle",
|
||||
icon: "power"
|
||||
icon: mdi("power")
|
||||
}
|
||||
]
|
||||
},
|
||||
fan: {
|
||||
name: "Ventilator",
|
||||
position: [520, 450],
|
||||
icon: "fan",
|
||||
icon: mdi("fan"),
|
||||
iconColor: ({fan}) => fan == "on" ? hex("#00FF00") : hex("#000000"),
|
||||
ui: [
|
||||
{
|
||||
type: "toggle",
|
||||
text: "Ventilator",
|
||||
topic: "fan",
|
||||
icon: "power"
|
||||
icon: mdi("power")
|
||||
}
|
||||
]
|
||||
},
|
||||
cashdesk: {
|
||||
name: "Cashdesk",
|
||||
position: [500, 470],
|
||||
icon: "coin",
|
||||
icon: mdi("coin"),
|
||||
ui: [
|
||||
{
|
||||
type: "link",
|
||||
|
|
@ -272,49 +280,68 @@ const config : Config = {
|
|||
videogames: {
|
||||
name: "Videospiele",
|
||||
position: [100, 100],
|
||||
icon: "gamepad-variant",
|
||||
icon: mdi("gamepad-variant"),
|
||||
iconColor: ({videogames}) => videogames == "on" ? hex("#00FF00") : hex("#000000"),
|
||||
ui: [
|
||||
{
|
||||
type: "toggle",
|
||||
text: "Videospiele",
|
||||
topic: "videogames",
|
||||
icon: "power"
|
||||
icon: mdi("power")
|
||||
}
|
||||
]
|
||||
},
|
||||
olymp_pc: {
|
||||
name: "Rechner und Drucker",
|
||||
name: "Rechner",
|
||||
position: [297, 90],
|
||||
icon: "desktop-classic",
|
||||
icon: mdi("desktop-classic"),
|
||||
iconColor: ({olymp_pc}) => olymp_pc == "on" ? hex("#00FF00") : hex("#000000"),
|
||||
ui: [
|
||||
{
|
||||
type: "toggle",
|
||||
text: "Rechner und Drucker",
|
||||
text: "Rechner",
|
||||
topic: "olymp_pc",
|
||||
icon: mdi("power")
|
||||
}
|
||||
]
|
||||
},
|
||||
olymp_printer: {
|
||||
name: "Drucker",
|
||||
position: [335, 90],
|
||||
icon: "printer",
|
||||
iconColor: ({olymp_printer}) => olymp_printer == "on" ? hex("#00FF00") : hex("#000000"),
|
||||
ui: [
|
||||
{
|
||||
type: "toggle",
|
||||
text: "Drucker",
|
||||
topic: "olymp_printer",
|
||||
icon: "power"
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
link: "http://annette.rzl/",
|
||||
text: "Open Annette"
|
||||
}
|
||||
]
|
||||
},
|
||||
flyfry: {
|
||||
name: "Fliegenbratgerät",
|
||||
position: [450, 590],
|
||||
icon: "fire",
|
||||
icon: mdi("fire"),
|
||||
iconColor: ({flyfry}) => flyfry == "on" ? hex("#6666FF") : hex("#000000"),
|
||||
ui: esper_statistics("flyfry", [
|
||||
{
|
||||
type: "toggle",
|
||||
text: "Fliegenbratgerät",
|
||||
topic: "flyfry",
|
||||
icon: "power"
|
||||
icon: mdi("power")
|
||||
}
|
||||
])
|
||||
},
|
||||
artnet: {
|
||||
name: "Artnet",
|
||||
position: [535,480],
|
||||
icon: "spotlight",
|
||||
icon: mdi("spotlight"),
|
||||
iconColor: ({artnet}) =>
|
||||
({
|
||||
off: hex("#000000"),
|
||||
|
|
@ -331,7 +358,7 @@ const config : Config = {
|
|||
topic: "artnet",
|
||||
on: "cycle",
|
||||
toggled: val => val != "off",
|
||||
icon: "power"
|
||||
icon: mdi("power")
|
||||
},
|
||||
{
|
||||
type: "dropDown",
|
||||
|
|
@ -345,7 +372,7 @@ const config : Config = {
|
|||
cycle: "Farbwechsel"
|
||||
},
|
||||
enableCondition: val => val != "off",
|
||||
icon: "palette"
|
||||
icon: mdi("palette")
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
@ -354,12 +381,12 @@ const config : Config = {
|
|||
position: [350, 650],
|
||||
iconColor: ({onkyo_connection, onkyo_power}) =>
|
||||
onkyo_connection != "connected" ? hex("#888888") : (onkyo_power == "on" ? hex("#00FF00") : hex("#000000")),
|
||||
icon: "volume-high",
|
||||
icon: mdi("audio-video"),
|
||||
ui: [
|
||||
{
|
||||
type: "toggle",
|
||||
text: "Power",
|
||||
icon: "power",
|
||||
icon: mdi("power"),
|
||||
topic: "onkyo_power",
|
||||
enableCondition: (a, b, state) => state.onkyo_connection.internal == "connected"
|
||||
},
|
||||
|
|
@ -373,14 +400,14 @@ const config : Config = {
|
|||
topic: "onkyo_volume",
|
||||
min: 0,
|
||||
max: 50,
|
||||
icon: "volume-high",
|
||||
icon: mdi("volume-high"),
|
||||
enableCondition: (a, b, state) => state.onkyo_connection.internal == "connected"
|
||||
},
|
||||
{
|
||||
type: "toggle",
|
||||
text: "Mute",
|
||||
topic: "onkyo_mute",
|
||||
icon: "volume-off",
|
||||
icon: mdi("volume-off"),
|
||||
enableCondition: (a, b, state) => state.onkyo_connection.internal == "connected"
|
||||
},
|
||||
{
|
||||
|
|
@ -398,7 +425,7 @@ const config : Config = {
|
|||
pult: "Pult",
|
||||
front: "Front HDMI"
|
||||
},
|
||||
icon: "usb",
|
||||
icon: mdi("usb"),
|
||||
enableCondition: (a, b, state) => state.onkyo_connection.internal == "connected"
|
||||
},
|
||||
{
|
||||
|
|
@ -417,7 +444,7 @@ const config : Config = {
|
|||
somafm_beatblender: "Beat Blender (Soma FM)",
|
||||
ponyville: "Ponyville FM"
|
||||
},
|
||||
icon: "radio",
|
||||
icon: mdi("radio"),
|
||||
enableCondition: (a, b, state) => state.onkyo_connection.internal == "connected" && state.onkyo_inputs.internal == "netzwerk"
|
||||
},
|
||||
{
|
||||
|
|
@ -434,28 +461,28 @@ const config : Config = {
|
|||
rundumleuchte: {
|
||||
name: "Rundumleuchte",
|
||||
position: [310,275],
|
||||
icon: "alarm-light",
|
||||
icon: mdi("alarm-light"),
|
||||
iconColor: ({rundumleuchte}) => rundumleuchte == "on" ? hex("#F0DF10") : hex("#000000"),
|
||||
ui: [
|
||||
{
|
||||
type: "toggle",
|
||||
text: "Rundumleuchte",
|
||||
topic: "rundumleuchte",
|
||||
icon: "power"
|
||||
icon: mdi("power")
|
||||
}
|
||||
]
|
||||
},
|
||||
alarm: {
|
||||
name: "Alarm",
|
||||
position: [340, 250],
|
||||
icon: "alarm-bell",
|
||||
icon: mdi("alarm-bell"),
|
||||
iconColor: () => hex("#000000"),
|
||||
ui: esper_statistics("alarm")
|
||||
},
|
||||
door: {
|
||||
name: "Tür",
|
||||
position: [455,350],
|
||||
icon: "swap-vertical",
|
||||
icon: mdi("swap-vertical"),
|
||||
iconColor: ({door_status}) => door_status == "on" ? hex("#00FF00") : hex("#FF0000"),
|
||||
ui: [
|
||||
{
|
||||
|
|
@ -467,21 +494,21 @@ const config : Config = {
|
|||
type: "text",
|
||||
text: "Anwesend",
|
||||
topic: "presence_status",
|
||||
icon: "account"
|
||||
icon: mdi("account")
|
||||
}
|
||||
]
|
||||
},
|
||||
infoscreen: {
|
||||
name: "Infoscreen",
|
||||
position: [255, 495],
|
||||
icon: "television-guide flip-v",
|
||||
icon: mdi("television-guide flip-v"),
|
||||
iconColor: ({infoscreen}) => infoscreen == "on" ? hex("#4444FF") : hex("#000000"),
|
||||
ui: [
|
||||
{
|
||||
type: "toggle",
|
||||
text: "Infoscreen",
|
||||
topic: "infoscreen",
|
||||
icon: "power"
|
||||
icon: mdi("power")
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
|
|
@ -493,7 +520,7 @@ const config : Config = {
|
|||
printer_3d: {
|
||||
name: "Ultimaker 3",
|
||||
position: [754, 560],
|
||||
icon: "printer-3d",
|
||||
icon: mdi("printer-3d"),
|
||||
iconColor: ({printer_3d_status}) =>
|
||||
({
|
||||
awaiting_interaction: hex("#b3b300"),
|
||||
|
|
@ -514,7 +541,7 @@ const config : Config = {
|
|||
},
|
||||
{
|
||||
type: "progress",
|
||||
icon: "rotate-right",
|
||||
icon: mdi("rotate-right"),
|
||||
min: 0,
|
||||
max: 1,
|
||||
text: "Printing Progress",
|
||||
|
|
@ -525,7 +552,7 @@ const config : Config = {
|
|||
partkeepr: {
|
||||
name: "Partkeepr",
|
||||
position: [48, 450],
|
||||
icon: "chip",
|
||||
icon: mdi("chip"),
|
||||
ui: [
|
||||
{
|
||||
type: "link",
|
||||
|
|
@ -537,7 +564,7 @@ const config : Config = {
|
|||
kitchen_light: {
|
||||
name: "Deckenlicht Küche",
|
||||
position: [325, 407],
|
||||
icon: "ceiling-light",
|
||||
icon: mdi("ceiling-light"),
|
||||
ui: [
|
||||
{
|
||||
type: "toggle",
|
||||
|
|
@ -546,14 +573,14 @@ const config : Config = {
|
|||
toggled: n => parseInt(n) > 0,
|
||||
topic: "kitchen_light_brightness",
|
||||
text: "Ein/Ausschalten",
|
||||
icon: "power"
|
||||
icon: mdi("power")
|
||||
},
|
||||
{
|
||||
type: "slider",
|
||||
min: 0,
|
||||
max: 100,
|
||||
text: "Helligkeit",
|
||||
icon: "brightness-7",
|
||||
icon: mdi("brightness-7"),
|
||||
topic: "kitchen_light_brightness",
|
||||
delayedApply: true
|
||||
},
|
||||
|
|
@ -562,7 +589,7 @@ const config : Config = {
|
|||
min: 0,
|
||||
max: 100,
|
||||
text: "Farbtemperatur",
|
||||
icon: "weather-sunset-down",
|
||||
icon: mdi("weather-sunset-down"),
|
||||
topic: "kitchen_light_color",
|
||||
delayedApply: true
|
||||
},
|
||||
|
|
@ -575,7 +602,7 @@ const config : Config = {
|
|||
min: 0,
|
||||
max: 100,
|
||||
text: "Helligkeit",
|
||||
icon: "brightness-7",
|
||||
icon: mdi("brightness-7"),
|
||||
topic: floalt.brightness("65537"),
|
||||
delayedApply: true
|
||||
},
|
||||
|
|
@ -584,7 +611,7 @@ const config : Config = {
|
|||
min: 0,
|
||||
max: 100,
|
||||
text: "Farbtemperatur",
|
||||
icon: "weather-sunset-down",
|
||||
icon: mdi("weather-sunset-down"),
|
||||
topic: floalt.color("65537"),
|
||||
delayedApply: true
|
||||
},
|
||||
|
|
@ -597,7 +624,7 @@ const config : Config = {
|
|||
min: 0,
|
||||
max: 100,
|
||||
text: "Helligkeit",
|
||||
icon: "brightness-7",
|
||||
icon: mdi("brightness-7"),
|
||||
topic: floalt.brightness("65538"),
|
||||
delayedApply: true
|
||||
},
|
||||
|
|
@ -606,7 +633,7 @@ const config : Config = {
|
|||
min: 0,
|
||||
max: 100,
|
||||
text: "Farbtemperatur",
|
||||
icon: "weather-sunset-down",
|
||||
icon: mdi("weather-sunset-down"),
|
||||
topic: floalt.color("65538"),
|
||||
delayedApply: true
|
||||
},
|
||||
|
|
@ -619,7 +646,7 @@ const config : Config = {
|
|||
min: 0,
|
||||
max: 100,
|
||||
text: "Helligkeit",
|
||||
icon: "brightness-7",
|
||||
icon: mdi("brightness-7"),
|
||||
topic: floalt.brightness("65539"),
|
||||
delayedApply: true
|
||||
},
|
||||
|
|
@ -628,7 +655,7 @@ const config : Config = {
|
|||
min: 0,
|
||||
max: 100,
|
||||
text: "Farbtemperatur",
|
||||
icon: "weather-sunset-down",
|
||||
icon: mdi("weather-sunset-down"),
|
||||
topic: floalt.color("65539"),
|
||||
delayedApply: true
|
||||
},
|
||||
|
|
@ -641,7 +668,7 @@ const config : Config = {
|
|||
min: 0,
|
||||
max: 100,
|
||||
text: "Helligkeit",
|
||||
icon: "brightness-7",
|
||||
icon: mdi("brightness-7"),
|
||||
topic: floalt.brightness("65540"),
|
||||
delayedApply: true
|
||||
},
|
||||
|
|
@ -650,7 +677,7 @@ const config : Config = {
|
|||
min: 0,
|
||||
max: 100,
|
||||
text: "Farbtemperatur",
|
||||
icon: "weather-sunset-down",
|
||||
icon: mdi("weather-sunset-down"),
|
||||
topic: floalt.color("65540"),
|
||||
delayedApply: true
|
||||
}
|
||||
|
|
@ -658,8 +685,8 @@ const config : Config = {
|
|||
},
|
||||
kitchen_sink_light: {
|
||||
name: "Licht Spüle",
|
||||
position: [300, 348],
|
||||
icon: "ceiling-light",
|
||||
position: [300, 345],
|
||||
icon: mdi("wall-sconce-flat"),
|
||||
ui: [
|
||||
{
|
||||
type: "toggle",
|
||||
|
|
@ -668,14 +695,14 @@ const config : Config = {
|
|||
toggled: n => parseInt(n) > 0,
|
||||
topic: "kitchen_sink_light_brightness",
|
||||
text: "Ein/Ausschalten",
|
||||
icon: "power"
|
||||
icon: mdi("power")
|
||||
},
|
||||
{
|
||||
type: "slider",
|
||||
min: 0,
|
||||
max: 100,
|
||||
text: "Helligkeit",
|
||||
icon: "brightness-7",
|
||||
icon: mdi("brightness-7"),
|
||||
topic: "kitchen_sink_light_brightness",
|
||||
delayedApply: true
|
||||
}
|
||||
|
|
@ -800,7 +827,8 @@ const config : Config = {
|
|||
{
|
||||
image: require("../img/layers/rzl/labels.svg"),
|
||||
name: "Labels",
|
||||
defaultVisibility: "visible",
|
||||
defaultVisibility: "hidden",
|
||||
opacity: 0.8,
|
||||
bounds: {
|
||||
topLeft: [0, 0],
|
||||
bottomRight: [1000, 700]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue