You can subscribe to this list here.
| 2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(121) |
Dec
(58) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2011 |
Jan
(38) |
Feb
(36) |
Mar
(7) |
Apr
(2) |
May
(32) |
Jun
(24) |
Jul
(16) |
Aug
(21) |
Sep
(17) |
Oct
(62) |
Nov
(60) |
Dec
(70) |
| 2012 |
Jan
(54) |
Feb
(41) |
Mar
(21) |
Apr
(38) |
May
(76) |
Jun
(47) |
Jul
(25) |
Aug
(72) |
Sep
(29) |
Oct
(64) |
Nov
(93) |
Dec
(97) |
| 2013 |
Jan
(100) |
Feb
(168) |
Mar
(115) |
Apr
(59) |
May
(37) |
Jun
(32) |
Jul
(45) |
Aug
(42) |
Sep
(24) |
Oct
(73) |
Nov
(64) |
Dec
(4) |
| 2014 |
Jan
(14) |
Feb
(57) |
Mar
(58) |
Apr
(10) |
May
(18) |
Jun
(12) |
Jul
(7) |
Aug
(12) |
Sep
(15) |
Oct
(6) |
Nov
(32) |
Dec
(17) |
| 2015 |
Jan
(50) |
Feb
(5) |
Mar
(1) |
Apr
(26) |
May
(10) |
Jun
(3) |
Jul
(3) |
Aug
(2) |
Sep
(3) |
Oct
(18) |
Nov
(18) |
Dec
(8) |
| 2016 |
Jan
(33) |
Feb
(35) |
Mar
(50) |
Apr
(20) |
May
(25) |
Jun
(17) |
Jul
(8) |
Aug
(73) |
Sep
(64) |
Oct
(51) |
Nov
(20) |
Dec
(14) |
| 2017 |
Jan
(41) |
Feb
(57) |
Mar
(44) |
Apr
(136) |
May
(32) |
Jun
(39) |
Jul
(2) |
Aug
(12) |
Sep
(32) |
Oct
(103) |
Nov
(12) |
Dec
(4) |
| 2018 |
Jan
(9) |
Feb
(1) |
Mar
(60) |
Apr
(24) |
May
(15) |
Jun
(1) |
Jul
(2) |
Aug
(23) |
Sep
(15) |
Oct
(57) |
Nov
(21) |
Dec
(77) |
| 2019 |
Jan
(62) |
Feb
(99) |
Mar
(98) |
Apr
(49) |
May
(6) |
Jun
(3) |
Jul
(6) |
Aug
(18) |
Sep
(9) |
Oct
(15) |
Nov
(30) |
Dec
(6) |
| 2020 |
Jan
(14) |
Feb
(2) |
Mar
(22) |
Apr
(33) |
May
(47) |
Jun
(12) |
Jul
|
Aug
|
Sep
(4) |
Oct
(2) |
Nov
(5) |
Dec
(5) |
| 2021 |
Jan
(4) |
Feb
(101) |
Mar
(13) |
Apr
(32) |
May
(40) |
Jun
|
Jul
(3) |
Aug
|
Sep
|
Oct
(25) |
Nov
(12) |
Dec
|
| 2022 |
Jan
(154) |
Feb
(82) |
Mar
(63) |
Apr
(27) |
May
(26) |
Jun
(5) |
Jul
(12) |
Aug
(23) |
Sep
(17) |
Oct
(37) |
Nov
(13) |
Dec
(21) |
| 2023 |
Jan
(43) |
Feb
(43) |
Mar
(15) |
Apr
(8) |
May
(3) |
Jun
(25) |
Jul
(6) |
Aug
(38) |
Sep
(5) |
Oct
(20) |
Nov
(9) |
Dec
(28) |
| 2024 |
Jan
(15) |
Feb
(2) |
Mar
(12) |
Apr
(2) |
May
(8) |
Jun
(10) |
Jul
(10) |
Aug
(2) |
Sep
(3) |
Oct
(15) |
Nov
(6) |
Dec
(20) |
| 2025 |
Jan
|
Feb
(2) |
Mar
(6) |
Apr
(2) |
May
(2) |
Jun
|
Jul
|
Aug
(1) |
Sep
(1) |
Oct
(11) |
Nov
(2) |
Dec
|
|
From: <sw...@us...> - 2011-07-03 18:35:40
|
Revision: 380
http://openautomation.svn.sourceforge.net/openautomation/?rev=380&view=rev
Author: swiss1
Date: 2011-07-03 18:35:33 +0000 (Sun, 03 Jul 2011)
Log Message:
-----------
Es wurde die Berechnung der Kalenderwoche erg?\195?\164nzt, da diese nicht ?\195?\188ber localtime ausgegeben wird. Das Plugin wurde gr?\195?\188ndlich auf Funktion getestet. Version 0.4 BETA
Modified Paths:
--------------
wiregate/plugin/generic/schaltuhr.pl
Modified: wiregate/plugin/generic/schaltuhr.pl
===================================================================
--- wiregate/plugin/generic/schaltuhr.pl 2011-07-03 14:41:35 UTC (rev 379)
+++ wiregate/plugin/generic/schaltuhr.pl 2011-07-03 18:35:33 UTC (rev 380)
@@ -1,5 +1,5 @@
# Plugin zum Zeit abh\xE4ngigem schaten von GA's (Schaltuhr)
-# Version 0.3 BETA 03.07.2011
+# Version 0.4 BETA 03.07.2011
# Copyright: swiss (http://knx-user-forum.de/members/swiss.html)
# License: GPL (v2)
# Aufbau m\xF6glichst so, dass man unterhalb der Einstellungen nichts ver\xE4ndern muss!
@@ -12,40 +12,44 @@
#Pro Schaltpunkt einfach den unten stehenden Eintrag kopieren und anpassen.
-push @Schaltzeiten, { name => "bew\xE4sserung_ein", montag => 1, dienstag => 1, mittwoch => 1, donnerstag => 1, freitag => 1, samstag => 0, sonntag => 1, Stunden => 15, Minuten => 45, Wert => 1, DPT => 1, ga => '2/0/0', KW => '', Monat => '' };
+push @Schaltzeiten, { name => "bew\xE4sserung_ein", montag => 1, dienstag => 1, mittwoch => 1, donnerstag => 1, freitag => 1, samstag => 0, sonntag => 1, Stunden => 20, Minuten => 30, Wert => 1, DPT => 1, ga => '2/0/0', KW => '', Monat => '' };
-push @Schaltzeiten, { name => "bew\xE4sserung_aus", montag => 1, dienstag => 1, mittwoch => 1, donnerstag => 1, freitag => 1, samstag => 0, sonntag => 1, Stunden => 15, Minuten => 46, Wert => 0, DPT => 1, ga => '2/0/0', KW => '', Monat => '' };
+push @Schaltzeiten, { name => "bew\xE4sserung_aus", montag => 1, dienstag => 1, mittwoch => 1, donnerstag => 1, freitag => 1, samstag => 0, sonntag => 1, Stunden => 20, Minuten => 31, Wert => 0, DPT => 1, ga => '2/0/0', KW => '', Monat => '' };
######################
##ENDE Einstellungen##
######################
use POSIX;
+use Time::Local;
-# Eigenen Aufruf-Zyklus auf 30sek. setzen
-$plugin_info{$plugname.'_cycle'} = 30;
+# Eigenen Aufruf-Zyklus auf 20sek. setzen
+$plugin_info{$plugname.'_cycle'} = 20;
#Hier wird ein Array angelegt, um die Wochentagsnummer von localtime zu \xFCbersetzen
my @Wochentag = ('sonntag', 'montag', 'dienstag', 'mittwoch', 'donnerstag', 'freitag', 'samstag');
-my $sec;
-my $min;
-my $hour;
-my $mday;
-my $mon;
-my $year;
-my $wday;
-my $yday;
+my $sec; #Sekunde
+my $min; # Minute
+my $hour; #Stunde
+my $mday; #Monatstag
+my $mon; #Monatsnummer
+my $year; #Jahr
+my $wday; #Wochentag 0-6
+my $yday; #Tag ab 01.01.xxxx
my $isdst;
+($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
+$year += 1900;
+$mon += 1;
+my $kw = getWeekNumber($year, $mon, $mday);
+$plugin_info{$plugname.'_debug'} = $kw;
+
foreach my $element (@Schaltzeiten) {
- ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
- $year += 1900;
-
if ($element->{$Wochentag[$wday]} == 1 && $element->{Stunden} == $hour && $element->{Minuten} == $min && $element->{KW} ne '') {
- if ($element->{KW} == $yday) {
+ if ($element->{KW} == $kw) {
knx_write($element->{ga},$element->{Wert},$element->{DPT});
next;
} else {
@@ -63,4 +67,68 @@
next;
}
next;
+}
+
+sub getWeekNumber {
+my ($year, $month, $day) = @_;
+my $weekNumber = checkWeekNumber($year, $month, $day);
+# wenn Wochennummer gleich 0, dann ist das aktuelle Datum
+# in der Woche vor dem 4. Januar
+# also in der letzten Woche des letzten Jahres
+if ($weekNumber eq 0)
+{
+# Wochennummer des letzten Woche des letzten Jahres suchen
+$weekNumber = checkWeekNumber(($year - 1), 12, 31);
+
+# wenn die Wochennummer gr\xF6\xDFer als 52 ist
+# dann pr\xFCfen ob diese Wochennummer korrekt ist oder
+# sie bereits die erste Woche des aktuellen Jahres ist
+if ($weekNumber gt 52)
+{
+$weekNumber = checkWeekNumber($year, 1, 1);
+# wenn der 1. Januar des aktuellen Jahres in der Woche 0 liegt
+# dann ist es die Woche 53
+if ($weekNumber eq 0)
+{
+$weekNumber = 53;
+}
+}
+}
+# wenn die Wochennummer gr\xF6\xDFer als 52 ist
+# dann pr\xFCfen ob diese Wochennummer korrekt ist oder
+# sie bereits die erste Woche des n\xE4chsten Jahres ist
+elsif ($weekNumber gt 52)
+{
+$weekNumber = checkWeekNumber(($year + 1), 1, 1);
+# wenn der 1. Januar des n\xE4chsten Jahres in der Woche 0 liegt
+# dann ist es die Woche 53
+if ($weekNumber eq 0)
+{
+$weekNumber = 53;
+}
+}
+
+return ($weekNumber);
+}
+
+sub checkWeekNumber {
+my ($year, $month, $day) = @_;
+
+# 4. Januar als erste Woche erstellen
+my $firstDateTime = timelocal(0, 0, 12, 4, 0, $year);
+# Wochentag des 4. Januar ermitteln
+my $dayOfWeek = (localtime($firstDateTime))[6];
+$dayOfWeek = abs((($dayOfWeek + 6) % 7));
+# geh zu Wochenanfang (Montag) zur\xFCck
+$firstDateTime -= ($dayOfWeek * 3600 * 24);
+
+# aktuelles Datum erstellen
+my $currentDateTime = timelocal(0, 0, 14, $day, ($month - 1),$year);
+
+# Differenz in Tagen berechnen
+my $diffInDay = ($currentDateTime - $firstDateTime) / 3600 / 24;
+# Anzahl der Wochen zwischen aktuellem Datum und 4. Januar berechnen
+my $weekNumber = floor($diffInDay / 7) + 1;
+
+return ($weekNumber);
}
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sw...@us...> - 2011-07-03 14:41:41
|
Revision: 379
http://openautomation.svn.sourceforge.net/openautomation/?rev=379&view=rev
Author: swiss1
Date: 2011-07-03 14:41:35 +0000 (Sun, 03 Jul 2011)
Log Message:
-----------
In der neusten Version sind nun auch Schaltpunkte in bestimmten Monaten oder Kalenderwochen m?\195?\182glich. Version 0.3 BETA
Modified Paths:
--------------
wiregate/plugin/generic/schaltuhr.pl
Modified: wiregate/plugin/generic/schaltuhr.pl
===================================================================
--- wiregate/plugin/generic/schaltuhr.pl 2011-07-03 14:04:15 UTC (rev 378)
+++ wiregate/plugin/generic/schaltuhr.pl 2011-07-03 14:41:35 UTC (rev 379)
@@ -1,5 +1,5 @@
# Plugin zum Zeit abh\xE4ngigem schaten von GA's (Schaltuhr)
-# Version 0.2 03.07.2011
+# Version 0.3 BETA 03.07.2011
# Copyright: swiss (http://knx-user-forum.de/members/swiss.html)
# License: GPL (v2)
# Aufbau m\xF6glichst so, dass man unterhalb der Einstellungen nichts ver\xE4ndern muss!
@@ -12,9 +12,9 @@
#Pro Schaltpunkt einfach den unten stehenden Eintrag kopieren und anpassen.
-push @Schaltzeiten, { name => "bew\xE4sserung_ein", montag => 1, dienstag => 1, mittwoch => 1, donnerstag => 1, freitag => 1, samstag => 0, sonntag => 1, Stunden => 15, Minuten => 45, Wert => 1, DPT => 1, ga => '2/0/0' };
+push @Schaltzeiten, { name => "bew\xE4sserung_ein", montag => 1, dienstag => 1, mittwoch => 1, donnerstag => 1, freitag => 1, samstag => 0, sonntag => 1, Stunden => 15, Minuten => 45, Wert => 1, DPT => 1, ga => '2/0/0', KW => '', Monat => '' };
-push @Schaltzeiten, { name => "bew\xE4sserung_aus", montag => 1, dienstag => 1, mittwoch => 1, donnerstag => 1, freitag => 1, samstag => 0, sonntag => 1, Stunden => 15, Minuten => 46, Wert => 0, DPT => 1, ga => '2/0/0' };
+push @Schaltzeiten, { name => "bew\xE4sserung_aus", montag => 1, dienstag => 1, mittwoch => 1, donnerstag => 1, freitag => 1, samstag => 0, sonntag => 1, Stunden => 15, Minuten => 46, Wert => 0, DPT => 1, ga => '2/0/0', KW => '', Monat => '' };
######################
##ENDE Einstellungen##
@@ -41,11 +41,26 @@
foreach my $element (@Schaltzeiten) {
-($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
+ ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
$year += 1900;
- if ($element->{$Wochentag[$wday]} == 1 && $element->{Stunden} == $hour && $element->{Minuten} == $min) {
+ if ($element->{$Wochentag[$wday]} == 1 && $element->{Stunden} == $hour && $element->{Minuten} == $min && $element->{KW} ne '') {
+ if ($element->{KW} == $yday) {
+ knx_write($element->{ga},$element->{Wert},$element->{DPT});
+ next;
+ } else {
+ next;
+ }
+ } elsif ($element->{$Wochentag[$wday]} == 1 && $element->{Stunden} == $hour && $element->{Minuten} == $min && $element->{Monat} ne '') {
+ if ($element->{Monat} == $mon) {
+ knx_write($element->{ga},$element->{Wert},$element->{DPT});
+ next;
+ } else {
+ next;
+ }
+ } elsif ($element->{$Wochentag[$wday]} == 1 && $element->{Stunden} == $hour && $element->{Minuten} == $min && $element->{KW} eq '' && $element->{Monat} eq '') {
knx_write($element->{ga},$element->{Wert},$element->{DPT});
- }
+ next;
+ }
next;
}
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sw...@us...> - 2011-07-03 14:04:21
|
Revision: 378
http://openautomation.svn.sourceforge.net/openautomation/?rev=378&view=rev
Author: swiss1
Date: 2011-07-03 14:04:15 +0000 (Sun, 03 Jul 2011)
Log Message:
-----------
Das einstellen der DPT wurde hinzugef?\195?\188gt. Damit k?\195?\182nnen jetzt auch Werte zeitabh?\195?\164ngig gesendet werden. Version 0.2
Modified Paths:
--------------
wiregate/plugin/generic/schaltuhr.pl
Modified: wiregate/plugin/generic/schaltuhr.pl
===================================================================
--- wiregate/plugin/generic/schaltuhr.pl 2011-07-03 13:53:33 UTC (rev 377)
+++ wiregate/plugin/generic/schaltuhr.pl 2011-07-03 14:04:15 UTC (rev 378)
@@ -1,5 +1,5 @@
-# Plugin zum Zeit abh\xE4ngigem schaten von beliebig vielen GA's (Schaltuhr)
-# Version 0.1 03.07.2011
+# Plugin zum Zeit abh\xE4ngigem schaten von GA's (Schaltuhr)
+# Version 0.2 03.07.2011
# Copyright: swiss (http://knx-user-forum.de/members/swiss.html)
# License: GPL (v2)
# Aufbau m\xF6glichst so, dass man unterhalb der Einstellungen nichts ver\xE4ndern muss!
@@ -12,9 +12,9 @@
#Pro Schaltpunkt einfach den unten stehenden Eintrag kopieren und anpassen.
-push @Schaltzeiten, { name => "bew\xE4sserung_ein", montag => 1, dienstag => 1, mittwoch => 1, donnerstag => 1, freitag => 1, samstag => 0, sonntag => 1, Stunden => 15, Minuten => 45, Befehl => 1, ga => '2/0/0' };
+push @Schaltzeiten, { name => "bew\xE4sserung_ein", montag => 1, dienstag => 1, mittwoch => 1, donnerstag => 1, freitag => 1, samstag => 0, sonntag => 1, Stunden => 15, Minuten => 45, Wert => 1, DPT => 1, ga => '2/0/0' };
-push @Schaltzeiten, { name => "bew\xE4sserung_aus", montag => 1, dienstag => 1, mittwoch => 1, donnerstag => 1, freitag => 1, samstag => 0, sonntag => 1, Stunden => 15, Minuten => 46, Befehl => 0, ga => '2/0/0' };
+push @Schaltzeiten, { name => "bew\xE4sserung_aus", montag => 1, dienstag => 1, mittwoch => 1, donnerstag => 1, freitag => 1, samstag => 0, sonntag => 1, Stunden => 15, Minuten => 46, Wert => 0, DPT => 1, ga => '2/0/0' };
######################
##ENDE Einstellungen##
@@ -45,7 +45,7 @@
$year += 1900;
if ($element->{$Wochentag[$wday]} == 1 && $element->{Stunden} == $hour && $element->{Minuten} == $min) {
- knx_write($element->{ga},$element->{Befehl},1);
+ knx_write($element->{ga},$element->{Wert},$element->{DPT});
}
next;
}
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sw...@us...> - 2011-07-03 13:53:39
|
Revision: 377
http://openautomation.svn.sourceforge.net/openautomation/?rev=377&view=rev
Author: swiss1
Date: 2011-07-03 13:53:33 +0000 (Sun, 03 Jul 2011)
Log Message:
-----------
Plugin zum Schalten beliebig vieler GA's zu bestimmten Wochentage und Zeiten. Version 0.1
Added Paths:
-----------
wiregate/plugin/generic/schaltuhr.pl
Added: wiregate/plugin/generic/schaltuhr.pl
===================================================================
--- wiregate/plugin/generic/schaltuhr.pl (rev 0)
+++ wiregate/plugin/generic/schaltuhr.pl 2011-07-03 13:53:33 UTC (rev 377)
@@ -0,0 +1,51 @@
+# Plugin zum Zeit abh\xE4ngigem schaten von beliebig vielen GA's (Schaltuhr)
+# Version 0.1 03.07.2011
+# Copyright: swiss (http://knx-user-forum.de/members/swiss.html)
+# License: GPL (v2)
+# Aufbau m\xF6glichst so, dass man unterhalb der Einstellungen nichts ver\xE4ndern muss!
+
+
+####################
+###Einstellungen:###
+####################
+my @Schaltzeiten;
+
+#Pro Schaltpunkt einfach den unten stehenden Eintrag kopieren und anpassen.
+
+push @Schaltzeiten, { name => "bew\xE4sserung_ein", montag => 1, dienstag => 1, mittwoch => 1, donnerstag => 1, freitag => 1, samstag => 0, sonntag => 1, Stunden => 15, Minuten => 45, Befehl => 1, ga => '2/0/0' };
+
+push @Schaltzeiten, { name => "bew\xE4sserung_aus", montag => 1, dienstag => 1, mittwoch => 1, donnerstag => 1, freitag => 1, samstag => 0, sonntag => 1, Stunden => 15, Minuten => 46, Befehl => 0, ga => '2/0/0' };
+
+######################
+##ENDE Einstellungen##
+######################
+
+use POSIX;
+
+# Eigenen Aufruf-Zyklus auf 30sek. setzen
+$plugin_info{$plugname.'_cycle'} = 30;
+
+#Hier wird ein Array angelegt, um die Wochentagsnummer von localtime zu \xFCbersetzen
+my @Wochentag = ('sonntag', 'montag', 'dienstag', 'mittwoch', 'donnerstag', 'freitag', 'samstag');
+
+my $sec;
+my $min;
+my $hour;
+my $mday;
+my $mon;
+my $year;
+my $wday;
+my $yday;
+my $isdst;
+
+
+foreach my $element (@Schaltzeiten) {
+
+($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
+ $year += 1900;
+
+ if ($element->{$Wochentag[$wday]} == 1 && $element->{Stunden} == $hour && $element->{Minuten} == $min) {
+ knx_write($element->{ga},$element->{Befehl},1);
+ }
+next;
+}
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2011-07-03 13:04:55
|
Revision: 376
http://openautomation.svn.sourceforge.net/openautomation/?rev=376&view=rev
Author: chris_ace
Date: 2011-07-03 13:04:49 +0000 (Sun, 03 Jul 2011)
Log Message:
-----------
Add certain iframe style attributes
Modified Paths:
--------------
CometVisu/trunk/visu/designs/structure_pure.js
CometVisu/trunk/visu/visu_config.xsd
Modified: CometVisu/trunk/visu/designs/structure_pure.js
===================================================================
--- CometVisu/trunk/visu/designs/structure_pure.js 2011-06-26 09:03:25 UTC (rev 375)
+++ CometVisu/trunk/visu/designs/structure_pure.js 2011-07-03 13:04:49 UTC (rev 376)
@@ -611,15 +611,21 @@
var style = '';
if( $p.attr('width' ) ) style += 'width:' + $p.attr('width' ) + ';';
if( $p.attr('height') ) style += 'height:' + $p.attr('height') + ';';
+ if( $p.attr('allowtransparency') == 0 ) style += 'allowTransparency: false ;';
+ if( $p.attr('frameborder') == 0 ) style += 'border: 0px ;';
+ if( $p.attr('background') ) style += 'background-color:' + $p.attr('background') + ';';
if( style != '' ) style = 'style="' + style + '"';
var actor = '<div class="actor"><iframe src="' +$p.attr('src') + '" ' + style + '></iframe></div>';
ret_val.append( $(actor) );
return ret_val;
},
attributes: {
- src: { type: 'uri' , required: true },
- width: { type: 'string', required: false },
- height: { type: 'string', required: false }
+ src: { type: 'uri' , required: true },
+ width: { type: 'string', required: false },
+ height: { type: 'string', required: false },
+ allowtransparency: { type: 'numeric', required: false },
+ frameborder: { type: 'numeric', required: false },
+ background: { type: 'string', required: false }
},
elements: {
label: { type: 'string', required: false, multi: false }
Modified: CometVisu/trunk/visu/visu_config.xsd
===================================================================
--- CometVisu/trunk/visu/visu_config.xsd 2011-06-26 09:03:25 UTC (rev 375)
+++ CometVisu/trunk/visu/visu_config.xsd 2011-07-03 13:04:49 UTC (rev 376)
@@ -329,9 +329,12 @@
<xsd:choice maxOccurs="unbounded" minOccurs="0">
<xsd:element name="label" type="xsd:string" maxOccurs="1" />
</xsd:choice>
- <xsd:attribute name="src" type="uri" use="required" />
+ <xsd:attribute name="src" type="uri" use="required" />
<xsd:attribute name="width" type="dimension" />
<xsd:attribute name="height" type="dimension" />
+ <xsd:attribute name="allowtransparency" type="xsd:bool" />
+ <xsd:attribute name="frameborder" type="xsd:bool" />
+ <xsd:attribute name="background" type="xsd:string" />
</xsd:complexType>
<xsd:complexType name="colorchooser" >
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2011-06-26 09:03:31
|
Revision: 375
http://openautomation.svn.sourceforge.net/openautomation/?rev=375&view=rev
Author: mayerch
Date: 2011-06-26 09:03:25 +0000 (Sun, 26 Jun 2011)
Log Message:
-----------
Added forceReload=true to the reload link to avoid cache trouble
Modified Paths:
--------------
CometVisu/trunk/visu/visu_config.xml
CometVisu/trunk/visu/visu_config_demo.xml
Modified: CometVisu/trunk/visu/visu_config.xml
===================================================================
--- CometVisu/trunk/visu/visu_config.xml 2011-06-25 13:42:59 UTC (rev 374)
+++ CometVisu/trunk/visu/visu_config.xml 2011-06-26 09:03:25 UTC (rev 375)
@@ -10,7 +10,7 @@
<statusbar>
<status type="html"><![CDATA[
<img src="icon/comet_64_ff8000.png" alt="CometVisu" /> by <a href="http://www.cometvisu.org/">CometVisu.org</a>
- - <a href=".">Reload</a>
+ - <a href=".?forceReload=true">Reload</a>
- <a href="?config=demo">Widget Demo</a>
]]></status>
<status type="html" condition="!edit" hrefextend="config"><![CDATA[
Modified: CometVisu/trunk/visu/visu_config_demo.xml
===================================================================
--- CometVisu/trunk/visu/visu_config_demo.xml 2011-06-25 13:42:59 UTC (rev 374)
+++ CometVisu/trunk/visu/visu_config_demo.xml 2011-06-26 09:03:25 UTC (rev 375)
@@ -45,7 +45,7 @@
<statusbar>
<status type="html"><![CDATA[
<img src="icon/comet_64_ff8000.png" alt="CometVisu" /> by <a href="http://www.cometvisu.org/">CometVisu.org</a>
- - <a href=".?config=demo">Reload</a>
+ - <a href=".?config=demo&forceReload=true">Reload</a>
- <a href=".">Default Config</a>
]]></status>
<status type="html" condition="!edit" hrefextend="config"><![CDATA[
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kle...@us...> - 2011-06-25 13:43:06
|
Revision: 374
http://openautomation.svn.sourceforge.net/openautomation/?rev=374&view=rev
Author: kleinklausi
Date: 2011-06-25 13:42:59 +0000 (Sat, 25 Jun 2011)
Log Message:
-----------
Renamed Rolladen-Automatik2.pl to RollladenAutomatik.pl
Added Paths:
-----------
wiregate/plugin/generic/RollladenAutomatik.pl
Removed Paths:
-------------
wiregate/plugin/generic/Rolladen-Automatik2.pl
Deleted: wiregate/plugin/generic/Rolladen-Automatik2.pl
===================================================================
--- wiregate/plugin/generic/Rolladen-Automatik2.pl 2011-06-25 13:39:10 UTC (rev 373)
+++ wiregate/plugin/generic/Rolladen-Automatik2.pl 2011-06-25 13:42:59 UTC (rev 374)
@@ -1,224 +0,0 @@
-######################################################################################
-#
-# Plugin RollladenAutomatik
-# V0.5 2011-06-10
-# Ben\xF6tigt: libastro-satpass-perl -> 'apt-get install libastro-satpass-perl'
-#
-# Ein Wiregate Plugin zum automatischen Fahren der Rolll\xE4den. Es berechnet unter Anderem
-# den Stand der Sonne und f\xE4hrt je nach Winkel der Sonne zum Fenster, den Rollladen in
-# eine Beschattungsposition. Folgende Funktionen werden unterst\xFCtzt:
-# - Sonnenstand (Azimuth)
-# - Anfangs- und Endwinkel (Azimuth) ab dem das Fenster beschienen wird
-# - Globale Sperre duch eine Gruppenadresse
-# - Sperre eines einzelnen Rollladens durch eine Gruppenadresse
-# - Fahren des Rollladen zu (1) oder auf (0) oder Positionsfahren mit Prozentwert
-# - Zufahren bei Dunkelheit am Abend und Hell am Morgen
-# - Bugfix f\xFCr Busch-J\xE4ger USB Schnittstelle (muss eingeschaltet werden)
-#
-# TODO: Was teilweise integriert ist aber noch nicht komplett ist:
-# - Nur zufahren, wenn es im Raum warm genug ist
-# - Wetterstation einbinden: Helligkeit, Sonnenschein, D\xE4mmerung
-# - Bei Fensterdefinition auch Elevation oben bzw. unten angeben
-# - Jalousie Lamellenf\xFChrung
-# - Vorwarnpositionsfahrten?
-# - Englisch oder Deutsch?
-# - Au\xDFentemperaur
-######################################################################################
-
-
-#########################
-### BEGINN DEFINITION ###
-#########################
-
-# Die Koordinaten des Hauses. Sehr einfach \xFCber http://www.getlatlon.com/ zu ermitteln.
-# Und die H\xF6he \xFCber NN
-my ($lat, $lon, $elev) = (
- 49.02917390736781, # Breitengrad in Grad
- 8.570709228515625, # L\xE4ngengrad in Grad
- 180 / 1000 # H\xF6he \xFCber NN in Kilometer (dewegen geteilt durch 1000)
- );
-
-# Elevation der Sonne, ab der es abends dunkel ist bzw. morgens hell ist.
-# B\xFCrgerliche D\xE4mmerung ist bei -6 Grad.
-my $daemmerung = -3;
-
-# Gruppenadresse, \xFCber welche die komplette Automatik f\xFCr alle Rolll\xE4den gesperrt werden kann
-my $GASperreAlle = "0/0/125";
-
-# Bugfix f\xFCr KNX-Schnittstellen die sich bei zu schneller Telegrammabfolge
-# verschlucken, und denen wir deshalb die Geschwindigkeit der Telegramme drosseln m\xFCssen
-# 0 = nicht anschalten (Telegramme mit voller Geschwindigkeit abfeuern)
-# 1 = anschalten (Telegramme um 20 millisekunden verz\xF6gern)
-# nur f\xFCr "Busch-J\xE4ger 6196 USB REG" ist bekannt das dies ben\xF6tigt wird
-my $bugfixSlowInterface = 0;
-
-# Ein Array von Hashes, wobei jeder Hash ein Rollladen/Fenster/Raum ist.
-my @AlleRolllaeden;
-# Name des Rolladen
-# name => "Speisekammer"
-# Winkel zum Norden, ab dem das Fenster beschienen wird.
-# Echter Osten = 90\xB0, echter S\xFCden = 180\xB0, echter Westen = 270\xB0, echter Norden = 0\xB0
-# winkel1 => 66
-# Winkel zum Norden, bis zu dem das Fenster beschienen wird
-# winkel2 => 186
-# Richtung bei Beschattung: wenn 1 wird DPT3 angenommen und ganz zugefahren.
-# Bei ungleich 1, wird DPT5 angenommen und Position angefahren
-# wertZuBesch => 1
-# Richtung bei keiner Beschattung: wenn 0 wird DPT3 angenommen und ganz aufgefahren.
-# Bei ungleich 0, wird DPT5 angenommen und Position angefahren
-# wertAufBesch => 0
-# Richtung bei Nacht: wenn 1 wird DPT3 angenommen und ganz zugefahren.
-# Bei ungleich 1, wird DPT5 angenommen und Position angefahren
-# wertZuNacht => 1
-# Richtung bei keiner Nacht: wenn 0 wird DPT3 angenommen und ganz aufgefahren.
-# Bei ungleich 0, wird DPT5 angenommen und Position angefahren
-# wertAufNacht => 0
-# Ob der Rollladen in die Automatik f\xFCr Sonnenauf- und untergang einbezogen werden soll
-# sonnenAufUnter => 1
-# Raum-Solltemperatur, wenn keine GA angegeben wurde oder kein Wert vom Bus gelesen wurde
-# raumSollTemp => 22
-# GA der Raum-Solltemperatur
-# GAraumsollTemp => "0/0/127"
-# GA der Raum-Isttemperatur
-# GAraumIstTemp => "0/0/128"
-# GA um Rollladen zu fahren TODO:Sollte man hier mehrere GAs angeben k\xF6nnen?
-# GAfahren => "0/0/126"
-# GA um die Automatik dieses einen Rollladen zu sperren
-# GAsperre=> "0/0/129"
-push @AlleRolllaeden, { name => "Speisekammer", winkel1 => 66, winkel2 => 186, wertZuBesch => 1, wertAufBesch => 0,
- wertZuNacht => 1, wertAufNacht => 0, sonnenAufUnter => 1, raumSollTemp => 22, GAraumSollTemp => "0/0/127",
- GAraumIstTemp => "0/0/128", GAfahren => "2/1/11", GAsperre => "0/0/129" };
-push @AlleRolllaeden, { name => "K\xFCche", winkel1 => 194, winkel2 => 294, wertZuBesch => 80, wertAufBesch => 2,
- wertZuNacht => 100, wertAufNacht => 2, sonnenAufUnter => 1, raumSollTemp => 22, GAraumSollTemp => "0/0/127",
- GAraumIstTemp => "0/0/128", GAfahren => "2/2/3", GAsperre => "0/0/129" };
-push @AlleRolllaeden, { name => "Kind Strasse", winkel1 => 182, winkel2 => 294, wertZuBesch => 86, wertAufBesch => 2,
- wertZuNacht => 100, wertAufNacht => 2, sonnenAufUnter => 0, raumSollTemp => 22, GAraumSollTemp => "0/0/127",
- GAraumIstTemp => "0/0/128", GAfahren => "2/3/13", GAsperre => "0/0/129" };
-push @AlleRolllaeden, { name => "Kind Friedhof", winkel1 => 182, winkel2 => 294, wertZuBesch => 86, wertAufBesch => 2,
- wertZuNacht => 100, wertAufNacht => 2, sonnenAufUnter => 0, raumSollTemp => 22, GAraumSollTemp => "0/0/127",
- GAraumIstTemp => "0/0/128", GAfahren => "2/3/23", GAsperre => "0/0/129" };
-push @AlleRolllaeden, { name => "Schlafen", winkel1 => 359, winkel2 => 359, wertZuBesch => 82, wertAufBesch => 2,
- wertZuNacht => 100, wertAufNacht => 2, sonnenAufUnter => 0, raumSollTemp => 22, GAraumSollTemp => "0/0/127",
- GAraumIstTemp => "0/0/128", GAfahren => "2/3/3", GAsperre => "0/0/129" };
-
-#######################
-### ENDE DEFINITION ###
-#######################
-
-
-# Festlegen, dass das Plugin alle 5 Minuten laufen soll
-$plugin_info{$plugname.'_cycle'} = 300;
-
-# Auf die GA der globalen Sperre anmelden
-#TODO: muss man sich \xFCberhaupt auf die GA anmelden. Sollte doch reichen wenn man den letzten Stand liest...
-$plugin_subscribe{$GASperreAlle}{$plugname} = 1;
-# Fals global gesperrt, Plugin-Durchgang beenden
-if (knx_read($GASperreAlle, 0, 1) == 1) {
- return "Global gesperrt";
-}
-
-# Sonnenstands-Berechnungen durchf\xFChren
-my ($azimuth, $elevation) = berechneSonnenstand($lat, $lon, $elev);
-# Auslesen wo die Sonne beim letzten Durchgang war
-my $lastAzimuth = $plugin_info{$plugname.'_lastAzimuth'};
-my $lastElevation = $plugin_info{$plugname.'_lastElevation'};
-
-# Teste ob es Nacht ist, oder gerade Abend- oder Morgend\xE4mmerung ist
-my $testAbendDaemmerung = ($elevation < deg2rad($daemmerung) && $lastElevation > deg2rad($daemmerung)) || 0;
-my $testMorgenDaemmerung = ($elevation > deg2rad($daemmerung) && $lastElevation < deg2rad($daemmerung)) || 0;
-my $testNacht = ($elevation < deg2rad($daemmerung)) || 0;
-# Los gehts. Jeden Rolladen/Fenster/Raum abarbeiten.
-foreach my $element (@AlleRolllaeden) {
- # Falls gesperrt, mit n\xE4chstem Rollladen fortfahren
- if (knx_read($element->{GAsperre}, 0, 1) == 1) {
- next;
- }
- # Die Einfallwinkel in Radians umrechnen
- my $winkel1 = deg2rad($element->{winkel1});
- my $winkel2 = deg2rad($element->{winkel2});
-
- # Teste ob das Fenster beschienen wird
- my $testAktuellBeschienen = ($azimuth > $winkel1 && $azimuth < $winkel2) || 0;
- my $testVoherBeschienen = ($lastAzimuth > $winkel1 && $lastAzimuth < $winkel2) || 0;
-
- # Fenster war nicht beschienen, ist jetzt beschienen, keine Nacht
- if (!$testVoherBeschienen && $testAktuellBeschienen && !$testNacht) {
- fahreRollladen($element->{wertZuBesch}, $element->{GAfahren});
- plugin_log($plugname,"Name: " . $element->{name} . "; Wegen Sonne zufahren bei: " . round(rad2deg($azimuth)));
- }
- # Fenster ist nicht beschienen, war beschienen, keine Nacht
- if ($testVoherBeschienen && !$testAktuellBeschienen && !$testNacht) {
- fahreRollladen($element->{wertAufBesch}, $element->{GAfahren});
- plugin_log($plugname,"Name: " . $element->{name} . "; Wegen Sonne auffahren bei: " . round(rad2deg($azimuth)));
- }
- # AbendDaemmerung
- if ($testAbendDaemmerung && $element->{sonnenAufUnter}) {
- fahreRollladen($element->{wertZuNacht}, $element->{GAfahren});
- plugin_log($plugname,"Name: " . $element->{name} . "; Wegen Abenddaemmerung zufahren bei: " . round(rad2deg($azimuth)));
- }
- # MorgenDaemmerung
- if ($testMorgenDaemmerung && $element->{sonnenAufUnter}) {
- fahreRollladen($element->{wertAufNacht}, $element->{GAfahren});
- plugin_log($plugname,"Name: " . $element->{name} . "; Wegen Morgendaemmerung auffahren bei: " . round(rad2deg($azimuth)));
- }
-}
-
-# F\xFCr die n\xE4chste Iteration den aktuellen Sonnenstand merken
-# TODO: M\xFCsste man sich nicht eigentlich f\xFCr jedes Element den Zustand merken, ob es auf- oder zugefahren wurde???
-# lastAzimuth ging noch als nur der Sonnenstand entscheidend war, ob gefahren wird. Jetzt aber auch lokale Sperre,
-# IstTemperatur, Sonnenschein.
-$plugin_info{$plugname.'_lastAzimuth'} = $azimuth;
-$plugin_info{$plugname.'_lastElevation'} = $elevation;
-# Ende
-return "Grad gegen Norden: " . round(rad2deg($azimuth)) . "; Grad ueber Horizont: " . round(rad2deg($elevation));
-
-
-####################################################
-# Aufruf mit berechneSonnenstand($lat, $lon, $elev);
-####################################################
-sub berechneSonnenstand {
- # Module laden
- use Astro::Coord::ECI;
- use Astro::Coord::ECI::Sun;
- use Astro::Coord::ECI::TLE;
- use Astro::Coord::ECI::Utils qw{rad2deg deg2rad};
- # Aktuelle Zeit
- my $time = time ();
- # Die eigenen Koordinaten
- my $loc = Astro::Coord::ECI->geodetic(deg2rad(shift), deg2rad(shift), shift);
- # Sonne instanzieren
- my $sun = Astro::Coord::ECI::Sun->universal($time);
- # Feststellen wo die Sonne gerade ist
- my ($azimuth, $elevation, $range) = $loc->azel($sun);
- return ($azimuth, $elevation);
-
-
-}
-
-
-####################################################
-# Aufruf mit fahreRollladen($richtung, $GA);
-####################################################
-sub fahreRollladen {
- # Falls $richtung 0 oder 1 ist, wird angenommen, dass der Rollladen
- # komplett zu- bzw. aufgefahren werden soll (DPT3).
- # Bei $richtung>1 wird angenommen, dass eine Positionsfahrt
- # durchgef\xFChrt werden soll (DPT5).
- # TODO: man muss bei Positionsfahrt f\xFCr den Offen-Zustand mindestens 2% angeben...
- # hm, wenn man die GAs ins Wiregate importiert hat, br\xE4uchte man keinerlei
- # Unterscheidung mehr! Und man kann auch 0% bzw 1% benutzen
- my ($richtung, $GA) = @_;
- if ($richtung == 0 || $richtung == 1) {
- # Auf/Zu fahren
- knx_write($GA,$richtung,3);
- }
- else {
- # Position anfahren
- knx_write($GA,$richtung,5);
- }
- # kurze Pause, falls das benutzte Interface das braucht...
- if ($bugfixSlowInterface) {
- usleep(20000);
- }
-}
-
Copied: wiregate/plugin/generic/RollladenAutomatik.pl (from rev 373, wiregate/plugin/generic/Rolladen-Automatik2.pl)
===================================================================
--- wiregate/plugin/generic/RollladenAutomatik.pl (rev 0)
+++ wiregate/plugin/generic/RollladenAutomatik.pl 2011-06-25 13:42:59 UTC (rev 374)
@@ -0,0 +1,224 @@
+######################################################################################
+#
+# Plugin RollladenAutomatik
+# V0.5 2011-06-10
+# Ben\xF6tigt: libastro-satpass-perl -> 'apt-get install libastro-satpass-perl'
+#
+# Ein Wiregate Plugin zum automatischen Fahren der Rolll\xE4den. Es berechnet unter Anderem
+# den Stand der Sonne und f\xE4hrt je nach Winkel der Sonne zum Fenster, den Rollladen in
+# eine Beschattungsposition. Folgende Funktionen werden unterst\xFCtzt:
+# - Sonnenstand (Azimuth)
+# - Anfangs- und Endwinkel (Azimuth) ab dem das Fenster beschienen wird
+# - Globale Sperre duch eine Gruppenadresse
+# - Sperre eines einzelnen Rollladens durch eine Gruppenadresse
+# - Fahren des Rollladen zu (1) oder auf (0) oder Positionsfahren mit Prozentwert
+# - Zufahren bei Dunkelheit am Abend und Hell am Morgen
+# - Bugfix f\xFCr Busch-J\xE4ger USB Schnittstelle (muss eingeschaltet werden)
+#
+# TODO: Was teilweise integriert ist aber noch nicht komplett ist:
+# - Nur zufahren, wenn es im Raum warm genug ist
+# - Wetterstation einbinden: Helligkeit, Sonnenschein, D\xE4mmerung
+# - Bei Fensterdefinition auch Elevation oben bzw. unten angeben
+# - Jalousie Lamellenf\xFChrung
+# - Vorwarnpositionsfahrten?
+# - Englisch oder Deutsch?
+# - Au\xDFentemperaur
+######################################################################################
+
+
+#########################
+### BEGINN DEFINITION ###
+#########################
+
+# Die Koordinaten des Hauses. Sehr einfach \xFCber http://www.getlatlon.com/ zu ermitteln.
+# Und die H\xF6he \xFCber NN
+my ($lat, $lon, $elev) = (
+ 49.02917390736781, # Breitengrad in Grad
+ 8.570709228515625, # L\xE4ngengrad in Grad
+ 180 / 1000 # H\xF6he \xFCber NN in Kilometer (dewegen geteilt durch 1000)
+ );
+
+# Elevation der Sonne, ab der es abends dunkel ist bzw. morgens hell ist.
+# B\xFCrgerliche D\xE4mmerung ist bei -6 Grad.
+my $daemmerung = -3;
+
+# Gruppenadresse, \xFCber welche die komplette Automatik f\xFCr alle Rolll\xE4den gesperrt werden kann
+my $GASperreAlle = "0/0/125";
+
+# Bugfix f\xFCr KNX-Schnittstellen die sich bei zu schneller Telegrammabfolge
+# verschlucken, und denen wir deshalb die Geschwindigkeit der Telegramme drosseln m\xFCssen
+# 0 = nicht anschalten (Telegramme mit voller Geschwindigkeit abfeuern)
+# 1 = anschalten (Telegramme um 20 millisekunden verz\xF6gern)
+# nur f\xFCr "Busch-J\xE4ger 6196 USB REG" ist bekannt das dies ben\xF6tigt wird
+my $bugfixSlowInterface = 0;
+
+# Ein Array von Hashes, wobei jeder Hash ein Rollladen/Fenster/Raum ist.
+my @AlleRolllaeden;
+# Name des Rolladen
+# name => "Speisekammer"
+# Winkel zum Norden, ab dem das Fenster beschienen wird.
+# Echter Osten = 90\xB0, echter S\xFCden = 180\xB0, echter Westen = 270\xB0, echter Norden = 0\xB0
+# winkel1 => 66
+# Winkel zum Norden, bis zu dem das Fenster beschienen wird
+# winkel2 => 186
+# Richtung bei Beschattung: wenn 1 wird DPT3 angenommen und ganz zugefahren.
+# Bei ungleich 1, wird DPT5 angenommen und Position angefahren
+# wertZuBesch => 1
+# Richtung bei keiner Beschattung: wenn 0 wird DPT3 angenommen und ganz aufgefahren.
+# Bei ungleich 0, wird DPT5 angenommen und Position angefahren
+# wertAufBesch => 0
+# Richtung bei Nacht: wenn 1 wird DPT3 angenommen und ganz zugefahren.
+# Bei ungleich 1, wird DPT5 angenommen und Position angefahren
+# wertZuNacht => 1
+# Richtung bei keiner Nacht: wenn 0 wird DPT3 angenommen und ganz aufgefahren.
+# Bei ungleich 0, wird DPT5 angenommen und Position angefahren
+# wertAufNacht => 0
+# Ob der Rollladen in die Automatik f\xFCr Sonnenauf- und untergang einbezogen werden soll
+# sonnenAufUnter => 1
+# Raum-Solltemperatur, wenn keine GA angegeben wurde oder kein Wert vom Bus gelesen wurde
+# raumSollTemp => 22
+# GA der Raum-Solltemperatur
+# GAraumsollTemp => "0/0/127"
+# GA der Raum-Isttemperatur
+# GAraumIstTemp => "0/0/128"
+# GA um Rollladen zu fahren TODO:Sollte man hier mehrere GAs angeben k\xF6nnen?
+# GAfahren => "0/0/126"
+# GA um die Automatik dieses einen Rollladen zu sperren
+# GAsperre=> "0/0/129"
+push @AlleRolllaeden, { name => "Speisekammer", winkel1 => 66, winkel2 => 186, wertZuBesch => 1, wertAufBesch => 0,
+ wertZuNacht => 1, wertAufNacht => 0, sonnenAufUnter => 1, raumSollTemp => 22, GAraumSollTemp => "0/0/127",
+ GAraumIstTemp => "0/0/128", GAfahren => "2/1/11", GAsperre => "0/0/129" };
+push @AlleRolllaeden, { name => "K\xFCche", winkel1 => 194, winkel2 => 294, wertZuBesch => 80, wertAufBesch => 2,
+ wertZuNacht => 100, wertAufNacht => 2, sonnenAufUnter => 1, raumSollTemp => 22, GAraumSollTemp => "0/0/127",
+ GAraumIstTemp => "0/0/128", GAfahren => "2/2/3", GAsperre => "0/0/129" };
+push @AlleRolllaeden, { name => "Kind Strasse", winkel1 => 182, winkel2 => 294, wertZuBesch => 86, wertAufBesch => 2,
+ wertZuNacht => 100, wertAufNacht => 2, sonnenAufUnter => 0, raumSollTemp => 22, GAraumSollTemp => "0/0/127",
+ GAraumIstTemp => "0/0/128", GAfahren => "2/3/13", GAsperre => "0/0/129" };
+push @AlleRolllaeden, { name => "Kind Friedhof", winkel1 => 182, winkel2 => 294, wertZuBesch => 86, wertAufBesch => 2,
+ wertZuNacht => 100, wertAufNacht => 2, sonnenAufUnter => 0, raumSollTemp => 22, GAraumSollTemp => "0/0/127",
+ GAraumIstTemp => "0/0/128", GAfahren => "2/3/23", GAsperre => "0/0/129" };
+push @AlleRolllaeden, { name => "Schlafen", winkel1 => 359, winkel2 => 359, wertZuBesch => 82, wertAufBesch => 2,
+ wertZuNacht => 100, wertAufNacht => 2, sonnenAufUnter => 0, raumSollTemp => 22, GAraumSollTemp => "0/0/127",
+ GAraumIstTemp => "0/0/128", GAfahren => "2/3/3", GAsperre => "0/0/129" };
+
+#######################
+### ENDE DEFINITION ###
+#######################
+
+
+# Festlegen, dass das Plugin alle 5 Minuten laufen soll
+$plugin_info{$plugname.'_cycle'} = 300;
+
+# Auf die GA der globalen Sperre anmelden
+#TODO: muss man sich \xFCberhaupt auf die GA anmelden. Sollte doch reichen wenn man den letzten Stand liest...
+$plugin_subscribe{$GASperreAlle}{$plugname} = 1;
+# Fals global gesperrt, Plugin-Durchgang beenden
+if (knx_read($GASperreAlle, 0, 1) == 1) {
+ return "Global gesperrt";
+}
+
+# Sonnenstands-Berechnungen durchf\xFChren
+my ($azimuth, $elevation) = berechneSonnenstand($lat, $lon, $elev);
+# Auslesen wo die Sonne beim letzten Durchgang war
+my $lastAzimuth = $plugin_info{$plugname.'_lastAzimuth'};
+my $lastElevation = $plugin_info{$plugname.'_lastElevation'};
+
+# Teste ob es Nacht ist, oder gerade Abend- oder Morgend\xE4mmerung ist
+my $testAbendDaemmerung = ($elevation < deg2rad($daemmerung) && $lastElevation > deg2rad($daemmerung)) || 0;
+my $testMorgenDaemmerung = ($elevation > deg2rad($daemmerung) && $lastElevation < deg2rad($daemmerung)) || 0;
+my $testNacht = ($elevation < deg2rad($daemmerung)) || 0;
+# Los gehts. Jeden Rolladen/Fenster/Raum abarbeiten.
+foreach my $element (@AlleRolllaeden) {
+ # Falls gesperrt, mit n\xE4chstem Rollladen fortfahren
+ if (knx_read($element->{GAsperre}, 0, 1) == 1) {
+ next;
+ }
+ # Die Einfallwinkel in Radians umrechnen
+ my $winkel1 = deg2rad($element->{winkel1});
+ my $winkel2 = deg2rad($element->{winkel2});
+
+ # Teste ob das Fenster beschienen wird
+ my $testAktuellBeschienen = ($azimuth > $winkel1 && $azimuth < $winkel2) || 0;
+ my $testVoherBeschienen = ($lastAzimuth > $winkel1 && $lastAzimuth < $winkel2) || 0;
+
+ # Fenster war nicht beschienen, ist jetzt beschienen, keine Nacht
+ if (!$testVoherBeschienen && $testAktuellBeschienen && !$testNacht) {
+ fahreRollladen($element->{wertZuBesch}, $element->{GAfahren});
+ plugin_log($plugname,"Name: " . $element->{name} . "; Wegen Sonne zufahren bei: " . round(rad2deg($azimuth)));
+ }
+ # Fenster ist nicht beschienen, war beschienen, keine Nacht
+ if ($testVoherBeschienen && !$testAktuellBeschienen && !$testNacht) {
+ fahreRollladen($element->{wertAufBesch}, $element->{GAfahren});
+ plugin_log($plugname,"Name: " . $element->{name} . "; Wegen Sonne auffahren bei: " . round(rad2deg($azimuth)));
+ }
+ # AbendDaemmerung
+ if ($testAbendDaemmerung && $element->{sonnenAufUnter}) {
+ fahreRollladen($element->{wertZuNacht}, $element->{GAfahren});
+ plugin_log($plugname,"Name: " . $element->{name} . "; Wegen Abenddaemmerung zufahren bei: " . round(rad2deg($azimuth)));
+ }
+ # MorgenDaemmerung
+ if ($testMorgenDaemmerung && $element->{sonnenAufUnter}) {
+ fahreRollladen($element->{wertAufNacht}, $element->{GAfahren});
+ plugin_log($plugname,"Name: " . $element->{name} . "; Wegen Morgendaemmerung auffahren bei: " . round(rad2deg($azimuth)));
+ }
+}
+
+# F\xFCr die n\xE4chste Iteration den aktuellen Sonnenstand merken
+# TODO: M\xFCsste man sich nicht eigentlich f\xFCr jedes Element den Zustand merken, ob es auf- oder zugefahren wurde???
+# lastAzimuth ging noch als nur der Sonnenstand entscheidend war, ob gefahren wird. Jetzt aber auch lokale Sperre,
+# IstTemperatur, Sonnenschein.
+$plugin_info{$plugname.'_lastAzimuth'} = $azimuth;
+$plugin_info{$plugname.'_lastElevation'} = $elevation;
+# Ende
+return "Grad gegen Norden: " . round(rad2deg($azimuth)) . "; Grad ueber Horizont: " . round(rad2deg($elevation));
+
+
+####################################################
+# Aufruf mit berechneSonnenstand($lat, $lon, $elev);
+####################################################
+sub berechneSonnenstand {
+ # Module laden
+ use Astro::Coord::ECI;
+ use Astro::Coord::ECI::Sun;
+ use Astro::Coord::ECI::TLE;
+ use Astro::Coord::ECI::Utils qw{rad2deg deg2rad};
+ # Aktuelle Zeit
+ my $time = time ();
+ # Die eigenen Koordinaten
+ my $loc = Astro::Coord::ECI->geodetic(deg2rad(shift), deg2rad(shift), shift);
+ # Sonne instanzieren
+ my $sun = Astro::Coord::ECI::Sun->universal($time);
+ # Feststellen wo die Sonne gerade ist
+ my ($azimuth, $elevation, $range) = $loc->azel($sun);
+ return ($azimuth, $elevation);
+
+
+}
+
+
+####################################################
+# Aufruf mit fahreRollladen($richtung, $GA);
+####################################################
+sub fahreRollladen {
+ # Falls $richtung 0 oder 1 ist, wird angenommen, dass der Rollladen
+ # komplett zu- bzw. aufgefahren werden soll (DPT3).
+ # Bei $richtung>1 wird angenommen, dass eine Positionsfahrt
+ # durchgef\xFChrt werden soll (DPT5).
+ # TODO: man muss bei Positionsfahrt f\xFCr den Offen-Zustand mindestens 2% angeben...
+ # hm, wenn man die GAs ins Wiregate importiert hat, br\xE4uchte man keinerlei
+ # Unterscheidung mehr! Und man kann auch 0% bzw 1% benutzen
+ my ($richtung, $GA) = @_;
+ if ($richtung == 0 || $richtung == 1) {
+ # Auf/Zu fahren
+ knx_write($GA,$richtung,3);
+ }
+ else {
+ # Position anfahren
+ knx_write($GA,$richtung,5);
+ }
+ # kurze Pause, falls das benutzte Interface das braucht...
+ if ($bugfixSlowInterface) {
+ usleep(20000);
+ }
+}
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kle...@us...> - 2011-06-25 13:39:17
|
Revision: 373
http://openautomation.svn.sourceforge.net/openautomation/?rev=373&view=rev
Author: kleinklausi
Date: 2011-06-25 13:39:10 +0000 (Sat, 25 Jun 2011)
Log Message:
-----------
v0.5 Beschattung und D?\195?\164mmerung funktionieren
Modified Paths:
--------------
wiregate/plugin/generic/Rolladen-Automatik2.pl
Modified: wiregate/plugin/generic/Rolladen-Automatik2.pl
===================================================================
--- wiregate/plugin/generic/Rolladen-Automatik2.pl 2011-06-25 08:23:03 UTC (rev 372)
+++ wiregate/plugin/generic/Rolladen-Automatik2.pl 2011-06-25 13:39:10 UTC (rev 373)
@@ -1,196 +1,224 @@
-######################################################################################
-#
-# Plugin RollladenAutomatik
-# V0.2 2011-05-30
-# Benötigt: libastro-satpass-perl
-#
-# Ein Wiregate Plugin zum automatischen Fahren der Rollläden. Es berechnet unter Anderem
-# den Stand der Sonne und fährt je nach Winkel der Sonne zum Fenster, den Rollladen in
-# eine Beschattungsposition. Folgende Funktionen werden unterstützt:
-# - Sonnenstand (Azimuth)
-# - Anfangs- und Endwinkel (Azimuth) ab dem das Fenster beschienen wird
-# - Globale Sperre duch eine Gruppenadresse
-# - Sperre eines einzelnen Rollladens durch eine Gruppenadresse
-# - Fahren des Rollladen zu (1) oder auf (0) oder Positionsfahren mit Prozentwert
-# - Bugfix für Busch-Jäger USB Schnittstelle (muss eingeschaltet werden)
-#
-# TODO: Was teilweise integriert ist aber noch nicht komplett ist:
-# - Zufahren bei Dunkelheit am Abend und Hell am Morgen
-# - Nur zufahren, wenn es im Raum warm genug ist
-# - Wetterstation einbinden: Helligkeit, Sonnenschein, Dämmerung
-# - Bei Fensterdefinition auch Elevation oben bzw. unten angeben
-# - Jalousie Lamellenführung
-# - Vorwarnpositionsfahrten?
-# - Englisch oder Deutsch?
-# - Aussentemperatur: im Winter ist es draussen kalt :-)
-#
-######################################################################################
-
-
-#########################
-### BEGINN DEFINITION ###
-#########################
-
-# Die Koordinaten des Hauses. Sehr einfach über http://www.getlatlon.com/ zu ermitteln.
-# Und die Höhe über NN
-my ($lat, $lon, $elev) = (
- 49.02917390736781, # Breitengrad in Grad
- 8.570709228515625, # Längengrad in Grad
- 180 / 1000 # Höhe über NN in Kilometer (dewegen geteilt durch 1000)
- );
-
-# Gruppenadresse, über welche die komplette Automatik für alle Rollläden gesperrt werden kann
-my $GASperreAlle = "0/0/125";
-
-# Bugfix für KNX-Schnittstellen die sich bei zu schneller Telegrammabfolge
-# verschlucken, und denen wir deshalb die Geschwindigkeit der Telegramme drosseln müssen
-# 0 = nicht anschalten (Telegramme mit voller Geschwindigkeit abfeuern)
-# 1 = anschalten (Telegramme um 20 millisekunden verzögern)
-# nur für "Busch-Jäger 6196 USB REG" ist bekannt das dies benötigt wird
-my $bugfixSlowInterface = 0;
-
-# Ein Array von Hashes, wobei jeder Hash ein Rollladen/Fenster/Raum ist.
-my @AlleRolllaeden;
-# Name des Rolladen
-# name => "Speisekammer"
-# Winkel zum Norden, ab dem das Fenster beschienen wird.
-# Echter Osten = 90°, echter Süden = 180°, echter Westen = 270°, echter Norden = 0°
-# winkel1 => 66
-# Winkel zum Norden, bis zu dem das Fenster beschienen wird
-# winkel2 => 186
-# Richtung bei Beschattung: wenn 1 wird DPT3 angenommen und ganz zugefahren.
-# Bei ungleich 1, wird DPT5 angenommen und Position angefahren
-# richtungZu => 1
-# Richtung bei keiner Beschattung: wenn 0 wird DPT3 angenommen und ganz aufgefahren.
-# Bei ungleich 0, wird DPT5 angenommen und Position angefahren
-# richtungAuf => 0
-# Ob der Rollladen in die Automatik für Sonnenauf- und untergang einbezogen werden soll
-# sonnenAufUnter => 1
-# Raum-Solltemperatur, wenn keine GA angegeben wurde oder kein Wert vom Bus gelesen wurde
-# raumSollTemp => 22
-# GA der Raum-Solltemperatur
-# GAraumsollTemp => "0/0/127"
-# GA der Raum-Isttemperatur
-# GAraumIstTemp => "0/0/128"
-# GA um Rollladen zu fahren TODO:Sollte man hier mehrere GAs angeben können?
-# GAfahren => "0/0/126"
-# GA um die Automatik dieses einen Rollladen zu sperren
-# GAsperre=> "0/0/129"
-push @AlleRolllaeden, { name => "Speisekammer", winkel1 => 66, winkel2 => 186, richtungZu => 1, richtungAuf => 0,
- sonnenAufUnter => 1, raumSollTemp => 22, GAraumSollTemp => "0/0/127", GAraumIstTemp => "0/0/128",
- GAfahren => "2/1/11", GAsperre => "0/0/129" };
-push @AlleRolllaeden, { name => "Kind Strasse", winkel1 => 182, winkel2 => 290, richtungZu => 86, richtungAuf => 2,
- sonnenAufUnter => 1, raumSollTemp => 22, GAraumSollTemp => "0/0/127", GAraumIstTemp => "0/0/128",
- GAfahren => "2/3/13", GAsperre => "0/0/129" };
-push @AlleRolllaeden, { name => "Küche", winkel1 => 194, winkel2 => 310, richtungZu => 80, richtungAuf => 2,
- sonnenAufUnter => 1, raumSollTemp => 22, GAraumSollTemp => "0/0/127", GAraumIstTemp => "0/0/128",
- GAfahren => "2/2/3", GAsperre => "0/0/129" };
-
-#######################
-### ENDE DEFINITION ###
-#######################
-
-
-# Festlegen, dass das Plugin alle 5 Minuten laufen soll
-$plugin_info{$plugname.'_cycle'} = 300;
-
-# Auf die GA der globalen Sperre anmelden
-#TODO: muss man sich überhaupt auf die GA anmelden. Sollte doch reichen wenn man den letzten Stand liest...
-$plugin_subscribe{$GASperreAlle}{$plugname} = 1;
-# Fals global gesperrt, Plugin-Durchgang beenden
-if (knx_read($GASperreAlle, 0, 1) == 1) {
- return "Global gesperrt";
-}
-
-# Sonnenstands-Berechnungen durchführen
-my ($azimuth, $elevation) = berechneSonnenstand($lat, $lon, $elev);
-# Auslesen wo die Sonne beim letzten Durchgang war
-my $lastAzimuth = $plugin_info{$plugname.'_lastAzimuth'};
-
-#berechneSonnenaufgang();
-#berechneSonnenuntergang();
-
-#Los gehts. Jeden Rolladen/Fenster/Raum abarbeiten.
-foreach my $element (@AlleRolllaeden) {
- # Falls gesperrt, mit nächstem Rollladen fortfahren
- if (knx_read($element->{GAsperre}, 0, 1) == 1) {
- next;
- }
- # Die Einfallwinkel in Radians umrechnen
- my $winkel1 = deg2rad($element->{winkel1});
- my $winkel2 = deg2rad($element->{winkel2});
-
- # Beachtet werden muss: Letzter Zustand; Sonnenstand; Tag oder Nacht; IstTemp;
- my $testAktuellBeschienen = ($azimuth > $winkel1 && $azimuth < $winkel2) || 0;
- my $testVoherBeschienen = ($lastAzimuth > $winkel1 && $lastAzimuth < $winkel2) || 0;
- my $testAbendDaemmerung;
- my $testMorgenDaemmerung;
-
- # Falls Rollladen in Offen-Position ist
- if (!$testVoherBeschienen && $testAktuellBeschienen) {
- fahreRollladen($element->{richtungZu}, $element->{GAfahren});
- plugin_log($plugname,"Name: " . $element->{name} . "; Zufahren bei: " . round(rad2deg($azimuth)));
- }
- # Falls Rollladen in Geschlossen-Position ist
- if ($testVoherBeschienen && !$testAktuellBeschienen) {
- fahreRollladen($element->{richtungAuf}, $element->{GAfahren});
- plugin_log($plugname,"Name: " . $element->{name} . "; Auffahren bei: " . round(rad2deg($azimuth)));
- }
-}
-
-# Für die nächste Iteration den aktuellen Sonnenstand merken
-# TODO: Müsste man sich nicht eigentlich für jedes Element den Zustand merken, ob es auf- oder zugefahren wurde???
-# lastAzimuth ging noch als nur der Sonnenstand entscheidend war, ob gefahren wird. Jetzt aber auch lokale Sperre,
-# IstTemperatur, Tag/Nacht etc.
-$plugin_info{$plugname.'_lastAzimuth'} = $azimuth;
-# Ende
-return "Grad gegen Norden: " . round(rad2deg($azimuth)) . "; Grad über Horizont: " . round(rad2deg($elevation));
-
-
-####################################################
-# Aufruf mit berechneSonnenstand($lat, $lon, $elev);
-####################################################
-sub berechneSonnenstand {
- # Module laden
- use Astro::Coord::ECI;
- use Astro::Coord::ECI::Sun;
- use Astro::Coord::ECI::TLE;
- use Astro::Coord::ECI::Utils qw{rad2deg deg2rad};
- # Aktuelle Zeit
- my $time = time ();
- # Die eigenen Koordinaten
- my $loc = Astro::Coord::ECI->geodetic(deg2rad(shift), deg2rad(shift), shift);
- # Sonne instanzieren
- my $sun = Astro::Coord::ECI::Sun->universal($time);
- # Feststellen wo die Sonne gerade ist
- my ($azimuth, $elevation, $range) = $loc->azel($sun);
- return ($azimuth, $elevation);
-}
-
-
-####################################################
-# Aufruf mit fahreRollladen($richtung, $GA);
-####################################################
-sub fahreRollladen {
- # Falls $richtung 0 oder 1 ist, wird angenommen, dass der Rollladen
- # komplett zu- bzw. aufgefahren werden soll (DPT3).
- # Bei $richtung>1 wird angenommen, dass eine Positionsfahrt
- # durchgeführt werden soll (DPT5).
- # TODO: man muss bei Positionsfahrt für den Offen-Zustand mindestens 2% angeben...
- # hm, wenn man die GAs ins Wiregate importiert hat, braucht man keinerlei
- # Unterscheidung mehr! Und man kann auch 0% bzw 1% benutzen
- my ($richtung, $GA) = @_;
- if ($richtung == 0 || $richtung == 1) {
- # Auf/Zu fahren
- knx_write($GA,$richtung,3);
- }
- else {
- # Position anfahren
- knx_write($GA,$richtung,5);
- }
- # kurze Pause, falls das benutzte Interface das braucht...
- if ($bugfixSlowInterface) {
- usleep(20000);
- }
-}
-
+######################################################################################
+#
+# Plugin RollladenAutomatik
+# V0.5 2011-06-10
+# Ben\xF6tigt: libastro-satpass-perl -> 'apt-get install libastro-satpass-perl'
+#
+# Ein Wiregate Plugin zum automatischen Fahren der Rolll\xE4den. Es berechnet unter Anderem
+# den Stand der Sonne und f\xE4hrt je nach Winkel der Sonne zum Fenster, den Rollladen in
+# eine Beschattungsposition. Folgende Funktionen werden unterst\xFCtzt:
+# - Sonnenstand (Azimuth)
+# - Anfangs- und Endwinkel (Azimuth) ab dem das Fenster beschienen wird
+# - Globale Sperre duch eine Gruppenadresse
+# - Sperre eines einzelnen Rollladens durch eine Gruppenadresse
+# - Fahren des Rollladen zu (1) oder auf (0) oder Positionsfahren mit Prozentwert
+# - Zufahren bei Dunkelheit am Abend und Hell am Morgen
+# - Bugfix f\xFCr Busch-J\xE4ger USB Schnittstelle (muss eingeschaltet werden)
+#
+# TODO: Was teilweise integriert ist aber noch nicht komplett ist:
+# - Nur zufahren, wenn es im Raum warm genug ist
+# - Wetterstation einbinden: Helligkeit, Sonnenschein, D\xE4mmerung
+# - Bei Fensterdefinition auch Elevation oben bzw. unten angeben
+# - Jalousie Lamellenf\xFChrung
+# - Vorwarnpositionsfahrten?
+# - Englisch oder Deutsch?
+# - Au\xDFentemperaur
+######################################################################################
+
+
+#########################
+### BEGINN DEFINITION ###
+#########################
+
+# Die Koordinaten des Hauses. Sehr einfach \xFCber http://www.getlatlon.com/ zu ermitteln.
+# Und die H\xF6he \xFCber NN
+my ($lat, $lon, $elev) = (
+ 49.02917390736781, # Breitengrad in Grad
+ 8.570709228515625, # L\xE4ngengrad in Grad
+ 180 / 1000 # H\xF6he \xFCber NN in Kilometer (dewegen geteilt durch 1000)
+ );
+
+# Elevation der Sonne, ab der es abends dunkel ist bzw. morgens hell ist.
+# B\xFCrgerliche D\xE4mmerung ist bei -6 Grad.
+my $daemmerung = -3;
+
+# Gruppenadresse, \xFCber welche die komplette Automatik f\xFCr alle Rolll\xE4den gesperrt werden kann
+my $GASperreAlle = "0/0/125";
+
+# Bugfix f\xFCr KNX-Schnittstellen die sich bei zu schneller Telegrammabfolge
+# verschlucken, und denen wir deshalb die Geschwindigkeit der Telegramme drosseln m\xFCssen
+# 0 = nicht anschalten (Telegramme mit voller Geschwindigkeit abfeuern)
+# 1 = anschalten (Telegramme um 20 millisekunden verz\xF6gern)
+# nur f\xFCr "Busch-J\xE4ger 6196 USB REG" ist bekannt das dies ben\xF6tigt wird
+my $bugfixSlowInterface = 0;
+
+# Ein Array von Hashes, wobei jeder Hash ein Rollladen/Fenster/Raum ist.
+my @AlleRolllaeden;
+# Name des Rolladen
+# name => "Speisekammer"
+# Winkel zum Norden, ab dem das Fenster beschienen wird.
+# Echter Osten = 90\xB0, echter S\xFCden = 180\xB0, echter Westen = 270\xB0, echter Norden = 0\xB0
+# winkel1 => 66
+# Winkel zum Norden, bis zu dem das Fenster beschienen wird
+# winkel2 => 186
+# Richtung bei Beschattung: wenn 1 wird DPT3 angenommen und ganz zugefahren.
+# Bei ungleich 1, wird DPT5 angenommen und Position angefahren
+# wertZuBesch => 1
+# Richtung bei keiner Beschattung: wenn 0 wird DPT3 angenommen und ganz aufgefahren.
+# Bei ungleich 0, wird DPT5 angenommen und Position angefahren
+# wertAufBesch => 0
+# Richtung bei Nacht: wenn 1 wird DPT3 angenommen und ganz zugefahren.
+# Bei ungleich 1, wird DPT5 angenommen und Position angefahren
+# wertZuNacht => 1
+# Richtung bei keiner Nacht: wenn 0 wird DPT3 angenommen und ganz aufgefahren.
+# Bei ungleich 0, wird DPT5 angenommen und Position angefahren
+# wertAufNacht => 0
+# Ob der Rollladen in die Automatik f\xFCr Sonnenauf- und untergang einbezogen werden soll
+# sonnenAufUnter => 1
+# Raum-Solltemperatur, wenn keine GA angegeben wurde oder kein Wert vom Bus gelesen wurde
+# raumSollTemp => 22
+# GA der Raum-Solltemperatur
+# GAraumsollTemp => "0/0/127"
+# GA der Raum-Isttemperatur
+# GAraumIstTemp => "0/0/128"
+# GA um Rollladen zu fahren TODO:Sollte man hier mehrere GAs angeben k\xF6nnen?
+# GAfahren => "0/0/126"
+# GA um die Automatik dieses einen Rollladen zu sperren
+# GAsperre=> "0/0/129"
+push @AlleRolllaeden, { name => "Speisekammer", winkel1 => 66, winkel2 => 186, wertZuBesch => 1, wertAufBesch => 0,
+ wertZuNacht => 1, wertAufNacht => 0, sonnenAufUnter => 1, raumSollTemp => 22, GAraumSollTemp => "0/0/127",
+ GAraumIstTemp => "0/0/128", GAfahren => "2/1/11", GAsperre => "0/0/129" };
+push @AlleRolllaeden, { name => "K\xFCche", winkel1 => 194, winkel2 => 294, wertZuBesch => 80, wertAufBesch => 2,
+ wertZuNacht => 100, wertAufNacht => 2, sonnenAufUnter => 1, raumSollTemp => 22, GAraumSollTemp => "0/0/127",
+ GAraumIstTemp => "0/0/128", GAfahren => "2/2/3", GAsperre => "0/0/129" };
+push @AlleRolllaeden, { name => "Kind Strasse", winkel1 => 182, winkel2 => 294, wertZuBesch => 86, wertAufBesch => 2,
+ wertZuNacht => 100, wertAufNacht => 2, sonnenAufUnter => 0, raumSollTemp => 22, GAraumSollTemp => "0/0/127",
+ GAraumIstTemp => "0/0/128", GAfahren => "2/3/13", GAsperre => "0/0/129" };
+push @AlleRolllaeden, { name => "Kind Friedhof", winkel1 => 182, winkel2 => 294, wertZuBesch => 86, wertAufBesch => 2,
+ wertZuNacht => 100, wertAufNacht => 2, sonnenAufUnter => 0, raumSollTemp => 22, GAraumSollTemp => "0/0/127",
+ GAraumIstTemp => "0/0/128", GAfahren => "2/3/23", GAsperre => "0/0/129" };
+push @AlleRolllaeden, { name => "Schlafen", winkel1 => 359, winkel2 => 359, wertZuBesch => 82, wertAufBesch => 2,
+ wertZuNacht => 100, wertAufNacht => 2, sonnenAufUnter => 0, raumSollTemp => 22, GAraumSollTemp => "0/0/127",
+ GAraumIstTemp => "0/0/128", GAfahren => "2/3/3", GAsperre => "0/0/129" };
+
+#######################
+### ENDE DEFINITION ###
+#######################
+
+
+# Festlegen, dass das Plugin alle 5 Minuten laufen soll
+$plugin_info{$plugname.'_cycle'} = 300;
+
+# Auf die GA der globalen Sperre anmelden
+#TODO: muss man sich \xFCberhaupt auf die GA anmelden. Sollte doch reichen wenn man den letzten Stand liest...
+$plugin_subscribe{$GASperreAlle}{$plugname} = 1;
+# Fals global gesperrt, Plugin-Durchgang beenden
+if (knx_read($GASperreAlle, 0, 1) == 1) {
+ return "Global gesperrt";
+}
+
+# Sonnenstands-Berechnungen durchf\xFChren
+my ($azimuth, $elevation) = berechneSonnenstand($lat, $lon, $elev);
+# Auslesen wo die Sonne beim letzten Durchgang war
+my $lastAzimuth = $plugin_info{$plugname.'_lastAzimuth'};
+my $lastElevation = $plugin_info{$plugname.'_lastElevation'};
+
+# Teste ob es Nacht ist, oder gerade Abend- oder Morgend\xE4mmerung ist
+my $testAbendDaemmerung = ($elevation < deg2rad($daemmerung) && $lastElevation > deg2rad($daemmerung)) || 0;
+my $testMorgenDaemmerung = ($elevation > deg2rad($daemmerung) && $lastElevation < deg2rad($daemmerung)) || 0;
+my $testNacht = ($elevation < deg2rad($daemmerung)) || 0;
+# Los gehts. Jeden Rolladen/Fenster/Raum abarbeiten.
+foreach my $element (@AlleRolllaeden) {
+ # Falls gesperrt, mit n\xE4chstem Rollladen fortfahren
+ if (knx_read($element->{GAsperre}, 0, 1) == 1) {
+ next;
+ }
+ # Die Einfallwinkel in Radians umrechnen
+ my $winkel1 = deg2rad($element->{winkel1});
+ my $winkel2 = deg2rad($element->{winkel2});
+
+ # Teste ob das Fenster beschienen wird
+ my $testAktuellBeschienen = ($azimuth > $winkel1 && $azimuth < $winkel2) || 0;
+ my $testVoherBeschienen = ($lastAzimuth > $winkel1 && $lastAzimuth < $winkel2) || 0;
+
+ # Fenster war nicht beschienen, ist jetzt beschienen, keine Nacht
+ if (!$testVoherBeschienen && $testAktuellBeschienen && !$testNacht) {
+ fahreRollladen($element->{wertZuBesch}, $element->{GAfahren});
+ plugin_log($plugname,"Name: " . $element->{name} . "; Wegen Sonne zufahren bei: " . round(rad2deg($azimuth)));
+ }
+ # Fenster ist nicht beschienen, war beschienen, keine Nacht
+ if ($testVoherBeschienen && !$testAktuellBeschienen && !$testNacht) {
+ fahreRollladen($element->{wertAufBesch}, $element->{GAfahren});
+ plugin_log($plugname,"Name: " . $element->{name} . "; Wegen Sonne auffahren bei: " . round(rad2deg($azimuth)));
+ }
+ # AbendDaemmerung
+ if ($testAbendDaemmerung && $element->{sonnenAufUnter}) {
+ fahreRollladen($element->{wertZuNacht}, $element->{GAfahren});
+ plugin_log($plugname,"Name: " . $element->{name} . "; Wegen Abenddaemmerung zufahren bei: " . round(rad2deg($azimuth)));
+ }
+ # MorgenDaemmerung
+ if ($testMorgenDaemmerung && $element->{sonnenAufUnter}) {
+ fahreRollladen($element->{wertAufNacht}, $element->{GAfahren});
+ plugin_log($plugname,"Name: " . $element->{name} . "; Wegen Morgendaemmerung auffahren bei: " . round(rad2deg($azimuth)));
+ }
+}
+
+# F\xFCr die n\xE4chste Iteration den aktuellen Sonnenstand merken
+# TODO: M\xFCsste man sich nicht eigentlich f\xFCr jedes Element den Zustand merken, ob es auf- oder zugefahren wurde???
+# lastAzimuth ging noch als nur der Sonnenstand entscheidend war, ob gefahren wird. Jetzt aber auch lokale Sperre,
+# IstTemperatur, Sonnenschein.
+$plugin_info{$plugname.'_lastAzimuth'} = $azimuth;
+$plugin_info{$plugname.'_lastElevation'} = $elevation;
+# Ende
+return "Grad gegen Norden: " . round(rad2deg($azimuth)) . "; Grad ueber Horizont: " . round(rad2deg($elevation));
+
+
+####################################################
+# Aufruf mit berechneSonnenstand($lat, $lon, $elev);
+####################################################
+sub berechneSonnenstand {
+ # Module laden
+ use Astro::Coord::ECI;
+ use Astro::Coord::ECI::Sun;
+ use Astro::Coord::ECI::TLE;
+ use Astro::Coord::ECI::Utils qw{rad2deg deg2rad};
+ # Aktuelle Zeit
+ my $time = time ();
+ # Die eigenen Koordinaten
+ my $loc = Astro::Coord::ECI->geodetic(deg2rad(shift), deg2rad(shift), shift);
+ # Sonne instanzieren
+ my $sun = Astro::Coord::ECI::Sun->universal($time);
+ # Feststellen wo die Sonne gerade ist
+ my ($azimuth, $elevation, $range) = $loc->azel($sun);
+ return ($azimuth, $elevation);
+
+
+}
+
+
+####################################################
+# Aufruf mit fahreRollladen($richtung, $GA);
+####################################################
+sub fahreRollladen {
+ # Falls $richtung 0 oder 1 ist, wird angenommen, dass der Rollladen
+ # komplett zu- bzw. aufgefahren werden soll (DPT3).
+ # Bei $richtung>1 wird angenommen, dass eine Positionsfahrt
+ # durchgef\xFChrt werden soll (DPT5).
+ # TODO: man muss bei Positionsfahrt f\xFCr den Offen-Zustand mindestens 2% angeben...
+ # hm, wenn man die GAs ins Wiregate importiert hat, br\xE4uchte man keinerlei
+ # Unterscheidung mehr! Und man kann auch 0% bzw 1% benutzen
+ my ($richtung, $GA) = @_;
+ if ($richtung == 0 || $richtung == 1) {
+ # Auf/Zu fahren
+ knx_write($GA,$richtung,3);
+ }
+ else {
+ # Position anfahren
+ knx_write($GA,$richtung,5);
+ }
+ # kurze Pause, falls das benutzte Interface das braucht...
+ if ($bugfixSlowInterface) {
+ usleep(20000);
+ }
+}
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sw...@us...> - 2011-06-25 08:23:09
|
Revision: 372
http://openautomation.svn.sourceforge.net/openautomation/?rev=372&view=rev
Author: swiss1
Date: 2011-06-25 08:23:03 +0000 (Sat, 25 Jun 2011)
Log Message:
-----------
Die Auswertung der aktuellen Lautst?\195?\164rke wurde erg?\195?\164nzt und kann nun als 14byte Text auf den BUS gesendet werden. Version 0.2 BETA
Modified Paths:
--------------
wiregate/plugin/generic/denon_steuerung_knx.pl
Modified: wiregate/plugin/generic/denon_steuerung_knx.pl
===================================================================
--- wiregate/plugin/generic/denon_steuerung_knx.pl 2011-06-24 21:26:40 UTC (rev 371)
+++ wiregate/plugin/generic/denon_steuerung_knx.pl 2011-06-25 08:23:03 UTC (rev 372)
@@ -1,5 +1,5 @@
-# Plugin zur Multimediasteuerung \xFCber einen 8fach Tastsensor
-# Version 0.1 20.06.2011 BETA
+# Plugin zur Multimediasteuerung \xFCber einen 8fach Tastsensor oder eine Visu
+# Version 0.2 23.06.2011 BETA
# Copyright: swiss (http://knx-user-forum.de/members/swiss.html)
# Die Vorlage f\xFCr die Daten\xFCbertragung via socat stammt von makki (http://knx-user-forum.de/members/makki.html)
# Aufbau m\xF6glichst so, dass man unterhalb der Einstellungen nichts ver\xE4ndern muss!
@@ -33,6 +33,8 @@
my $ga_status_mute = '9/5/8'; #Hier die R\xFCckmelde-GA f\xFCr die Statusled Stummschaltung eintragen (0=AUS, 1=EIN)
+my $ga_status_lautstaerke = '9/5/9'; #Hier wird die aktuelle Lautst\xE4rke als 14byte TEXT zur\xFCckgegeben (z.B. -35.5)
+
my $ga_umschalttaste = '9/1/5';
my $ga_status_umschalttaste = '9/1/14';
@@ -258,7 +260,30 @@
my $return_value = rueckmeldung_led();
return;
} elsif ($fn eq "MV" and $buf !~ /^MVMAX/) { # MVMAX is undocumented?
- # broken, just sends every 2, .5 isn't considered
+ # Hier wird die aktuelle Lautst\xE4rke aus der R\xFCckmeldung berechnet
+ $plugin_info{$plugname.'_debug_mv'} = $buf;
+ my $laenge = length($buf);
+ my $wert;
+
+ if ($laenge == 4){
+ $wert = substr($buf,2,2);
+ $wert = $wert."0";
+ }elsif ($laenge == 5){
+ $wert = substr($buf,2,3);
+ }
+
+ if ($wert ne ""){
+ if ($wert <= 800){
+ $wert = 800 - $wert;
+ $wert = "-".substr($wert,0,2).".".substr($wert,2,1);
+ } elsif ($wert == 995){
+ $wert = "-80.5";
+ } else {
+ $wert = "---.-";
+ }
+ knx_write($ga_status_lautstaerke,$wert,16); #Hier funktioniert etwas noch nicht ganz!
+ $plugin_info{$plugname.'_mv_vol'} = $wert;
+ }
return;
} else {
return;
@@ -282,7 +307,7 @@
syswrite($socket[$socknum],"SI?\r");
return;
-#Hier werden die Status LED der Quellenwahltasten angesteuert
+#Hier werden die Status LED's der Quellenwahltasten angesteuert
sub rueckmeldung_led{
SELECT:{
if ($plugin_info{$plugname.'_status_quelle'} == 0){ knx_write($ga_status_umschalttaste,0,1); knx_write($ga_status_kurzwahltaste1,0,1); knx_write($ga_status_kurzwahltaste2,0,1); knx_write($ga_status_kurzwahltaste3,0,1); knx_write($ga_status_kurzwahltaste4,0,1); last SELECT; }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2011-06-24 21:26:47
|
Revision: 371
http://openautomation.svn.sourceforge.net/openautomation/?rev=371&view=rev
Author: mayerch
Date: 2011-06-24 21:26:40 +0000 (Fri, 24 Jun 2011)
Log Message:
-----------
Refinement of the "pure" design
Modified Paths:
--------------
CometVisu/trunk/visu/designs/pure/basic.css
CometVisu/trunk/visu/edit_config.html
Modified: CometVisu/trunk/visu/designs/pure/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/pure/basic.css 2011-06-21 20:50:30 UTC (rev 370)
+++ CometVisu/trunk/visu/designs/pure/basic.css 2011-06-24 21:26:40 UTC (rev 371)
@@ -4,7 +4,7 @@
color: white;
font-family: Verdana, Helvetica, sans-serif;
font-family: 'URW Gothic L','Century Gothic','Apple Gothic',Arial,sans-serif;
- font-size: 6mm;
+ font-size: 5mm;
overflow: hidden;
margin:0;
-moz-user-select: none;
@@ -65,27 +65,40 @@
.widget
{
float:left;
- width:48%;
+ width:48%; /* dumb fallback */
+ width: -moz-calc(50% - 0.6em);
+ width: -webkit-calc(50% - 0.6em);
+ width: -o-calc(50% - 0.6em);
+ width: calc(50% - 0.6em);
margin:0.10em;
padding:0.1em;
/* border:yellow 1px solid; */
- border: 1px solid #444;
+ border: none;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
min-height: 2em;
}
+.editmode .widget
+{
+ border: 1px solid #444;
+}
+
.widget .widget
{
- width:98%;
+ width:98%; /* dumb fallback */
+ width: -moz-calc(100% - 0.6em);
+ width: -webkit-calc(100% - 0.6em);
+ width: -o-calc(100% - 0.6em);
+ width: calc(100% - 0.6em);
}
.widget .label,
.widget.info .actor,
.text > div,
.link > a {
- line-height: 2em;
+ padding: 5px;
}
.widget .label
@@ -151,6 +164,7 @@
color: #ff8000;
text-align: right;
width: 49%;
+ padding: 5px;
}
.page
@@ -176,7 +190,7 @@
border-style: solid;
border-width: 1px;
border-color: #fff #666 #666 #fff;
- padding: 5px;
+ padding: 3px;
width: 5em;
float: left;
-moz-border-radius: 5px;
@@ -186,13 +200,6 @@
.switchPressed
{
- border-top: 1px solid #666;
- border-left: 1px solid #666;
- border-right: 1px solid #ccc;
- border-bottom: 1px solid #ccc;
-}
-.switchPressed
-{
border-style: solid;
border-width: 1px;
border-color: #666 #fff #fff #666;
@@ -206,7 +213,7 @@
border-style: solid;
border-width: 1px;
border-color: #444 #666 #666 #444;
- padding: 5px;
+ padding: 3px;
width: 5em;
float: left;
-moz-border-radius: 5px;
Modified: CometVisu/trunk/visu/edit_config.html
===================================================================
--- CometVisu/trunk/visu/edit_config.html 2011-06-21 20:50:30 UTC (rev 370)
+++ CometVisu/trunk/visu/edit_config.html 2011-06-24 21:26:40 UTC (rev 371)
@@ -25,7 +25,7 @@
.loading { display: none; }
</style>
</head>
- <body>
+ <body class="editmode">
<div id="top" class="loading">
<div class="nav_path">-</div>
<hr />
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sw...@us...> - 2011-06-21 20:50:36
|
Revision: 370
http://openautomation.svn.sourceforge.net/openautomation/?rev=370&view=rev
Author: swiss1
Date: 2011-06-21 20:50:30 +0000 (Tue, 21 Jun 2011)
Log Message:
-----------
Diverse Kommentare hinzugef?\195?\188gt. Version 0.1 BETA
Modified Paths:
--------------
wiregate/plugin/generic/denon_steuerung_knx.pl
Modified: wiregate/plugin/generic/denon_steuerung_knx.pl
===================================================================
--- wiregate/plugin/generic/denon_steuerung_knx.pl 2011-06-21 20:05:06 UTC (rev 369)
+++ wiregate/plugin/generic/denon_steuerung_knx.pl 2011-06-21 20:50:30 UTC (rev 370)
@@ -28,8 +28,8 @@
my $ga_status_einaus = '9/5/30'; #Hier die R\xFCckmelde-GA f\xFCr die Statusled EIN/AUS eintragen (0=AUS, 1=EIN)
my $ga_lautstaerke = '9/5/4'; #Hier die GA f\xFCr MAINZONE leiser/lauter eintragen (0=leiser, 1=lauter)
-my $ga_main_lauter = '9/5/5';
-my $ga_main_leiser = '9/5/6';
+my $ga_main_lauter = '9/5/5'; #Hier die GA f\xFCr MAINZONE lauter eintragen (0=NICHTS, 1=lauter)
+my $ga_main_leiser = '9/5/6'; #Hier die GA f\xFCr MAINZONE leiser eintragen (0=NICHTS, 1=leiser)
my $ga_status_mute = '9/5/8'; #Hier die R\xFCckmelde-GA f\xFCr die Statusled Stummschaltung eintragen (0=AUS, 1=EIN)
@@ -41,12 +41,12 @@
my $ga_kurzwahltaste3 = '9/1/8'; #Hier die GA f\xFCr die MEMORY-Taste 3 eintragen (1=abrufen)
my $ga_kurzwahltaste4 = '9/1/9'; #Hier die GA f\xFCr die MEMORY-Taste 4 eintragen (1=abrufen)
-my $ga_status_kurzwahltaste1 = '9/1/10';
-my $ga_status_kurzwahltaste2 = '9/1/11';
-my $ga_status_kurzwahltaste3 = '9/1/12';
-my $ga_status_kurzwahltaste4 = '9/1/13';
+my $ga_status_kurzwahltaste1 = '9/1/10'; #Hier die GA f\xFCr die Status LED der Taste 1 eintragen (1=EIN, 0=Aus)
+my $ga_status_kurzwahltaste2 = '9/1/11'; #Hier die GA f\xFCr die Status LED der Taste 2 eintragen (1=EIN, 0=Aus)
+my $ga_status_kurzwahltaste3 = '9/1/12'; #Hier die GA f\xFCr die Status LED der Taste 3 eintragen (1=EIN, 0=Aus)
+my $ga_status_kurzwahltaste4 = '9/1/13'; #Hier die GA f\xFCr die Status LED der Taste 4 eintragen (1=EIN, 0=Aus)
-my $socknum = 118; # Eindeutige Nummer des Sockets +1
+my $socknum = 118; # Eindeutige Nummer des Sockets +1
#Diese Einstellungen k\xF6nnen normalerweise so belassen werden!
@@ -61,6 +61,8 @@
use Time::HiRes qw(usleep nanosleep);
+
+#Hier werden den Denon-befehle interne Namen zugewiesen
my %denon_befehle = ("PWOFF" => "PWSTANDBY\r",
"PWON" => "PWON\r",
"MVDOWN" => "MVDOWN\r",
@@ -74,9 +76,9 @@
"IRADIO" => "SIIRADIO\r",
"DVR" => "SIDVR\r");
-# Eigenen Aufruf-Zyklus auf 1T setzen
+
$plugin_info{$plugname.'_cycle'} = 600;
-# Zyklischer Aufruf nach restart und alle 600 sek., dient dem anmelden an die Gruppenadresse, einmalig (0) w\xFCrde in diesem Fall auch gen\xFCgen
+# Zyklischer Aufruf nach restart und alle 600 sek.
if (!$socket[$socknum]) { # socket erstellen
$socket[$socknum] = IO::Socket::INET->new(LocalPort => $recv_port,
@@ -206,7 +208,7 @@
}
}
}
-} elsif ($fh) { # incoming datagram
+} elsif ($fh) { # Wenn der Denon ein Antworttelegramm sendet, wird ab hier der entsprechende Status ausgelesen.
my $buf = <$fh>;
my $bufhex = unpack("H*",$buf);
chomp $buf;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2011-06-21 20:05:14
|
Revision: 369
http://openautomation.svn.sourceforge.net/openautomation/?rev=369&view=rev
Author: mayerch
Date: 2011-06-21 20:05:06 +0000 (Tue, 21 Jun 2011)
Log Message:
-----------
Update flot to version 0.7 to have a better fix for bug 3175343
Note: This flot version has a bug that calculates the width for the y-axis labels wrongly. The submitted file jquery.flot.js (but not the minimized version!) contains a patch to fix that bahaviour.
Modified Paths:
--------------
CometVisu/trunk/visu/designs/discreet/basic.css
CometVisu/trunk/visu/designs/pure/basic.css
CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.crosshair.min.js
CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.image.min.js
CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.js
CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.min.js
CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.navigate.min.js
CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.selection.min.js
CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.stack.min.js
CometVisu/trunk/visu/plugins/diagram/structure_plugin.js
Added Paths:
-----------
CometVisu/trunk/visu/plugins/diagram/flot/jquery.colorhelpers.js
CometVisu/trunk/visu/plugins/diagram/flot/jquery.colorhelpers.min.js
CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.crosshair.js
CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.fillbetween.js
CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.fillbetween.min.js
CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.image.js
CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.navigate.js
CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.pie.js
CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.pie.min.js
CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.resize.js
CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.resize.min.js
CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.selection.js
CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.stack.js
CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.symbol.js
CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.symbol.min.js
CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.threshold.js
Modified: CometVisu/trunk/visu/designs/discreet/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/discreet/basic.css 2011-06-21 19:57:10 UTC (rev 368)
+++ CometVisu/trunk/visu/designs/discreet/basic.css 2011-06-21 20:05:06 UTC (rev 369)
@@ -366,7 +366,6 @@
}
.diagram_inline {
- margin-left: 1em;
width: 320px;
height: 180px;
}
Modified: CometVisu/trunk/visu/designs/pure/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/pure/basic.css 2011-06-21 19:57:10 UTC (rev 368)
+++ CometVisu/trunk/visu/designs/pure/basic.css 2011-06-21 20:05:06 UTC (rev 369)
@@ -353,7 +353,6 @@
}
.diagram_inline {
- margin-left: 1em;
width: 320px;
height: 180px;
}
Added: CometVisu/trunk/visu/plugins/diagram/flot/jquery.colorhelpers.js
===================================================================
--- CometVisu/trunk/visu/plugins/diagram/flot/jquery.colorhelpers.js (rev 0)
+++ CometVisu/trunk/visu/plugins/diagram/flot/jquery.colorhelpers.js 2011-06-21 20:05:06 UTC (rev 369)
@@ -0,0 +1,179 @@
+/* Plugin for jQuery for working with colors.
+ *
+ * Version 1.1.
+ *
+ * Inspiration from jQuery color animation plugin by John Resig.
+ *
+ * Released under the MIT license by Ole Laursen, October 2009.
+ *
+ * Examples:
+ *
+ * $.color.parse("#fff").scale('rgb', 0.25).add('a', -0.5).toString()
+ * var c = $.color.extract($("#mydiv"), 'background-color');
+ * console.log(c.r, c.g, c.b, c.a);
+ * $.color.make(100, 50, 25, 0.4).toString() // returns "rgba(100,50,25,0.4)"
+ *
+ * Note that .scale() and .add() return the same modified object
+ * instead of making a new one.
+ *
+ * V. 1.1: Fix error handling so e.g. parsing an empty string does
+ * produce a color rather than just crashing.
+ */
+
+(function($) {
+ $.color = {};
+
+ // construct color object with some convenient chainable helpers
+ $.color.make = function (r, g, b, a) {
+ var o = {};
+ o.r = r || 0;
+ o.g = g || 0;
+ o.b = b || 0;
+ o.a = a != null ? a : 1;
+
+ o.add = function (c, d) {
+ for (var i = 0; i < c.length; ++i)
+ o[c.charAt(i)] += d;
+ return o.normalize();
+ };
+
+ o.scale = function (c, f) {
+ for (var i = 0; i < c.length; ++i)
+ o[c.charAt(i)] *= f;
+ return o.normalize();
+ };
+
+ o.toString = function () {
+ if (o.a >= 1.0) {
+ return "rgb("+[o.r, o.g, o.b].join(",")+")";
+ } else {
+ return "rgba("+[o.r, o.g, o.b, o.a].join(",")+")";
+ }
+ };
+
+ o.normalize = function () {
+ function clamp(min, value, max) {
+ return value < min ? min: (value > max ? max: value);
+ }
+
+ o.r = clamp(0, parseInt(o.r), 255);
+ o.g = clamp(0, parseInt(o.g), 255);
+ o.b = clamp(0, parseInt(o.b), 255);
+ o.a = clamp(0, o.a, 1);
+ return o;
+ };
+
+ o.clone = function () {
+ return $.color.make(o.r, o.b, o.g, o.a);
+ };
+
+ return o.normalize();
+ }
+
+ // extract CSS color property from element, going up in the DOM
+ // if it's "transparent"
+ $.color.extract = function (elem, css) {
+ var c;
+ do {
+ c = elem.css(css).toLowerCase();
+ // keep going until we find an element that has color, or
+ // we hit the body
+ if (c != '' && c != 'transparent')
+ break;
+ elem = elem.parent();
+ } while (!$.nodeName(elem.get(0), "body"));
+
+ // catch Safari's way of signalling transparent
+ if (c == "rgba(0, 0, 0, 0)")
+ c = "transparent";
+
+ return $.color.parse(c);
+ }
+
+ // parse CSS color string (like "rgb(10, 32, 43)" or "#fff"),
+ // returns color object, if parsing failed, you get black (0, 0,
+ // 0) out
+ $.color.parse = function (str) {
+ var res, m = $.color.make;
+
+ // Look for rgb(num,num,num)
+ if (res = /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(str))
+ return m(parseInt(res[1], 10), parseInt(res[2], 10), parseInt(res[3], 10));
+
+ // Look for rgba(num,num,num,num)
+ if (res = /rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(str))
+ return m(parseInt(res[1], 10), parseInt(res[2], 10), parseInt(res[3], 10), parseFloat(res[4]));
+
+ // Look for rgb(num%,num%,num%)
+ if (res = /rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(str))
+ return m(parseFloat(res[1])*2.55, parseFloat(res[2])*2.55, parseFloat(res[3])*2.55);
+
+ // Look for rgba(num%,num%,num%,num)
+ if (res = /rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(str))
+ return m(parseFloat(res[1])*2.55, parseFloat(res[2])*2.55, parseFloat(res[3])*2.55, parseFloat(res[4]));
+
+ // Look for #a0b1c2
+ if (res = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(str))
+ return m(parseInt(res[1], 16), parseInt(res[2], 16), parseInt(res[3], 16));
+
+ // Look for #fff
+ if (res = /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(str))
+ return m(parseInt(res[1]+res[1], 16), parseInt(res[2]+res[2], 16), parseInt(res[3]+res[3], 16));
+
+ // Otherwise, we're most likely dealing with a named color
+ var name = $.trim(str).toLowerCase();
+ if (name == "transparent")
+ return m(255, 255, 255, 0);
+ else {
+ // default to black
+ res = lookupColors[name] || [0, 0, 0];
+ return m(res[0], res[1], res[2]);
+ }
+ }
+
+ var lookupColors = {
+ aqua:[0,255,255],
+ azure:[240,255,255],
+ beige:[245,245,220],
+ black:[0,0,0],
+ blue:[0,0,255],
+ brown:[165,42,42],
+ cyan:[0,255,255],
+ darkblue:[0,0,139],
+ darkcyan:[0,139,139],
+ darkgrey:[169,169,169],
+ darkgreen:[0,100,0],
+ darkkhaki:[189,183,107],
+ darkmagenta:[139,0,139],
+ darkolivegreen:[85,107,47],
+ darkorange:[255,140,0],
+ darkorchid:[153,50,204],
+ darkred:[139,0,0],
+ darksalmon:[233,150,122],
+ darkviolet:[148,0,211],
+ fuchsia:[255,0,255],
+ gold:[255,215,0],
+ green:[0,128,0],
+ indigo:[75,0,130],
+ khaki:[240,230,140],
+ lightblue:[173,216,230],
+ lightcyan:[224,255,255],
+ lightgreen:[144,238,144],
+ lightgrey:[211,211,211],
+ lightpink:[255,182,193],
+ lightyellow:[255,255,224],
+ lime:[0,255,0],
+ magenta:[255,0,255],
+ maroon:[128,0,0],
+ navy:[0,0,128],
+ olive:[128,128,0],
+ orange:[255,165,0],
+ pink:[255,192,203],
+ purple:[128,0,128],
+ violet:[128,0,128],
+ red:[255,0,0],
+ silver:[192,192,192],
+ white:[255,255,255],
+ yellow:[255,255,0]
+ };
+})(jQuery);
Added: CometVisu/trunk/visu/plugins/diagram/flot/jquery.colorhelpers.min.js
===================================================================
--- CometVisu/trunk/visu/plugins/diagram/flot/jquery.colorhelpers.min.js (rev 0)
+++ CometVisu/trunk/visu/plugins/diagram/flot/jquery.colorhelpers.min.js 2011-06-21 20:05:06 UTC (rev 369)
@@ -0,0 +1 @@
+(function(b){b.color={};b.color.make=function(f,e,c,d){var h={};h.r=f||0;h.g=e||0;h.b=c||0;h.a=d!=null?d:1;h.add=function(k,j){for(var g=0;g<k.length;++g){h[k.charAt(g)]+=j}return h.normalize()};h.scale=function(k,j){for(var g=0;g<k.length;++g){h[k.charAt(g)]*=j}return h.normalize()};h.toString=function(){if(h.a>=1){return"rgb("+[h.r,h.g,h.b].join(",")+")"}else{return"rgba("+[h.r,h.g,h.b,h.a].join(",")+")"}};h.normalize=function(){function g(j,k,i){return k<j?j:(k>i?i:k)}h.r=g(0,parseInt(h.r),255);h.g=g(0,parseInt(h.g),255);h.b=g(0,parseInt(h.b),255);h.a=g(0,h.a,1);return h};h.clone=function(){return b.color.make(h.r,h.b,h.g,h.a)};return h.normalize()};b.color.extract=function(e,d){var f;do{f=e.css(d).toLowerCase();if(f!=""&&f!="transparent"){break}e=e.parent()}while(!b.nodeName(e.get(0),"body"));if(f=="rgba(0, 0, 0, 0)"){f="transparent"}return b.color.parse(f)};b.color.parse=function(f){var e,c=b.color.make;if(e=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(f)){return c(parseInt(e[1],10),parseInt(e[2],10),parseInt(e[3],10))}if(e=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(f)){return c(parseInt(e[1],10),parseInt(e[2],10),parseInt(e[3],10),parseFloat(e[4]))}if(e=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(f)){return c(parseFloat(e[1])*2.55,parseFloat(e[2])*2.55,parseFloat(e[3])*2.55)}if(e=/rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(f)){return c(parseFloat(e[1])*2.55,parseFloat(e[2])*2.55,parseFloat(e[3])*2.55,parseFloat(e[4]))}if(e=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(f)){return c(parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16))}if(e=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(f)){return c(parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16))}var d=b.trim(f).toLowerCase();if(d=="transparent"){return c(255,255,255,0)}else{e=a[d]||[0,0,0];return c(e[0],e[1],e[2])}};var a={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]}})(jQuery);
\ No newline at end of file
Added: CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.crosshair.js
===================================================================
--- CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.crosshair.js (rev 0)
+++ CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.crosshair.js 2011-06-21 20:05:06 UTC (rev 369)
@@ -0,0 +1,167 @@
+/*
+Flot plugin for showing crosshairs, thin lines, when the mouse hovers
+over the plot.
+
+ crosshair: {
+ mode: null or "x" or "y" or "xy"
+ color: color
+ lineWidth: number
+ }
+
+Set the mode to one of "x", "y" or "xy". The "x" mode enables a
+vertical crosshair that lets you trace the values on the x axis, "y"
+enables a horizontal crosshair and "xy" enables them both. "color" is
+the color of the crosshair (default is "rgba(170, 0, 0, 0.80)"),
+"lineWidth" is the width of the drawn lines (default is 1).
+
+The plugin also adds four public methods:
+
+ - setCrosshair(pos)
+
+ Set the position of the crosshair. Note that this is cleared if
+ the user moves the mouse. "pos" is in coordinates of the plot and
+ should be on the form { x: xpos, y: ypos } (you can use x2/x3/...
+ if you're using multiple axes), which is coincidentally the same
+ format as what you get from a "plothover" event. If "pos" is null,
+ the crosshair is cleared.
+
+ - clearCrosshair()
+
+ Clear the crosshair.
+
+ - lockCrosshair(pos)
+
+ Cause the crosshair to lock to the current location, no longer
+ updating if the user moves the mouse. Optionally supply a position
+ (passed on to setCrosshair()) to move it to.
+
+ Example usage:
+ var myFlot = $.plot( $("#graph"), ..., { crosshair: { mode: "x" } } };
+ $("#graph").bind("plothover", function (evt, position, item) {
+ if (item) {
+ // Lock the crosshair to the data point being hovered
+ myFlot.lockCrosshair({ x: item.datapoint[0], y: item.datapoint[1] });
+ }
+ else {
+ // Return normal crosshair operation
+ myFlot.unlockCrosshair();
+ }
+ });
+
+ - unlockCrosshair()
+
+ Free the crosshair to move again after locking it.
+*/
+
+(function ($) {
+ var options = {
+ crosshair: {
+ mode: null, // one of null, "x", "y" or "xy",
+ color: "rgba(170, 0, 0, 0.80)",
+ lineWidth: 1
+ }
+ };
+
+ function init(plot) {
+ // position of crosshair in pixels
+ var crosshair = { x: -1, y: -1, locked: false };
+
+ plot.setCrosshair = function setCrosshair(pos) {
+ if (!pos)
+ crosshair.x = -1;
+ else {
+ var o = plot.p2c(pos);
+ crosshair.x = Math.max(0, Math.min(o.left, plot.width()));
+ crosshair.y = Math.max(0, Math.min(o.top, plot.height()));
+ }
+
+ plot.triggerRedrawOverlay();
+ };
+
+ plot.clearCrosshair = plot.setCrosshair; // passes null for pos
+
+ plot.lockCrosshair = function lockCrosshair(pos) {
+ if (pos)
+ plot.setCrosshair(pos);
+ crosshair.locked = true;
+ }
+
+ plot.unlockCrosshair = function unlockCrosshair() {
+ crosshair.locked = false;
+ }
+
+ function onMouseOut(e) {
+ if (crosshair.locked)
+ return;
+
+ if (crosshair.x != -1) {
+ crosshair.x = -1;
+ plot.triggerRedrawOverlay();
+ }
+ }
+
+ function onMouseMove(e) {
+ if (crosshair.locked)
+ return;
+
+ if (plot.getSelection && plot.getSelection()) {
+ crosshair.x = -1; // hide the crosshair while selecting
+ return;
+ }
+
+ var offset = plot.offset();
+ crosshair.x = Math.max(0, Math.min(e.pageX - offset.left, plot.width()));
+ crosshair.y = Math.max(0, Math.min(e.pageY - offset.top, plot.height()));
+ plot.triggerRedrawOverlay();
+ }
+
+ plot.hooks.bindEvents.push(function (plot, eventHolder) {
+ if (!plot.getOptions().crosshair.mode)
+ return;
+
+ eventHolder.mouseout(onMouseOut);
+ eventHolder.mousemove(onMouseMove);
+ });
+
+ plot.hooks.drawOverlay.push(function (plot, ctx) {
+ var c = plot.getOptions().crosshair;
+ if (!c.mode)
+ return;
+
+ var plotOffset = plot.getPlotOffset();
+
+ ctx.save();
+ ctx.translate(plotOffset.left, plotOffset.top);
+
+ if (crosshair.x != -1) {
+ ctx.strokeStyle = c.color;
+ ctx.lineWidth = c.lineWidth;
+ ctx.lineJoin = "round";
+
+ ctx.beginPath();
+ if (c.mode.indexOf("x") != -1) {
+ ctx.moveTo(crosshair.x, 0);
+ ctx.lineTo(crosshair.x, plot.height());
+ }
+ if (c.mode.indexOf("y") != -1) {
+ ctx.moveTo(0, crosshair.y);
+ ctx.lineTo(plot.width(), crosshair.y);
+ }
+ ctx.stroke();
+ }
+ ctx.restore();
+ });
+
+ plot.hooks.shutdown.push(function (plot, eventHolder) {
+ eventHolder.unbind("mouseout", onMouseOut);
+ eventHolder.unbind("mousemove", onMouseMove);
+ });
+ }
+
+ $.plot.plugins.push({
+ init: init,
+ options: options,
+ name: 'crosshair',
+ version: '1.0'
+ });
+})(jQuery);
Modified: CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.crosshair.min.js
===================================================================
--- CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.crosshair.min.js 2011-06-21 19:57:10 UTC (rev 368)
+++ CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.crosshair.min.js 2011-06-21 20:05:06 UTC (rev 369)
@@ -1 +1 @@
-(function(B){var A={crosshair:{mode:null,color:"rgba(170, 0, 0, 0.80)",lineWidth:1}};function C(G){var H={x:-1,y:-1,locked:false};G.setCrosshair=function D(J){if(!J){H.x=-1}else{var I=G.getAxes();H.x=Math.max(0,Math.min(J.x!=null?I.xaxis.p2c(J.x):I.x2axis.p2c(J.x2),G.width()));H.y=Math.max(0,Math.min(J.y!=null?I.yaxis.p2c(J.y):I.y2axis.p2c(J.y2),G.height()))}G.triggerRedrawOverlay()};G.clearCrosshair=G.setCrosshair;G.lockCrosshair=function E(I){if(I){G.setCrosshair(I)}H.locked=true};G.unlockCrosshair=function F(){H.locked=false};G.hooks.bindEvents.push(function(J,I){if(!J.getOptions().crosshair.mode){return }I.mouseout(function(){if(H.x!=-1){H.x=-1;J.triggerRedrawOverlay()}});I.mousemove(function(K){if(J.getSelection&&J.getSelection()){H.x=-1;return }if(H.locked){return }var L=J.offset();H.x=Math.max(0,Math.min(K.pageX-L.left,J.width()));H.y=Math.max(0,Math.min(K.pageY-L.top,J.height()));J.triggerRedrawOverlay()})});G.hooks.drawOverlay.push(function(K,I){var L=K.getOptions().crosshair;if(!L.mode){return }var J=K.getPlotOffset();I.save();I.translate(J.left,J.top);if(H.x!=-1){I.strokeStyle=L.color;I.lineWidth=L.lineWidth;I.lineJoin="round";I.beginPath();if(L.mode.indexOf("x")!=-1){I.moveTo(H.x,0);I.lineTo(H.x,K.height())}if(L.mode.indexOf("y")!=-1){I.moveTo(0,H.y);I.lineTo(K.width(),H.y)}I.stroke()}I.restore()})}B.plot.plugins.push({init:C,options:A,name:"crosshair",version:"1.0"})})(jQuery);
\ No newline at end of file
+(function(b){var a={crosshair:{mode:null,color:"rgba(170, 0, 0, 0.80)",lineWidth:1}};function c(h){var j={x:-1,y:-1,locked:false};h.setCrosshair=function e(l){if(!l){j.x=-1}else{var k=h.p2c(l);j.x=Math.max(0,Math.min(k.left,h.width()));j.y=Math.max(0,Math.min(k.top,h.height()))}h.triggerRedrawOverlay()};h.clearCrosshair=h.setCrosshair;h.lockCrosshair=function f(k){if(k){h.setCrosshair(k)}j.locked=true};h.unlockCrosshair=function g(){j.locked=false};function d(k){if(j.locked){return}if(j.x!=-1){j.x=-1;h.triggerRedrawOverlay()}}function i(k){if(j.locked){return}if(h.getSelection&&h.getSelection()){j.x=-1;return}var l=h.offset();j.x=Math.max(0,Math.min(k.pageX-l.left,h.width()));j.y=Math.max(0,Math.min(k.pageY-l.top,h.height()));h.triggerRedrawOverlay()}h.hooks.bindEvents.push(function(l,k){if(!l.getOptions().crosshair.mode){return}k.mouseout(d);k.mousemove(i)});h.hooks.drawOverlay.push(function(m,k){var n=m.getOptions().crosshair;if(!n.mode){return}var l=m.getPlotOffset();k.save();k.translate(l.left,l.top);if(j.x!=-1){k.strokeStyle=n.color;k.lineWidth=n.lineWidth;k.lineJoin="round";k.beginPath();if(n.mode.indexOf("x")!=-1){k.moveTo(j.x,0);k.lineTo(j.x,m.height())}if(n.mode.indexOf("y")!=-1){k.moveTo(0,j.y);k.lineTo(m.width(),j.y)}k.stroke()}k.restore()});h.hooks.shutdown.push(function(l,k){k.unbind("mouseout",d);k.unbind("mousemove",i)})}b.plot.plugins.push({init:c,options:a,name:"crosshair",version:"1.0"})})(jQuery);
\ No newline at end of file
Added: CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.fillbetween.js
===================================================================
--- CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.fillbetween.js (rev 0)
+++ CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.fillbetween.js 2011-06-21 20:05:06 UTC (rev 369)
@@ -0,0 +1,183 @@
+/*
+Flot plugin for computing bottoms for filled line and bar charts.
+
+The case: you've got two series that you want to fill the area
+between. In Flot terms, you need to use one as the fill bottom of the
+other. You can specify the bottom of each data point as the third
+coordinate manually, or you can use this plugin to compute it for you.
+
+In order to name the other series, you need to give it an id, like this
+
+ var dataset = [
+ { data: [ ... ], id: "foo" } , // use default bottom
+ { data: [ ... ], fillBetween: "foo" }, // use first dataset as bottom
+ ];
+
+ $.plot($("#placeholder"), dataset, { line: { show: true, fill: true }});
+
+As a convenience, if the id given is a number that doesn't appear as
+an id in the series, it is interpreted as the index in the array
+instead (so fillBetween: 0 can also mean the first series).
+
+Internally, the plugin modifies the datapoints in each series. For
+line series, extra data points might be inserted through
+interpolation. Note that at points where the bottom line is not
+defined (due to a null point or start/end of line), the current line
+will show a gap too. The algorithm comes from the jquery.flot.stack.js
+plugin, possibly some code could be shared.
+*/
+
+(function ($) {
+ var options = {
+ series: { fillBetween: null } // or number
+ };
+
+ function init(plot) {
+ function findBottomSeries(s, allseries) {
+ var i;
+ for (i = 0; i < allseries.length; ++i) {
+ if (allseries[i].id == s.fillBetween)
+ return allseries[i];
+ }
+
+ if (typeof s.fillBetween == "number") {
+ i = s.fillBetween;
+
+ if (i < 0 || i >= allseries.length)
+ return null;
+
+ return allseries[i];
+ }
+
+ return null;
+ }
+
+ function computeFillBottoms(plot, s, datapoints) {
+ if (s.fillBetween == null)
+ return;
+
+ var other = findBottomSeries(s, plot.getData());
+ if (!other)
+ return;
+
+ var ps = datapoints.pointsize,
+ points = datapoints.points,
+ otherps = other.datapoints.pointsize,
+ otherpoints = other.datapoints.points,
+ newpoints = [],
+ px, py, intery, qx, qy, bottom,
+ withlines = s.lines.show,
+ withbottom = ps > 2 && datapoints.format[2].y,
+ withsteps = withlines && s.lines.steps,
+ fromgap = true,
+ i = 0, j = 0, l;
+
+ while (true) {
+ if (i >= points.length)
+ break;
+
+ l = newpoints.length;
+
+ if (points[i] == null) {
+ // copy gaps
+ for (m = 0; m < ps; ++m)
+ newpoints.push(points[i + m]);
+ i += ps;
+ }
+ else if (j >= otherpoints.length) {
+ // for lines, we can't use the rest of the points
+ if (!withlines) {
+ for (m = 0; m < ps; ++m)
+ newpoints.push(points[i + m]);
+ }
+ i += ps;
+ }
+ else if (otherpoints[j] == null) {
+ // oops, got a gap
+ for (m = 0; m < ps; ++m)
+ newpoints.push(null);
+ fromgap = true;
+ j += otherps;
+ }
+ else {
+ // cases where we actually got two points
+ px = points[i];
+ py = points[i + 1];
+ qx = otherpoints[j];
+ qy = otherpoints[j + 1];
+ bottom = 0;
+
+ if (px == qx) {
+ for (m = 0; m < ps; ++m)
+ newpoints.push(points[i + m]);
+
+ //newpoints[l + 1] += qy;
+ bottom = qy;
+
+ i += ps;
+ j += otherps;
+ }
+ else if (px > qx) {
+ // we got past point below, might need to
+ // insert interpolated extra point
+ if (withlines && i > 0 && points[i - ps] != null) {
+ intery = py + (points[i - ps + 1] - py) * (qx - px) / (points[i - ps] - px);
+ newpoints.push(qx);
+ newpoints.push(intery)
+ for (m = 2; m < ps; ++m)
+ newpoints.push(points[i + m]);
+ bottom = qy;
+ }
+
+ j += otherps;
+ }
+ else { // px < qx
+ if (fromgap && withlines) {
+ // if we come from a gap, we just skip this point
+ i += ps;
+ continue;
+ }
+
+ for (m = 0; m < ps; ++m)
+ newpoints.push(points[i + m]);
+
+ // we might be able to interpolate a point below,
+ // this can give us a better y
+ if (withlines && j > 0 && otherpoints[j - otherps] != null)
+ bottom = qy + (otherpoints[j - otherps + 1] - qy) * (px - qx) / (otherpoints[j - otherps] - qx);
+
+ //newpoints[l + 1] += bottom;
+
+ i += ps;
+ }
+
+ fromgap = false;
+
+ if (l != newpoints.length && withbottom)
+ newpoints[l + 2] = bottom;
+ }
+
+ // maintain the line steps invariant
+ if (withsteps && l != newpoints.length && l > 0
+ && newpoints[l] != null
+ && newpoints[l] != newpoints[l - ps]
+ && newpoints[l + 1] != newpoints[l - ps + 1]) {
+ for (m = 0; m < ps; ++m)
+ newpoints[l + ps + m] = newpoints[l + m];
+ newpoints[l + 1] = newpoints[l - ps + 1];
+ }
+ }
+
+ datapoints.points = newpoints;
+ }
+
+ plot.hooks.processDatapoints.push(computeFillBottoms);
+ }
+
+ $.plot.plugins.push({
+ init: init,
+ options: options,
+ name: 'fillbetween',
+ version: '1.0'
+ });
+})(jQuery);
Added: CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.fillbetween.min.js
===================================================================
--- CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.fillbetween.min.js (rev 0)
+++ CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.fillbetween.min.js 2011-06-21 20:05:06 UTC (rev 369)
@@ -0,0 +1 @@
+(function(b){var a={series:{fillBetween:null}};function c(f){function d(j,h){var g;for(g=0;g<h.length;++g){if(h[g].id==j.fillBetween){return h[g]}}if(typeof j.fillBetween=="number"){g=j.fillBetween;if(g<0||g>=h.length){return null}return h[g]}return null}function e(B,u,g){if(u.fillBetween==null){return}var p=d(u,B.getData());if(!p){return}var y=g.pointsize,E=g.points,h=p.datapoints.pointsize,x=p.datapoints.points,r=[],w,v,k,G,F,q,t=u.lines.show,o=y>2&&g.format[2].y,n=t&&u.lines.steps,D=true,C=0,A=0,z;while(true){if(C>=E.length){break}z=r.length;if(E[C]==null){for(m=0;m<y;++m){r.push(E[C+m])}C+=y}else{if(A>=x.length){if(!t){for(m=0;m<y;++m){r.push(E[C+m])}}C+=y}else{if(x[A]==null){for(m=0;m<y;++m){r.push(null)}D=true;A+=h}else{w=E[C];v=E[C+1];G=x[A];F=x[A+1];q=0;if(w==G){for(m=0;m<y;++m){r.push(E[C+m])}q=F;C+=y;A+=h}else{if(w>G){if(t&&C>0&&E[C-y]!=null){k=v+(E[C-y+1]-v)*(G-w)/(E[C-y]-w);r.push(G);r.push(k);for(m=2;m<y;++m){r.push(E[C+m])}q=F}A+=h}else{if(D&&t){C+=y;continue}for(m=0;m<y;++m){r.push(E[C+m])}if(t&&A>0&&x[A-h]!=null){q=F+(x[A-h+1]-F)*(w-G)/(x[A-h]-G)}C+=y}}D=false;if(z!=r.length&&o){r[z+2]=q}}}}if(n&&z!=r.length&&z>0&&r[z]!=null&&r[z]!=r[z-y]&&r[z+1]!=r[z-y+1]){for(m=0;m<y;++m){r[z+y+m]=r[z+m]}r[z+1]=r[z-y+1]}}g.points=r}f.hooks.processDatapoints.push(e)}b.plot.plugins.push({init:c,options:a,name:"fillbetween",version:"1.0"})})(jQuery);
\ No newline at end of file
Added: CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.image.js
===================================================================
--- CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.image.js (rev 0)
+++ CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.image.js 2011-06-21 20:05:06 UTC (rev 369)
@@ -0,0 +1,238 @@
+/*
+Flot plugin for plotting images, e.g. useful for putting ticks on a
+prerendered complex visualization.
+
+The data syntax is [[image, x1, y1, x2, y2], ...] where (x1, y1) and
+(x2, y2) are where you intend the two opposite corners of the image to
+end up in the plot. Image must be a fully loaded Javascript image (you
+can make one with new Image()). If the image is not complete, it's
+skipped when plotting.
+
+There are two helpers included for retrieving images. The easiest work
+the way that you put in URLs instead of images in the data (like
+["myimage.png", 0, 0, 10, 10]), then call $.plot.image.loadData(data,
+options, callback) where data and options are the same as you pass in
+to $.plot. This loads the images, replaces the URLs in the data with
+the corresponding images and calls "callback" when all images are
+loaded (or failed loading). In the callback, you can then call $.plot
+with the data set. See the included example.
+
+A more low-level helper, $.plot.image.load(urls, callback) is also
+included. Given a list of URLs, it calls callback with an object
+mapping from URL to Image object when all images are loaded or have
+failed loading.
+
+Options for the plugin are
+
+ series: {
+ images: {
+ show: boolean
+ anchor: "corner" or "center"
+ alpha: [0,1]
+ }
+ }
+
+which can be specified for a specific series
+
+ $.plot($("#placeholder"), [{ data: [ ... ], images: { ... } ])
+
+Note that because the data format is different from usual data points,
+you can't use images with anything else in a specific data series.
+
+Setting "anchor" to "center" causes the pixels in the image to be
+anchored at the corner pixel centers inside of at the pixel corners,
+effectively letting half a pixel stick out to each side in the plot.
+
+
+A possible future direction could be support for tiling for large
+images (like Google Maps).
+
+*/
+
+(function ($) {
+ var options = {
+ series: {
+ images: {
+ show: false,
+ alpha: 1,
+ anchor: "corner" // or "center"
+ }
+ }
+ };
+
+ $.plot.image = {};
+
+ $.plot.image.loadDataImages = function (series, options, callback) {
+ var urls = [], points = [];
+
+ var defaultShow = options.series.images.show;
+
+ $.each(series, function (i, s) {
+ if (!(defaultShow || s.images.show))
+ return;
+
+ if (s.data)
+ s = s.data;
+
+ $.each(s, function (i, p) {
+ if (typeof p[0] == "string") {
+ urls.push(p[0]);
+ points.push(p);
+ }
+ });
+ });
+
+ $.plot.image.load(urls, function (loadedImages) {
+ $.each(points, function (i, p) {
+ var url = p[0];
+ if (loadedImages[url])
+ p[0] = loadedImages[url];
+ });
+
+ callback();
+ });
+ }
+
+ $.plot.image.load = function (urls, callback) {
+ var missing = urls.length, loaded = {};
+ if (missing == 0)
+ callback({});
+
+ $.each(urls, function (i, url) {
+ var handler = function () {
+ --missing;
+
+ loaded[url] = this;
+
+ if (missing == 0)
+ callback(loaded);
+ };
+
+ $('<img />').load(handler).error(handler).attr('src', url);
+ });
+ }
+
+ function drawSeries(plot, ctx, series) {
+ var plotOffset = plot.getPlotOffset();
+
+ if (!series.images || !series.images.show)
+ return;
+
+ var points = series.datapoints.points,
+ ps = series.datapoints.pointsize;
+
+ for (var i = 0; i < points.length; i += ps) {
+ var img = points[i],
+ x1 = points[i + 1], y1 = points[i + 2],
+ x2 = points[i + 3], y2 = points[i + 4],
+ xaxis = series.xaxis, yaxis = series.yaxis,
+ tmp;
+
+ // actually we should check img.complete, but it
+ // appears to be a somewhat unreliable indicator in
+ // IE6 (false even after load event)
+ if (!img || img.width <= 0 || img.height <= 0)
+ continue;
+
+ if (x1 > x2) {
+ tmp = x2;
+ x2 = x1;
+ x1 = tmp;
+ }
+ if (y1 > y2) {
+ tmp = y2;
+ y2 = y1;
+ y1 = tmp;
+ }
+
+ // if the anchor is at the center of the pixel, expand the
+ // image by 1/2 pixel in each direction
+ if (series.images.anchor == "center") {
+ tmp = 0.5 * (x2-x1) / (img.width - 1);
+ x1 -= tmp;
+ x2 += tmp;
+ tmp = 0.5 * (y2-y1) / (img.height - 1);
+ y1 -= tmp;
+ y2 += tmp;
+ }
+
+ // clip
+ if (x1 == x2 || y1 == y2 ||
+ x1 >= xaxis.max || x2 <= xaxis.min ||
+ y1 >= yaxis.max || y2 <= yaxis.min)
+ continue;
+
+ var sx1 = 0, sy1 = 0, sx2 = img.width, sy2 = img.height;
+ if (x1 < xaxis.min) {
+ sx1 += (sx2 - sx1) * (xaxis.min - x1) / (x2 - x1);
+ x1 = xaxis.min;
+ }
+
+ if (x2 > xaxis.max) {
+ sx2 += (sx2 - sx1) * (xaxis.max - x2) / (x2 - x1);
+ x2 = xaxis.max;
+ }
+
+ if (y1 < yaxis.min) {
+ sy2 += (sy1 - sy2) * (yaxis.min - y1) / (y2 - y1);
+ y1 = yaxis.min;
+ }
+
+ if (y2 > yaxis.max) {
+ sy1 += (sy1 - sy2) * (yaxis.max - y2) / (y2 - y1);
+ y2 = yaxis.max;
+ }
+
+ x1 = xaxis.p2c(x1);
+ x2 = xaxis.p2c(x2);
+ y1 = yaxis.p2c(y1);
+ y2 = yaxis.p2c(y2);
+
+ // the transformation may have swapped us
+ if (x1 > x2) {
+ tmp = x2;
+ x2 = x1;
+ x1 = tmp;
+ }
+ if (y1 > y2) {
+ tmp = y2;
+ y2 = y1;
+ y1 = tmp;
+ }
+
+ tmp = ctx.globalAlpha;
+ ctx.globalAlpha *= series.images.alpha;
+ ctx.drawImage(img,
+ sx1, sy1, sx2 - sx1, sy2 - sy1,
+ x1 + plotOffset.left, y1 + plotOffset.top,
+ x2 - x1, y2 - y1);
+ ctx.globalAlpha = tmp;
+ }
+ }
+
+ function processRawData(plot, series, data, datapoints) {
+ if (!series.images.show)
+ return;
+
+ // format is Image, x1, y1, x2, y2 (opposite corners)
+ datapoints.format = [
+ { required: true },
+ { x: true, number: true, required: true },
+ { y: true, number: true, required: true },
+ { x: true, number: true, required: true },
+ { y: true, number: true, required: true }
+ ];
+ }
+
+ function init(plot) {
+ plot.hooks.processRawData.push(processRawData);
+ plot.hooks.drawSeries.push(drawSeries);
+ }
+
+ $.plot.plugins.push({
+ init: init,
+ options: options,
+ name: 'image',
+ version: '1.1'
+ });
+})(jQuery);
Modified: CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.image.min.js
===================================================================
--- CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.image.min.js 2011-06-21 19:57:10 UTC (rev 368)
+++ CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.image.min.js 2011-06-21 20:05:06 UTC (rev 369)
@@ -1 +1 @@
-(function(D){var B={series:{images:{show:false,alpha:1,anchor:"corner"}}};D.plot.image={};D.plot.image.loadDataImages=function(G,F,K){var J=[],H=[];var I=F.series.images.show;D.each(G,function(L,M){if(!(I||M.images.show)){return }if(M.data){M=M.data}D.each(M,function(N,O){if(typeof O[0]=="string"){J.push(O[0]);H.push(O)}})});D.plot.image.load(J,function(L){D.each(H,function(N,O){var M=O[0];if(L[M]){O[0]=L[M]}});K()})};D.plot.image.load=function(H,I){var G=H.length,F={};if(G==0){I({})}D.each(H,function(K,J){var L=function(){--G;F[J]=this;if(G==0){I(F)}};D("<img />").load(L).error(L).attr("src",J)})};function A(H,F){var G=H.getPlotOffset();D.each(H.getData(),function(O,P){var X=P.datapoints.points,I=P.datapoints.pointsize;for(var O=0;O<X.length;O+=I){var Q=X[O],M=X[O+1],V=X[O+2],K=X[O+3],T=X[O+4],W=P.xaxis,S=P.yaxis,N;if(!Q||Q.width<=0||Q.height<=0){continue}if(M>K){N=K;K=M;M=N}if(V>T){N=T;T=V;V=N}if(P.images.anchor=="center"){N=0.5*(K-M)/(Q.width-1);M-=N;K+=N;N=0.5*(T-V)/(Q.height-1);V-=N;T+=N}if(M==K||V==T||M>=W.max||K<=W.min||V>=S.max||T<=S.min){continue}var L=0,U=0,J=Q.width,R=Q.height;if(M<W.min){L+=(J-L)*(W.min-M)/(K-M);M=W.min}if(K>W.max){J+=(J-L)*(W.max-K)/(K-M);K=W.max}if(V<S.min){R+=(U-R)*(S.min-V)/(T-V);V=S.min}if(T>S.max){U+=(U-R)*(S.max-T)/(T-V);T=S.max}M=W.p2c(M);K=W.p2c(K);V=S.p2c(V);T=S.p2c(T);if(M>K){N=K;K=M;M=N}if(V>T){N=T;T=V;V=N}N=F.globalAlpha;F.globalAlpha*=P.images.alpha;F.drawImage(Q,L,U,J-L,R-U,M+G.left,V+G.top,K-M,T-V);F.globalAlpha=N}})}function C(I,F,G,H){if(!F.images.show){return }H.format=[{required:true},{x:true,number:true,required:true},{y:true,number:true,required:true},{x:true,number:true,required:true},{y:true,number:true,required:true}]}function E(F){F.hooks.processRawData.push(C);F.hooks.draw.push(A)}D.plot.plugins.push({init:E,options:B,name:"image",version:"1.1"})})(jQuery);
\ No newline at end of file
+(function(c){var a={series:{images:{show:false,alpha:1,anchor:"corner"}}};c.plot.image={};c.plot.image.loadDataImages=function(g,f,k){var j=[],h=[];var i=f.series.images.show;c.each(g,function(l,m){if(!(i||m.images.show)){return}if(m.data){m=m.data}c.each(m,function(n,o){if(typeof o[0]=="string"){j.push(o[0]);h.push(o)}})});c.plot.image.load(j,function(l){c.each(h,function(n,o){var m=o[0];if(l[m]){o[0]=l[m]}});k()})};c.plot.image.load=function(h,i){var g=h.length,f={};if(g==0){i({})}c.each(h,function(k,j){var l=function(){--g;f[j]=this;if(g==0){i(f)}};c("<img />").load(l).error(l).attr("src",j)})};function d(q,o,l){var m=q.getPlotOffset();if(!l.images||!l.images.show){return}var r=l.datapoints.points,n=l.datapoints.pointsize;for(var t=0;t<r.length;t+=n){var y=r[t],w=r[t+1],g=r[t+2],v=r[t+3],f=r[t+4],h=l.xaxis,u=l.yaxis,x;if(!y||y.width<=0||y.height<=0){continue}if(w>v){x=v;v=w;w=x}if(g>f){x=f;f=g;g=x}if(l.images.anchor=="center"){x=0.5*(v-w)/(y.width-1);w-=x;v+=x;x=0.5*(f-g)/(y.height-1);g-=x;f+=x}if(w==v||g==f||w>=h.max||v<=h.min||g>=u.max||f<=u.min){continue}var k=0,s=0,j=y.width,p=y.height;if(w<h.min){k+=(j-k)*(h.min-w)/(v-w);w=h.min}if(v>h.max){j+=(j-k)*(h.max-v)/(v-w);v=h.max}if(g<u.min){p+=(s-p)*(u.min-g)/(f-g);g=u.min}if(f>u.max){s+=(s-p)*(u.max-f)/(f-g);f=u.max}w=h.p2c(w);v=h.p2c(v);g=u.p2c(g);f=u.p2c(f);if(w>v){x=v;v=w;w=x}if(g>f){x=f;f=g;g=x}x=o.globalAlpha;o.globalAlpha*=l.images.alpha;o.drawImage(y,k,s,j-k,p-s,w+m.left,g+m.top,v-w,f-g);o.globalAlpha=x}}function b(i,f,g,h){if(!f.images.show){return}h.format=[{required:true},{x:true,number:true,required:true},{y:true,number:true,required:true},{x:true,number:true,required:true},{y:true,number:true,required:true}]}function e(f){f.hooks.processRawData.push(b);f.hooks.drawSeries.push(d)}c.plot.plugins.push({init:e,options:a,name:"image",version:"1.1"})})(jQuery);
\ No newline at end of file
Modified: CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.js
===================================================================
--- CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.js 2011-06-21 19:57:10 UTC (rev 368)
+++ CometVisu/trunk/visu/plugins/diagram/flot/jquery.flot.js 2011-06-21 20:05:06 UTC (rev 369)
@@ -1,4 +1,4 @@
-/* Javascript plotting library for jQuery, v. 0.6.
+/*! Javascript plotting library for jQuery, v. 0.7.
*
* Released under the MIT license by IOLA, December 2007.
*
@@ -9,7 +9,7 @@
/* Plugin for jQuery for working with colors.
*
- * Version 1.0.
+ * Version 1.1.
*
* Inspiration from jQuery color animation plugin by John Resig.
*
@@ -22,10 +22,13 @@
* console.log(c.r, c.g, c.b, c.a);
* $.color.make(100, 50, 25, 0.4).toString() // returns "rgba(100,50,25,0.4)"
*
- * Note that .scale() and .add() work in-place instead of returning
- * new objects.
+ * Note that .scale() and .add() return the same modified object
+ * instead of making a new one.
+ *
+ * V. 1.1: Fix error handling so e.g. parsing an empty string does
+ * produce a color rather than just crashing.
*/
-(function(){jQuery.color={};jQuery.color.make=function(E,D,B,C){var F={};F.r=E||0;F.g=D||0;F.b=B||0;F.a=C!=null?C:1;F.add=function(I,H){for(var G=0;G<I.length;++G){F[I.charAt(G)]+=H}return F.normalize()};F.scale=function(I,H){for(var G=0;G<I.length;++G){F[I.charAt(G)]*=H}return F.normalize()};F.toString=function(){if(F.a>=1){return"rgb("+[F.r,F.g,F.b].join(",")+")"}else{return"rgba("+[F.r,F.g,F.b,F.a].join(",")+")"}};F.normalize=function(){function G(I,J,H){return J<I?I:(J>H?H:J)}F.r=G(0,parseInt(F.r),255);F.g=G(0,parseInt(F.g),255);F.b=G(0,parseInt(F.b),255);F.a=G(0,F.a,1);return F};F.clone=function(){return jQuery.color.make(F.r,F.b,F.g,F.a)};return F.normalize()};jQuery.color.extract=function(C,B){var D;do{D=C.css(B).toLowerCase();if(D!=""&&D!="transparent"){break}C=C.parent()}while(!jQuery.nodeName(C.get(0),"body"));if(D=="rgba(0, 0, 0, 0)"){D="transparent"}return jQuery.color.parse(D)};jQuery.color.parse=function(E){var D,B=jQuery.color.make;if(D=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(E)){return B(parseInt(D[1],10),parseInt(D[2],10),parseInt(D[3],10))}if(D=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(E)){return B(parseInt(D[1],10),parseInt(D[2],10),parseInt(D[3],10),parseFloat(D[4]))}if(D=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(E)){return B(parseFloat(D[1])*2.55,parseFloat(D[2])*2.55,parseFloat(D[3])*2.55)}if(D=/rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(E)){return B(parseFloat(D[1])*2.55,parseFloat(D[2])*2.55,parseFloat(D[3])*2.55,parseFloat(D[4]))}if(D=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(E)){return B(parseInt(D[1],16),parseInt(D[2],16),parseInt(D[3],16))}if(D=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(E)){return B(parseInt(D[1]+D[1],16),parseInt(D[2]+D[2],16),parseInt(D[3]+D[3],16))}var C=jQuery.trim(E).toLowerCase();if(C=="transparent"){return B(255,255,255,0)}else{D=A[C];return B(D[0],D[1],D[2])}};var A={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]}})();
+(function(B){B.color={};B.color.make=function(F,E,C,D){var G={};G.r=F||0;G.g=E||0;G.b=C||0;G.a=D!=null?D:1;G.add=function(J,I){for(var H=0;H<J.length;++H){G[J.charAt(H)]+=I}return G.normalize()};G.scale=function(J,I){for(var H=0;H<J.length;++H){G[J.charAt(H)]*=I}return G.normalize()};G.toString=function(){if(G.a>=1){return"rgb("+[G.r,G.g,G.b].join(",")+")"}else{return"rgba("+[G.r,G.g,G.b,G.a].join(",")+")"}};G.normalize=function(){function H(J,K,I){return K<J?J:(K>I?I:K)}G.r=H(0,parseInt(G.r),255);G.g=H(0,parseInt(G.g),255);G.b=H(0,parseInt(G.b),255);G.a=H(0,G.a,1);return G};G.clone=function(){return B.color.make(G.r,G.b,G.g,G.a)};return G.normalize()};B.color.extract=function(D,C){var E;do{E=D.css(C).toLowerCase();if(E!=""&&E!="transparent"){break}D=D.parent()}while(!B.nodeName(D.get(0),"body"));if(E=="rgba(0, 0, 0, 0)"){E="transparent"}return B.color.parse(E)};B.color.parse=function(F){var E,C=B.color.make;if(E=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(F)){return C(parseInt(E[1],10),parseInt(E[2],10),parseInt(E[3],10))}if(E=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(F)){return C(parseInt(E[1],10),parseInt(E[2],10),parseInt(E[3],10),parseFloat(E[4]))}if(E=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(F)){return C(parseFloat(E[1])*2.55,parseFloat(E[2])*2.55,parseFloat(E[3])*2.55)}if(E=/rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(F)){return C(parseFloat(E[1])*2.55,parseFloat(E[2])*2.55,parseFloat(E[3])*2.55,parseFloat(E[4]))}if(E=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(F)){return C(parseInt(E[1],16),parseInt(E[2],16),parseInt(E[3],16))}if(E=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(F)){return C(parseInt(E[1]+E[1],16),parseInt(E[2]+E[2],16),parseInt(E[3]+E[3],16))}var D=B.trim(F).toLowerCase();if(D=="transparent"){return C(255,255,255,0)}else{E=A[D]||[0,0,0];return C(E[0],E[1],E[2])}};var A={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]}})(jQuery);
// the actual Flot code
(function($) {
@@ -51,7 +54,11 @@
backgroundOpacity: 0.85 // set to 0 to avoid background
},
xaxis: {
+ show: null, // null = auto-detect, true = always, false = never
+ position: "bottom", // or "top"
mode: null, // null or "time"
+ color: null, // base color, labels, ticks
+ tickColor: null, // possibly different color of ticks, e.g. "rgba(0,0,0,0.15)"
transform: null, // null or f: number -> number to transform axis
inverseTransform: null, // if transform is set, this should be the inverse function
min: null, // min. value to show, null means set automatically
@@ -61,6 +68,9 @@
tickFormatter: null, // fn: number -> string
labelWidth: null, // size of tick labels in pixels
labelHeight: null,
+ reserveSpace: null, // whether to reserve space even if axis isn't shown
+ tickLength: null, // size in pixels of ticks, or "full" for whole line
+ alignTicksWithAxis: null, // axis number or null for no sync
// mode specific options
tickDecimals: null, // no. of decimals, null means auto
@@ -71,21 +81,19 @@
twelveHourClock: false // 12 or 24 time in time mode
},
yaxis: {
- autoscaleMargin: 0.02
+ autoscaleMargin: 0.02,
+ position: "left" // or "right"
},
- x2axis: {
- autoscaleMargin: null
- },
- y2axis: {
- autoscaleMargin: 0.02
- },
+ xaxes: [],
+ yaxes: [],
series: {
points: {
show: false,
radius: 3,
lineWidth: 2, // in pixels
fill: true,
- fillColor: "#ffffff"
+ fillColor: "#ffffff",
+ symbol: "circle" // or callback
},
lines: {
// we don't put in show: false so we can see
@@ -102,7 +110,7 @@
fill: true,
fillColor: null,
align: "left", // or "center"
- horizontal: false // when horizontal, left is now top
+ horizontal: false
},
shadowSize: 3
},
@@ -111,10 +119,12 @@
aboveData: false,
color: "#545454", // primary color used for outline and labels
backgroundColor: null, // null for transparent, else color
- tickColor: "rgba(0,0,0,0.15)", // color used for the ticks
+ borderColor: null, // set if different from the grid color
+ tickColor: null, // color for the ticks, e.g. "rgba(0,0,0,0.15)"
labelMargin: 5, // in pixels
+ axisMargin: 8, // in pixels
borderWidth: 2, // in pixels
- borderColor: null, // set if different from the grid color
+ minBorderMargin: null, // in pixels, null means taken from points radius
markings: null, // array of ranges or fn: axes -> array of ranges
markingsColor: "#f4f4f4",
markingsLineWidth: 2,
@@ -130,7 +140,7 @@
overlay = null, // canvas for interactive stuff on top of plot
eventHolder = null, // jQuery object that events should be bound to
ctx = null, octx = null,
- axes = { xaxis: {}, yaxis: {}, x2axis: {}, y2axis: {} },
+ xaxes = [], yaxes = [],
plotOffset = { left: 0, right: 0, top: 0, bottom: 0},
canvasWidth = 0, canvasHeight = 0,
plotWidth = 0, plotHeight = 0,
@@ -138,9 +148,11 @@
processOptions: [],
processRawData: [],
processDatapoints: [],
+ drawSeries: [],
draw: [],
bindEvents: [],
- drawOverlay: []
+ drawOverlay: [],
+ shutdown: []
},
plot = this;
@@ -159,17 +171,35 @@
o.top += plotOffset.top;
return o;
};
- plot.getData = function() { return series; };
- plot.getAxes = function() { return axes; };
- plot.getOptions = function() { return options; };
+ plot.getData = function () { return series; };
+ plot.getAxes = function () {
+ var res = {}, i;
+ $.each(xaxes.concat(yaxes), function (_, axis) {
+ if (axis)
+ res[axis.direction + (axis.n != 1 ? axis.n : "") + "axis"] = axis;
+ });
+ return res;
+ };
+ plot.getXAxes = function () { return xaxes; };
+ plot.getYAxes = function () { return yaxes; };
+ plot.c2p = canvasToAxisCoords;
+ plot.p2c = axisToCanvasCoords;
+ plot.getOptions = function () { return options; };
plot.highlight = highlight;
plot.unhighlight = unhighlight;
plot.triggerRedrawOverlay = triggerRedrawOverlay;
plot.pointOffset = function(point) {
- return { left: parseInt(axisSpecToRealAxis(point, "xaxis").p2c(+point.x) + plotOffset.left),
- top: parseInt(axisSpecToRealAxis(point, "yaxis").p2c(+point.y) + plotOffset.top) };
+ return {
+ left: parseInt(xaxes[axisNumber(point, "x") - 1].p2c(+point.x) + plotOffset.left),
+ top: parseInt(yaxes[axisNumber(point, "y") - 1].p2c(+point.y) + plotOffset.top)
+ };
};
-
+ plot.shutdown = shutdown;
+ plot.resize = function () {
+ getCanvasDimensions();
+ resizeCanvas(canvas);
+ resizeCanvas(overlay);
+ };
// public attributes
plot.hooks = hooks;
@@ -177,7 +207,7 @@
// initialize
initPlugins(plot);
parseOptions(options_);
- constructCanvas();
+ setupCanvases();
setData(data_);
setupGrid();
draw();
@@ -200,14 +230,45 @@
}
function parseOptions(opts) {
+ var i;
+
$.extend(true, options, opts);
+
+ if (options.xaxis.color == null)
+ options.xaxis.color = options.grid.color;
+ if (options.yaxis.color == null)
+ options.yaxis.color = options.grid.color;
+
+ if (options.xaxis.tickColor == null) // backwards-compatibility
+ options.xaxis.tickColor = options.grid.tickColor;
+ if (options.yaxis.tickColor == null) // backwards-compatibility
+ options.yaxis.tickColor = options.grid.tickColor;
+
if (options.grid.borderColor == null)
options.grid.borderColor = options.grid.color;
+ if (options.grid.tickColor == null)
+ options.grid.tickColor = $.color.parse(options.grid.color).scale('a', 0.22).toString();
+
+ // fill in defaults in axes, copy at least always the
+ // first as the rest of the code assumes it'll be there
+ for (i = 0; i < Math.max(1, options.xaxes.length); ++i)
+ options.xaxes[i] = $.extend(true, {}, options.xaxis, options.xaxes[i]);
+ for (i = 0; i < Math.max(1, options.yaxes.length); ++i)
+ options.yaxes[i] = $.extend(true, {}, options.yaxis, options.yaxes[i]);
+
// backwards compatibility, to be removed in future
if (options.xaxis.noTicks && options.xaxis.ticks == null)
options.xaxis.ticks = options.xaxis.noTicks;
if (options.yaxis.noTicks && options.yaxis.ticks == null)
options.yaxis.ticks = options.yaxis.noTicks;
+ if (options.x2axis) {
+ options.xaxes[1] = $.extend(true, {}, options.xaxis, options.x2axis);
+ options.xaxes[1].position = "top";
+ }
+ if (options.y2axis) {
+ options.yaxes[1] = $.extend(true, {}, options.yaxis, options.y2axis);
+ options.yaxes[1].position = "right";
+ }
if (options.grid.coloredAreas)
options.grid.markings = options.grid.coloredAreas;
if (options.grid.coloredAreasColor)
@@ -218,9 +279,16 @@
$.extend(true, options.series.points, options.points);
if (options.bars)
$.extend(true, options.series.bars, options.bars);
- if (options.shadowSize)
+ if (options.shadowSize != null)
options.series.shadowSize = options.shadowSize;
+ // save options on axes for future reference
+ for (i = 0; i < options.xaxes.length; ++i)
+ getOrCreateAxis(xaxes, i + 1).options = options.xaxes[i];
+ for (i = 0; i < options.yaxes.length; ++i)
+ getOrCreateAxis(yaxes, i + 1).options = options.yaxes[i];
+
+ // add hooks from options
for (var n in hooks)
if (options.hooks[n] && options.hooks[n].length)
hooks[n] = hooks[n].concat(options.hooks[n]);
@@ -239,7 +307,7 @@
for (var i = 0; i < d.length; ++i) {
var s = $.extend(true, {}, options.series);
- if (d[i].data) {
+ if (d[i].data != null) {
s.data = d[i].data; // move the data instead of deep-copy
delete d[i].data;
@@ -255,15 +323,89 @@
return res;
}
- function axisSpecToRealAxis(obj, attr) {
- var a = obj[attr];
- if (!a || a == 1)
- return axes[attr];
- if (typeof a == "number")
- return axes[attr.ch...
[truncated message content] |
|
From: <sw...@us...> - 2011-06-21 19:57:17
|
Revision: 368
http://openautomation.svn.sourceforge.net/openautomation/?rev=368&view=rev
Author: swiss1
Date: 2011-06-21 19:57:10 +0000 (Tue, 21 Jun 2011)
Log Message:
-----------
Denon => KNX Plugin Version 0.1 BETA
Added Paths:
-----------
wiregate/plugin/generic/denon_steuerung_knx.pl
Added: wiregate/plugin/generic/denon_steuerung_knx.pl
===================================================================
--- wiregate/plugin/generic/denon_steuerung_knx.pl (rev 0)
+++ wiregate/plugin/generic/denon_steuerung_knx.pl 2011-06-21 19:57:10 UTC (rev 368)
@@ -0,0 +1,301 @@
+# Plugin zur Multimediasteuerung \xFCber einen 8fach Tastsensor
+# Version 0.1 20.06.2011 BETA
+# Copyright: swiss (http://knx-user-forum.de/members/swiss.html)
+# Die Vorlage f\xFCr die Daten\xFCbertragung via socat stammt von makki (http://knx-user-forum.de/members/makki.html)
+# Aufbau m\xF6glichst so, dass man unterhalb der Einstellungen nichts ver\xE4ndern muss!
+#
+#
+#######################
+### Wichtige Infos: ###
+#######################
+#
+# Im WG ist eine Socketverbindung mit folgenden Parametern zu erstellen:
+# Name: z.B. Denon
+# Socket1: tcp-connect, Socket: IP_DES_DENON:23, Optionen: cr
+# Socket2: udp-datagram, Socket: localhost:50105, Optionen: bind=localhost:50106,reuseaddr
+#
+#
+# Damit die Steuerung des ON/OFF Tasters korrekt funktioniert, muss die GA die unter $ga_status_einaus angegeben wird auch als h\xF6hrende Adresse beim EIN/AUS Taster angegeben werden!
+#
+#
+
+####################
+###Einstellungen:###
+####################
+
+
+my $ga_einaus = '9/5/0'; #Hier die GA f\xFCr EIN/AUS eintragen (0=AUS, 1=EIN)
+my $ga_status_einaus = '9/5/30'; #Hier die R\xFCckmelde-GA f\xFCr die Statusled EIN/AUS eintragen (0=AUS, 1=EIN)
+
+my $ga_lautstaerke = '9/5/4'; #Hier die GA f\xFCr MAINZONE leiser/lauter eintragen (0=leiser, 1=lauter)
+my $ga_main_lauter = '9/5/5';
+my $ga_main_leiser = '9/5/6';
+
+my $ga_status_mute = '9/5/8'; #Hier die R\xFCckmelde-GA f\xFCr die Statusled Stummschaltung eintragen (0=AUS, 1=EIN)
+
+my $ga_umschalttaste = '9/1/5';
+my $ga_status_umschalttaste = '9/1/14';
+
+my $ga_kurzwahltaste1 = '9/1/6'; #Hier die GA f\xFCr die MEMORY-Taste 1 eintragen (1=abrufen)
+my $ga_kurzwahltaste2 = '9/1/7'; #Hier die GA f\xFCr die MEMORY-Taste 2 eintragen (1=abrufen)
+my $ga_kurzwahltaste3 = '9/1/8'; #Hier die GA f\xFCr die MEMORY-Taste 3 eintragen (1=abrufen)
+my $ga_kurzwahltaste4 = '9/1/9'; #Hier die GA f\xFCr die MEMORY-Taste 4 eintragen (1=abrufen)
+
+my $ga_status_kurzwahltaste1 = '9/1/10';
+my $ga_status_kurzwahltaste2 = '9/1/11';
+my $ga_status_kurzwahltaste3 = '9/1/12';
+my $ga_status_kurzwahltaste4 = '9/1/13';
+
+my $socknum = 118; # Eindeutige Nummer des Sockets +1
+
+
+#Diese Einstellungen k\xF6nnen normalerweise so belassen werden!
+my $send_ip = "localhost"; # Sendeport (UDP, siehe in Socket-Einstellungen)
+my $send_port = "50106"; # Sendeport (UDP, siehe in Socket-Einstellungen)
+my $recv_ip = "localhost"; # Empfangsport (UDP, siehe in Socket-Einstellungen)
+my $recv_port = "50105"; # Empfangsport (UDP, siehe in Socket-Einstellungen)
+
+######################
+##ENDE Einstellungen##
+######################
+
+use Time::HiRes qw(usleep nanosleep);
+
+my %denon_befehle = ("PWOFF" => "PWSTANDBY\r",
+ "PWON" => "PWON\r",
+ "MVDOWN" => "MVDOWN\r",
+ "MVUP" => "MVUP\r",
+ "SAT" => "SISAT/CBL\r",
+ "DVD" => "SIDVD\r",
+ "TV" => "SITV\r",
+ "NET" => "SINET/USB\r",
+ "CD" => "SICD\r",
+ "TUNER" => "SITUNER\r",
+ "IRADIO" => "SIIRADIO\r",
+ "DVR" => "SIDVR\r");
+
+# Eigenen Aufruf-Zyklus auf 1T setzen
+$plugin_info{$plugname.'_cycle'} = 600;
+# Zyklischer Aufruf nach restart und alle 600 sek., dient dem anmelden an die Gruppenadresse, einmalig (0) w\xFCrde in diesem Fall auch gen\xFCgen
+
+if (!$socket[$socknum]) { # socket erstellen
+ $socket[$socknum] = IO::Socket::INET->new(LocalPort => $recv_port,
+ Proto => "udp",
+ LocalAddr => $recv_ip,
+ PeerPort => $send_port,
+ PeerAddr => $send_ip,
+ ReuseAddr => 1
+ )
+ or return ("open of $recv_ip : $recv_port failed: $!");
+
+ $socksel->add($socket[$socknum]); # add socket to select
+
+ $plugin_socket_subscribe{$socket[$socknum]} = $plugname; # subscribe plugin
+ return "opened Socket $socknum";
+}
+
+if ($msg{'apci'} eq "A_GroupValue_Write"){
+ if ($msg{'dst'} eq $ga_einaus) {
+ if (knx_read($msg{'dst'},0,1) == 1){
+ my $return_value2 = command_senden('PWON');
+ }elsif (knx_read($msg{'dst'},0,1) == 0){
+ knx_write($ga_status_einaus,0,1);
+ $plugin_info{$plugname.'_status_quelle'} = 0;
+ my $return_value = rueckmeldung_led();
+ my $return_value2 = command_senden('PWOFF');
+ }
+ return;
+ } elsif ($msg{'dst'} eq $ga_main_lauter) {
+ if (knx_read($msg{'dst'},0,1) == 1){
+ do
+ {
+ my $return_value2 = command_senden('MVUP');
+ usleep(150000);
+ } until (knx_read($msg{'dst'},0,1) == 0);
+ return;
+ }
+ } elsif ($msg{'dst'} eq $ga_main_leiser) {
+ if (knx_read($msg{'dst'},0,1) == 1){
+ do
+ {
+ my $return_value2 = command_senden('MVDOWN');
+ usleep(150000);
+ } until (knx_read($msg{'dst'},0,1) == 0);
+ return;
+ }
+ } elsif ($msg{'dst'} eq $ga_lautstaerke) {
+ if (knx_read($msg{'dst'},0,1) == 1){
+ my $return_value2 = command_senden('MVUP');
+ }elsif (knx_read($msg{'dst'},0,1) == 0){
+ my $return_value2 = command_senden('MVDOWN');
+ }
+ return;
+ } elsif ($msg{'dst'} eq $ga_umschalttaste) {
+ if (knx_read($ga_status_einaus,0,1) == 1){ #Wenn der Verst\xE4rker eingeschaltet ist, dann reagiere auf Quellenwahl
+ if (knx_read($msg{'dst'},0,1) == 1){
+ knx_write($ga_status_umschalttaste,1,1);
+ $plugin_info{$plugname.'_status_umschaltung'} = 1;
+ }elsif (knx_read($msg{'dst'},0,1) == 0){
+ knx_write($ga_status_umschalttaste,0,1);
+ $plugin_info{$plugname.'_status_umschaltung'} = 0;
+ }
+ return;
+ }
+ } elsif ($msg{'dst'} eq $ga_kurzwahltaste1) {
+ if (knx_read($ga_status_einaus,0,1) == 1){ #Wenn der Verst\xE4rker eingeschaltet ist, dann reagiere auf Quellenwahl
+ if (knx_read($msg{'dst'},0,1) == 1){
+ if ($plugin_info{$plugname.'_status_umschaltung'} == 0) {
+ $plugin_info{$plugname.'_status_quelle'} = 1;
+ my $return_value2 = command_senden('SAT');
+ my $return_value = rueckmeldung_led();
+ return;
+ } elsif ($plugin_info{$plugname.'_status_umschaltung'} == 1){
+ $plugin_info{$plugname.'_status_quelle'} = 5;
+ my $return_value2 = command_senden('NET');
+ my $return_value = rueckmeldung_led();
+ return;
+ }
+ }
+ }
+ } elsif ($msg{'dst'} eq $ga_kurzwahltaste2) {
+ if (knx_read($ga_status_einaus,0,1) == 1){ #Wenn der Verst\xE4rker eingeschaltet ist, dann reagiere auf Quellenwahl
+ if (knx_read($msg{'dst'},0,1) == 1){
+ if ($plugin_info{$plugname.'_status_umschaltung'} == 0) {
+ $plugin_info{$plugname.'_status_quelle'} = 2;
+ my $return_value2 = command_senden('TV');
+ my $return_value = rueckmeldung_led();
+ return;
+ } elsif ($plugin_info{$plugname.'_status_umschaltung'} == 1){
+ $plugin_info{$plugname.'_status_quelle'} = 6;
+ my $return_value2 = command_senden('IRADIO');
+ my $return_value = rueckmeldung_led();
+ return;
+ }
+ }
+ }
+ } elsif ($msg{'dst'} eq $ga_kurzwahltaste3) {
+ if (knx_read($ga_status_einaus,0,1) == 1){ #Wenn der Verst\xE4rker eingeschaltet ist, dann reagiere auf Quellenwahl
+ if (knx_read($msg{'dst'},0,1) == 1){
+ if ($plugin_info{$plugname.'_status_umschaltung'} == 0) {
+ $plugin_info{$plugname.'_status_quelle'} = 3;
+ my $return_value2 = command_senden('DVD');
+ my $return_value = rueckmeldung_led();
+ return;
+ } elsif ($plugin_info{$plugname.'_status_umschaltung'} == 1){
+ $plugin_info{$plugname.'_status_quelle'} = 7;
+ my $return_value2 = command_senden('DVR');
+ my $return_value = rueckmeldung_led();
+ return;
+ }
+ }
+ }
+ } elsif ($msg{'dst'} eq $ga_kurzwahltaste4) {
+ if (knx_read($ga_status_einaus,0,1) == 1){ #Wenn der Verst\xE4rker eingeschaltet ist, dann reagiere auf Quellenwahl
+ if (knx_read($msg{'dst'},0,1) == 1){
+ if ($plugin_info{$plugname.'_status_umschaltung'} == 0) {
+ $plugin_info{$plugname.'_status_quelle'} = 4;
+ my $return_value2 = command_senden('CD');
+ my $return_value = rueckmeldung_led();
+ return;
+ } elsif ($plugin_info{$plugname.'_status_umschaltung'} == 1){
+ $plugin_info{$plugname.'_status_quelle'} = 8;
+ my $return_value2 = command_senden('TUNER');
+ my $return_value = rueckmeldung_led();
+ return;
+ }
+ }
+ }
+ }
+} elsif ($fh) { # incoming datagram
+ my $buf = <$fh>;
+ my $bufhex = unpack("H*",$buf);
+ chomp $buf;
+ my $fn = substr($buf,0,2);
+ my $fp = substr($buf,0,4);
+
+ if ($fp eq "PWON") {
+ knx_write($ga_status_einaus,1,1);
+ syswrite($socket[$socknum],"SI?\r");
+ return;
+ } elsif ($fp eq "PWST") {
+ knx_write($ga_status_einaus,0,1);
+ $plugin_info{$plugname.'_status_quelle'} = 0;
+ my $return_value = rueckmeldung_led();
+ return;
+ } elsif ($fp eq "MUON") {
+ knx_write($ga_status_mute,1,1);
+ return;
+ } elsif ($fp eq "MUOF") {
+ knx_write($ga_status_mute,0,1);
+ return;
+ } elsif ($fn eq "SI") {
+ if (knx_read($ga_status_einaus,0,1) == 0){
+ $plugin_info{$plugname.'_status_quelle'} = 0;
+
+ } else {
+ if ($buf eq "SISAT/CBL"){
+ $plugin_info{$plugname.'_status_quelle'} = 1;
+ } elsif ($buf eq "SITV") {
+ $plugin_info{$plugname.'_status_quelle'} = 2;
+ } elsif ($buf eq "SIDVD") {
+ $plugin_info{$plugname.'_status_quelle'} = 3;
+ } elsif ($buf eq "SICD") {
+ $plugin_info{$plugname.'_status_quelle'} = 4;
+ } elsif ($buf eq "SINET/USB") {
+ $plugin_info{$plugname.'_status_quelle'} = 5;
+ } elsif ($buf eq "SIIRADIO") {
+ $plugin_info{$plugname.'_status_quelle'} = 6;
+ } elsif ($buf eq "SIDVR") {
+ $plugin_info{$plugname.'_status_quelle'} = 7;
+ } elsif ($buf eq "SITUNER") {
+ $plugin_info{$plugname.'_status_quelle'} = 8;
+ } else {
+ $plugin_info{$plugname.'_status_quelle'} = 0;
+ }
+ }
+ my $return_value = rueckmeldung_led();
+ return;
+ } elsif ($fn eq "MV" and $buf !~ /^MVMAX/) { # MVMAX is undocumented?
+ # broken, just sends every 2, .5 isn't considered
+ return;
+ } else {
+ return;
+ }
+} else { # zyklischer Aufruf
+ # Plugin an Gruppenadresse "anmelden", hierdurch wird das Plugin im folgenden bei jedem eintreffen eines Telegramms auf die GA aufgerufen und der obere Teil dieser if-Schleife durchlaufen
+ $plugin_subscribe{$ga_einaus}{$plugname} = 1;
+ $plugin_subscribe{$ga_lautstaerke}{$plugname} = 1;
+ $plugin_subscribe{$ga_main_lauter}{$plugname} = 1;
+ $plugin_subscribe{$ga_main_leiser}{$plugname} = 1;
+ $plugin_subscribe{$ga_umschalttaste}{$plugname} = 1;
+ $plugin_subscribe{$ga_kurzwahltaste1}{$plugname} = 1;
+ $plugin_subscribe{$ga_kurzwahltaste2}{$plugname} = 1;
+ $plugin_subscribe{$ga_kurzwahltaste3}{$plugname} = 1;
+ $plugin_subscribe{$ga_kurzwahltaste4}{$plugname} = 1;
+}
+
+# Hier werden diverse Zust\xE4nde des Denon zyklisch abgefragt um den aktuellen Status auch anzeigen zu k\xF6nnen, wenn etwas \xFCber z.B. die FB ver\xE4ndert wird:
+syswrite($socket[$socknum],"PW?\r");
+syswrite($socket[$socknum],"MU?\r");
+syswrite($socket[$socknum],"SI?\r");
+return;
+
+#Hier werden die Status LED der Quellenwahltasten angesteuert
+sub rueckmeldung_led{
+ SELECT:{
+ if ($plugin_info{$plugname.'_status_quelle'} == 0){ knx_write($ga_status_umschalttaste,0,1); knx_write($ga_status_kurzwahltaste1,0,1); knx_write($ga_status_kurzwahltaste2,0,1); knx_write($ga_status_kurzwahltaste3,0,1); knx_write($ga_status_kurzwahltaste4,0,1); last SELECT; }
+ if ($plugin_info{$plugname.'_status_quelle'} == 1){ knx_write($ga_status_umschalttaste,0,1); knx_write($ga_status_kurzwahltaste1,1,1); knx_write($ga_status_kurzwahltaste2,0,1); knx_write($ga_status_kurzwahltaste3,0,1); knx_write($ga_status_kurzwahltaste4,0,1); last SELECT; }
+ if ($plugin_info{$plugname.'_status_quelle'} == 2){ knx_write($ga_status_umschalttaste,0,1); knx_write($ga_status_kurzwahltaste1,0,1); knx_write($ga_status_kurzwahltaste2,1,1); knx_write($ga_status_kurzwahltaste3,0,1); knx_write($ga_status_kurzwahltaste4,0,1); last SELECT; }
+ if ($plugin_info{$plugname.'_status_quelle'} == 3){ knx_write($ga_status_umschalttaste,0,1); knx_write($ga_status_kurzwahltaste1,0,1); knx_write($ga_status_kurzwahltaste2,0,1); knx_write($ga_status_kurzwahltaste3,1,1); knx_write($ga_status_kurzwahltaste4,0,1); last SELECT; }
+ if ($plugin_info{$plugname.'_status_quelle'} == 4){ knx_write($ga_status_umschalttaste,0,1); knx_write($ga_status_kurzwahltaste1,0,1); knx_write($ga_status_kurzwahltaste2,0,1); knx_write($ga_status_kurzwahltaste3,0,1); knx_write($ga_status_kurzwahltaste4,1,1); last SELECT; }
+ if ($plugin_info{$plugname.'_status_quelle'} == 5){ knx_write($ga_status_umschalttaste,1,1); knx_write($ga_status_kurzwahltaste1,1,1); knx_write($ga_status_kurzwahltaste2,0,1); knx_write($ga_status_kurzwahltaste3,0,1); knx_write($ga_status_kurzwahltaste4,0,1); last SELECT; }
+ if ($plugin_info{$plugname.'_status_quelle'} == 6){ knx_write($ga_status_umschalttaste,1,1); knx_write($ga_status_kurzwahltaste1,0,1); knx_write($ga_status_kurzwahltaste2,1,1); knx_write($ga_status_kurzwahltaste3,0,1); knx_write($ga_status_kurzwahltaste4,0,1); last SELECT; }
+ if ($plugin_info{$plugname.'_status_quelle'} == 7){ knx_write($ga_status_umschalttaste,1,1); knx_write($ga_status_kurzwahltaste1,0,1); knx_write($ga_status_kurzwahltaste2,0,1); knx_write($ga_status_kurzwahltaste3,1,1); knx_write($ga_status_kurzwahltaste4,0,1); last SELECT; }
+ if ($plugin_info{$plugname.'_status_quelle'} == 8){ knx_write($ga_status_umschalttaste,1,1); knx_write($ga_status_kurzwahltaste1,0,1); knx_write($ga_status_kurzwahltaste2,0,1); knx_write($ga_status_kurzwahltaste3,0,1); knx_write($ga_status_kurzwahltaste4,1,1); last SELECT; }
+ }
+}
+
+sub command_senden{
+ my $befehl = $_[0];
+ syswrite($socket[$socknum], $denon_befehle{$befehl});
+}
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <j-...@us...> - 2011-06-21 19:41:09
|
Revision: 367
http://openautomation.svn.sourceforge.net/openautomation/?rev=367&view=rev
Author: j-n-k
Date: 2011-06-21 19:41:03 +0000 (Tue, 21 Jun 2011)
Log Message:
-----------
Added Heizungsregelung Plugin
Added Paths:
-----------
wiregate/plugin/generic/Heizung
Added: wiregate/plugin/generic/Heizung
===================================================================
--- wiregate/plugin/generic/Heizung (rev 0)
+++ wiregate/plugin/generic/Heizung 2011-06-21 19:41:03 UTC (rev 367)
@@ -0,0 +1,53 @@
+# Heizungsregelung
+# Plugin h\xF6rt auf GA des Auf/Ab-Befehles und schickt neuen Sollwert
+# V0.1 2011-05-18
+# by Jan N. Klug
+
+### Definitionen
+my $schritt_ga = '4/1/3'; # Gruppenadresse Sollwert Auf = 1 / Ab = 0
+my $sollwert_ga = '4/2/3'; # Gruppenadresse Sollwert
+my $sollwert = 15;
+my $sollwertmin = 10; # Sollwert Minimum
+my $sollwertmax = 25; # Sollwert Maximum
+### Ende Definitionen
+
+# Eigenen Aufruf-Zyklus auf 1x st\xFCndlich setzen, h\xF6rt ja auf GA
+$plugin_info{$plugname.'_cycle'} = 3600;
+$sollwert = $plugin_info{$plugname.'_sollwert'};
+
+# Plugin an Gruppenadresse "anmelden"
+$plugin_subscribe{$schritt_ga}{$plugname} = 1;
+$plugin_subscribe{$sollwert_ga}{$plugname} = 1;
+
+# 1=auf, 0=ab
+if ($msg{'apci'} eq "A_GroupValue_Write" && $msg{'dst'} eq $schritt_ga && defined $msg{'value'} && $msg{'value'} == "0" ) {
+ if($sollwert>$sollwertmin) {
+ $sollwert -= 0.5;
+ knx_write($sollwert_ga,$sollwert,9);
+ $plugin_info{$plugname.'_sollwert'} = $sollwert;
+ return 1;
+ }
+}
+
+if ($msg{'apci'} eq "A_GroupValue_Write" && $msg{'dst'} eq $schritt_ga && defined $msg{'value'} && $msg{'value'} == "1" ) {
+ if($sollwert<$sollwertmax) {
+ $sollwert += 0.5;
+ knx_write($sollwert_ga,$sollwert,9);
+ $plugin_info{$plugname.'_sollwert'} = $sollwert;
+ return 1;
+ }
+}
+
+#Sollwert vom Bus lesen, wenn von dort gesendet
+if ($msg{'apci'} eq "A_GroupValue_Write" && $msg{'dst'} eq $sollwert_ga ) {
+# if (!defined $msg{'value'}) {
+ # falls GA/DPT nicht importiert
+ $msg{'value'} = decode_dpt9($msg{'data'});
+# }
+ $plugin_info{$plugname.'_sollwert'} = $msg{'value'};
+ return 2;
+}
+
+knx_write($sollwert_ga,$sollwert,9);
+
+return 0;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2011-06-19 19:15:16
|
Revision: 366
http://openautomation.svn.sourceforge.net/openautomation/?rev=366&view=rev
Author: makki1
Date: 2011-06-19 19:15:10 +0000 (Sun, 19 Jun 2011)
Log Message:
-----------
Dreambox - messages using LWP::Useragent
Added Paths:
-----------
wiregate/plugin/generic/Dreambox-Meldung.pl
Added: wiregate/plugin/generic/Dreambox-Meldung.pl
===================================================================
--- wiregate/plugin/generic/Dreambox-Meldung.pl (rev 0)
+++ wiregate/plugin/generic/Dreambox-Meldung.pl 2011-06-19 19:15:10 UTC (rev 366)
@@ -0,0 +1,112 @@
+# Plugin um Meldungen an die Dreambox zu senden (mit LWP::UserAgent statt wget)
+# f\xFCr Enigma2-boxen (7025,8000,800,..)
+# Version: 0.1 2011-06-19
+
+##################
+### DEFINITION ###
+##################
+
+my $socknum = 131; # Eindeutige Nummer des UDP-Sockets
+
+# Eigenen Aufruf-Zyklus setzen (Initialisierung/zyklisches pr\xFCfen)
+$plugin_info{$plugname.'_cycle'} = 86400;
+
+my %options = ();
+$options{'dream_ip'} = "172.17.2.90"; # IP-Adresse der Dreambox
+
+# Drei verschiedene M\xF6glichkeiten zur Nutzung:
+# VARIANTE 1: Wert auf einer GA sendet fixe Nachricht mit Wert (Bitwert oder Bytewert):
+my %meldungs_ga; # Eintrag darf nicht auskommentiert werden, solange nachfolgend keine GA definiert erfolgt kein Versand!
+$meldungs_ga{'14/5/208'} = "1;5;Text208"; # Type,Timeout,Text - ggfs. NUR DIESE Zeile auskommentieren um Variante 1 nicht zu nutzen!
+$meldungs_ga{'14/5/209'} = "1;5;Text209"; # Type,Timeout,Text - ggfs. NUR DIESE Zeile auskommentieren um Variante 1 nicht zu nutzen!
+# Type: 1=Info-Icon,2=kein Icon,3= Error-Icon,0=Frage ja/nein->nonsens hier
+
+# VARIANTE 2: Plugin horcht auf UDP-Port und empf\xE4ngt Format Type;Timeout;Text\n
+# Vorteil: man mann aus anderen Plugins - sofern diese vorhanden - z.B. auch einfach mit
+# syswrite($socket[131],"1;5;MeinText");
+# eine Meldung absetzten. 131 siehe oben, die Variable ist nur lokal im Plugin vorhanden
+my $recv_ip = "0.0.0.0"; # Empfangs-IP
+my $recv_port = "50019"; # Empfangsport
+
+# VARIANTE 3: vordefinierte Meldungstexte je nach Inhalt des Telegramms (1-Byte unsigned DPT5.010 - 0-255)
+my $meldungs_array_ga = "14/5/210"; # Eintrag darf nicht auskommentiert werden, solange nachfolgend keine Meldung definiert erfolgt kein Versand!
+my @meldungs_array; # Eintrag darf nicht auskommentiert werden, solange nachfolgend keine Meldung definiert erfolgt kein Versand!
+$meldungs_array[0] = "1;5;Text f\xFCr Wert 0";
+#...
+$meldungs_array[99] = "1;5;Text f\xFCr Wert 99";
+
+#######################
+### ENDE DEFINITION ###
+#######################
+
+# Hauptverarbeitung
+if (!$socket[$socknum]) { # horchenden UDP-socket erstellen
+ $socket[$socknum] = IO::Socket::INET->new(LocalPort => $recv_port,
+ Proto => "udp",
+ LocalAddr => $recv_ip,
+ ReuseAddr => 1
+ )
+ or return ("open of $recv_ip : $recv_port failed: $!");
+ $socksel->add($socket[$socknum]); # add socket to select
+ $plugin_socket_subscribe{$socket[$socknum]} = $plugname; # subscribe plugin
+ # subscribe GA's
+ while( my ($k, $v) = each(%meldungs_ga) ) {
+ # Plugin an Gruppenadresse "anmelden"
+ $plugin_subscribe{$k}{$plugname} = 1;
+ }
+ $plugin_subscribe{$meldungs_array_ga}{$plugname} = 1;
+
+ return "opened UDP-Socket $socknum";
+}
+
+if (%msg) { # telegramm vom KNX
+ if ($msg{'apci'} eq "A_GroupValue_Write" and $meldungs_ga{$msg{'dst'}}) {
+ return sendDream($meldungs_ga{$msg{'dst'}});
+ } elsif ($msg{'apci'} eq "A_GroupValue_Write" and $meldungs_array_ga and $meldungs_array[$msg{'data'}]) {
+ return sendDream($meldungs_array[$msg{'data'}]);
+ }
+} elsif ($fh) { # UDP-Packet
+ my $buf = <$fh>;
+ chomp $buf;
+ return sendDream($buf);
+} else {
+ # cyclic/init/change
+ # subscribe GA's
+ while( my ($k, $v) = each(%meldungs_ga) ) {
+ # Plugin an Gruppenadresse "anmelden"
+ $plugin_subscribe{$k}{$plugname} = 1;
+ }
+ $plugin_subscribe{$meldungs_array_ga}{$plugname} = 1;
+ return; # ("return dunno");
+}
+
+sub sendDream {
+ ($options{'type'},$options{'timeout'},$options{'text'}) = split ';',shift;
+ use LWP::UserAgent;
+ # URL encode our arguments
+ $options{'text'} =~ s/([^A-Za-z0-9])/sprintf("%%%02X", ord($1))/seg;
+ # Generate our HTTP request.
+ my ($userAgent, $request, $response, $requestURL);
+ $userAgent = LWP::UserAgent->new;
+ $userAgent->agent("WireGatePlugin/1.0");
+
+ $requestURL = sprintf("http://%s/web/message?type=%d&timeout=%d&text=%s",
+ $options{'dream_ip'},
+ $options{'type'},
+ $options{'timeout'},
+ $options{'text'});
+
+ $request = HTTP::Request->new(GET => $requestURL);
+
+ $response = $userAgent->request($request);
+
+ if ($response->is_success) {
+ return "Notification successfully posted: $options{'type'},$options{'timeout'},$options{'text'}";
+ } elsif ($response->code == 401) {
+ return "Notification not posted: access denied: " . $response->content;
+ } else {
+ return "Notification not posted: " . $response->content;
+ }
+}
+
+return;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2011-06-10 20:26:32
|
Revision: 365
http://openautomation.svn.sourceforge.net/openautomation/?rev=365&view=rev
Author: mayerch
Date: 2011-06-10 20:26:26 +0000 (Fri, 10 Jun 2011)
Log Message:
-----------
Change for release
Modified Paths:
--------------
CometVisu/branches/release_0.6.0-pre1/ChangeLog
Modified: CometVisu/branches/release_0.6.0-pre1/ChangeLog
===================================================================
--- CometVisu/branches/release_0.6.0-pre1/ChangeLog 2011-06-10 20:23:41 UTC (rev 364)
+++ CometVisu/branches/release_0.6.0-pre1/ChangeLog 2011-06-10 20:26:26 UTC (rev 365)
@@ -1,8 +1,3 @@
-HEAD
-====
-
--
-
0.6.0-pre1
==========
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2011-06-10 20:23:47
|
Revision: 364
http://openautomation.svn.sourceforge.net/openautomation/?rev=364&view=rev
Author: mayerch
Date: 2011-06-10 20:23:41 +0000 (Fri, 10 Jun 2011)
Log Message:
-----------
Creating release branch 0.6.0-pre1
Added Paths:
-----------
CometVisu/branches/release_0.6.0-pre1/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2011-06-10 20:05:24
|
Revision: 363
http://openautomation.svn.sourceforge.net/openautomation/?rev=363&view=rev
Author: mayerch
Date: 2011-06-10 20:05:18 +0000 (Fri, 10 Jun 2011)
Log Message:
-----------
clean up
Removed Paths:
-------------
CometVisu/branches/release_0.6.0-pre1/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2011-06-10 19:54:46
|
Revision: 362
http://openautomation.svn.sourceforge.net/openautomation/?rev=362&view=rev
Author: mayerch
Date: 2011-06-10 19:54:40 +0000 (Fri, 10 Jun 2011)
Log Message:
-----------
Creating release branch 0.6.0-pre1
Added Paths:
-----------
CometVisu/branches/release_0.6.0-pre1/trunk/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2011-06-10 19:39:07
|
Revision: 361
http://openautomation.svn.sourceforge.net/openautomation/?rev=361&view=rev
Author: mayerch
Date: 2011-06-10 19:39:01 +0000 (Fri, 10 Jun 2011)
Log Message:
-----------
Creating release branch 0.6.0-pre1
Added Paths:
-----------
CometVisu/branches/release_0.6.0-pre1/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2011-06-10 19:20:36
|
Revision: 360
http://openautomation.svn.sourceforge.net/openautomation/?rev=360&view=rev
Author: mayerch
Date: 2011-06-10 19:20:30 +0000 (Fri, 10 Jun 2011)
Log Message:
-----------
Prepare release 0.6.0-pre1
Modified Paths:
--------------
CometVisu/trunk/ChangeLog
Modified: CometVisu/trunk/ChangeLog
===================================================================
--- CometVisu/trunk/ChangeLog 2011-06-08 20:57:06 UTC (rev 359)
+++ CometVisu/trunk/ChangeLog 2011-06-10 19:20:30 UTC (rev 360)
@@ -1,6 +1,11 @@
HEAD
====
+-
+
+0.6.0-pre1
+==========
+
- New Feature: Multitrigger widget
- New Feature: The switch widget can send arbitrary values now
- New Feature: Add selectable config to check_config.php
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <da...@us...> - 2011-06-08 20:57:14
|
Revision: 359
http://openautomation.svn.sourceforge.net/openautomation/?rev=359&view=rev
Author: daviid5
Date: 2011-06-08 20:57:06 +0000 (Wed, 08 Jun 2011)
Log Message:
-----------
fixed scroll problem with ipad
Modified Paths:
--------------
CometVisu/trunk/visu/lib/templateengine.js
Modified: CometVisu/trunk/visu/lib/templateengine.js
===================================================================
--- CometVisu/trunk/visu/lib/templateengine.js 2011-06-05 18:55:13 UTC (rev 358)
+++ CometVisu/trunk/visu/lib/templateengine.js 2011-06-08 20:57:06 UTC (rev 359)
@@ -126,8 +126,7 @@
{
var uagent = navigator.userAgent.toLowerCase();
- if (/(android|blackberry|iphone|ipod|series60|symbian|windows ce|palm)/i.test(uagent)) {
- var width = $( window ).width();
+if (/(android|blackberry|iphone|ipod|ipad|series60|symbian|windows ce|palm)/i.test(uagent)) { var width = $( window ).width();
$( '#main' ).css( 'width', width );
$( 'head' ).append( '<style type="text/css">.page{width:' + (width-0) + 'px;}</style>' );
// do nothing
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2011-06-05 18:55:19
|
Revision: 358
http://openautomation.svn.sourceforge.net/openautomation/?rev=358&view=rev
Author: mayerch
Date: 2011-06-05 18:55:13 +0000 (Sun, 05 Jun 2011)
Log Message:
-----------
Remove the obsolete pre and post attributes
Modified Paths:
--------------
CometVisu/trunk/visu/visu_config_demo.xml
Modified: CometVisu/trunk/visu/visu_config_demo.xml
===================================================================
--- CometVisu/trunk/visu/visu_config_demo.xml 2011-06-05 18:53:17 UTC (rev 357)
+++ CometVisu/trunk/visu/visu_config_demo.xml 2011-06-05 18:55:13 UTC (rev 358)
@@ -67,7 +67,7 @@
<address transform="DPT:9.001" readonly="true" type="">12/4/253</address>
</switch>
<break/>
- <trigger pre="pre" post="post" value="0" mapping="OnOff">
+ <trigger value="0" mapping="OnOff">
<label>Trigger - Terrasse Licht</label>
<address transform="DPT:1.001" readonly="false" type="">1/0/2</address>
</trigger>
@@ -87,7 +87,7 @@
<address transform="DPT:9.001" readonly="true" type="">12/4/253</address>
</slide>
</group>
- <multitrigger pre="pre" post="post" button1label="An" button1value="0" button2label="Aus" button2value="1" button3label="Essen" button3value="2" button4label="Fernsehen" button4value="3">
+ <multitrigger button1label="An" button1value="0" button2label="Aus" button2value="1" button3label="Essen" button3value="2" button4label="Fernsehen" button4value="3">
<label>Multitrigger - Szenenaufruf</label>
<address transform="DPT:5.010" readonly="false" type="">11/2/50</address>
</multitrigger>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2011-06-05 18:53:23
|
Revision: 357
http://openautomation.svn.sourceforge.net/openautomation/?rev=357&view=rev
Author: mayerch
Date: 2011-06-05 18:53:17 +0000 (Sun, 05 Jun 2011)
Log Message:
-----------
Update to the new universal address attribute "variant" (and thus delete the color attribute)
Modified Paths:
--------------
CometVisu/trunk/visu/visu_config.xsd
Modified: CometVisu/trunk/visu/visu_config.xsd
===================================================================
--- CometVisu/trunk/visu/visu_config.xsd 2011-06-05 18:44:26 UTC (rev 356)
+++ CometVisu/trunk/visu/visu_config.xsd 2011-06-05 18:53:17 UTC (rev 357)
@@ -16,21 +16,13 @@
<xsd:restriction base="xsd:string" />
</xsd:simpleType>
-<xsd:simpleType name="color">
- <xsd:restriction base="xsd:string">
- <xsd:enumeration value="r" />
- <xsd:enumeration value="g" />
- <xsd:enumeration value="b" />
- </xsd:restriction>
-</xsd:simpleType>
-
<xsd:complexType name="address">
<xsd:simpleContent>
<xsd:extension base="addr">
<xsd:attribute ref="transform" use="required" />
<xsd:attribute ref="readonly" use="optional" />
<xsd:attribute name="type" type="xsd:string" use="optional" />
- <xsd:attribute name="color" type="color" use="optional" />
+ <xsd:attribute name="variant" type="xsd:string" use="optional" />
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2011-06-05 18:44:32
|
Revision: 356
http://openautomation.svn.sourceforge.net/openautomation/?rev=356&view=rev
Author: mayerch
Date: 2011-06-05 18:44:26 +0000 (Sun, 05 Jun 2011)
Log Message:
-----------
Updated change log to contain all commits up to 355
Modified Paths:
--------------
CometVisu/trunk/ChangeLog
Modified: CometVisu/trunk/ChangeLog
===================================================================
--- CometVisu/trunk/ChangeLog 2011-06-05 16:50:22 UTC (rev 355)
+++ CometVisu/trunk/ChangeLog 2011-06-05 18:44:26 UTC (rev 356)
@@ -3,7 +3,26 @@
- New Feature: Multitrigger widget
- New Feature: The switch widget can send arbitrary values now
+- New Feature: Add selectable config to check_config.php
+- New Feature: groups
+- New Feature: infotrigger widget
+- updated config scheme, added documentaion for widgets
+- added "align"-attribute to switch, trigger, multitrigger
+- Add jnotify statusbar instead of alerts in editor
+- Changed behaviour of the slider to not send any packets when it's changed by
+ an external packet - even if it can't display that value
+- diagrams: Fix Grid timezone and add periods+datasource
+- editor fixes: allow attributes for pages, don't drop names of "empty" pages
+- fix diagram_popup preview in design pure
+- Fix bug #3300926: "Multitrigger display broken"
+- Fix bug #3301566
+- Fix bug #3309264: fix for broken infotrigger scheme
+Config changes:
+- Change the ColorChooser plugin from using <address ... color="..."> to the new
+ common attribute "variant"
+NOTE: this breaks backward compatability. Please adjust your config file!
+
0.5.3
=====
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|