Compare commits
9 Commits
0.3.3-conf
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
1311f7a59b
|
|||
|
a226fa9268
|
|||
|
3bd8d293a2
|
|||
|
be30ad3a3c
|
|||
|
500384b1cd
|
|||
|
6b4c247413
|
|||
|
04a1807306
|
|||
|
db5e4589d0
|
|||
|
5399f044a1
|
@@ -1,5 +1,8 @@
|
|||||||
when:
|
when:
|
||||||
event: [tag]
|
event: [tag]
|
||||||
|
ref:
|
||||||
|
exclude:
|
||||||
|
- refs/tags/*-configchange
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
APP:
|
APP:
|
||||||
@@ -22,8 +25,3 @@ steps:
|
|||||||
repo: ${FORGE_NAME}/${CI_REPO}/${APP}
|
repo: ${FORGE_NAME}/${CI_REPO}/${APP}
|
||||||
auto_tag: true
|
auto_tag: true
|
||||||
dockerfile: apps/${APP}/Dockerfile
|
dockerfile: apps/${APP}/Dockerfile
|
||||||
when:
|
|
||||||
event: [tag]
|
|
||||||
ref:
|
|
||||||
exclude:
|
|
||||||
- refs/tags/*-configchange
|
|
||||||
|
|||||||
@@ -1,23 +1,10 @@
|
|||||||
when:
|
when:
|
||||||
event: [tag]
|
event: [tag]
|
||||||
|
|
||||||
steps:
|
depends_on:
|
||||||
create_namespace:
|
- namespace
|
||||||
image: quay.io/wollud1969/k8s-admin-helper:0.3.4
|
|
||||||
environment:
|
|
||||||
KUBE_CONFIG_CONTENT:
|
|
||||||
from_secret: kube_config
|
|
||||||
NAMESPACE: "homea2"
|
|
||||||
commands:
|
|
||||||
- printf "$KUBE_CONFIG_CONTENT" > /tmp/kubeconfig
|
|
||||||
- export KUBECONFIG=/tmp/kubeconfig
|
|
||||||
- kubectl create namespace $NAMESPACE || echo "Namespace $NAMESPACE already exists"
|
|
||||||
when:
|
|
||||||
event: [tag]
|
|
||||||
ref:
|
|
||||||
exclude:
|
|
||||||
- refs/tags/*-configchange
|
|
||||||
|
|
||||||
|
steps:
|
||||||
apply_configuration:
|
apply_configuration:
|
||||||
image: quay.io/wollud1969/k8s-admin-helper:0.3.4
|
image: quay.io/wollud1969/k8s-admin-helper:0.3.4
|
||||||
environment:
|
environment:
|
||||||
@@ -36,6 +23,4 @@ steps:
|
|||||||
--namespace=$NAMESPACE
|
--namespace=$NAMESPACE
|
||||||
--dry-run=client -o yaml | kubectl apply -f -
|
--dry-run=client -o yaml | kubectl apply -f -
|
||||||
- kubectl apply -f deployment/configmap.yaml -n $NAMESPACE
|
- kubectl apply -f deployment/configmap.yaml -n $NAMESPACE
|
||||||
when:
|
|
||||||
event: [tag]
|
|
||||||
|
|
||||||
@@ -1,9 +1,13 @@
|
|||||||
when:
|
when:
|
||||||
event: [tag]
|
event: [tag]
|
||||||
|
ref:
|
||||||
|
exclude:
|
||||||
|
- refs/tags/*-configchange
|
||||||
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- build
|
- build
|
||||||
- predeploy
|
- namespace
|
||||||
|
- config
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
APP:
|
APP:
|
||||||
@@ -26,9 +30,5 @@ steps:
|
|||||||
- export KUBECONFIG=/tmp/kubeconfig
|
- export KUBECONFIG=/tmp/kubeconfig
|
||||||
- echo "Deploying application ${APP} ($IMAGE) to namespace $NAMESPACE"
|
- echo "Deploying application ${APP} ($IMAGE) to namespace $NAMESPACE"
|
||||||
- cat deployment/${APP}-deployment.yaml | sed "s,%IMAGE%,$IMAGE,g" | kubectl apply -n $NAMESPACE -f -
|
- cat deployment/${APP}-deployment.yaml | sed "s,%IMAGE%,$IMAGE,g" | kubectl apply -n $NAMESPACE -f -
|
||||||
when:
|
|
||||||
event: [tag]
|
|
||||||
ref:
|
|
||||||
exclude:
|
|
||||||
- refs/tags/*-configchange
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
when:
|
when:
|
||||||
event: [tag]
|
event: [tag]
|
||||||
|
ref:
|
||||||
|
exclude:
|
||||||
|
- refs/tags/*-configchange
|
||||||
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- deploy
|
- deploy
|
||||||
@@ -15,9 +18,4 @@ steps:
|
|||||||
- printf "$KUBE_CONFIG_CONTENT" > /tmp/kubeconfig
|
- printf "$KUBE_CONFIG_CONTENT" > /tmp/kubeconfig
|
||||||
- export KUBECONFIG=/tmp/kubeconfig
|
- export KUBECONFIG=/tmp/kubeconfig
|
||||||
- kubectl apply -f deployment/ingress.yaml -n $NAMESPACE
|
- kubectl apply -f deployment/ingress.yaml -n $NAMESPACE
|
||||||
when:
|
|
||||||
event: [tag]
|
|
||||||
ref:
|
|
||||||
exclude:
|
|
||||||
- refs/tags/*-configchange
|
|
||||||
|
|
||||||
|
|||||||
15
.woodpecker/namespace.yml
Normal file
15
.woodpecker/namespace.yml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
when:
|
||||||
|
event: [tag]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
create_namespace:
|
||||||
|
image: quay.io/wollud1969/k8s-admin-helper:0.3.4
|
||||||
|
environment:
|
||||||
|
KUBE_CONFIG_CONTENT:
|
||||||
|
from_secret: kube_config
|
||||||
|
NAMESPACE: "homea2"
|
||||||
|
commands:
|
||||||
|
- printf "$KUBE_CONFIG_CONTENT" > /tmp/kubeconfig
|
||||||
|
- export KUBECONFIG=/tmp/kubeconfig
|
||||||
|
- kubectl create namespace $NAMESPACE || echo "Namespace $NAMESPACE already exists"
|
||||||
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "Home Automation",
|
|
||||||
"short_name": "Home",
|
|
||||||
"description": "Smart Home Automation System",
|
|
||||||
"start_url": "/",
|
|
||||||
"display": "standalone",
|
|
||||||
"background_color": "#667eea",
|
|
||||||
"theme_color": "#667eea",
|
|
||||||
"orientation": "portrait",
|
|
||||||
"icons": [
|
|
||||||
{
|
|
||||||
"src": "/static/apple-touch-icon-180x180.png",
|
|
||||||
"sizes": "180x180",
|
|
||||||
"type": "image/png",
|
|
||||||
"purpose": "any maskable"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"src": "/static/apple-touch-icon-152x152.png",
|
|
||||||
"sizes": "152x152",
|
|
||||||
"type": "image/png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"src": "/static/apple-touch-icon-120x120.png",
|
|
||||||
"sizes": "120x120",
|
|
||||||
"type": "image/png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"src": "/static/apple-touch-icon-76x76.png",
|
|
||||||
"sizes": "76x76",
|
|
||||||
"type": "image/png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"src": "/static/apple-touch-icon-32x32.png",
|
|
||||||
"sizes": "32x32",
|
|
||||||
"type": "image/png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"src": "/static/apple-touch-icon-16x16.png",
|
|
||||||
"sizes": "16x16",
|
|
||||||
"type": "image/png"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -16,7 +16,6 @@
|
|||||||
<meta name="apple-mobile-web-app-status-bar-style" content="default">
|
<meta name="apple-mobile-web-app-status-bar-style" content="default">
|
||||||
<meta name="apple-mobile-web-app-title" content="Dashboard">
|
<meta name="apple-mobile-web-app-title" content="Dashboard">
|
||||||
<meta name="theme-color" content="#667eea">
|
<meta name="theme-color" content="#667eea">
|
||||||
<link rel="manifest" href="{{ STATIC_BASE }}/manifest.json">
|
|
||||||
<style>
|
<style>
|
||||||
* {
|
* {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|||||||
@@ -15,7 +15,6 @@
|
|||||||
<meta name="apple-mobile-web-app-status-bar-style" content="default">
|
<meta name="apple-mobile-web-app-status-bar-style" content="default">
|
||||||
<meta name="apple-mobile-web-app-title" content="Gerät">
|
<meta name="apple-mobile-web-app-title" content="Gerät">
|
||||||
<meta name="theme-color" content="#667eea">
|
<meta name="theme-color" content="#667eea">
|
||||||
<link rel="manifest" href="{{ STATIC_BASE }}/manifest.json">
|
|
||||||
<style>
|
<style>
|
||||||
* {
|
* {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
@@ -359,6 +358,7 @@
|
|||||||
let deviceData = null;
|
let deviceData = null;
|
||||||
let deviceState = {};
|
let deviceState = {};
|
||||||
let roomName = '';
|
let roomName = '';
|
||||||
|
let deviceStateUnknown = false;
|
||||||
|
|
||||||
// Device type icons
|
// Device type icons
|
||||||
const deviceIcons = {
|
const deviceIcons = {
|
||||||
@@ -381,8 +381,19 @@
|
|||||||
// NEW: Use new endpoints for device info and layout
|
// NEW: Use new endpoints for device info and layout
|
||||||
deviceData = await window.apiClient.getDevice(deviceId);
|
deviceData = await window.apiClient.getDevice(deviceId);
|
||||||
console.log("Loaded device data:", deviceData);
|
console.log("Loaded device data:", deviceData);
|
||||||
deviceState = await window.apiClient.getDeviceState(deviceId);
|
|
||||||
console.log("Loaded device state:", deviceState);
|
try {
|
||||||
|
deviceState = await window.apiClient.getDeviceState(deviceId);
|
||||||
|
console.log("Loaded device state:", deviceState);
|
||||||
|
if (!deviceState || Object.keys(deviceState).length === 0) {
|
||||||
|
deviceStateUnknown = true;
|
||||||
|
deviceState = {};
|
||||||
|
}
|
||||||
|
} catch (stateError) {
|
||||||
|
console.warn('No state for device, using unknown state:', stateError);
|
||||||
|
deviceStateUnknown = true;
|
||||||
|
deviceState = {};
|
||||||
|
}
|
||||||
const layoutInfo = await window.apiClient.getDeviceLayout(deviceId);
|
const layoutInfo = await window.apiClient.getDeviceLayout(deviceId);
|
||||||
console.log("Loaded layout info:", layoutInfo);
|
console.log("Loaded layout info:", layoutInfo);
|
||||||
roomName = layoutInfo.room;
|
roomName = layoutInfo.room;
|
||||||
@@ -518,6 +529,14 @@
|
|||||||
}, 0);
|
}, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (deviceStateUnknown) {
|
||||||
|
const hint = document.createElement('div');
|
||||||
|
hint.className = 'device-meta';
|
||||||
|
hint.style.marginTop = '12px';
|
||||||
|
hint.textContent = 'Status unbekannt';
|
||||||
|
card.appendChild(hint);
|
||||||
|
}
|
||||||
|
|
||||||
container.appendChild(card);
|
container.appendChild(card);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -553,6 +572,14 @@
|
|||||||
`;
|
`;
|
||||||
card.appendChild(sliderGroup);
|
card.appendChild(sliderGroup);
|
||||||
|
|
||||||
|
if (deviceStateUnknown) {
|
||||||
|
const hint = document.createElement('div');
|
||||||
|
hint.className = 'device-meta';
|
||||||
|
hint.style.marginTop = '12px';
|
||||||
|
hint.textContent = 'Status unbekannt';
|
||||||
|
card.appendChild(hint);
|
||||||
|
}
|
||||||
|
|
||||||
container.appendChild(card);
|
container.appendChild(card);
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
@@ -581,6 +608,14 @@
|
|||||||
powerGroup.appendChild(powerButton);
|
powerGroup.appendChild(powerButton);
|
||||||
card.appendChild(powerGroup);
|
card.appendChild(powerGroup);
|
||||||
|
|
||||||
|
if (deviceStateUnknown) {
|
||||||
|
const hint = document.createElement('div');
|
||||||
|
hint.className = 'device-meta';
|
||||||
|
hint.style.marginTop = '12px';
|
||||||
|
hint.textContent = 'Status unbekannt';
|
||||||
|
card.appendChild(hint);
|
||||||
|
}
|
||||||
|
|
||||||
container.appendChild(card);
|
container.appendChild(card);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -599,6 +634,14 @@
|
|||||||
`;
|
`;
|
||||||
card.appendChild(statusDiv);
|
card.appendChild(statusDiv);
|
||||||
|
|
||||||
|
if (deviceStateUnknown) {
|
||||||
|
const hint = document.createElement('div');
|
||||||
|
hint.className = 'device-meta';
|
||||||
|
hint.style.marginTop = '12px';
|
||||||
|
hint.textContent = 'Status unbekannt';
|
||||||
|
card.appendChild(hint);
|
||||||
|
}
|
||||||
|
|
||||||
container.appendChild(card);
|
container.appendChild(card);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,6 @@
|
|||||||
<meta name="apple-mobile-web-app-status-bar-style" content="default">
|
<meta name="apple-mobile-web-app-status-bar-style" content="default">
|
||||||
<meta name="apple-mobile-web-app-title" content="Garage">
|
<meta name="apple-mobile-web-app-title" content="Garage">
|
||||||
<meta name="theme-color" content="#667eea">
|
<meta name="theme-color" content="#667eea">
|
||||||
<link rel="manifest" href="{{ STATIC_BASE }}/manifest.json">
|
|
||||||
<style>
|
<style>
|
||||||
* {
|
* {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|||||||
@@ -16,7 +16,6 @@
|
|||||||
<meta name="apple-mobile-web-app-status-bar-style" content="default">
|
<meta name="apple-mobile-web-app-status-bar-style" content="default">
|
||||||
<meta name="apple-mobile-web-app-title" content="Home Automation">
|
<meta name="apple-mobile-web-app-title" content="Home Automation">
|
||||||
<meta name="theme-color" content="#667eea">
|
<meta name="theme-color" content="#667eea">
|
||||||
<link rel="manifest" href="{{ STATIC_BASE }}/manifest.json">
|
|
||||||
<style>
|
<style>
|
||||||
* {
|
* {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|||||||
@@ -15,7 +15,6 @@
|
|||||||
<meta name="apple-mobile-web-app-status-bar-style" content="default">
|
<meta name="apple-mobile-web-app-status-bar-style" content="default">
|
||||||
<meta name="apple-mobile-web-app-title" content="{{ room_name }}">
|
<meta name="apple-mobile-web-app-title" content="{{ room_name }}">
|
||||||
<meta name="theme-color" content="#667eea">
|
<meta name="theme-color" content="#667eea">
|
||||||
<link rel="manifest" href="{{ STATIC_BASE }}/manifest.json">
|
|
||||||
<style>
|
<style>
|
||||||
* {
|
* {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|||||||
@@ -16,7 +16,6 @@
|
|||||||
<meta name="apple-mobile-web-app-status-bar-style" content="default">
|
<meta name="apple-mobile-web-app-status-bar-style" content="default">
|
||||||
<meta name="apple-mobile-web-app-title" content="Räume">
|
<meta name="apple-mobile-web-app-title" content="Räume">
|
||||||
<meta name="theme-color" content="#667eea">
|
<meta name="theme-color" content="#667eea">
|
||||||
<link rel="manifest" href="{{ STATIC_BASE }}/manifest.json">
|
|
||||||
<style>
|
<style>
|
||||||
* {
|
* {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|||||||
@@ -730,8 +730,19 @@ devices:
|
|||||||
features:
|
features:
|
||||||
power: true
|
power: true
|
||||||
topics:
|
topics:
|
||||||
set: "shellies/LightKitchenSink/relay/0/command"
|
set: "shellies/shellyplug-s-DED4E4/relay/0/command"
|
||||||
state: "shellies/LightKitchenSink/relay/0"
|
state: "shellies/shellyplug-s-DED4E4/relay/0"
|
||||||
|
- device_id: putzlicht_kueche
|
||||||
|
name: Putzlicht
|
||||||
|
type: light
|
||||||
|
cap_version: "light@1.2.0"
|
||||||
|
technology: zigbee2mqtt
|
||||||
|
features:
|
||||||
|
power: true
|
||||||
|
brightness: true
|
||||||
|
topics:
|
||||||
|
state: "zigbee2mqtt/0xa4c138563834406c"
|
||||||
|
set: "zigbee2mqtt/0xa4c138563834406c/set"
|
||||||
- device_id: licht_schrank_esszimmer
|
- device_id: licht_schrank_esszimmer
|
||||||
name: Schrank
|
name: Schrank
|
||||||
type: relay
|
type: relay
|
||||||
|
|||||||
@@ -123,6 +123,10 @@ rooms:
|
|||||||
title: Küche Spüle
|
title: Küche Spüle
|
||||||
icon: 💡
|
icon: 💡
|
||||||
rank: 142
|
rank: 142
|
||||||
|
- device_id: putzlicht_kueche
|
||||||
|
title: Küche Putzlicht
|
||||||
|
icon: 💡
|
||||||
|
rank: 143
|
||||||
- device_id: thermostat_kueche
|
- device_id: thermostat_kueche
|
||||||
title: Kueche
|
title: Kueche
|
||||||
icon: 🌡️
|
icon: 🌡️
|
||||||
|
|||||||
Reference in New Issue
Block a user