3 Commits
2.1.2 ... 2.2.0

Author SHA1 Message Date
d677b33cdb recreate
All checks were successful
ci/woodpecker/tag/woodpecker Pipeline was successful
2026-02-26 12:19:48 +01:00
d9b1000665 publish cache retained
All checks were successful
ci/woodpecker/tag/woodpecker Pipeline was successful
2025-12-06 14:46:39 +01:00
7794fabaf3 publish cache 4
All checks were successful
ci/woodpecker/tag/woodpecker Pipeline was successful
2025-12-06 14:41:39 +01:00
5 changed files with 14 additions and 15 deletions

View File

@@ -47,10 +47,7 @@ steps:
commands:
- printf "$KUBE_CONFIG_CONTENT" > /tmp/kubeconfig
- export KUBECONFIG=/tmp/kubeconfig
- kubectl create configmap pv-controller-config
--from-file=config.yaml=config/config.yaml
--namespace=$NAMESPACE
--dry-run=client -o yaml | kubectl apply -f -
- kubectl create configmap pv-controller-config --from-file=config.yaml=config/config.yaml --namespace=$NAMESPACE --dry-run=client -o yaml | kubectl apply -f -
deploy:
image: quay.io/wollud1969/k8s-admin-helper:0.3.4

View File

@@ -1,6 +1,6 @@
global:
scan_interval: 0.25
log_level: DEBUG
log_level: INFO
mqtt:
broker: emqx01-anonymous-cluster-internal.broker.svc.cluster.local
@@ -25,17 +25,10 @@ input:
output:
- name: pv_meter
enabled: true
scan_rate: 15
scan_rate: 60
publish_topic: IoT/PV/Values
slave_id: 2
registers:
- address: 0x0048
attribute: importEnergyActive
name: Import active energy
unit: kWh
register_type: input
data_type: float32
adaptor: floatAdaptor
- address: 0x004c
attribute: importEnergyReactive
name: Import reactive energy

7
config/config.yaml-bak Normal file
View File

@@ -0,0 +1,7 @@
- address: 0x0048
attribute: importEnergyActive
name: Import active energy
unit: kWh
register_type: input
data_type: float32
adaptor: floatAdaptor

View File

@@ -9,6 +9,8 @@ metadata:
reloader.stakater.com/configmap: "pv-controller-config"
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
app: pv-controller

View File

@@ -69,5 +69,5 @@ class AbstractMqttPublisher(threading.Thread):
logger.debug(f"mqtt message unchanged, not publishing: {topic} -> {payload}")
return
self.cache[topic] = payload
self.client.publish(topic, payload)
self.client.publish(topic, payload, retain=True)