Re: FOSHKplugin
Verfasst: 26 Apr 2026, 14:51
Meinst Du das hier:
Der Platz für alle wetterbegeisterten Hobbymeteorologen
https://www.wetterstationsforum.info/
Code: Alles auswählen
[Banner]
image_name = banner-simple.png
image_width = 300
image_height = 325
image_background = lightblue
dtime_format = "%A, %d.%m.%Y %H:%M:%S"
locale_format = "de_DE.UTF-8"
rounded_corners = 0
border_width = 0
border_color = black
header_font_name = verdana.ttf
header_font_color = black
header_font_size = 14
header_pre_count = 32
header_dec_count =
header_1 = 0,1,$datetime,,,,,,,,
custom_font_name = verdana.ttf
custom_font_color = black
custom_font_size = 8
custom_dec_count = 1
custom1_font_name = verdana.ttf
custom1_font_color = black
custom1_font_size = 14
custom1_dec_count = 1
custom1_pre_count = 6
custom1_dtime_format = "%H:%M"
custom1_1 = 20,10,Temperatur:,130,tempc, °C,,,,,,,,,,
custom1_2 = 35,10,Boden +5cm:,130,tf_ch1c, °C,,,,,,,,,,
custom1_3 = 50,10,Gefühlte Temp.:,130,feelslikec, °C,,,,,,,,,,
custom1_4 = 80,10,Luftdruck:,130,baromrelhpa, hPa,,,,,,,,,,
custom1_5 = 95,10,Änderung/3h:,130,pchange3, hPa,,,,,,,,,,
custom1_9 = 155,10,Niederschlag:,130,dailyrainmm, mm,,,,,,,,,,
custom1_11 = 170,10,Wind/Richt.:,130,windspeedkmh, km/h,,,,,,,,220,winddir_text,
custom1_12 = 185,10,Böe:,130,windgustkmh, km/h,,,,,,,,,,
custom1_13 = 240,10,MaxBöe:,130,windgustkmh_max, km/h,,,,,,,,230,maxgustbfttime,
custom2_font_name = verdana.ttf
custom2_font_color = black
custom2_font_size = 14
custom2_dtime_format = "%H:%M"
custom2_dec_count = 0
custom2_pre_count = 6
custom2_1 = 65,10,Luftfeuchte:,130,humidity, %,,,,,,,,,,
custom2_2 = 110,10,Wolken:,130,cloudm, m,,,,,,,,,,
custom2_3 = 140,10,Helligkeit:,130,solarradiation, W/m²,,,,,,,,,,
custom2_4 = 240,10,,35,windgustbft_max, BFT,,,,,,,,,,
custom3_font_name = verdana.ttf # just to show the possibilities
custom3_font_color = red
custom3_font_size = 14
custom3_dec_count = 1
custom3_pre_count = 6
custom3_dtime_format = "%H:%M"
custom3_1 = 210,10,MaxTemp:,130,tempc_max, °C,,,,,,,,230,tempc_max_time,
custom4_font_name = verdana.ttf
custom4_font_color = black
custom4_font_size = 10
custom4_dec_count = 1
custom4_pre_count = 6
custom4_1 = 290,10,Laufzeit: ,80,srv_uptime,,,,,,,,,,,
custom4_2 = 280,10,RPI Online: ,80,server_uptime,,,,,,,,,,,
custom4_3 = 300,10,FOSHKplugin ,80,prgbuild,,,,,,,,,,,
custom4_4 = 310,10,www.wetter-willich.de ,,,,,,,,,,,,,
custom5_font_name = verdana.ttf
custom5_font_color = blue
custom5_font_size = 14
custom5_dec_count = 1
custom5_pre_count = 6
custom5_dtime_format = "%H:%M"
custom5_1 = 225,10,MinTemp:,130,tempc_min, °C,,,,,,,,230,tempc_min_time,
footer_font_name = verdana.ttf
footer_font_color = black
footer_font_size = 14
footer_1 = 260,10,Wetterstation Willich\, Germany,,,,,,,,
special_font_name = verdana.ttf
special_font_color = black
special_font_size = 14
special_dec_count = 2
special_pre_count = 6
special_1 = 125,10,Sonnenschein:,130,sunhours, Std.,,,,,,,,,,Code: Alles auswählen
#!/bin/bash
instr="$@"
# get Raspi runtime as timestamp
server_uptime=$(date -d "$(uptime -s)" +%s)
if [ ! -z "$server_uptime" ]; then srstring=" server_uptime=$server_uptime"; fi
# get Raspi runtime as string
diff=$(($(date +%s) - $(date -d "$(uptime -s)" +%s)))
days=$(($diff / 86400))
srv_uptime=$(date -d@$diff -u "+$days%%20Tage%%20%H:%M:%S")
if [ ! -z "$srv_uptime" ]; then sustring=" srv_uptime=$srv_uptime"; fi
# output added line
echo "${instr}${srstring}${sustring}"
Fast.Ich lege also Dein Skript, z.B. als runtime.sh unter /opt/FOSHKplugin/ an und in der conf-Datei dann add_script = /opt/FOSHKplugin/runtime.sh ?
Code: Alles auswählen
FWD_EXEC = ./runtime.sh
Code: Alles auswählen
ADD_SCRIPT = ./runtime.sh