RaspberryPi, NUT und Node Red

Wenn man mal mehr als eine USV überwachen muss.

Nach dem Umrüsten der Anlage auf die neuen Server stieg auch der Stromverbrauch ein wenig an. Das hat aber gereicht, dass die Autonomiezeit sich gerade halbiert hat. Damit konnte ich eigentlich sehr gut Leben, weil ich mir da nicht wirklich Sorgen darum gemacht habe bei dem stabilen Stromnetz heut zu tage. Aber als der Serverschrank ein neues Plätzchen bekam, war ich recht erstaunt, wie schnell die 10 Minuten eigentlich dahinraften. Das waren eher gefühlte Sekunden. Da gerade Aktion war bei den APC USVs, habe ich mir da eine baugleiche APC BR155GI gekauft, die ich schon im Betrieb habe. USB Kabel und alles wird mitgeliefert, alles super.

Zuhause gabs dann die erste Überraschung, die Notstromgruppe war DOA... Na toll, aber der Händler hat ohne Diskussion, kurz und schmerzlos die ganze Kiste ausgetauscht. Ich stand keine 3 Minuten im Laden.

Ab nach Hause anschliessen, jawooohl funktioniert. So alles umgesteckt vereilt, und jetzt kam die Frage, wohin mit diesem USB Kabel. Das QNAP hatte schon die alte Notstromgruppe angeschlossen und schickte den Status ins Netzwerk. Aber mit zwei USVs kann die nicht umgehen. Grübel...

Die Idee war dann ganz einfach, ich habe noch ein Karton mit RaspberryPi's, also bau ich mir schnell mal ein Raspi zusammen, dass Ding hat ganze 4 USB Anschlüsse, sprich da passen 4 USV ran. Was ich noch zu entscheiden hatte, mit welchem Daemon frage ich die USVs ab. Für APC gäbe es extra den apcupsd, aber nach einer Weile herumprobieren und USB Ports via udev zu fixieren, war mir das eigentlich zu kompliziert, um da eine anständige Lösung, die man auch ruhigen gewissens in einem Betrieb einsetzten kann, zu veröffentlichen. Es gibt aber auch noch "nut" als Software, die auch sehr einfach den Status im Netzwerk anbieten kann. Daher für mich Ideal.

Wie bin ich da vorgegangen:

  • Raspi zusammenbauen
  • Raspbian lite herunterladen
  • SD-Card mit balenaEtcher beschreiben
  • SD-Card entfernen, wieder einsetzten
  • Auf der Partition "boot" eine leere Textdatei mit dem Namen ssh (ohne Endung) schreiben (aktiviert ssh nach dem starten)
  • SD-Card ins RaspberryPi einlegen und starten

 

So Raspi läuft, man kann mit ssh darauf zugreifen. Zeit, zuerst Updates zu machen:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get autoclean

 

Raspi ist jetzt aktiv. passt. Nun muss noch gaaaaanz kompliziert die restliche Software installiert werden:

sudo apt-get install nut

 

Nun geht es an die Konfiguration. Davor holen wir uns aber zuerst noch ein paar Infos über die angeschlossenen USVs:

lsusb -> Listet alle Geräte, die an den USBs angeschlossen sind, da müsste mindestens die beiden USB auftauchen, hier im Beispiel 2x APC

  • ups-lsusb

ls /dev/usb/
udevadm info --attribute-walk --name=/dev/usb/hiddevX | egrep 'manufacturer|product|serial'

Mit diesem Befehl kann man siich detailierte Informationen über Hersteller, Produkt und Seriennummer holen. Wichtig dabei ist, bei hiddev eines der Geräte einzusetzen, welche vorher mit ls angezeigt wurde. Achtung, das geht nur solange bei den USV, bevor NUT sich die Geräte geschnappt hat. Danach sind die Geräte nicht mehr via hiddev eingebunden. Warum machen wir das? Damit später die USV zugeteilt werden kann, nutzen wir die Seriennummer der USV. So spielt es schlussendlich keine Rolle mehr, an welchem USB diese steckt.

 


udevadm info --attribute-walk --name=/dev/usb/hiddev0 | egrep 'manufacturer|product|serial'
ATTRS{manufacturer}=="American Power Conversion"
ATTRS{product}=="Back-UPS RS 1500G FW:878.L5 .I USB FW:L5 "
ATTRS{serial}=="XXXXXXXXXXXX "


udevadm info --attribute-walk --name=/dev/usb/hiddev1 | egrep 'manufacturer|product|serial'
ATTRS{manufacturer}=="American Power Conversion"
ATTRS{product}=="Back-UPS RS 1500G FW:878.L4 .I USB FW:L4 "
ATTRS{serial}=="YYYYYYYYYYYY "


 

Nun haben wir die USV-Informationen und können entsprechend die Zuteilung machen.

sudo nano /etc/nut/ups.conf

Die File enthält jetzt eine ganze Menge informationen was wie wo warum. Für meine 2 USV füge ich zuunterst der Datei folgende Zeilen ein:

[UPS01]

driver = usbhid-ups
port = auto
desc = "UPS01"
serial = XXXXXXXXXXXX

[UPS02]

driver = usbhid-ups
port = auto
desc = "UPS02"
serial = XXXXXXXXXXXX

driver beschreibt, wie die USV angesprochen werden soll. dafür schaut man am einfachsten hier vorbei: https://networkupstools.org/stable-hcl.html
port beschreibt, wo die USV angeschlossen ist, in unserm Fall via USB ist auto perfekt, bei einer seriellen USV muss hier z.B. der richtige tty stehen.
desc kann genutzt werden, um eine Beschreibung mitzugeben.
serial beschreibt die Seriennummer und weisst die USV der NUT-Konfiguration zu, über die später den Status abgefragt wird.

Nice to know, wenn man die USV mit einem QNAP abfragen möchte, nimmt man z.B. statt [UPS01] den Namen [qnapups]. Danach kann das Raspi als Slave im NAS eingetragen werden.

 

Jetzt stellen wir noch NUT ein, damit dies als Netzwerkserver läuft:

sudo nano /etc/nut/nut.conf

MODE=netserver

 

Die letzte Datei, die noch angepasst werden muss, definiert, auf welchen IPs der Daemon hören soll:

sudo nano /etc/nut/upsd.conf

Auch hier trage ich zuunterst folgende Zeilen ein. Den Beschrieb lasse ich stehen, wenn man mal etwas nachlesen möchte.

LISTEN 127.0.0.1 3493
LISTEN X.X.X.X 3493

localhost richten wir ein, damit später Node Red via Loopback direkt an seinse Daten kommt.

Bei X.X.X.X trägt man die IP-Adresse des Raspis ein.

 

Es ist nun Zeit, NUT zu starten.

sudo upsdrvctl start
sudo service nut-server restart


Zuerst wird der UPS Driver Controler gestartet, ab dann sind die Geräte nicht mehr unter /dev/usb/hiddevX vorhanden. Danach der NUT Server neu gestartet.

 

Ein kleiner Test gefällig?

upsc ups01

 


Init SSL without certificate database
battery.charge: 100
battery.charge.low: 10
battery.charge.warning: 50
battery.date: 2001/09/25
battery.mfr.date: 2018/06/17
battery.runtime: 1278
battery.runtime.low: 120
battery.type: PbAc
battery.voltage: 27.3
battery.voltage.nominal: 24.0
device.mfr: American Power Conversion
device.model: Back-UPS RS 1500G
device.serial: XXXXXXXXXXXX
device.type: ups
driver.name: usbhid-ups
driver.parameter.pollfreq: 30
driver.parameter.pollinterval: 2
driver.parameter.port: auto
driver.parameter.serial: XXXXXXXXXXXX
driver.parameter.synchronous: no
driver.version: 2.7.4
driver.version.data: APC HID 0.96
driver.version.internal: 0.41
input.sensitivity: medium
input.transfer.high: 294
input.transfer.low: 176
input.transfer.reason: input voltage out of range
input.voltage: 233.0
input.voltage.nominal: 230
ups.beeper.status: disabled
ups.delay.shutdown: 20
ups.firmware: 878.L5 .I
ups.firmware.aux: L5
ups.load: 30
ups.mfr: American Power Conversion
ups.mfr.date: 2018/06/17
ups.model: Back-UPS RS 1500G
ups.productid: 0002
ups.realpower.nominal: 865
ups.serial: XXXXXXXXXXXX
ups.status: OL
ups.test.result: No test initiated
ups.timer.reboot: 0
ups.timer.shutdown: -1
ups.vendorid: 051d


 

 Das gleiche geht natürlich auch mit ups02, oder wie du deine USV-Konfiguration benannt hast.

 

Jetzt geht es ans installieren von Node Red, damit wir auch etwas mit den Daten anfangen können.

Um Node Red zu installieren, genügt folgender Befehl, der übrigens auch fürs Aktualisieren verwendet werden kann:

bash <(curl -sL https://raw.githubusercontent.com/node-red/raspbian-deb-package/master/resources/update-nodejs-and-nodered)

 

Damit Node Red startet beim Start des Raspis mache ich folgendes:

crontab -e

 

Wenn du noch auswählen musst, welcher Editor genutzt werden soll, ich bin inzwischen gut an nano gewöhnt, da er sehr stark einem normalen Editor gleicht. Im crontab fügen wir nun folgende Zeile ein unten.

@reboot node-red-pi

 

Wenn du deinem Raspi einen Hostname geben willst, dann mach das jetzt! Sonst musst du später die Node Red Configs umbenennen gehen.

cd $HOME/.node-red
ls -al
mv flows_raspberrypi_cred.json flows_NEW-HOSTNAME_cred.json
mv flows_raspberrypi.json flows_NEW-HOSTNAME.json
sudo reboot

Mit ls schaue ich schnell ins Verzeichnis, um sicher zu sein, dass die Dateien nicht dem Hostname entsprechen oder ich einfach den Neustart noch nicht gemacht habe.

 

Damit startet Node Red automatisch bei jedem neustart des Raspis. Testen wir das doch gleich mal.

sudo reboot

 

Wenn du alles richtig gemacht hast, müsstest du das gleiche Resultat haben wie ich:

  • Die USVs sind abfragbar via upsc NAME
  • Du kannst auf Node Red zugreifen via http://X.X.X.X:1880

 

Nun, Node Red ist ein Thema für sich, da das Tool wirklich extrem viel kann. Für mein kleines Projekt habe ich folgende Paletten noch hinzugefügt:

  • node-red-contrib-nut-ups
  • node-red-contrb-unit-converter
  • node-red-contrib-dashboard

 

Um ein wenig ein Bild zu haben von der Lage habe ich in Node Red Realtime-Grafiken, Realtime-Werte und Trends über die letzten 30 Minuten konfiguriert gemacht. Zusätzlich hole ich mir via API noch Daten vom SmartMe Plug. Das ganze abgerundet mit einer E-Mailbenachrichtigung.

  • 01-nodered-graphs
  • 02-nodered-value
  • 03-nodered-trends
  • 04-nodered-flow

 

Hier noch der Flow dazu:


[
{
"id": "db9d8c60.0e9c28",
"type": "tab",
"label": "Main Flow",
"disabled": false,
"info": ""
},
{
"id": "dab2b4df.a60df",
"type": "subflow",
"name": "Subflow UPS 01",
"info": "",
"category": "",
"in": [
{
"x": 60,
"y": 60,
"wires": [
{
"id": "8247423f.35f77"
},
{
"id": "5c6070a7.adb8e"
},
{
"id": "2bc6287f.3bf59"
},
{
"id": "25f7a5df.5c2362"
},
{
"id": "3ab55dc9.86c382"
},
{
"id": "ed301093.822e1"
},
{
"id": "ce4e99b1.af885"
},
{
"id": "7cf4e999.441488"
},
{
"id": "f4d2bfdb.730fa8"
},
{
"id": "24cd7a46.93b0b6"
},
{
"id": "15bc6d02.004663"
},
{
"id": "b9514a4c.9492e"
}
]
}
],
"out": []
},
{
"id": "9364d046.950a98",
"type": "subflow",
"name": "Subflow UPS 02",
"info": "",
"category": "",
"in": [
{
"x": 60,
"y": 60,
"wires": [
{
"id": "cf443bda.f53a88"
},
{
"id": "ae08e2a6.2d879"
},
{
"id": "8b5418ce.34a8f"
},
{
"id": "7f0ab2fc.6ba8f4"
},
{
"id": "88c346bc.a39da8"
},
{
"id": "1465921a.0ed956"
},
{
"id": "9fbb1f84.90da88"
},
{
"id": "3dcc21a2.a34326"
},
{
"id": "cc9bbc2c.c71a2"
},
{
"id": "8904de2e.31e73"
},
{
"id": "4df62de1.bbf9ac"
},
{
"id": "640f143e.cef57c"
}
]
}
],
"out": []
},
{
"id": "a1380e4e.c27728",
"type": "subflow",
"name": "Subflow SmartMe",
"info": "",
"category": "",
"in": [
{
"x": 60,
"y": 60,
"wires": [
{
"id": "6dbadee7.47911"
},
{
"id": "58987c62.f56644"
},
{
"id": "e6726b10.b63cf"
},
{
"id": "ec6d4175.045a08"
},
{
"id": "a0acff6d.40d93"
},
{
"id": "42715953.f1c128"
},
{
"id": "904adffb.6a62"
},
{
"id": "b049b01a.87e0d8"
},
{
"id": "1e95623f.7faa5e"
},
{
"id": "30d13cf8.0560f4"
},
{
"id": "d07678dd.491608"
}
]
}
],
"out": []
},
{
"id": "e2c6be57.ee8fc",
"type": "subflow",
"name": "E-Mail",
"info": "",
"category": "",
"in": [
{
"x": 60,
"y": 60,
"wires": [
{
"id": "31e64d9c.f18bca"
}
]
}
],
"out": []
},
{
"id": "9e5b4e31.f6149",
"type": "ui_base",
"theme": {
"name": "theme-dark",
"lightTheme": {
"default": "#0094CE",
"baseColor": "#0094CE",
"baseFont": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif",
"edited": true,
"reset": false
},
"darkTheme": {
"default": "#097479",
"baseColor": "#097479",
"baseFont": "Verdana,Verdana,Geneva,sans-serif",
"edited": true,
"reset": false
},
"customTheme": {
"name": "Untitled Theme 1",
"default": "#4B7930",
"baseColor": "#4B7930",
"baseFont": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"
},
"themeState": {
"base-color": {
"default": "#097479",
"value": "#097479",
"edited": false
},
"page-titlebar-backgroundColor": {
"value": "#097479",
"edited": false
},
"page-backgroundColor": {
"value": "#111111",
"edited": false
},
"page-sidebar-backgroundColor": {
"value": "#000000",
"edited": false
},
"group-textColor": {
"value": "#0eb8c0",
"edited": false
},
"group-borderColor": {
"value": "#555555",
"edited": false
},
"group-backgroundColor": {
"value": "#333333",
"edited": false
},
"widget-textColor": {
"value": "#eeeeee",
"edited": false
},
"widget-backgroundColor": {
"value": "#097479",
"edited": false
},
"widget-borderColor": {
"value": "#333333",
"edited": false
},
"base-font": {
"value": "Verdana,Verdana,Geneva,sans-serif"
}
},
"angularTheme": {
"primary": "indigo",
"accents": "blue",
"warn": "red",
"background": "grey"
}
},
"site": {
"name": "Node-RED Dashboard",
"hideToolbar": "false",
"allowSwipe": "false",
"lockMenu": "false",
"allowTempTheme": "true",
"dateFormat": "DD/MM/YYYY",
"sizes": {
"sx": 48,
"sy": 48,
"gx": 6,
"gy": 6,
"cx": 6,
"cy": 6,
"px": 0,
"py": 0
}
}
},
{
"id": "c477158.b0b5368",
"type": "ui_tab",
"z": "",
"name": "Values",
"icon": "dashboard",
"order": 2,
"disabled": false,
"hidden": false
},
{
"id": "3962b9b7.88c466",
"type": "ui_group",
"z": "",
"name": "UPS 01",
"tab": "c477158.b0b5368",
"order": 1,
"disp": true,
"width": "6",
"collapse": false
},
{
"id": "91cbe17a.8ff7c",
"type": "ui_group",
"z": "",
"name": "UPS 02",
"tab": "c477158.b0b5368",
"order": 2,
"disp": true,
"width": "6",
"collapse": false
},
{
"id": "1d9e7830.1afda",
"type": "ui_group",
"z": "",
"name": "UPS 01",
"tab": "c86075c3.c6902",
"order": 2,
"disp": true,
"width": "4",
"collapse": false
},
{
"id": "1ab16311.4f1aed",
"type": "ui_group",
"z": "9364d046.950a98",
"name": "UPS 02",
"tab": "c86075c3.c6902",
"order": 3,
"disp": true,
"width": "4",
"collapse": false
},
{
"id": "f60febb9.5faae",
"type": "ui_group",
"z": "",
"name": "UPS 01",
"tab": "559c7fe1.52dff8",
"order": 2,
"disp": true,
"width": "4",
"collapse": false
},
{
"id": "559c7fe1.52dff8",
"type": "ui_tab",
"z": "",
"name": "Trends",
"icon": "dashboard",
"order": 3,
"disabled": false,
"hidden": false
},
{
"id": "2c97efea.ffbf4",
"type": "ui_group",
"z": "",
"name": "UPS 02",
"tab": "559c7fe1.52dff8",
"order": 3,
"disp": true,
"width": "4",
"collapse": false
},
{
"id": "c86075c3.c6902",
"type": "ui_tab",
"z": "",
"name": "Graphs",
"icon": "dashboard",
"order": 1,
"disabled": false,
"hidden": false
},
{
"id": "986cd082.b4355",
"type": "ui_group",
"z": "",
"name": "SmartMe",
"tab": "559c7fe1.52dff8",
"order": 1,
"disp": true,
"width": "4",
"collapse": false
},
{
"id": "afe97a45.9961e8",
"type": "ui_group",
"z": "",
"name": "SmartMe",
"tab": "c86075c3.c6902",
"order": 1,
"disp": true,
"width": "4",
"collapse": false
},
{
"id": "57b7f11b.c2ac08",
"type": "ui_group",
"z": "",
"name": "SmartMe",
"tab": "c477158.b0b5368",
"order": 3,
"disp": true,
"width": "6",
"collapse": false
},
{
"id": "946923c5.1c798",
"type": "ui_spacer",
"name": "spacer",
"group": "3962b9b7.88c466",
"order": 3,
"width": 1,
"height": 1
},
{
"id": "cd20ea46.c545e8",
"type": "ui_spacer",
"name": "spacer",
"group": "57b7f11b.c2ac08",
"order": 3,
"width": 1,
"height": 1
},
{
"id": "5e5dd2c6.aa2b34",
"type": "ui_spacer",
"name": "spacer",
"group": "91cbe17a.8ff7c",
"order": 3,
"width": 1,
"height": 1
},
{
"id": "b42f6e08.399728",
"type": "inject",
"z": "db9d8c60.0e9c28",
"name": "inject every 1 second",
"topic": "",
"payload": "",
"payloadType": "date",
"repeat": "1",
"crontab": "",
"once": true,
"onceDelay": 0.1,
"x": 160,
"y": 60,
"wires": [
[
"f9d1b5c3.cb802",
"4a2f38c1.d51ab",
"c2a7e99.9553a18"
]
]
},
{
"id": "f9d1b5c3.cb802",
"type": "nut-ups",
"z": "db9d8c60.0e9c28",
"name": "UPS 01",
"ups": "ups01@localhost",
"x": 400,
"y": 320,
"wires": [
[
"60051273.febb84",
"794b5f5f.292338",
"3fe20434.b47084",
"56d190fc.1d96c8",
"ce69acfe.ed2ff"
]
]
},
{
"id": "4a2f38c1.d51ab",
"type": "nut-ups",
"z": "db9d8c60.0e9c28",
"name": "UPS 02",
"ups": "ups02@localhost",
"x": 400,
"y": 580,
"wires": [
[
"613d835d.11d91c",
"a373a804.50e0d",
"6cd3c962.991ed8",
"eba4ef95.8e4418",
"55f5a269.7c5d44"
]
]
},
{
"id": "ed301093.822e1",
"type": "ui_text",
"z": "dab2b4df.a60df",
"group": "3962b9b7.88c466",
"order": 6,
"width": 0,
"height": 0,
"name": "",
"label": "Beeper",
"format": "{{msg.payload.ups.beeper.status.value}}",
"layout": "row-spread",
"x": 220,
"y": 420,
"wires": []
},
{
"id": "8247423f.35f77",
"type": "ui_text",
"z": "dab2b4df.a60df",
"group": "3962b9b7.88c466",
"order": 1,
"width": 0,
"height": 0,
"name": "",
"label": "Model",
"format": "{{msg.payload.ups.model.value}}",
"layout": "row-spread",
"x": 210,
"y": 60,
"wires": []
},
{
"id": "5c6070a7.adb8e",
"type": "ui_text",
"z": "dab2b4df.a60df",
"group": "3962b9b7.88c466",
"order": 2,
"width": 0,
"height": 0,
"name": "",
"label": "Serial",
"format": "{{msg.payload.ups.serial.value}}",
"layout": "row-spread",
"x": 210,
"y": 100,
"wires": []
},
{
"id": "f4d2bfdb.730fa8",
"type": "ui_gauge",
"z": "dab2b4df.a60df",
"name": "",
"group": "1d9e7830.1afda",
"order": 3,
"width": 0,
"height": 0,
"gtype": "gage",
"title": "Charge",
"label": "percent",
"format": "{{msg.payload.battery.charge.value}}",
"min": 0,
"max": "100",
"colors": [
"#ca3838",
"#e6e600",
"#00b500"
],
"seg1": "10",
"seg2": "50",
"x": 220,
"y": 660,
"wires": []
},
{
"id": "2bc6287f.3bf59",
"type": "ui_text",
"z": "dab2b4df.a60df",
"group": "3962b9b7.88c466",
"order": 9,
"width": 0,
"height": 0,
"name": "",
"label": "Battery Date",
"format": "{{msg.payload.battery.mfr.date.value}}",
"layout": "row-spread",
"x": 230,
"y": 260,
"wires": []
},
{
"id": "25f7a5df.5c2362",
"type": "ui_text",
"z": "dab2b4df.a60df",
"group": "3962b9b7.88c466",
"order": 10,
"width": 0,
"height": 0,
"name": "",
"label": "Battery Voltage",
"format": "{{msg.payload.battery.voltage.value}} ({{msg.payload.battery.voltage.nominal.value}})",
"layout": "row-spread",
"x": 240,
"y": 300,
"wires": []
},
{
"id": "3ab55dc9.86c382",
"type": "ui_text",
"z": "dab2b4df.a60df",
"group": "3962b9b7.88c466",
"order": 4,
"width": 0,
"height": 0,
"name": "",
"label": "Input Voltage",
"format": "{{msg.payload.input.voltage.value}} ({{msg.payload.input.voltage.nominal.value}})",
"layout": "row-spread",
"x": 230,
"y": 340,
"wires": []
},
{
"id": "24cd7a46.93b0b6",
"type": "ui_gauge",
"z": "dab2b4df.a60df",
"name": "",
"group": "1d9e7830.1afda",
"order": 1,
"width": 0,
"height": 0,
"gtype": "gage",
"title": "Input Voltage",
"label": "volt",
"format": "{{msg.payload.input.voltage.value}}",
"min": "176",
"max": "294",
"colors": [
"#e6e600",
"#00b500",
"#e6e600"
],
"seg1": "220",
"seg2": "250",
"x": 230,
"y": 700,
"wires": []
},
{
"id": "ce4e99b1.af885",
"type": "ui_text",
"z": "dab2b4df.a60df",
"group": "3962b9b7.88c466",
"order": 5,
"width": 0,
"height": 0,
"name": "",
"label": "Load",
"format": "{{msg.payload.ups.load.value}}",
"layout": "row-spread",
"x": 210,
"y": 460,
"wires": []
},
{
"id": "cdbf85e.69a9078",
"type": "ui_text",
"z": "dab2b4df.a60df",
"group": "3962b9b7.88c466",
"order": 11,
"width": 0,
"height": 0,
"name": "",
"label": "Status",
"format": "{{msg.payload.ups.status.value}}",
"layout": "row-spread",
"x": 450,
"y": 500,
"wires": []
},
{
"id": "7cf4e999.441488",
"type": "ui_gauge",
"z": "dab2b4df.a60df",
"name": "",
"group": "1d9e7830.1afda",
"order": 2,
"width": 0,
"height": 0,
"gtype": "gage",
"title": "Load",
"label": "percent",
"format": "{{msg.payload.ups.load.value}}",
"min": 0,
"max": "100",
"colors": [
"#00b500",
"#e6e600",
"#ca3838"
],
"seg1": "",
"seg2": "",
"x": 210,
"y": 620,
"wires": []
},
{
"id": "60051273.febb84",
"type": "subflow:dab2b4df.a60df",
"z": "db9d8c60.0e9c28",
"name": "",
"x": 620,
"y": 320,
"wires": []
},
{
"id": "1465921a.0ed956",
"type": "ui_text",
"z": "9364d046.950a98",
"group": "91cbe17a.8ff7c",
"order": 6,
"width": 0,
"height": 0,
"name": "",
"label": "Beeper",
"format": "{{msg.payload.ups.beeper.status.value}}",
"layout": "row-spread",
"x": 220,
"y": 420,
"wires": []
},
{
"id": "cf443bda.f53a88",
"type": "ui_text",
"z": "9364d046.950a98",
"group": "91cbe17a.8ff7c",
"order": 1,
"width": 0,
"height": 0,
"name": "",
"label": "Model",
"format": "{{msg.payload.ups.model.value}}",
"layout": "row-spread",
"x": 210,
"y": 60,
"wires": []
},
{
"id": "ae08e2a6.2d879",
"type": "ui_text",
"z": "9364d046.950a98",
"group": "91cbe17a.8ff7c",
"order": 2,
"width": 0,
"height": 0,
"name": "",
"label": "Serial",
"format": "{{msg.payload.ups.serial.value}}",
"layout": "row-spread",
"x": 210,
"y": 100,
"wires": []
},
{
"id": "cc9bbc2c.c71a2",
"type": "ui_gauge",
"z": "9364d046.950a98",
"name": "",
"group": "1ab16311.4f1aed",
"order": 3,
"width": 0,
"height": 0,
"gtype": "gage",
"title": "Charge",
"label": "percent",
"format": "{{msg.payload.battery.charge.value}}",
"min": 0,
"max": "100",
"colors": [
"#ca3838",
"#e6e600",
"#00b500"
],
"seg1": "10",
"seg2": "50",
"x": 220,
"y": 660,
"wires": []
},
{
"id": "821e70d1.7fda58",
"type": "ui_text",
"z": "9364d046.950a98",
"group": "91cbe17a.8ff7c",
"order": 8,
"width": 0,
"height": 0,
"name": "",
"label": "Runtime",
"format": "{{msg.payload.battery.runtime.value}}",
"layout": "row-spread",
"x": 460,
"y": 200,
"wires": []
},
{
"id": "8b5418ce.34a8f",
"type": "ui_text",
"z": "9364d046.950a98",
"group": "91cbe17a.8ff7c",
"order": 9,
"width": 0,
"height": 0,
"name": "",
"label": "Battery Date",
"format": "{{msg.payload.battery.mfr.date.value}}",
"layout": "row-spread",
"x": 230,
"y": 260,
"wires": []
},
{
"id": "7f0ab2fc.6ba8f4",
"type": "ui_text",
"z": "9364d046.950a98",
"group": "91cbe17a.8ff7c",
"order": 10,
"width": 0,
"height": 0,
"name": "",
"label": "Battery Voltage",
"format": "{{msg.payload.battery.voltage.value}} ({{msg.payload.battery.voltage.nominal.value}})",
"layout": "row-spread",
"x": 240,
"y": 300,
"wires": []
},
{
"id": "88c346bc.a39da8",
"type": "ui_text",
"z": "9364d046.950a98",
"group": "91cbe17a.8ff7c",
"order": 4,
"width": 0,
"height": 0,
"name": "",
"label": "Input Voltage",
"format": "{{msg.payload.input.voltage.value}} ({{msg.payload.input.voltage.nominal.value}})",
"layout": "row-spread",
"x": 230,
"y": 340,
"wires": []
},
{
"id": "8904de2e.31e73",
"type": "ui_gauge",
"z": "9364d046.950a98",
"name": "",
"group": "1ab16311.4f1aed",
"order": 1,
"width": 0,
"height": 0,
"gtype": "gage",
"title": "Input Voltage",
"label": "volt",
"format": "{{msg.payload.input.voltage.value}}",
"min": "176",
"max": "294",
"colors": [
"#e6e600",
"#00b500",
"#e6e600"
],
"seg1": "220",
"seg2": "250",
"x": 230,
"y": 700,
"wires": []
},
{
"id": "9fbb1f84.90da88",
"type": "ui_text",
"z": "9364d046.950a98",
"group": "91cbe17a.8ff7c",
"order": 5,
"width": 0,
"height": 0,
"name": "",
"label": "Load",
"format": "{{msg.payload.ups.load.value}}",
"layout": "row-spread",
"x": 210,
"y": 460,
"wires": []
},
{
"id": "3dcc21a2.a34326",
"type": "ui_gauge",
"z": "9364d046.950a98",
"name": "",
"group": "1ab16311.4f1aed",
"order": 2,
"width": 0,
"height": 0,
"gtype": "gage",
"title": "Load",
"label": "percent",
"format": "{{msg.payload.ups.load.value}}",
"min": 0,
"max": "100",
"colors": [
"#00b500",
"#e6e600",
"#ca3838"
],
"seg1": "",
"seg2": "",
"x": 210,
"y": 620,
"wires": []
},
{
"id": "613d835d.11d91c",
"type": "subflow:9364d046.950a98",
"z": "db9d8c60.0e9c28",
"name": "",
"x": 620,
"y": 580,
"wires": []
},
{
"id": "15bc6d02.004663",
"type": "change",
"z": "dab2b4df.a60df",
"name": "",
"rules": [
{
"t": "change",
"p": "payload.ups.status.value",
"pt": "msg",
"from": "OL CHRG",
"fromt": "str",
"to": "online charging",
"tot": "str"
},
{
"t": "change",
"p": "payload.ups.status.value",
"pt": "msg",
"from": "OL",
"fromt": "str",
"to": "online",
"tot": "str"
},
{
"t": "change",
"p": "payload.ups.status.value",
"pt": "msg",
"from": "OB DISCHRG",
"fromt": "str",
"to": "on battery discharging",
"tot": "str"
},
{
"t": "change",
"p": "payload.ups.status.value",
"pt": "msg",
"from": "LB",
"fromt": "str",
"to": "low battery",
"tot": "str"
},
{
"t": "change",
"p": "payload.ups.status.value",
"pt": "msg",
"from": "SD",
"fromt": "str",
"to": "shutdown load",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 240,
"y": 500,
"wires": [
[
"cdbf85e.69a9078",
"4169a957.f01d7"
]
]
},
{
"id": "e247d2e7.6a1af8",
"type": "ui_text",
"z": "9364d046.950a98",
"group": "91cbe17a.8ff7c",
"order": 11,
"width": 0,
"height": 0,
"name": "",
"label": "Status",
"format": "{{msg.payload.ups.status.value}}",
"layout": "row-spread",
"x": 450,
"y": 500,
"wires": []
},
{
"id": "4df62de1.bbf9ac",
"type": "change",
"z": "9364d046.950a98",
"name": "",
"rules": [
{
"t": "change",
"p": "payload.ups.status.value",
"pt": "msg",
"from": "OL CHRG",
"fromt": "str",
"to": "online charging",
"tot": "str"
},
{
"t": "change",
"p": "payload.ups.status.value",
"pt": "msg",
"from": "OL",
"fromt": "str",
"to": "online",
"tot": "str"
},
{
"t": "change",
"p": "payload.ups.status.value",
"pt": "msg",
"from": "OB DISCHRG",
"fromt": "str",
"to": "on battery discharging",
"tot": "str"
},
{
"t": "change",
"p": "payload.ups.status.value",
"pt": "msg",
"from": "LB",
"fromt": "str",
"to": "low battery",
"tot": "str"
},
{
"t": "change",
"p": "payload.ups.status.value",
"pt": "msg",
"from": "SD",
"fromt": "str",
"to": "shutdown load",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 240,
"y": 500,
"wires": [
[
"e247d2e7.6a1af8",
"34b7db69.44e264"
]
]
},
{
"id": "e15a3a14.288818",
"type": "ui_chart",
"z": "db9d8c60.0e9c28",
"name": "",
"group": "f60febb9.5faae",
"order": 3,
"width": "0",
"height": "0",
"label": "Charge [%]",
"chartType": "line",
"legend": "false",
"xformat": "HH:mm:ss",
"interpolate": "linear",
"nodata": "",
"dot": false,
"ymin": "0",
"ymax": "100",
"removeOlder": "30",
"removeOlderPoints": "",
"removeOlderUnit": "60",
"cutout": 0,
"useOneColor": false,
"colors": [
"#1f77b4",
"#aec7e8",
"#ff7f0e",
"#2ca02c",
"#98df8a",
"#d62728",
"#ff9896",
"#9467bd",
"#c5b0d5"
],
"useOldStyle": false,
"x": 790,
"y": 440,
"wires": [
[],
[]
]
},
{
"id": "63928d1b.e1b46c",
"type": "ui_chart",
"z": "db9d8c60.0e9c28",
"name": "",
"group": "2c97efea.ffbf4",
"order": 3,
"width": "0",
"height": "0",
"label": "Charge [%]",
"chartType": "line",
"legend": "false",
"xformat": "HH:mm:ss",
"interpolate": "linear",
"nodata": "",
"dot": false,
"ymin": "0",
"ymax": "100",
"removeOlder": "30",
"removeOlderPoints": "",
"removeOlderUnit": "60",
"cutout": 0,
"useOneColor": false,
"colors": [
"#1f77b4",
"#aec7e8",
"#ff7f0e",
"#2ca02c",
"#98df8a",
"#d62728",
"#ff9896",
"#9467bd",
"#c5b0d5"
],
"useOldStyle": false,
"x": 790,
"y": 700,
"wires": [
[],
[]
]
},
{
"id": "794b5f5f.292338",
"type": "function",
"z": "db9d8c60.0e9c28",
"name": "strip charge",
"func": "msg.payload = msg.payload.battery.charge.value\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 610,
"y": 440,
"wires": [
[
"e15a3a14.288818"
]
]
},
{
"id": "a373a804.50e0d",
"type": "function",
"z": "db9d8c60.0e9c28",
"name": "strip charge",
"func": "msg.payload = msg.payload.battery.charge.value\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 610,
"y": 700,
"wires": [
[
"63928d1b.e1b46c"
]
]
},
{
"id": "39b2f3ce.10e03c",
"type": "ui_chart",
"z": "db9d8c60.0e9c28",
"name": "",
"group": "f60febb9.5faae",
"order": 2,
"width": "0",
"height": "0",
"label": "Load [%]",
"chartType": "line",
"legend": "false",
"xformat": "HH:mm:ss",
"interpolate": "linear",
"nodata": "",
"dot": false,
"ymin": "0",
"ymax": "100",
"removeOlder": "30",
"removeOlderPoints": "",
"removeOlderUnit": "60",
"cutout": 0,
"useOneColor": false,
"colors": [
"#1f77b4",
"#aec7e8",
"#ff7f0e",
"#2ca02c",
"#98df8a",
"#d62728",
"#ff9896",
"#9467bd",
"#c5b0d5"
],
"useOldStyle": false,
"x": 780,
"y": 400,
"wires": [
[],
[]
]
},
{
"id": "a19dc865.e1827",
"type": "ui_chart",
"z": "db9d8c60.0e9c28",
"name": "",
"group": "2c97efea.ffbf4",
"order": 2,
"width": "0",
"height": "0",
"label": "Load [%]",
"chartType": "line",
"legend": "false",
"xformat": "HH:mm:ss",
"interpolate": "linear",
"nodata": "",
"dot": false,
"ymin": "0",
"ymax": "100",
"removeOlder": "30",
"removeOlderPoints": "",
"removeOlderUnit": "60",
"cutout": 0,
"useOneColor": false,
"colors": [
"#1f77b4",
"#aec7e8",
"#ff7f0e",
"#2ca02c",
"#98df8a",
"#d62728",
"#ff9896",
"#9467bd",
"#c5b0d5"
],
"useOldStyle": false,
"x": 780,
"y": 660,
"wires": [
[],
[]
]
},
{
"id": "3fe20434.b47084",
"type": "function",
"z": "db9d8c60.0e9c28",
"name": "strip Load",
"func": "msg.payload = msg.payload.ups.load.value\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 600,
"y": 400,
"wires": [
[
"39b2f3ce.10e03c"
]
]
},
{
"id": "6cd3c962.991ed8",
"type": "function",
"z": "db9d8c60.0e9c28",
"name": "strip Load",
"func": "msg.payload = msg.payload.ups.load.value\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 600,
"y": 660,
"wires": [
[
"a19dc865.e1827"
]
]
},
{
"id": "187d2913.9db8cf",
"type": "ui_chart",
"z": "db9d8c60.0e9c28",
"name": "",
"group": "f60febb9.5faae",
"order": 1,
"width": "0",
"height": "0",
"label": "Voltage [V]",
"chartType": "line",
"legend": "false",
"xformat": "HH:mm:ss",
"interpolate": "linear",
"nodata": "",
"dot": false,
"ymin": "176",
"ymax": "294",
"removeOlder": "30",
"removeOlderPoints": "",
"removeOlderUnit": "60",
"cutout": 0,
"useOneColor": false,
"colors": [
"#1f77b4",
"#aec7e8",
"#ff7f0e",
"#2ca02c",
"#98df8a",
"#d62728",
"#ff9896",
"#9467bd",
"#c5b0d5"
],
"useOldStyle": false,
"x": 790,
"y": 360,
"wires": [
[],
[]
]
},
{
"id": "56d190fc.1d96c8",
"type": "function",
"z": "db9d8c60.0e9c28",
"name": "strip Voltage",
"func": "msg.payload = msg.payload.input.voltage.value\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 610,
"y": 360,
"wires": [
[
"187d2913.9db8cf"
]
]
},
{
"id": "c58167a4.b2946",
"type": "ui_chart",
"z": "db9d8c60.0e9c28",
"name": "",
"group": "2c97efea.ffbf4",
"order": 1,
"width": "0",
"height": "0",
"label": "Voltage [V]",
"chartType": "line",
"legend": "false",
"xformat": "HH:mm:ss",
"interpolate": "linear",
"nodata": "",
"dot": false,
"ymin": "176",
"ymax": "294",
"removeOlder": "30",
"removeOlderPoints": "",
"removeOlderUnit": "60",
"cutout": 0,
"useOneColor": false,
"colors": [
"#1f77b4",
"#aec7e8",
"#ff7f0e",
"#2ca02c",
"#98df8a",
"#d62728",
"#ff9896",
"#9467bd",
"#c5b0d5"
],
"useOldStyle": false,
"x": 790,
"y": 620,
"wires": [
[],
[]
]
},
{
"id": "eba4ef95.8e4418",
"type": "function",
"z": "db9d8c60.0e9c28",
"name": "strip Voltage",
"func": "msg.payload = msg.payload.input.voltage.value\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 610,
"y": 620,
"wires": [
[
"c58167a4.b2946"
]
]
},
{
"id": "c2a7e99.9553a18",
"type": "http request",
"z": "db9d8c60.0e9c28",
"name": "get API data",
"method": "GET",
"ret": "obj",
"url": "",
"tls": "",
"x": 410,
"y": 60,
"wires": [
[
"eb39736b.69d718",
"930d503.0db9f3",
"e2103b5f.1ed85",
"f8970de3.9d055",
"9c2c4234.fb4e08"
]
]
},
{
"id": "6ef65e35.1193e8",
"type": "ui_chart",
"z": "db9d8c60.0e9c28",
"name": "",
"group": "986cd082.b4355",
"order": 0,
"width": "0",
"height": "0",
"label": "Voltage [V]",
"chartType": "line",
"legend": "false",
"xformat": "HH:mm:ss",
"interpolate": "linear",
"nodata": "",
"dot": false,
"ymin": "176",
"ymax": "294",
"removeOlder": "30",
"removeOlderPoints": "",
"removeOlderUnit": "60",
"cutout": 0,
"useOneColor": false,
"colors": [
"#1f77b4",
"#aec7e8",
"#ff7f0e",
"#2ca02c",
"#98df8a",
"#d62728",
"#ff9896",
"#9467bd",
"#c5b0d5"
],
"useOldStyle": false,
"x": 890,
"y": 100,
"wires": [
[],
[]
]
},
{
"id": "2e89916d.cea8d6",
"type": "ui_chart",
"z": "db9d8c60.0e9c28",
"name": "",
"group": "986cd082.b4355",
"order": 0,
"width": "0",
"height": "0",
"label": "Load [W]",
"chartType": "line",
"legend": "false",
"xformat": "HH:mm:ss",
"interpolate": "linear",
"nodata": "",
"dot": false,
"ymin": "0",
"ymax": "2300",
"removeOlder": "30",
"removeOlderPoints": "",
"removeOlderUnit": "60",
"cutout": 0,
"useOneColor": false,
"colors": [
"#1f77b4",
"#aec7e8",
"#ff7f0e",
"#2ca02c",
"#98df8a",
"#d62728",
"#ff9896",
"#9467bd",
"#c5b0d5"
],
"useOldStyle": false,
"x": 880,
"y": 140,
"wires": [
[],
[]
]
},
{
"id": "eb39736b.69d718",
"type": "function",
"z": "db9d8c60.0e9c28",
"name": "strip ActivePower *1000",
"func": "msg.payload = msg.payload.ActivePower *1000\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 670,
"y": 140,
"wires": [
[
"2e89916d.cea8d6"
]
]
},
{
"id": "930d503.0db9f3",
"type": "function",
"z": "db9d8c60.0e9c28",
"name": "strip Voltage",
"func": "msg.payload = msg.payload.Voltage\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 630,
"y": 100,
"wires": [
[
"6ef65e35.1193e8"
]
]
},
{
"id": "6a4e3f06.11e7d",
"type": "ui_chart",
"z": "db9d8c60.0e9c28",
"name": "",
"group": "986cd082.b4355",
"order": 0,
"width": "0",
"height": "0",
"label": "Current [A]",
"chartType": "line",
"legend": "false",
"xformat": "HH:mm:ss",
"interpolate": "linear",
"nodata": "",
"dot": false,
"ymin": "0",
"ymax": "10",
"removeOlder": "30",
"removeOlderPoints": "",
"removeOlderUnit": "60",
"cutout": 0,
"useOneColor": false,
"colors": [
"#1f77b4",
"#aec7e8",
"#ff7f0e",
"#2ca02c",
"#98df8a",
"#d62728",
"#ff9896",
"#9467bd",
"#c5b0d5"
],
"useOldStyle": false,
"x": 890,
"y": 180,
"wires": [
[],
[]
]
},
{
"id": "e2103b5f.1ed85",
"type": "function",
"z": "db9d8c60.0e9c28",
"name": "strip Current",
"func": "msg.payload = msg.payload.Current\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 630,
"y": 180,
"wires": [
[
"6a4e3f06.11e7d"
]
]
},
{
"id": "f8970de3.9d055",
"type": "subflow:a1380e4e.c27728",
"z": "db9d8c60.0e9c28",
"name": "",
"x": 650,
"y": 60,
"wires": []
},
{
"id": "58987c62.f56644",
"type": "ui_gauge",
"z": "a1380e4e.c27728",
"name": "",
"group": "afe97a45.9961e8",
"order": 3,
"width": 0,
"height": 0,
"gtype": "gage",
"title": "Current",
"label": "ampere",
"format": "{{msg.payload.Current}}",
"min": 0,
"max": "10",
"colors": [
"#00b500",
"#e6e600",
"#ca3838"
],
"seg1": "5",
"seg2": "8",
"x": 220,
"y": 580,
"wires": []
},
{
"id": "6dbadee7.47911",
"type": "ui_gauge",
"z": "a1380e4e.c27728",
"name": "",
"group": "afe97a45.9961e8",
"order": 1,
"width": 0,
"height": 0,
"gtype": "gage",
"title": "Input Voltage",
"label": "volt",
"format": "{{msg.payload.Voltage}}",
"min": "176",
"max": "294",
"colors": [
"#e6e600",
"#00b500",
"#e6e600"
],
"seg1": "220",
"seg2": "250",
"x": 230,
"y": 500,
"wires": []
},
{
"id": "c7c03d5d.86a4e",
"type": "ui_gauge",
"z": "a1380e4e.c27728",
"name": "",
"group": "afe97a45.9961e8",
"order": 2,
"width": 0,
"height": 0,
"gtype": "gage",
"title": "Load",
"label": "watt",
"format": "{{msg.payload.ActivePower}}",
"min": 0,
"max": "2000",
"colors": [
"#00b500",
"#e6e600",
"#ca3838"
],
"seg1": "",
"seg2": "",
"x": 430,
"y": 540,
"wires": []
},
{
"id": "e6726b10.b63cf",
"type": "function",
"z": "a1380e4e.c27728",
"name": "ActivePower *1000",
"func": "msg.payload.ActivePower = msg.payload.ActivePower * 1000\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 250,
"y": 540,
"wires": [
[
"c7c03d5d.86a4e"
]
]
},
{
"id": "ec6d4175.045a08",
"type": "ui_text",
"z": "a1380e4e.c27728",
"group": "57b7f11b.c2ac08",
"order": 1,
"width": 0,
"height": 0,
"name": "",
"label": "Model",
"format": "SmartMe Plug",
"layout": "row-spread",
"x": 210,
"y": 60,
"wires": []
},
{
"id": "a0acff6d.40d93",
"type": "ui_text",
"z": "a1380e4e.c27728",
"group": "57b7f11b.c2ac08",
"order": 2,
"width": 0,
"height": 0,
"name": "",
"label": "Serial",
"format": "{{msg.payload.Serial}}",
"layout": "row-spread",
"x": 210,
"y": 100,
"wires": []
},
{
"id": "f891b72f.1d0548",
"type": "ui_text",
"z": "a1380e4e.c27728",
"group": "57b7f11b.c2ac08",
"order": 5,
"width": 0,
"height": 0,
"name": "",
"label": "Load",
"format": "{{msg.payload.ActivePower}}",
"layout": "row-spread",
"x": 430,
"y": 220,
"wires": []
},
{
"id": "904adffb.6a62",
"type": "ui_text",
"z": "a1380e4e.c27728",
"group": "57b7f11b.c2ac08",
"order": 4,
"width": 0,
"height": 0,
"name": "",
"label": "Input Voltage",
"format": "{{msg.payload.Voltage}}",
"layout": "row-spread",
"x": 230,
"y": 260,
"wires": []
},
{
"id": "42715953.f1c128",
"type": "function",
"z": "a1380e4e.c27728",
"name": "ActivePower *1000",
"func": "msg.payload.ActivePower = msg.payload.ActivePower *1000\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 250,
"y": 220,
"wires": [
[
"f891b72f.1d0548"
]
]
},
{
"id": "b049b01a.87e0d8",
"type": "change",
"z": "a1380e4e.c27728",
"name": "",
"rules": [
{
"t": "change",
"p": "payload.SwitchOn",
"pt": "msg",
"from": "true",
"fromt": "bool",
"to": "On",
"tot": "str"
},
{
"t": "change",
"p": "payload.SwitchOn",
"pt": "msg",
"from": "false",
"fromt": "bool",
"to": "Off",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 240,
"y": 300,
"wires": [
[
"a2286f1b.90b618"
]
]
},
{
"id": "a2286f1b.90b618",
"type": "ui_text",
"z": "a1380e4e.c27728",
"group": "57b7f11b.c2ac08",
"order": 6,
"width": 0,
"height": 0,
"name": "",
"label": "Switch",
"format": "{{msg.payload.SwitchOn}}",
"layout": "row-spread",
"x": 410,
"y": 300,
"wires": []
},
{
"id": "1e95623f.7faa5e",
"type": "ui_text",
"z": "a1380e4e.c27728",
"group": "57b7f11b.c2ac08",
"order": 8,
"width": 0,
"height": 0,
"name": "",
"label": "Temperature",
"format": "{{msg.payload.Temperature}}",
"layout": "row-spread",
"x": 230,
"y": 340,
"wires": []
},
{
"id": "30d13cf8.0560f4",
"type": "ui_text",
"z": "a1380e4e.c27728",
"group": "57b7f11b.c2ac08",
"order": 7,
"width": 0,
"height": 0,
"name": "",
"label": "Counter",
"format": "{{msg.payload.CounterReading}}",
"layout": "row-spread",
"x": 220,
"y": 380,
"wires": []
},
{
"id": "31e64d9c.f18bca",
"type": "function",
"z": "e2c6be57.ee8fc",
"name": "set Sender",
"func": "msg.from = \"Diese E-Mail-Adresse ist vor Spambots geschützt! Zur Anzeige muss JavaScript eingeschaltet sein!\"\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 230,
"y": 60,
"wires": [
[
"e302d6bd.563c48"
]
]
},
{
"id": "e302d6bd.563c48",
"type": "e-mail",
"z": "e2c6be57.ee8fc",
"server": "",
"port": "25",
"secure": false,
"name": "",
"dname": "",
"x": 430,
"y": 60,
"wires": []
},
{
"id": "7f358d73.db2624",
"type": "subflow:e2c6be57.ee8fc",
"z": "dab2b4df.a60df",
"name": "",
"x": 930,
"y": 540,
"wires": []
},
{
"id": "4169a957.f01d7",
"type": "function",
"z": "dab2b4df.a60df",
"name": "strip Status / set Subject",
"func": "msg.payload = msg.payload.ups.status.value\nmsg.topic = \"UPS 01 - UPS Monitoring\"\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 510,
"y": 540,
"wires": [
[
"8868717c.aee53"
]
]
},
{
"id": "8868717c.aee53",
"type": "rbe",
"z": "dab2b4df.a60df",
"name": "",
"func": "rbe",
"gap": "",
"start": "",
"inout": "out",
"property": "payload",
"x": 750,
"y": 540,
"wires": [
[
"7f358d73.db2624"
]
]
},
{
"id": "7cda9e25.028b5",
"type": "subflow:e2c6be57.ee8fc",
"z": "9364d046.950a98",
"name": "",
"x": 930,
"y": 540,
"wires": []
},
{
"id": "34b7db69.44e264",
"type": "function",
"z": "9364d046.950a98",
"name": "strip Status / set Subject",
"func": "msg.payload = msg.payload.ups.status.value\nmsg.topic = \"UPS 02 - UPS Monitoring\"\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 510,
"y": 540,
"wires": [
[
"ca3e48a5.44688"
]
]
},
{
"id": "ca3e48a5.44688",
"type": "rbe",
"z": "9364d046.950a98",
"name": "",
"func": "rbe",
"gap": "",
"start": "",
"inout": "out",
"property": "payload",
"x": 750,
"y": 540,
"wires": [
[
"7cda9e25.028b5"
]
]
},
{
"id": "6c094402.3df30c",
"type": "ui_gauge",
"z": "9364d046.950a98",
"name": "",
"group": "1ab16311.4f1aed",
"order": 3,
"width": 0,
"height": 0,
"gtype": "gage",
"title": "Runtime",
"label": "minutes",
"format": "{{value}}",
"min": 0,
"max": "30",
"colors": [
"#ca3838",
"#e6e600",
"#00b500"
],
"seg1": "5",
"seg2": "10",
"x": 680,
"y": 240,
"wires": []
},
{
"id": "d07678dd.491608",
"type": "ui_gauge",
"z": "a1380e4e.c27728",
"name": "",
"group": "afe97a45.9961e8",
"order": 3,
"width": 0,
"height": 0,
"gtype": "gage",
"title": "Temperature",
"label": "celsius",
"format": "{{msg.payload.Temperature}}",
"min": 0,
"max": "45",
"colors": [
"#00b500",
"#e6e600",
"#ca3838"
],
"seg1": "20",
"seg2": "30",
"x": 230,
"y": 620,
"wires": []
},
{
"id": "640f143e.cef57c",
"type": "unit-converter",
"z": "9364d046.950a98",
"category": "time",
"inputUnit": "s",
"outputUnit": "min",
"inputField": "payload.battery.runtime.value",
"outputField": "payload.battery.runtime.value",
"inputFieldType": "msg",
"outputFieldType": "msg",
"name": "",
"x": 240,
"y": 220,
"wires": [
[
"821e70d1.7fda58",
"5b995e4.60841a"
]
]
},
{
"id": "5b995e4.60841a",
"type": "function",
"z": "9364d046.950a98",
"name": "strip Runtime",
"func": "msg.payload = msg.payload.battery.runtime.value\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 470,
"y": 240,
"wires": [
[
"6c094402.3df30c"
]
]
},
{
"id": "c01e8935.bf8798",
"type": "ui_text",
"z": "dab2b4df.a60df",
"group": "3962b9b7.88c466",
"order": 8,
"width": 0,
"height": 0,
"name": "",
"label": "Runtime",
"format": "{{msg.payload.battery.runtime.value}}",
"layout": "row-spread",
"x": 460,
"y": 200,
"wires": []
},
{
"id": "4d2b2a44.7ab9e4",
"type": "ui_gauge",
"z": "dab2b4df.a60df",
"name": "",
"group": "1d9e7830.1afda",
"order": 3,
"width": 0,
"height": 0,
"gtype": "gage",
"title": "Runtime",
"label": "minutes",
"format": "{{value}}",
"min": 0,
"max": "30",
"colors": [
"#ca3838",
"#e6e600",
"#00b500"
],
"seg1": "5",
"seg2": "10",
"x": 680,
"y": 240,
"wires": []
},
{
"id": "e6e2204d.edf6a",
"type": "function",
"z": "dab2b4df.a60df",
"name": "strip Runtime",
"func": "msg.payload = msg.payload.battery.runtime.value\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 470,
"y": 240,
"wires": [
[
"4d2b2a44.7ab9e4"
]
]
},
{
"id": "b9514a4c.9492e",
"type": "unit-converter",
"z": "dab2b4df.a60df",
"category": "time",
"inputUnit": "s",
"outputUnit": "min",
"inputField": "payload.battery.runtime.value",
"outputField": "payload.battery.runtime.value",
"inputFieldType": "msg",
"outputFieldType": "msg",
"name": "",
"x": 240,
"y": 220,
"wires": [
[
"c01e8935.bf8798",
"e6e2204d.edf6a"
]
]
},
{
"id": "badb2786.b15f2",
"type": "function",
"z": "db9d8c60.0e9c28",
"name": "strip runtime",
"func": "msg.payload = msg.payload.battery.runtime.value\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 810,
"y": 480,
"wires": [
[
"557e1d0c.a71f9c"
]
]
},
{
"id": "da42bb2a.94b24",
"type": "function",
"z": "db9d8c60.0e9c28",
"name": "strip runtime",
"func": "msg.payload = msg.payload.battery.runtime.value\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 810,
"y": 740,
"wires": [
[
"ae00e0f8.22535"
]
]
},
{
"id": "557e1d0c.a71f9c",
"type": "ui_chart",
"z": "db9d8c60.0e9c28",
"name": "",
"group": "f60febb9.5faae",
"order": 3,
"width": "0",
"height": "0",
"label": "Runtime [min]",
"chartType": "line",
"legend": "false",
"xformat": "HH:mm:ss",
"interpolate": "linear",
"nodata": "",
"dot": false,
"ymin": "0",
"ymax": "45",
"removeOlder": "30",
"removeOlderPoints": "",
"removeOlderUnit": "60",
"cutout": 0,
"useOneColor": false,
"colors": [
"#1f77b4",
"#aec7e8",
"#ff7f0e",
"#2ca02c",
"#98df8a",
"#d62728",
"#ff9896",
"#9467bd",
"#c5b0d5"
],
"useOldStyle": false,
"x": 1000,
"y": 480,
"wires": [
[],
[]
]
},
{
"id": "ae00e0f8.22535",
"type": "ui_chart",
"z": "db9d8c60.0e9c28",
"name": "",
"group": "2c97efea.ffbf4",
"order": 3,
"width": "0",
"height": "0",
"label": "Runtime [min]",
"chartType": "line",
"legend": "false",
"xformat": "HH:mm:ss",
"interpolate": "linear",
"nodata": "",
"dot": false,
"ymin": "0",
"ymax": "45",
"removeOlder": "30",
"removeOlderPoints": "",
"removeOlderUnit": "60",
"cutout": 0,
"useOneColor": false,
"colors": [
"#1f77b4",
"#aec7e8",
"#ff7f0e",
"#2ca02c",
"#98df8a",
"#d62728",
"#ff9896",
"#9467bd",
"#c5b0d5"
],
"useOldStyle": false,
"x": 1000,
"y": 740,
"wires": [
[],
[]
]
},
{
"id": "ce1c90ed.d0565",
"type": "ui_chart",
"z": "db9d8c60.0e9c28",
"name": "",
"group": "986cd082.b4355",
"order": 0,
"width": "0",
"height": "0",
"label": "Temperature [°]",
"chartType": "line",
"legend": "false",
"xformat": "HH:mm:ss",
"interpolate": "linear",
"nodata": "",
"dot": false,
"ymin": "0",
"ymax": "30",
"removeOlder": "30",
"removeOlderPoints": "",
"removeOlderUnit": "60",
"cutout": 0,
"useOneColor": false,
"colors": [
"#1f77b4",
"#aec7e8",
"#ff7f0e",
"#2ca02c",
"#98df8a",
"#d62728",
"#ff9896",
"#9467bd",
"#c5b0d5"
],
"useOldStyle": false,
"x": 900,
"y": 220,
"wires": [
[],
[]
]
},
{
"id": "9c2c4234.fb4e08",
"type": "function",
"z": "db9d8c60.0e9c28",
"name": "strip Temperature",
"func": "msg.payload = msg.payload.Temperature\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 650,
"y": 220,
"wires": [
[
"ce1c90ed.d0565"
]
]
},
{
"id": "55f5a269.7c5d44",
"type": "unit-converter",
"z": "db9d8c60.0e9c28",
"category": "time",
"inputUnit": "s",
"outputUnit": "min",
"inputField": "payload.battery.runtime.value",
"outputField": "payload.battery.runtime.value",
"inputFieldType": "msg",
"outputFieldType": "msg",
"name": "",
"x": 620,
"y": 740,
"wires": [
[
"da42bb2a.94b24"
]
]
},
{
"id": "ce69acfe.ed2ff",
"type": "unit-converter",
"z": "db9d8c60.0e9c28",
"category": "time",
"inputUnit": "s",
"outputUnit": "min",
"inputField": "payload.battery.runtime.value",
"outputField": "payload.battery.runtime.value",
"inputFieldType": "msg",
"outputFieldType": "msg",
"name": "",
"x": 620,
"y": 480,
"wires": [
[
"badb2786.b15f2"
]
]
}
]


 


Drucken