Compare commits
3 Commits
Author | SHA1 | Date |
---|---|---|
Carsten Schmiemann | 472161cff7 | |
Carsten Schmiemann | ce9e4ea7e0 | |
Carsten Schmiemann | 0cd969f87b |
|
@ -0,0 +1,14 @@
|
|||
Number apc_ups_time_remaining "Zeit verbleibend [%.1f min]" {channel="modbus:data:apc_ups:apc_ups_measurements:time_remaining:number", expire="1m,0"}
|
||||
Number apc_ups_soc "Ladezustand [%.0f %%]" {channel="modbus:data:apc_ups:apc_ups_measurements:soc:number", expire="1m,0"}
|
||||
Number apc_ups_battery_pos "Batteriespannung [%.2f V]" {channel="modbus:data:apc_ups:apc_ups_measurements:battery_pos:number", expire="1m,0"}
|
||||
Number apc_ups_battery_temp "Batterietemperatur [%.2f °C]" {channel="modbus:data:apc_ups:apc_ups_measurements:battery_temp:number", expire="1m,0"}
|
||||
Number apc_ups_load_w "Last [%.2f %%W]" {channel="modbus:data:apc_ups:apc_ups_measurements:load_W:number", expire="1m,0"}
|
||||
Number apc_ups_load_va "Last [%.2f %%VA]" {channel="modbus:data:apc_ups:apc_ups_measurements:load_VA:number", expire="1m,0"}
|
||||
Number apc_ups_ac_current "Ausgangstrom [%.2f A]" {channel="modbus:data:apc_ups:apc_ups_measurements:ac_current:number", expire="1m,0"}
|
||||
Number apc_ups_ac_voltage "Ausgangsspannung [%.2f V]" {channel="modbus:data:apc_ups:apc_ups_measurements:ac_voltage:number", expire="1m,0"}
|
||||
Number apc_ups_ac_freq "Ausgangsfreq [%.2f Hz]" {channel="modbus:data:apc_ups:apc_ups_measurements:ac_freq:number", expire="1m,0"}
|
||||
Number apc_ups_work "Wirkarbeit [%.2f kWh]" {channel="modbus:data:apc_ups:apc_ups_measurements:work:number", expire="1m,0"}
|
||||
|
||||
Switch apc_status_OnBattery "USV Batteriebetrieb [%s]" {channel="modbus:data:apc_ups:apc_status:on_battery:switch", expire="1m,0"}
|
||||
|
||||
Number apc_ups_counter "Zeit auf Batterie [%.0f sec]"
|
|
@ -0,0 +1,12 @@
|
|||
rule "Calculate Battery Runtime"
|
||||
when
|
||||
Time cron "* * * ? * * *"
|
||||
then
|
||||
if (apc_status_OnBattery.state == ON) {
|
||||
val temp = (apc_ups_counter.state as Number) + 1;
|
||||
apc_ups_counter.sendCommand(temp);
|
||||
}
|
||||
if (apc_ups_counter.state == NULL || apc_ups_counter.state == "") {
|
||||
apc_ups_counter.sendCommand("0");
|
||||
}
|
||||
end
|
|
@ -7,6 +7,6 @@ then
|
|||
DC_Load_Current.persist("influxdb")
|
||||
DC_Load_Power.persist("influxdb")
|
||||
DC_Load_Watthours.persist("influxdb")
|
||||
DC_Load_Watthours.persist("influxdb")
|
||||
DC_Load_Amperehours.persist("influxdb")
|
||||
}
|
||||
end
|
|
@ -76,5 +76,23 @@ sitemap default label="Power Station Manager" {
|
|||
Switch item=PI_Service mappings=[reboot="Neustart", shutdown="Herunterfahren"]
|
||||
}
|
||||
}
|
||||
Group item=apc_ups_time_remaining label="APC USV" {
|
||||
Frame label="APC USV Büro - Übersicht" {
|
||||
Text item=apc_ups_time_remaining
|
||||
Text item=apc_ups_soc
|
||||
Text item=apc_ups_battery_pos
|
||||
Text item=apc_ups_battery_temp
|
||||
Text item=apc_ups_load_w
|
||||
Text item=apc_ups_load_va
|
||||
Text item=apc_ups_ac_current
|
||||
Text item=apc_ups_ac_voltage
|
||||
Text item=apc_ups_ac_freq
|
||||
Text item=apc_ups_work
|
||||
}
|
||||
Frame label="Zustand, Zeitmessung" {
|
||||
Text item=apc_status_OnBattery
|
||||
Text item=apc_ups_counter
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
Bridge modbus:tcp:apc_ups [ host="192.168.0.122", port=502, id="1" ] {
|
||||
|
||||
Bridge poller apc_ups_measurements [ start=128, length=19, refresh=200, type="holding" ] {
|
||||
Thing data time_remaining [ readStart="128", readValueType="uint32", readTransform="JS(divide60.js)"]
|
||||
Thing data soc [ readStart="130", readValueType="uint16", readTransform="JS(divide512.js)"]
|
||||
Thing data battery_pos [ readStart="131", readValueType="int16", readTransform="JS(divide32.js)" ]
|
||||
Thing data load_W [ readStart="136", readValueType="uint16", readTransform="JS(divide256.js)" ]
|
||||
Thing data battery_temp [ readStart="135", readValueType="int16", readTransform="JS(divide128.js)" ]
|
||||
Thing data load_VA [ readStart="138", readValueType="uint16", readTransform="JS(divide256.js)" ]
|
||||
Thing data ac_current [ readStart="140", readValueType="uint16", readTransform="JS(divide32.js)" ]
|
||||
Thing data ac_voltage [ readStart="142", readValueType="uint16", readTransform="JS(divide64.js)" ]
|
||||
Thing data ac_freq [ readStart="144", readValueType="uint16", readTransform="JS(divide128.js)" ]
|
||||
Thing data work [ readStart="145", readValueType="uint32", readTransform="JS(divide1000.js)" ]
|
||||
}
|
||||
|
||||
Bridge poller apc_status [ start=18, length=1, refresh=200, type="holding" ] {
|
||||
Thing data on_battery [ readStart="18.0", readValueType="bit"]
|
||||
}
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
(function(i) {
|
||||
return parseFloat(i) / 128;
|
||||
})(input)
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
(function(i) {
|
||||
return parseFloat(i) / 256;
|
||||
})(input)
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
(function(i) {
|
||||
return parseFloat(i) / 32;
|
||||
})(input)
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
(function(i) {
|
||||
return parseFloat(i) / 512;
|
||||
})(input)
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
(function(i) {
|
||||
return parseFloat(i) / 60;
|
||||
})(input)
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
(function(i) {
|
||||
return parseFloat(i) / 64;
|
||||
})(input)
|
||||
|
Loading…
Reference in New Issue