define myrss RSS jpg 192.168.123.241 ./FHEM/rss.layout
http://192.168.123.158:8083/fhem/rss/myrss.jpg
set myrss rereadcfg
text 100 100 "Hallo, ich bin Dein RSS!"
text 100 100 { fhem("version fhem.pl") }
font /usr/share/fonts/truetype/msttcorefonts/arial.ttf
pt 12
rgb "FFFFFF"
# nun geben wir das Datum aus
date 400 100
# und jetzt noch die aktuelle Uhrzeit
time 400 200
rgb "FFFFFF"
line 0 300 800 300
rgb "FF0000"
line 400 0 400 600
rgb "00FF00"
line 0.1 0.1 0.9 0.9
rgb "FFFF00"
line 0.9 0.1 0.1 0.9
line <x1> <y1> <x2> <y2> [<thick>]
rgb "FFFFFF"
line 0 300 800 300
rgb "FFFFFF"
line 0 300 800 300 5
rgb "FF0000"
line 400 0 400 600
rgb "00FF00"
line 0.1 0.1 0.9 0.9
rgb "FFFF00"
line 0.9 0.1 0.1 0.9
line 0.1 0.1 0.9 0.9
line 0.5 0 0.5 600
line 0 0.5 800 0.5
img <x> <y> <scale> <type> <srcType> <source>
rgb "FFFFFF"
line 0 0.5 800 0.5
line 0.5 0 0.5 600
img 0.5 0.5 1 png url "http://fhem.de/www/images/default/fhemicon.png"
img 0.5 0.5 1 png url "http://fhem.de/www/images/default/fhemicon.png"
# Schriftart festlegen
font /usr/share/fonts/truetype/msttcorefonts/arial.ttf
# Farbe weiss
rgb "FFFFFF"
# drei waagerechte Linien
line 0 40 800 40
# 0.4 * 600 = 240
line 0 0.4 800 0.4
line 0 440 800 440
# wir bauen uns eine Kopfzeile
# Schriftgroesse festlegen
pt 20
date 10 30
time 650 30
rgb "00FF00"
text 300 30 "myrss Workshop"
# ein skaliertes Bild einbinden
img 764 1 .29 png url "http://fhem.de/www/images/default/fhemicon.png"
# einige vorlaeufige Beschriftungen
pt 12
rgb "FFFFFF"
text 10 80 "Darstellungsbereich 1"
text 10 280 "Darstellungsbereich 2"
text 10 480 "Hier bauen wir uns einen SVG Plot ein"
define owo openweathermap
attr owo owoInterval 600
set owo stationByName Hamburg
define owolog FileLog ./log/owo.log owo.*(c_temperature|c_humidity|c_pressure).*
set terminal png transparent size <SIZE> crop
set output '<OUT>.png'
set xdata time
set timefmt "%Y-%m-%d_%H:%M:%S"
set xlabel " "
set title '<L1>'
set ytics
set y2tics
set grid ytics
set ylabel "Temperatur"
set y2label "Luftfeuchte"
set yrange [10:30]
set y2range [0:100]
#FileLog 4:owo.c_temperature\x3a::
#FileLog 4:owo.c_humidity\x3a::
#FileLog 4:owo.c_pressure\x3a:950:$fld[3]-950
plot "<IN>" using 1:2 axes x1y1 title 'Temperatur' ls l0 lw 1 with lines,\
"<IN>" using 1:2 axes x1y2 title 'Feuchte' ls l2 lw 1 with lines,\
"<IN>" using 1:2 axes x1y2 title 'Luftdruck' ls l1 lw 1 with lines
define SVG_owo SVG owolog:SVG_owolog_1:CURRENT
attr SVG_owo label "min:$data{min1}°C max:$data{max1}°C akt:$data{currval1}°C"
url = gibt an, dass die Grafikdatei von einer URL gelesen wird. Alternativ gibt es noch "file" und "data"
#text 10 480 "Hier bauen wir uns einen SVG Plot ein"
img 0 441 1 png data { plotAsPng("SVG_owo") }
rgb "FF0000"
rect 400 120 480 160
rect 400 320 480 360 1
rect 400 120 480 160
rect 400 320 480 360 1
rect <x1> <y1> <x2> <y2> [<filled>]
#text 10 480 "Hier bauen wir uns einen SVG Plot ein"
rgb "585858"
rect 0 441 800 600 1
img 0 441 1 png data { plotAsPng("SVG_owo") }
#rgb "FF0000"
#rect 400 120 480 160
#rect 400 320 480 360 1
attr myrss bgcolor 0000FF
attr myrss bgcolor 1C1C1C
# wir bauen uns eine Kopfzeile
# Schriftgroesse festlegen
pt 20
date 10 30
time 650 30
#rgb "00FF00"
#text 300 30 "myrss Workshop"
rgb "FF0000"
text 200 30 { ReadingsVal('owo','c_temperature','')."°C"}
rgb "2E64FE"
text .5 30 { ReadingsVal('owo','c_humidity','')."%"}
rgb "00FF00"
text 500 30 { ReadingsVal('owo','c_pressure','')." hPa"}
# weitere Linien im Darstellungsbereich 1
rgb "7F7F7F"
line 400 40 400 240
line 600 40 600 240
line 400 140 800 140
# Demo Textausrichtung vertikal
rgb "FFFFFF"
tvalign "top"
text 410 140 "TO"
tvalign "center"
text 440 140 "CE gjp"
tvalign "base"
text 490 140 "BA gjp"
tvalign "bottom"
text 540 140 "BO gjp"
tvalign "base" # Rücksetzen auf default
# Demo Textausrichtung horizontal
thalign "left"
text 600 170 "LEFT"
thalign "center"
text 600 200 "CENTER"
thalign "right"
text 600 230 "RIGHT"
thalign "left" # Rücksetzen auf default
# nochmal zwei Hilfslinien
rgb "7F7F7F"
line 300 40 300 240
line 0 140 250 140
# Demo Bildausrichtung vertikal
ivalign "top"
img 10 140 1 png url "http://up.picr.de/17991350as.png"
ivalign "center"
img 75 140 1 png url "http://up.picr.de/17991350as.png"
ivalign "bottom"
img 140 140 1 png url "http://up.picr.de/17991350as.png"
ivalign "top" # Rücksetzen auf default
# Demo Bildausrichtung horizontal
ihalign "left"
img 300 50 1 png url "http://up.picr.de/17991350as.png"
ihalign "center"
img 300 115 1 png url "http://up.picr.de/17991350as.png"
ihalign "right"
img 300 180 1 png url "http://up.picr.de/17991350as.png"
ihalign "left" # Rücksetzen auf default
ihalign "center"
ivalign "center"
img .5 .5 1 png url "http://up.picr.de/17991350as.png"
define regenDummy dummy
set regenDummy rain
# Deno für bedingtes Einbinden von Informationen
# Variante 1
rgb "2E64FE"
text 210 280 { "Es regnet!" if(ReadingsVal('regenDummy','state','') eq 'rain') }
# Deno für bedingtes Einbinden von Informationen
# Variante 1
#rgb "2E64FE"
#text 210 280 { "Es regnet!" if(ReadingsVal('regenDummy','state','') eq 'rain') }
# Variante 2
condition {(ReadingsVal('regenDummy','state','') eq 'rain')}
rgb "2E64FE"
text 210 280 "Es regnet!"
condition 1
# Kapitel 14 - Readingliste anzeigen
# zuerst nochmal eine Linie zeichnen
rgb "7F7F7F"
line 400 240 400 440
# Wertebezeichnungen linksbündig ausgeben
rgb "FFFFFF"
pt 12
thalign "left"
text 410 270 "Temperatur"
text 410 300 "Luftfeuchte"
text 410 330 "Luftdruck"
# Messwerte rechtsbündig ausgeben
thalign "right"
text 550 270 {ReadingsVal('owo','c_temperature','?')}
text 550 300 {ReadingsVal('owo','c_humidity','?')}
text 550 330 {ReadingsVal('owo','c_pressure','?')}
# Einheiten linksbündig an die Messwerte anhängen
thalign "left"
text 552 270 "°C"
text 552 300 "%"
text 552 330 " hPa"
moveto 100 100
moveby 100 0
moveby 0 50
moveby 50 -30
text x y "blubber"
# Kapitel 14 - Teil 3
# wir schicken die Schildkröte los
# http://de.wikipedia.org/wiki/KTurtle
#
rgb "00FF00"
pt 12
# Wertebezeichnungen linksbündig ausgeben
thalign "left"
moveto 410 360
text x y "Temperatur"
moveby 0 30
text x y "Luftfeuchte"
moveby 0 30
text x y "Luftdruck"
# Messwerte rechtsbündig ausgeben
thalign "right"
moveby 140 0
text x y {ReadingsVal('owo','c_pressure','?')}
moveby 0 -30
text x y {ReadingsVal('owo','c_humidity','?')}
moveby 0 -30
text x y {ReadingsVal('owo','c_temperature','?')}
# Einheiten linksbündig an die Messwerte anhängen
thalign "left"
moveby 2 0
text 552 y "°C"
moveby 0 30
text x 390 "%"
moveby 0 30
text x y " hPa"
condition {(ReadingsVal('regenDummy','state','') eq 'rain')}
text 410 300 "Luftfeuchte"
condition 1
condition {(ReadingsVal('regenDummy','state','') eq 'rain')}
moveby 0 30
text x y "Luftfeuchte"
condition 1
#--------------------
# Türen und Fenster
#
condition 1
thalign "left"
moveto 410 50
condition { ReadingsVal("Melder_TEingang","state","") eq "open" }
rgb "FF0000"
moveby 0 20
text 410 y { "Eingang" }
text 470 y { ts2text(ReadingsTimestamp("Melder_TEingang","state","")) }
condition { ReadingsVal("Melder_TBalkon","state","") eq "open" }
rgb "FF0000"
moveby 0 20
text 410 y { "Balkon" }
text 470 y { ts2text(ReadingsTimestamp("Melder_TBalkon","state","")) }
condition { ReadingsVal("Melder_TBalkon","state","") eq "tilted" }
rgb "FFFF00"
moveby 0 20
text 410 y { "Balkon" }
text 470 y { ts2text(ReadingsTimestamp("Melder_TBalkon","state","")) }
condition { ReadingsVal("Melder_FSl","state","") eq "open" }
rgb "FF0000"
moveby 0 20
text 410 y { "SZ li" }
text 470 y { ts2text(ReadingsTimestamp("Melder_FSl","state","")) }
condition { ReadingsVal("Melder_FSr","state","") eq "open" }
rgb "FF0000"
moveby 0 20
text 410 y { "SZ re" }
text 470 y { ts2text(ReadingsTimestamp("Melder_FSr","state","")) }
condition { ReadingsVal("Melder_FSr","state","") eq "tilted" }
rgb "FFFF00"
moveby 0 20
text 410 y { "SZ re" }
text 470 y { ts2text(ReadingsTimestamp("Melder_FSr","state","")) }
condition { ReadingsVal("Melder_FKl","state","") eq "open" }
rgb "FF0000"
moveby 0 20
text 410 y { "KU li" }
text 470 y { ts2text(ReadingsTimestamp("Melder_FKl","state","")) }
condition { ReadingsVal("Melder_FKr","state","") eq "open" }
rgb "FF0000"
moveby 0 20
text 410 y { "KU re" }
text 470 y { ts2text(ReadingsTimestamp("Melder_FKr","state","")) }
condition { ReadingsVal("Melder_FKr","state","") eq "tilted" }
rgb "FFFF00"
moveby 0 20
text 410 y { "KU re" }
text 470 y { ts2text(ReadingsTimestamp("Melder_FKr","state","")) }
condition { ReadingsVal("Melder_FAl","state","") eq "open" }
rgb "FF0000"
moveby 0 20
text 410 y { "AZ li" }
text 470 y { ts2text(ReadingsTimestamp("Melder_FAl","state","")) }
condition { ReadingsVal("Melder_FAr","state","") eq "open" }
rgb "FF0000"
moveby 0 20
text 410 y { "AZ re" }
text 470 y { ts2text(ReadingsTimestamp("Melder_FAr","state","")) }
condition { ReadingsVal("Melder_FAr","state","") eq "tilted" }
rgb "FFFF00"
moveby 0 20
text 410 y { "AZ re" }
text 470 y { ts2text(ReadingsTimestamp("Melder_FAr","state","")) }
# Teil 15 - die Textbox
rgb "FFFFFF"
pt 12
thalign "left"
textbox 50 330 300 "Verbraucher erfahren auch künftig nicht, ob Honig Pollen von genmanipulierten Pflanzen enthält."
thalign "justified"
http://myFHEM:8083/fhem/rss/myRSS.html