From c7d5af765ca0ac3bd85cac227bd78177c4df8763 Mon Sep 17 00:00:00 2001 From: ulimaass <> Date: Thu, 15 Mar 2012 13:26:27 +0000 Subject: [PATCH] Example program for own Readings-lists git-svn-id: https://svn.fhem.de/fhem/trunk@1347 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- .../95_FLOORPLAN/99_myFloorplanList.pm | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 fhem/contrib/95_FLOORPLAN/99_myFloorplanList.pm diff --git a/fhem/contrib/95_FLOORPLAN/99_myFloorplanList.pm b/fhem/contrib/95_FLOORPLAN/99_myFloorplanList.pm new file mode 100644 index 000000000..265263047 --- /dev/null +++ b/fhem/contrib/95_FLOORPLAN/99_myFloorplanList.pm @@ -0,0 +1,44 @@ +package main; +use strict; +use warnings; +use POSIX; + +sub +myFloorplanList_Initialize($$) +{ + my ($hash) = @_; +} +################################################################################### +# Einbinden in fhem mit +# define w_WertListe1 weblink htmlCode {doWertListe1()} +# attr w_WertListe1 room Listen +# +sub +doWertListe1() { + my @wert; + my $div_class = "WertListe"; #format in css-file using #WertListe + + +# Change this list as needed + $wert[0] = "FHT Ist:" .','. ReadingsVal("ez_FHT","measured-temp","ezFHT measured-temp Fehler"); + $wert[1] = "FHT Soll:" .','. ReadingsVal("ez_FHT","desired-temp","ezFHT desired-temp Fehler"); + $wert[2] = "FHT Actuator:" .','. ReadingsVal("ez_FHT","actuator","ezFHT actuator Fehler"); + $wert[3] = "Aussen:" .','. ReadingsVal("ez_Aussensensor","temperature","ez_Aussensensor temperature Fehler"); + $wert[4] = "HomeStatus:" .','. Value("HomeStatus"); + $wert[5] = "GoogleTemp:" .','. ReadingsVal("MunichWeather","temperature","MunichWeather temperature Error"); + $wert[6] = "GoogleSky:" .','. ReadingsVal("MunichWeather","condition","MunichWeather condition Error"); + $wert[7] = "GoogleIcon:" .','. ""; + my $FritzTemp = `ctlmgr_ctl r power status/act_temperature` ; + $wert[8] = "FritzBoxTemp:" .','. $FritzTemp . "°"; +# Change this list as needed + + + my $htmlcode = '
\n"; + foreach (@wert) { + my ($title, $value) = split (",",$_); + $htmlcode .= "\n"; + } + $htmlcode .= "
$title$value
"; + return $htmlcode; +} +1;