Compare commits
3 Commits
da3e32423e
...
ac6c06dfb3
Author | SHA1 | Date |
---|---|---|
Carsten Schmiemann | ac6c06dfb3 | |
Carsten Schmiemann | ee4775b9b5 | |
Carsten Schmiemann | 5c4885ba63 |
|
@ -0,0 +1 @@
|
|||
deb https://packages.grafana.com/oss/deb stable main
|
|
@ -0,0 +1 @@
|
|||
deb [signed-by=/etc/apt/trusted.gpg.d/influxdb.gpg] https://repos.influxdata.com/debian buster stable
|
|
@ -0,0 +1 @@
|
|||
deb https://openhab.jfrog.io/artifactory/openhab-linuxpkg stable main
|
|
@ -0,0 +1 @@
|
|||
tmpfs /var/log/openhab2 tmpfs defaults,noatime,nosuid,uid=openhab,gid=openhab,mode=0755,size=60M 0 0
|
|
@ -0,0 +1,9 @@
|
|||
/var/log/openhab2/*.log.1 {
|
||||
hourly
|
||||
rotate 2
|
||||
missingok
|
||||
copytruncate
|
||||
compress
|
||||
notifempty
|
||||
create 0640 openhab openhab
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 60 KiB |
|
@ -0,0 +1,6 @@
|
|||
String OH2_Service "OpenHAB GUI Service" { channel="exec:command:oh2_service:input" }
|
||||
String NodeRED_Service "NodeRED Service" { channel="exec:command:node_service:input" }
|
||||
String PI_Service "Raspberry" { channel="exec:command:pi_service:input" }
|
||||
|
||||
String Raspi_CPU_Temp_Raw {channel="exec:command:cpu_temp:output"}
|
||||
Number Raspi_CPU_Temp "CPU Temperatur [%.1f °C]"
|
|
@ -0,0 +1,6 @@
|
|||
# For security reasons all commands that are used by the exec binding or transformation need to be whitelisted.
|
||||
# Every command needs to be listed on a separate line below.
|
||||
sudo /bin/systemctl %2$s openhab2.service
|
||||
sudo /bin/systemctl %2$s nodered.service
|
||||
sudo %2$s
|
||||
cat /sys/class/thermal/thermal_zone0/temp
|
|
@ -0,0 +1,8 @@
|
|||
rule "CPU Temp"
|
||||
when
|
||||
Item Raspi_CPU_Temp_Raw received update
|
||||
then
|
||||
var String cpupdate = Raspi_CPU_Temp_Raw.state.toString.trim
|
||||
var Number cpuTemp = new DecimalType(cpupdate)
|
||||
sendCommand(Raspi_CPU_Temp, cpuTemp/1000)
|
||||
end
|
|
@ -68,4 +68,13 @@ sitemap default label="Power Station Manager" {
|
|||
//Text label="" icon="none" visibility=[DC_Load_Set_OnOff == "OFF"]
|
||||
Switch item=DC_Load_Set_OnOff mappings=[OFF="Aus", ON = "Ein"] icon=switch
|
||||
}
|
||||
Frame label="System" {
|
||||
Group item=Raspi_CPU_Temp label="Einstellungen - CPU Temperatur" icon="einstellungen.png" {
|
||||
Frame label="Systemfunktionen" {
|
||||
Switch item=OH2_Service mappings=[restart="Neustart" ]
|
||||
Switch item=NodeRED_Service mappings=[restart="Neustart"]
|
||||
Switch item=PI_Service mappings=[reboot="Neustart", shutdown="Herunterfahren"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
Thing exec:command:oh2_service [command="sudo /bin/systemctl %2$s openhab2.service", autorun=true]
|
||||
Thing exec:command:node_service [command="sudo /bin/systemctl %2$s nodered.service", autorun=true]
|
||||
Thing exec:command:pi_service [command="sudo %2$s", autorun=true]
|
||||
|
||||
Thing exec:command:cpu_temp [command="cat /sys/class/thermal/thermal_zone0/temp", interval=15, timeout=5, autorun=false]
|
Loading…
Reference in New Issue