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: <j-...@us...> - 2012-01-15 17:36:12
|
Revision: 655
http://openautomation.svn.sourceforge.net/openautomation/?rev=655&view=rev
Author: j-n-k
Date: 2012-01-15 17:36:05 +0000 (Sun, 15 Jan 2012)
Log Message:
-----------
Fix css/ design issues for rss-plugin
Modified Paths:
--------------
CometVisu/trunk/visu/designs/alaska/basic.css
CometVisu/trunk/visu/designs/alaska_slim/basic.css
CometVisu/trunk/visu/designs/discreet/basic.css
CometVisu/trunk/visu/designs/discreet_sand/basic.css
CometVisu/trunk/visu/designs/discreet_slim/basic.css
CometVisu/trunk/visu/designs/pure/basic.css
CometVisu/trunk/visu/plugins/rss/structure_plugin.js
Modified: CometVisu/trunk/visu/designs/alaska/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/alaska/basic.css 2012-01-15 17:09:04 UTC (rev 654)
+++ CometVisu/trunk/visu/designs/alaska/basic.css 2012-01-15 17:36:05 UTC (rev 655)
@@ -385,6 +385,10 @@
text-decoration: none;
}
+.rss_inline>ul {
+ padding-left:1em;
+ margin: 0px;
+}
/* styles for the preview */
div#demo_1, div#demo_2, div#demo_3 {
Modified: CometVisu/trunk/visu/designs/alaska_slim/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/alaska_slim/basic.css 2012-01-15 17:09:04 UTC (rev 654)
+++ CometVisu/trunk/visu/designs/alaska_slim/basic.css 2012-01-15 17:36:05 UTC (rev 655)
@@ -330,6 +330,11 @@
cursor: pointer;
}
+.rss_inline>ul {
+ padding-left:1em;
+ margin: 0px;
+}
+
.diagram_inline
{
width: 320px;
Modified: CometVisu/trunk/visu/designs/discreet/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/discreet/basic.css 2012-01-15 17:09:04 UTC (rev 654)
+++ CometVisu/trunk/visu/designs/discreet/basic.css 2012-01-15 17:36:05 UTC (rev 655)
@@ -389,6 +389,11 @@
opacity: 0.80;
}
+.rss_inline>ul {
+ padding-left:1em;
+ margin: 0px;
+}
+
/* styles for the preview */
div#demo_1, div#demo_2 {
width: 100%;
Modified: CometVisu/trunk/visu/designs/discreet_sand/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/discreet_sand/basic.css 2012-01-15 17:09:04 UTC (rev 654)
+++ CometVisu/trunk/visu/designs/discreet_sand/basic.css 2012-01-15 17:36:05 UTC (rev 655)
@@ -169,6 +169,8 @@
{
color: #165d7e; /*#3F2F1F;*/
width: 49%;
+ line-height: 2em;
+ padding-left: 1em;
}
.page
@@ -373,6 +375,10 @@
color: #453420;
}
+.rss_inline>ul {
+ padding-left:1em;
+ margin: 0px;
+}
#diagramTooltip {
z-index: 1000;
color: black;
Modified: CometVisu/trunk/visu/designs/discreet_slim/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/discreet_slim/basic.css 2012-01-15 17:09:04 UTC (rev 654)
+++ CometVisu/trunk/visu/designs/discreet_slim/basic.css 2012-01-15 17:36:05 UTC (rev 655)
@@ -336,7 +336,6 @@
display: none !important;
}
-
.popup,
.popup_background {
position: absolute;
@@ -369,6 +368,11 @@
border-bottom: 1px solid;
}
+.rss_inline>ul {
+ padding-left:1em;
+ margin: 0px;
+}
+
.popup_background.error {
background: #800000;
border: #f00;
Modified: CometVisu/trunk/visu/designs/pure/basic.css
===================================================================
--- CometVisu/trunk/visu/designs/pure/basic.css 2012-01-15 17:09:04 UTC (rev 654)
+++ CometVisu/trunk/visu/designs/pure/basic.css 2012-01-15 17:36:05 UTC (rev 655)
@@ -371,6 +371,11 @@
opacity: 0.80;
}
+.rss_inline>ul {
+ padding-left:1em;
+ margin: 0px;
+}
+
/*****************************************************************************/
/* The definition of the flavours - overwrite the generic settings */
/*****************************************************************************/
Modified: CometVisu/trunk/visu/plugins/rss/structure_plugin.js
===================================================================
--- CometVisu/trunk/visu/plugins/rss/structure_plugin.js 2012-01-15 17:09:04 UTC (rev 654)
+++ CometVisu/trunk/visu/plugins/rss/structure_plugin.js 2012-01-15 17:36:05 UTC (rev 655)
@@ -42,7 +42,7 @@
var ret_val = $('<div class="widget clearfix" />');
ret_val.addClass( 'rss' );
var label = '<div class="label">' + page.textContent + '</div>';
- var actor = $("<div class=\"actor\"><div class=\"rss_inline\" id=\"" + id + "\"></div></div>");
+ var actor = $("<div class=\"actor\"><div class=\"rss_inline\" id=\"" + id + "\"><div class='ul'></div></div></div>");
var rss = $("#" + id, actor);
if ($p.attr("width")) {
@@ -103,32 +103,32 @@
if (src.match(/^http/)) {
//use zrssfeed
jQuery(function() {
- $(rss).rssfeed(src, {
- limit: rss.data("limit"),
- header: eval(rss.data("header")),
- date: eval(rss.data("date")),
- content: rss.data("content"),
- snippet: eval(rss.data("snippet")),
- showerror: eval(rss.data("showerror")),
- ssl: eval(rss.data("ssl")),
- linktarget: rss.data("linktarget"),
- });
+ $(rss).rssfeed(src, {
+ limit: rss.data("limit"),
+ header: eval(rss.data("header")),
+ date: eval(rss.data("date")),
+ content: rss.data("content"),
+ snippet: eval(rss.data("snippet")),
+ showerror: eval(rss.data("showerror")),
+ ssl: eval(rss.data("ssl")),
+ linktarget: rss.data("linktarget"),
+ });
});
} else {
jQuery(function() {
- $(rss).rssfeedlocal({
- src: src,
- limit: rss.data("limit"),
- header: eval(rss.data("header")),
- date: eval(rss.data("date")),
- content: rss.data("content"),
- snippet: eval(rss.data("snippet")),
- showerror: eval(rss.data("showerror")),
- ssl: eval(rss.data("ssl")),
- linktarget: rss.data("linktarget"),
- link: eval(rss.data("link")),
- title: eval(rss.data("title"))
- });
+ $(rss).rssfeedlocal({
+ src: src,
+ limit: rss.data("limit"),
+ header: eval(rss.data("header")),
+ date: eval(rss.data("date")),
+ content: rss.data("content"),
+ snippet: eval(rss.data("snippet")),
+ showerror: eval(rss.data("showerror")),
+ ssl: eval(rss.data("ssl")),
+ linktarget: rss.data("linktarget"),
+ link: eval(rss.data("link")),
+ title: eval(rss.data("title"))
+ });
});
}
if (typeof (refresh) != "undefined" && refresh) {
@@ -177,6 +177,7 @@
},
success: function(feed){
jQuery(c).html('');
+
/* FIXME: Header gets added on each refresh, unsupported in rssfeedlocal for now..
if (options.header)
jQuery(c).parent().parent().prepend( '<p><div class="rssHeader">' +
@@ -185,9 +186,10 @@
+'" target="' + o.linktarget + '">'
+ jQuery(feed).find('title:first').text()
+'</a>' + '</div></p>');
-*/
- jQuery(feed).find('item').each(function(i){
- var row = 'odd';
+*/
+ var row = 'odd';
+ jQuery(feed).find('item').each(function(i) {
+
var itemHtml;
if (o.link)
itemHtml = o.html.replace(/{title}/, '<a href="'
@@ -201,7 +203,7 @@
itemHtml = o.html.replace(/{title}/, '');
itemHtml = itemHtml.replace(/{text}/, jQuery(this).find('description').text());
- var entryDate = new Date(jQuery(this).find('pubDate').text());
+ var entryDate = new Date($(this).find('pubDate').text());
if (o.date && entryDate)
itemHtml = itemHtml.replace(/{date}/, entryDate.toLocaleDateString() + ' ' + entryDate.toLocaleTimeString() + ' ');
else
@@ -209,17 +211,18 @@
jQuery(c).append(jQuery('<' + o.wrapper + ' class="rssRow ' + row + '">').append(itemHtml));
- // Alternate row classes
- if (row == 'odd') {
- row = 'even';
- } else {
- row = 'odd';
- }
+ // Alternate row classes
+ if (row == 'odd') {
+ row = 'even';
+ } else {
+ row = 'odd';
+ }
if (i == o.limit-1) {
return false;
}
- });
+ });
+ $('li').wrapAll("<ul>");
}
});
});
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2012-01-15 17:09:11
|
Revision: 654
http://openautomation.svn.sourceforge.net/openautomation/?rev=654&view=rev
Author: makki1
Date: 2012-01-15 17:09:04 +0000 (Sun, 15 Jan 2012)
Log Message:
-----------
small fixes on variants in editor, save should work now
Modified Paths:
--------------
CometVisu/trunk/visu/designs/structure_pure.js
CometVisu/trunk/visu/edit/cometeditor.js
CometVisu/trunk/visu/edit/visuconfig_edit.js
Modified: CometVisu/trunk/visu/designs/structure_pure.js
===================================================================
--- CometVisu/trunk/visu/designs/structure_pure.js 2012-01-15 12:32:22 UTC (rev 653)
+++ CometVisu/trunk/visu/designs/structure_pure.js 2012-01-15 17:09:04 UTC (rev 654)
@@ -929,7 +929,7 @@
},
elements: {
label: { type: 'string', required: false, multi: false },
- address: { type: 'address', required: true, multi: true }
+ address: { type: 'address', required: true, multi: true, options: {variant: ['', 'isbutton']} }
},
content: false
});
@@ -1180,4 +1180,5 @@
if( layout.getAttribute('y' ) ) ret_val += 'top:' + layout.getAttribute('y' ) + ';';
if( layout.getAttribute('width') ) ret_val += 'width:' + layout.getAttribute('width') + ';';
return ret_val;
-}
\ No newline at end of file
+}
+
Modified: CometVisu/trunk/visu/edit/cometeditor.js
===================================================================
--- CometVisu/trunk/visu/edit/cometeditor.js 2012-01-15 12:32:22 UTC (rev 653)
+++ CometVisu/trunk/visu/edit/cometeditor.js 2012-01-15 17:09:04 UTC (rev 654)
@@ -311,7 +311,7 @@
$elements.each(function (index, e) {
$address = $("<address />")
.attr("transform", $(e).data("transform"))
- .attr("variant", $(e).data("variant"))
+ .attr("variant", $(e).data("variant") || "")
.attr("readonly", $(e).data("readonly") == true ? "true" : "false")
.append($(e).data("address"));
dataObject.append($address);
@@ -646,8 +646,9 @@
elementDiv.find(".title").append(t.find("option[value='" + elementData.textContent + "']").text());
elementDiv.find(".value").append(elementData.textContent);
elementDiv.find(".transform").append(elementData._attributes.transform);
+ elementDiv.find(".variant").append(elementData._attributes.variant);
if (elementData._attributes.variant != "undefined" && elementData._attributes.variant != "") {
- elementDiv.find(".variant").append(elementData._attributes.variant).show();
+ elementDiv.find(".variant").show();
} else {
elementDiv.find(".variant").hide();
}
Modified: CometVisu/trunk/visu/edit/visuconfig_edit.js
===================================================================
--- CometVisu/trunk/visu/edit/visuconfig_edit.js 2012-01-15 12:32:22 UTC (rev 653)
+++ CometVisu/trunk/visu/edit/visuconfig_edit.js 2012-01-15 17:09:04 UTC (rev 654)
@@ -273,7 +273,7 @@
element.find("label").html("variant");
// variants can be selected from a pre-defined list ONLY.
- var variantList = $("<select name=\"variant\" />");
+ var variantList = $("<select name=\"variant\" class=\"add_variant\" />");
// go through list of available variants and display as select-list
$.each(options.variant, function (i, element) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2012-01-15 12:32:28
|
Revision: 653
http://openautomation.svn.sourceforge.net/openautomation/?rev=653&view=rev
Author: mayerch
Date: 2012-01-15 12:32:22 +0000 (Sun, 15 Jan 2012)
Log Message:
-----------
Update documentation for new methods
Modified Paths:
--------------
JSFloorPlan/trunk/src/jsfloorplan.js
Modified: JSFloorPlan/trunk/src/jsfloorplan.js
===================================================================
--- JSFloorPlan/trunk/src/jsfloorplan.js 2012-01-14 16:47:21 UTC (rev 652)
+++ JSFloorPlan/trunk/src/jsfloorplan.js 2012-01-15 12:32:22 UTC (rev 653)
@@ -1076,8 +1076,16 @@
}
/**
- * Check if point p is in the zone zone. It's basically a point-in-polygon
- * test using a ray casting from left infinity to the point <code>p</code>.
+ * Check if point <code>p</code> is in the zone <code>zone</code>. It's
+ * basically a point-in-polygon test using a ray casting from left infinity to
+ * the point <code>p</code>.
+ * @method pointInZone
+ * @private
+ * @param {THREE.Vector3} p The point to check (note: only the
+ * <code>x</code> and <code>y</code> corrdinates
+ * are checked
+ * @param {Number} zone The zone to check
+ * @return {Bool} True when point <code>p</code> is inside
*/
function pointInZone( p, zone )
{
@@ -1100,7 +1108,15 @@
}
/**
- * Figur out the room that contains the point <code>p</code> in the floor <code>floor</code>.
+ * Figur out the room that contains the point <code>p</code> in the floor.
+ * <code>floor</code>.
+ * @method selectRoom
+ * @param {THREE.Vector3} p The point to check (note: only the
+ * <code>x</code> and <code>y</code> corrdinates
+ * are checked
+ * @param {Number} floor The number of the floor to check
+ * @return {Object} If a zone / room was found a hash with the keys "room" and
+ * "zone" will be returned otherwise an empty Object.
*/
JSFloorPlan3D.selectRoom = function( p, floor )
{
@@ -1112,14 +1128,20 @@
{
if( pointInZone( p, thisRoom.zones[zone] ) )
{
- console.log( 'in zone', thisRoom.zones[zone].name, 'in raum', thisFloor[room].name, 'in stock', floor );
+ return { room: thisFloor[room], zone: thisRoom.zones[zone] };
}
}
}
+ return {};
}
/**
- * Project screen coordinate to building space
+ * Project screen coordinate to building space.
+ * @method sceen2building
+ * @param {Number} x x position in pixel
+ * @param {Number} y y position in pixel
+ * @param {Number} h Height in building space used for mapping
+ * @return {THREE.Vector3} Point in building space
*/
JSFloorPlan3D.sceen2building = function( x, y, h )
{
@@ -1131,24 +1153,28 @@
}
/**
- * Project point in building space to screen space
+ * Project point in building space to screen space.
+ * @method building2screen
+ * @param {THREE.Vector3} p point in building space to map
+ * @return {Object} Hash with keys <code>x</code> and <code>y</code> in screen
+ * coordinates
*/
JSFloorPlan3D.building2screen = function( p )
{
var screen = p.clone();
projector.projectVector( screen, camera );
- return screen;
+ return { x: (screen.x+1)/2*WIDTH, y: -(screen.y-1)/2*HEIGHT };
}
/**
* This method can be used as an event handler for mouse events.
+ * @method translateMouseEvent
* @param {Event} event The jQuery event object.
* @param {Function} event.data.callback This callback function will be called
* after the mouse event was translated
*/
JSFloorPlan3D.translateMouseEvent = function( event )
{
- console.log( JSFloorPlan3D.buildingProperties, showStates );
var thisFloor = JSFloorPlan3D.buildingProperties.floor[showStates.showFloor];
var height = thisFloor.heightOfGround + thisFloor.height;
var intersec = JSFloorPlan3D.sceen2building( event.offsetX, event.offsetY, height );
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <j-...@us...> - 2012-01-14 16:47:27
|
Revision: 652
http://openautomation.svn.sourceforge.net/openautomation/?rev=652&view=rev
Author: j-n-k
Date: 2012-01-14 16:47:21 +0000 (Sat, 14 Jan 2012)
Log Message:
-----------
Fix broken "height"-attribute of image-widget
Modified Paths:
--------------
CometVisu/trunk/visu/designs/structure_pure.js
Modified: CometVisu/trunk/visu/designs/structure_pure.js
===================================================================
--- CometVisu/trunk/visu/designs/structure_pure.js 2012-01-14 16:26:53 UTC (rev 651)
+++ CometVisu/trunk/visu/designs/structure_pure.js 2012-01-14 16:47:21 UTC (rev 652)
@@ -696,7 +696,7 @@
if( $p.attr('width' ) ) {
style += 'width:' + $p.attr('width' ) + ';';
} else {
- style += 'width: 100%';
+ style += 'width: 100%;';
}
if( $p.attr('height') ) style += 'height:' + $p.attr('height') + ';';
if( style != '' ) style = 'style="' + style + '"';
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2012-01-14 16:27:00
|
Revision: 651
http://openautomation.svn.sourceforge.net/openautomation/?rev=651&view=rev
Author: makki1
Date: 2012-01-14 16:26:53 +0000 (Sat, 14 Jan 2012)
Log Message:
-----------
(interims?) fix for saving addr in editor, updated xsd with plugins
Modified Paths:
--------------
CometVisu/trunk/visu/edit/cometeditor.js
CometVisu/trunk/visu/visu_config.xsd
Modified: CometVisu/trunk/visu/edit/cometeditor.js
===================================================================
--- CometVisu/trunk/visu/edit/cometeditor.js 2012-01-14 15:18:07 UTC (rev 650)
+++ CometVisu/trunk/visu/edit/cometeditor.js 2012-01-14 16:26:53 UTC (rev 651)
@@ -654,17 +654,19 @@
elementDiv.find(".readonly").append(elementData._attributes.readonly == "true" ? "readonly" : "")
elementDiv.data("transform", elementData._attributes.transform)
- .data("variant", elementData._attributes.variant)
.data("readonly", elementData._attributes.readonly == "true" ? true : false)
.data("address", elementData.textContent);
if (typeof options == "undefined" || typeof options.variant == "undefined" || options.variant == false) {
// if this element does not support variants, then remove them from the HTML.
elementDiv.find("div.variant").remove();
+ } else {
+ elementDiv.data("variant", elementData._attributes.variant);
}
elementDiv.data("options", options);
return elementDiv;
}
-}
\ No newline at end of file
+}
+
Modified: CometVisu/trunk/visu/visu_config.xsd
===================================================================
--- CometVisu/trunk/visu/visu_config.xsd 2012-01-14 15:18:07 UTC (rev 650)
+++ CometVisu/trunk/visu/visu_config.xsd 2012-01-14 16:26:53 UTC (rev 651)
@@ -63,6 +63,7 @@
<xsd:attribute name="readonly" type="xsd:boolean" />
<xsd:attribute name="align" type="xsd:string" />
+<xsd:attribute name="variant" type="xsd:string" />
<!-- complex elements -->
@@ -179,6 +180,9 @@
<xsd:element name="colorchooser" type="colorchooser" />
<xsd:element name="diagram_popup" type="diagram_popup" />
<xsd:element name="diagram_inline" type="diagram_inline" />
+ <xsd:element name="gweather" type="gweather" />
+ <xsd:element name="rss" type="rss" />
+ <xsd:element name="jqclock" type="jqclock" />
<xsd:element ref="page" />
</xsd:choice>
<xsd:attribute name="name" type="xsd:string" use="required" />
@@ -222,6 +226,9 @@
<xsd:element name="colorchooser" type="colorchooser" />
<xsd:element name="diagram_popup" type="diagram_popup" />
<xsd:element name="diagram_inline" type="diagram_inline" />
+ <xsd:element name="gweather" type="gweather" />
+ <xsd:element name="rss" type="rss" />
+ <xsd:element name="jqclock" type="jqclock" />
<xsd:element ref="page" />
</xsd:choice>
<xsd:attribute name="name" type="xsd:string" use="required" />
@@ -428,6 +435,51 @@
<xsd:attribute name="gridcolor" type="xsd:string" use="optional" />
</xsd:complexType>
+<xsd:complexType name="gweather" >
+ <xsd:choice maxOccurs="unbounded" minOccurs="1">
+ <xsd:element name="label" type="xsd:string" maxOccurs="1" />
+ </xsd:choice>
+ <xsd:attribute name="width" type="dimension" use="optional"/>
+ <xsd:attribute name="height" type="dimension" use="optional"/>
+ <xsd:attribute name="refresh" type="xsd:integer" use="optional" />
+ <xsd:attribute name="city" type="xsd:string" use="required" />
+ <xsd:attribute name="lang" type="xsd:string" use="optional" />
+ <xsd:attribute name="image_url" type="xsd:string" use="optional" />
+ <xsd:attribute name="refresh" type="xsd:integer" use="optional" />
+ <xsd:attribute name="current" type="xsd:string" use="optional" />
+ <xsd:attribute name="forecast" type="xsd:string" use="optional" />
+</xsd:complexType>
+
+<xsd:complexType name="rss" >
+ <xsd:choice maxOccurs="unbounded" minOccurs="1">
+ <xsd:element name="label" type="xsd:string" maxOccurs="1" />
+ </xsd:choice>
+ <xsd:attribute name="src" type="xsd:string" use="required" />
+ <xsd:attribute name="width" type="dimension" use="optional"/>
+ <xsd:attribute name="height" type="dimension" use="optional"/>
+ <xsd:attribute name="refresh" type="xsd:integer" use="optional" />
+ <xsd:attribute name="limit" type="xsd:integer" use="optional" />
+ <xsd:attribute name="header" type="xsd:string" use="required" />
+ <xsd:attribute name="date" type="xsd:string" use="optional" />
+ <xsd:attribute name="content" type="xsd:string" use="optional" />
+ <xsd:attribute name="snippet" type="xsd:integer" use="optional" />
+ <xsd:attribute name="showerror" type="xsd:string" use="optional" />
+ <xsd:attribute name="ssl" type="xsd:string" use="optional" />
+ <xsd:attribute name="linktarget" type="xsd:string" use="optional" />
+ <xsd:attribute name="link" type="xsd:string" use="optional" />
+ <xsd:attribute name="title" type="xsd:string" use="optional" />
+</xsd:complexType>
+
+<xsd:complexType name="jqclock" >
+ <xsd:choice maxOccurs="unbounded" minOccurs="1">
+ <xsd:element name="label" type="xsd:string" maxOccurs="1" />
+ </xsd:choice>
+ <xsd:attribute name="width" type="dimension" use="optional"/>
+ <xsd:attribute name="height" type="dimension" use="optional"/>
+ <xsd:attribute name="lang" type="xsd:string" use="required" />
+ <xsd:attribute name="date" type="xsd:string" use="optional" />
+</xsd:complexType>
+
<xsd:complexType name="break" />
<xsd:complexType name="line" />
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <j-...@us...> - 2012-01-14 15:18:13
|
Revision: 650
http://openautomation.svn.sourceforge.net/openautomation/?rev=650&view=rev
Author: j-n-k
Date: 2012-01-14 15:18:07 +0000 (Sat, 14 Jan 2012)
Log Message:
-----------
Cleanup old documentation
Removed Paths:
-------------
CometVisu/trunk/documentation/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2012-01-14 14:44:42
|
Revision: 649
http://openautomation.svn.sourceforge.net/openautomation/?rev=649&view=rev
Author: mayerch
Date: 2012-01-14 14:44:36 +0000 (Sat, 14 Jan 2012)
Log Message:
-----------
New feature: figure out the room / zone that's under the mouse during a click
-> also added functions to map points between building and screen space
Modified Paths:
--------------
JSFloorPlan/trunk/src/jsfloorplan.js
JSFloorPlan/trunk/src/jsfloorplan_example_helper.js
Modified: JSFloorPlan/trunk/src/jsfloorplan.js
===================================================================
--- JSFloorPlan/trunk/src/jsfloorplan.js 2012-01-09 18:39:38 UTC (rev 648)
+++ JSFloorPlan/trunk/src/jsfloorplan.js 2012-01-14 14:44:36 UTC (rev 649)
@@ -1074,4 +1074,84 @@
else
doMove();
}
+
+ /**
+ * Check if point p is in the zone zone. It's basically a point-in-polygon
+ * test using a ray casting from left infinity to the point <code>p</code>.
+ */
+ function pointInZone( p, zone )
+ {
+ var crossing = 0;
+ var prevCorner = floorNodes[ zone.corners[zone.corners.length-1] ];
+ for( var i in zone.corners )
+ {
+ var corner = floorNodes[ zone.corners[i] ];
+ if( // only intersection if
+ (prevCorner.x < p.x || corner.x < p.x ) // at least one point is left
+ && // and
+ ( (prevCorner.y - p.y) * (corner.y - p.y) < 0 ) // one corner is above and the other below
+ )
+ {
+ crossing++;
+ }
+ prevCorner = corner;
+ }
+ return crossing % 2; // odd number of crossings == inside
+ }
+
+ /**
+ * Figur out the room that contains the point <code>p</code> in the floor <code>floor</code>.
+ */
+ JSFloorPlan3D.selectRoom = function( p, floor )
+ {
+ var thisFloor = rooms[floor];
+ for( var room in thisFloor )
+ {
+ var thisRoom = thisFloor[room];
+ for( var zone in thisRoom.zones )
+ {
+ if( pointInZone( p, thisRoom.zones[zone] ) )
+ {
+ console.log( 'in zone', thisRoom.zones[zone].name, 'in raum', thisFloor[room].name, 'in stock', floor );
+ }
+ }
+ }
+ }
+
+ /**
+ * Project screen coordinate to building space
+ */
+ JSFloorPlan3D.sceen2building = function( x, y, h )
+ {
+ var vector = new THREE.Vector3( (x / WIDTH)*2-1, -(y / HEIGHT)*2+1, 0.5 );
+ projector.unprojectVector( vector, camera );
+ var dirVec = vector.subSelf( camera.position ).normalize()
+ var d = (h - camera.position.z) / dirVec.z;
+ return new THREE.Vector3( camera.position.x + d * dirVec.x, camera.position.y + d * dirVec.y, camera.position.z + d * dirVec.z );
+ }
+
+ /**
+ * Project point in building space to screen space
+ */
+ JSFloorPlan3D.building2screen = function( p )
+ {
+ var screen = p.clone();
+ projector.projectVector( screen, camera );
+ return screen;
+ }
+
+ /**
+ * This method can be used as an event handler for mouse events.
+ * @param {Event} event The jQuery event object.
+ * @param {Function} event.data.callback This callback function will be called
+ * after the mouse event was translated
+ */
+ JSFloorPlan3D.translateMouseEvent = function( event )
+ {
+ console.log( JSFloorPlan3D.buildingProperties, showStates );
+ var thisFloor = JSFloorPlan3D.buildingProperties.floor[showStates.showFloor];
+ var height = thisFloor.heightOfGround + thisFloor.height;
+ var intersec = JSFloorPlan3D.sceen2building( event.offsetX, event.offsetY, height );
+ JSFloorPlan3D.selectRoom( intersec, showStates.showFloor );
+ }
};//());
\ No newline at end of file
Modified: JSFloorPlan/trunk/src/jsfloorplan_example_helper.js
===================================================================
--- JSFloorPlan/trunk/src/jsfloorplan_example_helper.js 2012-01-09 18:39:38 UTC (rev 648)
+++ JSFloorPlan/trunk/src/jsfloorplan_example_helper.js 2012-01-14 14:44:36 UTC (rev 649)
@@ -102,8 +102,8 @@
renderer.shadowMapHeight = SHADOW_MAP_HEIGHT;
renderer.shadowMapEnabled = true;
//renderer.shadowMapSoft = true;
+var projector = new THREE.Projector();
-
// set up the sphere vars
var radius = 50, segments = 16, rings = 16;
@@ -209,6 +209,7 @@
/////////////////////////////////////////////////////////////////////////////
$(function() {
three_init();
+ $('#top_level').click( 'foo', j.translateMouseEvent );
});
/////////////////////////////////////////////////////////////////////////////
// setup script here:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2012-01-09 18:39:49
|
Revision: 648
http://openautomation.svn.sourceforge.net/openautomation/?rev=648&view=rev
Author: mayerch
Date: 2012-01-09 18:39:38 +0000 (Mon, 09 Jan 2012)
Log Message:
-----------
Added directory structure for the http://knx-user-forum.de/ iconset.
Added Paths:
-----------
tools/knx-uf-iconset/
tools/knx-uf-iconset/release/
tools/knx-uf-iconset/trunk/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2012-01-08 19:36:02
|
Revision: 647
http://openautomation.svn.sourceforge.net/openautomation/?rev=647&view=rev
Author: makki1
Date: 2012-01-08 19:35:55 +0000 (Sun, 08 Jan 2012)
Log Message:
-----------
CV-Plugin RSS: add local options to display title/links, fixes
Modified Paths:
--------------
CometVisu/trunk/visu/plugins/rss/structure_plugin.js
Modified: CometVisu/trunk/visu/plugins/rss/structure_plugin.js
===================================================================
--- CometVisu/trunk/visu/plugins/rss/structure_plugin.js 2012-01-08 19:33:07 UTC (rev 646)
+++ CometVisu/trunk/visu/plugins/rss/structure_plugin.js 2012-01-08 19:35:55 UTC (rev 647)
@@ -19,6 +19,11 @@
* This plugins integrates zrssfeed to display RSS-Feeds via Google-API
* *and* a parser for local feeds using jQuery 1.5+ into CometVisu.
* rssfeedlocal is derived from simplerss and zrssfeed
+ * rssfeedlocal is mainly meant to be used with rsslog.php and plugins
+ * Examples
+ * <rss src="/visu/plugins/rss/rsslog.php" refresh="300" link="false" title="false"></rss>
+ * <rss src="http://www.tagesschau.de/xml/rss2" refresh="300">Test API</rss>
+ * <rss src="/visu/plugins/rss/tagesschau-rss2.xml" refresh="300" header="true" date="true"></rss>
*/
$("body").append("<script type=\"text/javascript\" src=\"plugins/rss/zrssfeed/jquery.zrssfeed.js\"></script>");
@@ -62,6 +67,7 @@
rss.data("ssl", $p.attr("ssl")) || false;
rss.data("linktarget", $p.attr("linktarget")) || "_new";
rss.data("link", $p.attr("link")) || true;
+ rss.data("title", $p.attr("title")) || true;
refreshRSS(rss, {});
@@ -80,7 +86,8 @@
showerror: {type: "list", required: false, list: {'true': "yes", 'false': "no"}},
ssl: {type: "list", required: false, list: {'true': "yes", 'false': "no"}},
linktarget: {type: "list", required: false, list: {"_new": "_new", "_self": "_self"}},
- link: {type: "list", required: false, list: {'true': "yes", 'false': "no"}}
+ link: {type: "list", required: false, list: {'true': "yes", 'false': "no"}},
+ title: {type: "list", required: false, list: {'true': "yes", 'false': "no"}}
},
content: {type: "string", required: true}
});
@@ -119,7 +126,8 @@
showerror: eval(rss.data("showerror")),
ssl: eval(rss.data("ssl")),
linktarget: rss.data("linktarget"),
- link: eval(rss.data("link"))
+ link: eval(rss.data("link")),
+ title: eval(rss.data("title"))
});
});
}
@@ -146,9 +154,11 @@
limit: 10,
linktarget: 'new',
date: true,
- link: true
+ link: true,
+ title: true
}
var options = jQuery.extend(defaults, options);
+
return this.each(function() {
var o = options;
var c = jQuery(this);
@@ -166,15 +176,16 @@
console.log('C: #%s, Error: %s, Feed: %s', $(c).attr('id'), e, o.src);
},
success: function(feed){
-
- if (o.header)
- jQuery(c).parent().parent().prepend( '<p><div class="rssHeader">' +
+ jQuery(c).html('');
+/* FIXME: Header gets added on each refresh, unsupported in rssfeedlocal for now..
+ if (options.header)
+ jQuery(c).parent().parent().prepend( '<p><div class="rssHeader">' +
'<a href="' + jQuery(feed).find('link:first').text()
+'" title="'+ jQuery(feed).find('description:first').text()
+'" target="' + o.linktarget + '">'
+ jQuery(feed).find('title:first').text()
+'</a>' + '</div></p>');
-
+*/
jQuery(feed).find('item').each(function(i){
var row = 'odd';
var itemHtml;
@@ -183,7 +194,10 @@
+ jQuery(this).find('guid').text()
+ '" target="' + o.linktarget + '">'
+ jQuery(this).find('title').text() + '</a><br />');
- else
+ else if (o.title)
+ itemHtml = o.html.replace(/{title}/,
+ jQuery(this).find('title').text() + '<br />');
+ else
itemHtml = o.html.replace(/{title}/, '');
itemHtml = itemHtml.replace(/{text}/, jQuery(this).find('description').text());
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2012-01-08 19:33:14
|
Revision: 646
http://openautomation.svn.sourceforge.net/openautomation/?rev=646&view=rev
Author: makki1
Date: 2012-01-08 19:33:07 +0000 (Sun, 08 Jan 2012)
Log Message:
-----------
WireGate-Plugins: FTP-Upload/create PNG-graphs, RSSlog
Added Paths:
-----------
wiregate/plugin/generic/FTP_UploadGraph.pl
wiregate/plugin/generic/RSSlog.pl
Added: wiregate/plugin/generic/FTP_UploadGraph.pl
===================================================================
--- wiregate/plugin/generic/FTP_UploadGraph.pl (rev 0)
+++ wiregate/plugin/generic/FTP_UploadGraph.pl 2012-01-08 19:33:07 UTC (rev 646)
@@ -0,0 +1,66 @@
+### Plugin zum erstellen von Grafiken aus RRD's und FTP-Upload (SMTP-Versand, ...)
+# v0.1
+# 2012-01-04
+# Kann aktuell nur einen Wert pro Grafik!
+# Hinweise: Die Grafikerstellung ist sehr resourcenintensiv -
+# stark abhängig von der Groesse der Grafik - und sollte nicht zu haeufig laufen!
+# Dringend empfohlen: nicht mehr als 10 Werte pro Plugin!
+
+###################
+### DEFINITION ###
+###################
+
+$plugin_info{$plugname . '_cycle'} = 3600; # Aufrufzyklus
+
+# FTP Zugangsdaten
+my $host = 'mein.ftpserver.de';
+my $user = 'meinuser';
+my $password = 'meinpasswort';
+my $path = '/public_html/graph'; # Pfad auf dem FTP-Server
+
+my $datasource = 'AVERAGE'; # MIN,AVERAGE,MAX
+
+my %graphics;
+# hash fuer RRD / Grafik-Name
+$graphics{'28.2C0E66010000_temp'} = 'WP_HGL-VL.png';
+$graphics{'28.5F1966010000_temp'} = 'WP_VL.png';
+$graphics{'28.480266010000_temp'} = 'WP_RL.png';
+
+# kann bis auf diesen Teil direkt aus der graph-URL uebernommen werden:
+# DEF:ds0=28.2C0E66010000_temp.rrd:value:AVERAGE;
+# (DEF:ds0.. bis ;)
+# kann man anpassen
+my $url1 = 'http://localhost/graph.pl?--start=-24h;--end=now;-X=0;-W=WireGate;--slope-mode;--lazy;-h=200;-w=650;--full-size-mode;--vertical-label=%B0%20Celsius;';
+my $url2 = 'LINE1:ds0%23ff0000:Wert;VDEF:ds0_LAST=ds0,LAST;GPRINT:ds0_LAST:%2.2lf%B0C;;VDEF:ds0_MIN=ds0,MINIMUM;GPRINT:ds0_MIN:Min\:%20%8.2lf%B0C;VDEF:ds0_AVERAGE=ds0,AVERAGE;GPRINT:ds0_AVERAGE:Mittel\:%20%8.2lf%B0C;VDEF:ds0_MAX=ds0,MAXIMUM;GPRINT:ds0_MAX:Max\:%20%8.2lf%B0C\n;';
+
+########################
+### Ende DEFINITION ###
+########################
+
+
+use Net::FTP;
+my $rrd_ret;
+
+my $ftp = Net::FTP->new($host, Debug => 0, Passive => 1, Timeout => 10)
+ or return "Cannot connect to host $!";
+$ftp->login($user,$password)
+ or return "Cannot login " . $ftp->message . "$!";
+$ftp->cwd($path)
+ or return "Cannot change working directory: " . $ftp->message . "$!";
+$ftp->binary;
+
+# durch den Hash gehen und senden
+while ( my ($rrd,$filename) = each(%graphics) ) {
+ my $url = $url1 . "DEF:ds0=$rrd.rrd:value:$datasource;" . $url2;
+ $rrd_ret .= `wget "$url" -O /tmp/$filename -o /tmp/wget.log`;
+ $ftp->put("/tmp/$filename",$filename)
+ or return "Cannot send $filename: $!";
+
+ # oder hier z.B. eMails verschicken oder...
+}
+
+$ftp->quit;
+
+#return; # ohne Logeintrag
+return "FTP said " . $ftp->message;
+
Added: wiregate/plugin/generic/RSSlog.pl
===================================================================
--- wiregate/plugin/generic/RSSlog.pl (rev 0)
+++ wiregate/plugin/generic/RSSlog.pl 2012-01-08 19:33:07 UTC (rev 646)
@@ -0,0 +1,79 @@
+### Plugin zum erstellen von RSS-logs
+# Fuer Verwendung mit rsslog.php / CometVisu
+# man koennte natuerlich ebenso das rsslog.php direkt mit LWP::Useragent oder
+# wget aufrufen, hier soll aber auch die Verwendung von SQLite Datenbanken
+# demonstriert werden.
+# Wichtig:
+# - benoetigt Paket libdbd-sqlite2-perl
+# - weil in PHP nur sqlite2 verfuegbar
+#
+# v0.1
+# 2012-01-08
+
+###################
+### DEFINITION ###
+###################
+
+$plugin_info{$plugname . '_cycle'} = 0; # Aufrufzyklus - never
+
+my @actionGA;
+# Datenpunkttypen MUESSEN in der globalen config angegeben sein!
+# Logeintrag bei bestimmtem Wert
+push @actionGA, { title => "Eintrag1 ohne Wert", content => 'Textinhalt1', tags => "tag1,tag3", trigger_ga => "1/1/11", value => 1 };
+# Logeintrag beliebigem Wert: value weglassen
+# %s wird mit sprintf durch den Wert ersetzt, anderes wie %.2f geht auch in content oder title!
+# man printf ;)
+push @actionGA, { title => "Eintrag2 mit Wert unabhaengig vom Wert %.2f", content => 'Textinhalt %s', tags => "tag4", trigger_ga => "1/1/11"};
+
+# Nun einge Beispiele aus der Praxis:
+push @actionGA, { title => "Haustuere", content => 'Haustuere auf', tags => "security,sensoren", trigger_ga => "5/1/10", value => 1};
+push @actionGA, { title => "Haustuere", content => 'Haustuere zu', tags => "security,sensoren", trigger_ga => "5/1/10", value => 0};
+push @actionGA, { title => "Garagentor", content => 'Garagentor %d (0=zu, 1=auf)', tags => "security,sensoren", trigger_ga => "5/4/103"};
+push @actionGA, { content => 'Trittmatte', tags => "security,sensoren", trigger_ga => "5/1/11", value => 1};
+push @actionGA, { content => 'Bluetooth Zutritt', tags => "security,sensoren", trigger_ga => "5/1/12", value => 1};
+# title & tags darf auch leer sein
+
+########################
+### Ende DEFINITION ###
+########################
+
+use DBI;
+my $logdb = '/etc/wiregate/rss/rsslog.db';
+
+# check setup, rights, DB
+if (! -d dirname($logdb)) {
+ mkdir(dirname($logdb),0777);
+}
+if (! -e $logdb) {
+ return "$logdb existiert nicht! Bitte mit rsslog.php anlegen"; # FIXME: create sqlite-db
+}
+
+if ($msg{'apci'} eq "A_GroupValue_Write") { # Telegramm eingetroffen
+ foreach my $element (@actionGA) {
+ if ($msg{'dst'} eq "$element->{trigger_ga}") {
+ if (defined $element->{value}) { # skip if value is defined and not what we like
+ next unless "$msg{'value'}" eq "$element->{value}"; }
+
+ my $dbargs = {AutoCommit => 0, PrintError => 1};
+ my $dbh = DBI->connect("dbi:SQLite2:dbname=$logdb", "", "", $dbargs);
+
+ $dbh->do('INSERT INTO Logs(content, title, tags, t) VALUES( ' .
+ " '" . sprintf($element->{content},$msg{'value'}) . "'," .
+ " '" . sprintf($element->{title},$msg{'value'}) . "'," .
+ " '" . $element->{tags} . "'," .
+ " datetime('now') );");
+
+ if ($dbh->err()) { return "DB-Fehler: $DBI::errstr\n"; }
+ $dbh->commit();
+ $dbh->disconnect();
+ return; # "V: " . $dbh->{sqlite_version};
+ }
+ }
+} else { # zyklischer Aufruf/initialisierung
+ #subscribe GAs
+ foreach my $element (@actionGA) {
+ $plugin_subscribe{$element->{trigger_ga}}{$plugname} = 1;
+ }
+}
+return; # "Noop";
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2012-01-08 16:08:30
|
Revision: 645
http://openautomation.svn.sourceforge.net/openautomation/?rev=645&view=rev
Author: makki1
Date: 2012-01-08 16:08:23 +0000 (Sun, 08 Jan 2012)
Log Message:
-----------
rsslog.php: added title,tags,filter,sanity-checks
Modified Paths:
--------------
tools/rsslog/rsslog.php
Modified: tools/rsslog/rsslog.php
===================================================================
--- tools/rsslog/rsslog.php 2012-01-08 15:30:03 UTC (rev 644)
+++ tools/rsslog/rsslog.php 2012-01-08 16:08:23 UTC (rev 645)
@@ -10,6 +10,7 @@
// 1. Creating a new log line:
// URL parameter "c": the content of the log
// URL parameter "t[]": a tag for later filtering. Multiple might be given
+// URL parameter "h": a header(title) for the entry; maybe empty
// 2. Recieve the log as RSS:
// URL parameter "f": The (optional) filter, only log lines with a tag
// that fit this string are sent
@@ -21,8 +22,20 @@
// 5. Get content as JSON:
// URL parameter "j"
+// look where to store DB
+if (is_dir('/etc/wiregate/rss'))
+ $dbfile = '/etc/wiregate/rss/rsslog.db';
+else
+ $dbfile = 'rsslog.db';
+
+//check if the DIRECTORY is writeable by the webserver
+$dbfile_dir = dirname($dbfile);
+if (! is_writable($dbfile_dir))
+ die ("Database $dbfile not writeable! make sure the file AND " .
+ "the directory are writeable by the webserver!");
+
// create database connection
-$db = sqlite_open('rsslog.db', 0666, $error);
+$db = sqlite_open($dbfile, 0666, $error);
if (!$db) die ($error);
// create table if it doesn't exists
@@ -33,11 +46,15 @@
// store a new log
$store = true;
$log_content = $_GET['c'] ? $_GET['c'] : '<no content>';
+ $log_title = $_GET['h'] ? $_GET['h'] : '';
if( mb_detect_encoding($log_content, 'UTF-8', true) != 'UTF-8' )
$log_content = utf8_encode($log_content);
+ if( mb_detect_encoding($log_title, 'UTF-8', true) != 'UTF-8' )
+ $log_title = utf8_encode($log_title);
$log_tags = $_GET['t'] ? $_GET['t'] : array();
-
- insert( $db, $log_content, $log_tags );
+ if(! is_array($log_tags))
+ die("wrong format - use one or more t[]= for tags");
+ insert( $db, $log_content, $log_title, $log_tags );
} else if( isset($_GET['dump']) )
{
$result = retrieve( $db, $log_filter );
@@ -51,7 +68,9 @@
echo '<tr>';
echo '<td>' . date( DATE_ATOM, $row['t'] ) . '</td>';
echo '<td>' . $row['t'] . '</td>';
+ echo '<td>' . $row['title'] . '</td>';
echo '<td>' . $row['content'] . '</td>';
+ echo '<td>' . $row['tags'] . '</td>';
echo "</tr>\n";
}
?>
@@ -83,7 +102,7 @@
$row = sqlite_fetch_array($result, SQLITE_ASSOC );
if( !$first ) echo ",\n";
echo '{';
- echo '"title": "' . $row['content'] . '",';
+ echo '"title": "' . $row['title'] . '",';
echo '"content": "' . $row['content'] . '",';
echo '"publishedDate": "' . date( DATE_ATOM, $row['t'] ) . '"';
echo '}';
@@ -115,8 +134,10 @@
while( sqlite_has_more($result) )
{
$row = sqlite_fetch_array($result, SQLITE_ASSOC );
+ if ($row['tags'])
+ $tags = ' [' . $row['tags'] . ']';
echo '<item>';
- echo '<title>' . $row['content'] . '</title>';
+ echo '<title>' . $row['title'] . $tags . '</title>';
echo '<description>' . $row['content'] . '</description>';
echo '<pubDate>' . date( DATE_ATOM, $row['t'] ) . '</pubDate>';
echo '</item>' . "\n";
@@ -135,43 +156,47 @@
{
$q = "SELECT name FROM sqlite_master WHERE type='table' AND name='Logs';";
$result = sqlite_query( $db, $q, SQLITE_NUM );
- if (!$result) die("Cannot execute query.");
+ if (!$result) die("Cannot execute query. $q");
if( !sqlite_has_more($result) )
{
// no table found - create it
$q = 'CREATE TABLE Logs(' .
- ' id INTEGER PRIMARY KEY,' .
+ ' id INTEGER PRIMARY KEY,' .
+ ' title TEXT,' .
' content TEXT NOT NULL,' .
+ ' tags TEXT,' .
' t TIMESTAMP' .
');';
$ok = sqlite_exec($db, $q, $error);
if (!$ok)
- die("Cannot execute query. $error");
+ die("Cannot execute query $q. $error");
}
}
// insert a new log line
-function insert( $db, $content, $tags )
+function insert( $db, $content, $title, $tags )
{
// store a new log line
- $q = 'INSERT INTO Logs(content, t) VALUES( ' .
+ $q = 'INSERT INTO Logs(content, title, tags, t) VALUES( ' .
" '" . sqlite_escape_string( $content ) . "'," .
-// " datetime('now','localtime')" .
+ " '" . sqlite_escape_string( $title ) . "'," .
+ " '" . sqlite_escape_string( implode(",",$tags) ) . "'," .
" datetime('now')" .
')';
$ok = sqlite_exec($db, $q, $error);
if (!$ok)
- die("Cannot execute query. $error");
+ die("Cannot execute query. $error (Content: $content Tags: $tags");
}
// return a handle to all the data
function retrieve( $db, $filter )
{
// $q = "SELECT content, strftime('%s', t, 'localtime') AS t FROM Logs";
- $q = "SELECT content, strftime('%s', t) AS t FROM Logs";
+ $q = "SELECT title, content, tags, strftime('%s', t) AS t FROM Logs " .
+ "WHERE tags LIKE '%" . sqlite_escape_string($filter) . "%'";
return sqlite_query( $db, $q, SQLITE_ASSOC );
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2012-01-08 15:30:09
|
Revision: 644
http://openautomation.svn.sourceforge.net/openautomation/?rev=644&view=rev
Author: mayerch
Date: 2012-01-08 15:30:03 +0000 (Sun, 08 Jan 2012)
Log Message:
-----------
Improofed transparency handling
Modified Paths:
--------------
JSFloorPlan/trunk/src/jsfloorplan.js
Modified: JSFloorPlan/trunk/src/jsfloorplan.js
===================================================================
--- JSFloorPlan/trunk/src/jsfloorplan.js 2012-01-08 15:02:04 UTC (rev 643)
+++ JSFloorPlan/trunk/src/jsfloorplan.js 2012-01-08 15:30:03 UTC (rev 644)
@@ -668,6 +668,7 @@
var mesh = new THREE.Mesh(geometry, cubeMaterial);
mesh.castShadow = true;
mesh.receiveShadow = true;
+ //mesh.doubleSided = true;
wallGroup.add(mesh);
} // end for( j=0; j<floorWalls.length; j++ )
Object3D.add( lineGroup );
@@ -961,7 +962,15 @@
}
// update opacity
- cubeMaterial.opacity = showStates.fillOpacity;
+ if( cubeMaterial.opacity != showStates.fillOpacity )
+ {
+ cubeMaterial.opacity = showStates.fillOpacity;
+ cubeMaterial.transparent = showStates.fillOpacity < 1.0;
+ cubeMaterial.depthTest = !cubeMaterial.transparent;
+ THREE.SceneUtils.traverseHierarchy( JSFloorPlan3D.buildingProperties.Object3D, function( object ) {
+ object.doubleSided = cubeMaterial.transparent;
+ });
+ }
// update color
switch( showStates.fillColor )
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2012-01-08 15:02:10
|
Revision: 643
http://openautomation.svn.sourceforge.net/openautomation/?rev=643&view=rev
Author: mayerch
Date: 2012-01-08 15:02:04 +0000 (Sun, 08 Jan 2012)
Log Message:
-----------
More stable moveTo during rapidly following requests
Modified Paths:
--------------
JSFloorPlan/trunk/src/jsfloorplan.js
Modified: JSFloorPlan/trunk/src/jsfloorplan.js
===================================================================
--- JSFloorPlan/trunk/src/jsfloorplan.js 2012-01-08 14:14:38 UTC (rev 642)
+++ JSFloorPlan/trunk/src/jsfloorplan.js 2012-01-08 15:02:04 UTC (rev 643)
@@ -196,6 +196,14 @@
var noSetup = true;
/**
+ * Status if currently an animation is running
+ * @property inAnimation
+ * @type Bool
+ * @private
+ */
+ JSFloorPlan3D.inAnimation = false;
+
+ /**
* Constant representing the ID of an ELEMENT_NODE
* @property ELEMENT_NODE
* @private
@@ -1000,28 +1008,43 @@
// speed of the changing
var steps = 100;
- var rate = {
- azimut: ( azimut - showStates.currentAzimut ) / steps,
- elevation: ( elevation - showStates.currentElevation ) / steps,
- height: ( height - showStates.currentHeight ) / steps
- };
+ var rate = { azimut: 0.0, elevation: 0.0, height: 0.0 };
+ function calcRate()
+ {
+ rate = {
+ azimut: ( azimut - showStates.currentAzimut ) / steps,
+ elevation: ( elevation - showStates.currentElevation ) / steps,
+ height: ( height - showStates.currentHeight ) / steps
+ };
+ }
+
function doMove()
{
+ JSFloorPlan3D.inAnimation = true;
var done = true;
if( Math.abs( azimut - showStates.currentAzimut ) > Math.abs( rate.azimut ) )
{
+ if( rate.azimut == 0.0 ) calcRate();
showStates.currentAzimut += rate.azimut;
+ if( Math.abs( azimut - showStates.currentAzimut ) < 1e-5 ) // clamp if close enough
+ showStates.currentAzimut = azimut;
done = false;
}
if( Math.abs( elevation - showStates.currenteElevation ) > Math.abs( rate.elevation ) )
{
+ if( rate.elevation == 0.0 ) calcRate();
showStates.currentElevation += rate.elevation;
+ if( Math.abs( elevation - showStates.currenteElevation ) < 1e-5 ) // clamp if close enough
+ showStates.currenteElevation = elevation;
done = false;
}
if( Math.abs( height - showStates.currentHeight ) > Math.abs( rate.height ) )
{
+ if( rate.height == 0.0 ) calcRate();
showStates.currentHeight += rate.height;
+ if( Math.abs( height - showStates.currentHeight ) < 1e-4 ) // clamp if close enough
+ showStates.currentHeight = height;
done = false;
}
@@ -1030,10 +1053,16 @@
render();
if( !done )
window.requestAnimationFrame( doMove );
- else if( delayedFn )
- delayedFn();
+ else {
+ JSFloorPlan3D.inAnimation = false;
+ if( delayedFn )
+ delayedFn();
+ }
}
- doMove();
+ if( JSFloorPlan3D.inAnimation )
+ calcRate();
+ else
+ doMove();
}
};//());
\ 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: <ma...@us...> - 2012-01-08 14:14:45
|
Revision: 642
http://openautomation.svn.sourceforge.net/openautomation/?rev=642&view=rev
Author: mayerch
Date: 2012-01-08 14:14:38 +0000 (Sun, 08 Jan 2012)
Log Message:
-----------
- fix holes in the walls
- new method moveTo() for smooth transisions
- use moveTo for floor level change
Modified Paths:
--------------
JSFloorPlan/trunk/src/jsfloorplan.js
JSFloorPlan/trunk/src/jsfloorplan_example_helper.js
Modified: JSFloorPlan/trunk/src/jsfloorplan.js
===================================================================
--- JSFloorPlan/trunk/src/jsfloorplan.js 2012-01-08 00:30:29 UTC (rev 641)
+++ JSFloorPlan/trunk/src/jsfloorplan.js 2012-01-08 14:14:38 UTC (rev 642)
@@ -565,7 +565,7 @@
var wall2vertices = [];
var sId, eId;
var l1SquaredInv = 1.0 / ((e1.x-s1.x)*(e1.x-s1.x) + (e1.y-s1.y)*(e1.y-s1.y));
- var l1SquaredInv = 1.0 / ((e2.x-s2.x)*(e2.x-s2.x) + (e2.y-s2.y)*(e2.y-s2.y));
+ var l2SquaredInv = 1.0 / ((e2.x-s2.x)*(e2.x-s2.x) + (e2.y-s2.y)*(e2.y-s2.y));
for( var v = 0; v < Tvertices.length; v++ )
{
var tv = Tvertices[v];
@@ -583,11 +583,11 @@
var y1 = s1.y * (1-f1) + e1.y * f1;
// project it onto s2->e2
- var f2 = ((tm.x-s2.x)*(e2.x-s2.x) + (tm.y-s2.y)*(e2.y-s2.y))*l1SquaredInv;
+ var f2 = ((tm.x-s2.x)*(e2.x-s2.x) + (tm.y-s2.y)*(e2.y-s2.y))*l2SquaredInv;
if( tv.x == 0.0 || tv.x == 1.0 ) f2 = 1-tv.x; // special case on concave wall bend
var x2 = s2.x * (1-f2) + e2.x * f2;
var y2 = s2.y * (1-f2) + e2.y * f2;
-
+
var z = heightOfGround + sh*tv.y;
if( wallSideOrder > 0 )
{
@@ -902,6 +902,17 @@
selectChange( 'showFloor' );
}
+ function setupCamera( azimut, elevation, height, target )
+ {
+ var cx = Math.sin(azimut) * Math.cos(elevation);
+ var cy = Math.cos(azimut) * Math.cos(elevation);
+ var cz = Math.sin(elevation);
+ camera.up = new THREE.Vector3( -Math.sin(azimut) * Math.sin(elevation), -Math.cos(azimut) * Math.sin(elevation), Math.cos(elevation) );
+ camera.position = new THREE.Vector3( cx*dist + JSFloorPlan3D.buildingProperties.x_center, cy*dist + JSFloorPlan3D.buildingProperties.y_center, dist * cz + height );
+ camera.lookAt( target );
+ pointLight.position = camera.position;
+ }
+
/**
* Show the floor plan by updating the relevant view parameters and calling
* the render() method
@@ -916,16 +927,14 @@
if( noSetup ) setup3D();
// set up camera
- var cx = Math.sin(azimut) * Math.cos(elevation);
- var cy = Math.cos(azimut) * Math.cos(elevation);
- var cz = Math.sin(elevation);
var heightOfGround = JSFloorPlan3D.buildingProperties.floor[ showStates.showFloor ].heightOfGround;
- var target = new THREE.Vector3( JSFloorPlan3D.buildingProperties.x_center, JSFloorPlan3D.buildingProperties.y_center, heightOfGround);
- camera.up = new THREE.Vector3( -Math.sin(azimut) * Math.sin(elevation), -Math.cos(azimut) * Math.sin(elevation), Math.cos(elevation) );
- camera.position = new THREE.Vector3( cx*dist + JSFloorPlan3D.buildingProperties.x_center, cy*dist + JSFloorPlan3D.buildingProperties.y_center, dist * cz + heightOfGround);
- camera.lookAt( target );
- pointLight.position = camera.position;
+ var target = new THREE.Vector3( JSFloorPlan3D.buildingProperties.x_center, JSFloorPlan3D.buildingProperties.y_center, heightOfGround );
+ setupCamera( azimut, elevation, heightOfGround, target );
+ showStates.currentAzimut = azimut;
+ showStates.currentElevation = elevation;
+ showStates.currentHeight = heightOfGround;
+
// set up sun
var sx = Math.sin(lightAzimut) * Math.cos(lightElevation);
var sy = Math.cos(lightAzimut) * Math.cos(lightElevation);
@@ -972,4 +981,59 @@
render();
}
+ /**
+ * Move the displayed part of the floor plan to a new part
+ * @method moveTo
+ * @param {Integer} floor The number of the floor to show
+ * @param {Integer} azmiut The direction of the camera. 0° = North, 90° =
+ * East.
+ * @param {Integer} elevation The amount of tilting the view. 0° = no tilt,
+ * 90° = bird eyes view
+ * @param {Function} delayedFn (optional) Function to call after animation is
+ * finished
+ */
+ JSFloorPlan3D.moveTo = function( floor, azimut, elevation, delayedFn )
+ {
+ if( noSetup ) setup3D();
+
+ var height = JSFloorPlan3D.buildingProperties.floor[ floor ].heightOfGround;
+
+ // speed of the changing
+ var steps = 100;
+ var rate = {
+ azimut: ( azimut - showStates.currentAzimut ) / steps,
+ elevation: ( elevation - showStates.currentElevation ) / steps,
+ height: ( height - showStates.currentHeight ) / steps
+ };
+
+ function doMove()
+ {
+ var done = true;
+ if( Math.abs( azimut - showStates.currentAzimut ) > Math.abs( rate.azimut ) )
+ {
+ showStates.currentAzimut += rate.azimut;
+ done = false;
+ }
+ if( Math.abs( elevation - showStates.currenteElevation ) > Math.abs( rate.elevation ) )
+ {
+ showStates.currentElevation += rate.elevation;
+ done = false;
+ }
+ if( Math.abs( height - showStates.currentHeight ) > Math.abs( rate.height ) )
+ {
+ showStates.currentHeight += rate.height;
+ done = false;
+ }
+
+ var target = new THREE.Vector3( JSFloorPlan3D.buildingProperties.x_center, JSFloorPlan3D.buildingProperties.y_center, showStates.currentHeight );
+ setupCamera( showStates.currentAzimut, showStates.currentElevation, showStates.currentHeight, target );
+ render();
+ if( !done )
+ window.requestAnimationFrame( doMove );
+ else if( delayedFn )
+ delayedFn();
+ }
+
+ doMove();
+ }
};//());
\ No newline at end of file
Modified: JSFloorPlan/trunk/src/jsfloorplan_example_helper.js
===================================================================
--- JSFloorPlan/trunk/src/jsfloorplan_example_helper.js 2012-01-08 00:30:29 UTC (rev 641)
+++ JSFloorPlan/trunk/src/jsfloorplan_example_helper.js 2012-01-08 14:14:38 UTC (rev 642)
@@ -248,16 +248,22 @@
function init()
{
$('input').change(function(e){
+ var old = showStates[ e.target.name ];
showStates[ e.target.name ] = e.target.checked;
- selectChange( e.target.name );
- j.show3D( roll, tilt );
+ if( selectChange( e.target.name, old ) )
+ {
+ j.show3D( roll, tilt );
+ }
}).each(function(){
showStates[ this.name ] = this.checked; // init
});
$('select').change(function(e){
+ var old = showStates[ e.target.name ];
showStates[ e.target.name ] = e.target.value;
- selectChange( e.target.name );
- j.show3D( roll, tilt );
+ if( selectChange( e.target.name, old ) )
+ {
+ j.show3D( roll, tilt );
+ }
}).each(function(){
showStates[ this.name ] = this.value; // init
});
@@ -266,7 +272,7 @@
createSlider();
}
-function selectChange( name )
+function selectChange( name, old )
{
switch( name )
{
@@ -287,17 +293,30 @@
break;
case 'showFloor':
+ //showStates['showFloor'] = Number( showStates['showFloor'] );
+ var min = old < showStates['showFloor'] ? old : showStates['showFloor'];
+ var max = old > showStates['showFloor'] ? old : showStates['showFloor'];
$( j.buildingProperties.floor ).each( function( number ){
THREE.SceneUtils.traverseHierarchy( this.wallGroup, function( object ) {
- object.visible = ( showStates['showFloor'] == number );
+ object.visible = ( (min <= number) && (number <= max) );
});
});
+ j.moveTo( showStates['showFloor'], roll, tilt, function(){
+ $( j.buildingProperties.floor ).each( function( number ){
+ THREE.SceneUtils.traverseHierarchy( this.wallGroup, function( object ) {
+ object.visible = ( showStates['showFloor'] == number );
+ });
+ });
+ j.show3D( roll, tilt );
+ });
+ return false;
break;
case 'showWireframe':
cubeMaterial.wireframe = showStates['showWireframe'];
break;
}
+ return true;
}
var toggle = false;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2012-01-08 00:30:35
|
Revision: 641
http://openautomation.svn.sourceforge.net/openautomation/?rev=641&view=rev
Author: makki1
Date: 2012-01-08 00:30:29 +0000 (Sun, 08 Jan 2012)
Log Message:
-----------
rsslog: change date-output to ISO-8601 to comply with RDF/RSS-standards being readable by JS - further commits pending
Modified Paths:
--------------
tools/rsslog/rsslog.php
Modified: tools/rsslog/rsslog.php
===================================================================
--- tools/rsslog/rsslog.php 2012-01-07 22:43:15 UTC (rev 640)
+++ tools/rsslog/rsslog.php 2012-01-08 00:30:29 UTC (rev 641)
@@ -49,7 +49,7 @@
{
$row = sqlite_fetch_array($result, SQLITE_ASSOC );
echo '<tr>';
- echo '<td>' . date( DATE_RFC822, $row['t'] ) . '</td>';
+ echo '<td>' . date( DATE_ATOM, $row['t'] ) . '</td>';
echo '<td>' . $row['t'] . '</td>';
echo '<td>' . $row['content'] . '</td>';
echo "</tr>\n";
@@ -85,7 +85,7 @@
echo '{';
echo '"title": "' . $row['content'] . '",';
echo '"content": "' . $row['content'] . '",';
- echo '"publishedDate": "' . date( DATE_RFC822, $row['t'] ) . '"';
+ echo '"publishedDate": "' . date( DATE_ATOM, $row['t'] ) . '"';
echo '}';
$first = false;
}
@@ -118,7 +118,7 @@
echo '<item>';
echo '<title>' . $row['content'] . '</title>';
echo '<description>' . $row['content'] . '</description>';
- echo '<pubDate>' . date( DATE_RFC822, $row['t'] ) . '</pubDate>';
+ echo '<pubDate>' . date( DATE_ATOM, $row['t'] ) . '</pubDate>';
echo '</item>' . "\n";
}
?>
@@ -185,4 +185,4 @@
if (!$ok)
die("Cannot execute query. $error");
}
-?>
\ 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: <han...@us...> - 2012-01-07 22:43:21
|
Revision: 640
http://openautomation.svn.sourceforge.net/openautomation/?rev=640&view=rev
Author: hannesloehr
Date: 2012-01-07 22:43:15 +0000 (Sat, 07 Jan 2012)
Log Message:
-----------
Fixed bug when using deeper hierarchies; lastpage is now stored into body.data instead of url parameter.
Modified Paths:
--------------
CometVisu/trunk/visu/lib/templateengine.js
Modified: CometVisu/trunk/visu/lib/templateengine.js
===================================================================
--- CometVisu/trunk/visu/lib/templateengine.js 2012-01-07 22:32:24 UTC (rev 639)
+++ CometVisu/trunk/visu/lib/templateengine.js 2012-01-07 22:43:15 UTC (rev 640)
@@ -297,7 +297,7 @@
window.onpopstate = function(e) {
// where do we come frome?
- lastpage = $.getUrlVar("lastpage");
+ lastpage = $('body').data("lastpage")
if (lastpage) {
// browser back button takes us one level higher
scrollToPage(lastpage);
@@ -358,37 +358,23 @@
{
$('#'+page_id).css( 'display', '' ); // show new page
-
- // build url string with new lastpage parameter
- url_vars = $.getUrlVars();
- parameters = [];
-
- // filter old lastpage parameter
- for (var i = 0; i < url_vars.length; i++) {
- key = url_vars[i];
- value = url_vars[key];
- if (key != "lastpage"){
- parameters.push(key+"="+value);
- }
- }
-
// which is the parent of target page_id?
- // => set this id as lastpage in url for window.onpopstate handling
+ // => set this id as lastpage in url for window.onpopstate handling
var path = page_id.split( '_' );
if (path.length > 1){
// above top level
- // the next to last item of path is the parent id
+ // everything besides the last number is the parent id
path.pop();
- parameters.push("lastpage="+path.pop());
+ // store lastpage in body.data
+ $('body').data("lastpage", path.join("_"));
}
else {
// top level
- parameters.push("lastpage="+page_id);
+ $('body').data("lastpage", page_id);
}
- // manipulate browser url
- path = window.location.pathname+"?"+parameters.join("&");
- window.history.pushState(page_id, page_id, path);
+ // push new state to history
+ window.history.pushState(page_id, page_id, window.location.href);
main_scroll.seekTo( $('.page').index( $('#'+page_id)[0] ), speed ); // scroll to it
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2012-01-07 22:32:30
|
Revision: 639
http://openautomation.svn.sourceforge.net/openautomation/?rev=639&view=rev
Author: makki1
Date: 2012-01-07 22:32:24 +0000 (Sat, 07 Jan 2012)
Log Message:
-----------
CV-plugin rss: local feeds without Google-API, better display for logentries without title/link (title=false), update zrssfeed to 1.1.5, still needs syncing on many paremeters, better CSS etc..
Modified Paths:
--------------
CometVisu/trunk/visu/plugins/rss/structure_plugin.js
CometVisu/trunk/visu/plugins/rss/zrssfeed/jquery.zrssfeed.js
Modified: CometVisu/trunk/visu/plugins/rss/structure_plugin.js
===================================================================
--- CometVisu/trunk/visu/plugins/rss/structure_plugin.js 2012-01-07 18:40:43 UTC (rev 638)
+++ CometVisu/trunk/visu/plugins/rss/structure_plugin.js 2012-01-07 22:32:24 UTC (rev 639)
@@ -16,10 +16,12 @@
*/
/**
- * This plugins integrates jFeed to display RSS-Feeds into CometVisu.
+ * This plugins integrates zrssfeed to display RSS-Feeds via Google-API
+ * *and* a parser for local feeds using jQuery 1.5+ into CometVisu.
+ * rssfeedlocal is derived from simplerss and zrssfeed
*/
-$("body").append("<script type=\"text/javascript\" src=\"plugins/rss/zrssfeed/jquery.zrssfeed.min.js\"></script>");
+$("body").append("<script type=\"text/javascript\" src=\"plugins/rss/zrssfeed/jquery.zrssfeed.js\"></script>");
VisuDesign_Custom.prototype.addCreator("rss", {
create: function( page, path ) {
@@ -35,7 +37,7 @@
var ret_val = $('<div class="widget clearfix" />');
ret_val.addClass( 'rss' );
var label = '<div class="label">' + page.textContent + '</div>';
- var actor = $("<div class=\"actor\"><div class=\"rss_inline\" id=\"" + id + "\">loading...</div></div>");
+ var actor = $("<div class=\"actor\"><div class=\"rss_inline\" id=\"" + id + "\"></div></div>");
var rss = $("#" + id, actor);
if ($p.attr("width")) {
@@ -59,6 +61,7 @@
rss.data("showerror", $p.attr("showerror")) || true;
rss.data("ssl", $p.attr("ssl")) || false;
rss.data("linktarget", $p.attr("linktarget")) || "_new";
+ rss.data("link", $p.attr("link")) || true;
refreshRSS(rss, {});
@@ -76,7 +79,8 @@
snippet: {type: "list", required: false, list: {'true': "yes", 'false': "no"}},
showerror: {type: "list", required: false, list: {'true': "yes", 'false': "no"}},
ssl: {type: "list", required: false, list: {'true': "yes", 'false': "no"}},
- linktarget: {type: "list", required: false, list: {"_new": "_new", "_self": "_self"}}
+ linktarget: {type: "list", required: false, list: {"_new": "_new", "_self": "_self"}},
+ link: {type: "list", required: false, list: {'true': "yes", 'false': "no"}}
},
content: {type: "string", required: true}
});
@@ -88,22 +92,37 @@
var label = rss.data("label");
var refresh = rss.data("refresh");
var limit = rss.data("limit");
- //console.log("refresh rss:" + src); //DEBUG
- //eval needed to convert string true/false to bool?
- jQuery(function() {
+ //FIXME: eval really needed?? to convert string true/false to bool?
+ if (src.match(/^http/)) {
+ //use zrssfeed
+ jQuery(function() {
$(rss).rssfeed(src, {
limit: rss.data("limit"),
header: eval(rss.data("header")),
date: eval(rss.data("date")),
+ content: rss.data("content"),
+ snippet: eval(rss.data("snippet")),
+ showerror: eval(rss.data("showerror")),
+ ssl: eval(rss.data("ssl")),
+ linktarget: rss.data("linktarget"),
+ });
+ });
+ } else {
+ jQuery(function() {
+ $(rss).rssfeedlocal({
+ src: src,
+ limit: rss.data("limit"),
+ header: eval(rss.data("header")),
date: eval(rss.data("date")),
content: rss.data("content"),
snippet: eval(rss.data("snippet")),
showerror: eval(rss.data("showerror")),
ssl: eval(rss.data("ssl")),
- linktarget: rss.data("linktarget")
+ linktarget: rss.data("linktarget"),
+ link: eval(rss.data("link"))
});
-
- });
+ });
+ }
if (typeof (refresh) != "undefined" && refresh) {
// reload regularly
window.setTimeout(function(rss, data) {
@@ -113,3 +132,85 @@
return false;
}
+
+(function($){
+ jQuery.fn.extend({
+ rssfeedlocal: function(options) {
+
+ var defaults = {
+ src: '',
+ header: false,
+ html: '{title}{date}{text}',
+ wrapper: 'li',
+ dataType: 'xml',
+ limit: 10,
+ linktarget: 'new',
+ date: true,
+ link: true
+ }
+ var options = jQuery.extend(defaults, options);
+ return this.each(function() {
+ var o = options;
+ var c = jQuery(this);
+
+ if (o.src == '') {
+ console.log('rssfeedlocal: no src URL');
+ return; // avoid the request
+ }
+
+ jQuery.ajax({
+ url: o.src,
+ type: 'GET',
+ dataType: o.dataType,
+ error: function (xhr, status, e) {
+ console.log('C: #%s, Error: %s, Feed: %s', $(c).attr('id'), e, o.src);
+ },
+ success: function(feed){
+
+ if (o.header)
+ jQuery(c).parent().parent().prepend( '<p><div class="rssHeader">' +
+ '<a href="' + jQuery(feed).find('link:first').text()
+ +'" title="'+ jQuery(feed).find('description:first').text()
+ +'" target="' + o.linktarget + '">'
+ + jQuery(feed).find('title:first').text()
+ +'</a>' + '</div></p>');
+
+ jQuery(feed).find('item').each(function(i){
+ var row = 'odd';
+ var itemHtml;
+ if (o.link)
+ itemHtml = o.html.replace(/{title}/, '<a href="'
+ + jQuery(this).find('guid').text()
+ + '" target="' + o.linktarget + '">'
+ + jQuery(this).find('title').text() + '</a><br />');
+ else
+ itemHtml = o.html.replace(/{title}/, '');
+
+ itemHtml = itemHtml.replace(/{text}/, jQuery(this).find('description').text());
+ var entryDate = new Date(jQuery(this).find('pubDate').text());
+ if (o.date && entryDate)
+ itemHtml = itemHtml.replace(/{date}/, entryDate.toLocaleDateString() + ' ' + entryDate.toLocaleTimeString() + ' ');
+ else
+ itemHtml = itemHtml.replace(/{date}/, '');
+
+ jQuery(c).append(jQuery('<' + o.wrapper + ' class="rssRow ' + row + '">').append(itemHtml));
+
+ // Alternate row classes
+ if (row == 'odd') {
+ row = 'even';
+ } else {
+ row = 'odd';
+ }
+ if (i == o.limit-1) {
+ return false;
+ }
+
+ });
+ }
+ });
+ });
+ return this;
+ }
+ });
+})(jQuery);
+
Modified: CometVisu/trunk/visu/plugins/rss/zrssfeed/jquery.zrssfeed.js
===================================================================
--- CometVisu/trunk/visu/plugins/rss/zrssfeed/jquery.zrssfeed.js 2012-01-07 18:40:43 UTC (rev 638)
+++ CometVisu/trunk/visu/plugins/rss/zrssfeed/jquery.zrssfeed.js 2012-01-07 22:32:24 UTC (rev 639)
@@ -1,13 +1,16 @@
/**
* Plugin: jquery.zRSSFeed
*
- * Version: 1.1.2
+ * Version: 1.1.5
* (c) Copyright 2010-2011, Zazar Ltd
*
* Description: jQuery plugin for display of RSS feeds via Google Feed API
* (Based on original plugin jGFeed by jQuery HowTo. Filesize function by Cary Dunn.)
*
* History:
+ * 1.1.5 - Target option now applies to all feed links
+ * 1.1.4 - Added option to hide media and now compressed with Google Closure
+ * 1.1.3 - Check for valid published date
* 1.1.2 - Added user callback function due to issue with ajaxStop after jQuery 1.4.2
* 1.1.1 - Correction to null xml entries and support for media with jQuery < 1.5
* 1.1.0 - Added support for media in enclosure tags
@@ -29,6 +32,7 @@
date: true,
content: true,
snippet: true,
+ media: true,
showerror: true,
errormsg: '',
key: null,
@@ -96,8 +100,10 @@
var row = 'odd';
// Get XML data for media (parseXML not used as requires 1.5+)
- var xml = getXMLDocument(data.xmlString);
- var xmlEntries = xml.getElementsByTagName('item');
+ if (options.media) {
+ var xml = getXMLDocument(data.xmlString);
+ var xmlEntries = xml.getElementsByTagName('item');
+ }
// Add header if required
if (options.header)
@@ -114,15 +120,18 @@
// Get individual feed
var entry = feeds.entries[i];
-
+ var pubDate;
+
// Format published date
- var entryDate = new Date(entry.publishedDate);
- var pubDate = entryDate.toLocaleDateString() + ' ' + entryDate.toLocaleTimeString();
+ if (entry.publishedDate) {
+ var entryDate = new Date(entry.publishedDate);
+ var pubDate = entryDate.toLocaleDateString() + ' ' + entryDate.toLocaleTimeString() + ' ';
+ }
// Add feed row
html += '<li class="rssRow '+row+'">' +
- '<'+ options.titletag +'><a href="'+ entry.link +'" title="View this feed at '+ feeds.title +'" target="'+ options.linktarget +'">'+ entry.title +'</a></'+ options.titletag +'>'
- if (options.date) html += '<div>'+ pubDate +'</div>'
+ '<'+ options.titletag +'><a href="'+ entry.link +'" title="View this feed at '+ feeds.title +'">'+ entry.title +'</a></'+ options.titletag +'>'
+ if (options.date && pubDate) html += '<div>'+ pubDate +'</div>'
if (options.content) {
// Use feed snippet if available and optioned
@@ -136,7 +145,7 @@
}
// Add any media
- if(xmlEntries.length > 0) {
+ if (options.media && xmlEntries.length > 0) {
var xmlMedia = xmlEntries[i].getElementsByTagName('enclosure');
if (xmlMedia.length > 0) {
html += '<div class="rssMedia"><div>Media files</div><ul>'
@@ -163,6 +172,9 @@
'</div>'
$(e).html(html);
+
+ // Apply target to links
+ $('a',e).attr('target',options.linktarget);
};
function formatFilesize(bytes) {
@@ -185,3 +197,4 @@
}
})(jQuery);
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <han...@us...> - 2012-01-07 18:40:50
|
Revision: 638
http://openautomation.svn.sourceforge.net/openautomation/?rev=638&view=rev
Author: hannesloehr
Date: 2012-01-07 18:40:43 +0000 (Sat, 07 Jan 2012)
Log Message:
-----------
Added handling for browser back button => go one level higher in page hierarchy.
Modified Paths:
--------------
CometVisu/trunk/visu/lib/templateengine.js
Modified: CometVisu/trunk/visu/lib/templateengine.js
===================================================================
--- CometVisu/trunk/visu/lib/templateengine.js 2012-01-06 19:01:35 UTC (rev 637)
+++ CometVisu/trunk/visu/lib/templateengine.js 2012-01-07 18:40:43 UTC (rev 638)
@@ -292,6 +292,19 @@
main_scroll.seekTo( $(this).text() );
});
+
+ // reaction on browser back button
+ window.onpopstate = function(e) {
+
+ // where do we come frome?
+ lastpage = $.getUrlVar("lastpage");
+ if (lastpage) {
+ // browser back button takes us one level higher
+ scrollToPage(lastpage);
+ }
+ }
+
+
visu.subscribe( ga_list );
$("#pages").triggerHandler("done");
}
@@ -344,6 +357,40 @@
function scrollToPage( page_id, speed )
{
$('#'+page_id).css( 'display', '' ); // show new page
+
+
+ // build url string with new lastpage parameter
+ url_vars = $.getUrlVars();
+ parameters = [];
+
+ // filter old lastpage parameter
+ for (var i = 0; i < url_vars.length; i++) {
+ key = url_vars[i];
+ value = url_vars[key];
+ if (key != "lastpage"){
+ parameters.push(key+"="+value);
+ }
+ }
+
+ // which is the parent of target page_id?
+ // => set this id as lastpage in url for window.onpopstate handling
+ var path = page_id.split( '_' );
+ if (path.length > 1){
+ // above top level
+ // the next to last item of path is the parent id
+ path.pop();
+ parameters.push("lastpage="+path.pop());
+ }
+ else {
+ // top level
+ parameters.push("lastpage="+page_id);
+ }
+
+ // manipulate browser url
+ path = window.location.pathname+"?"+parameters.join("&");
+ window.history.pushState(page_id, page_id, path);
+
+
main_scroll.seekTo( $('.page').index( $('#'+page_id)[0] ), speed ); // scroll to it
var pagedivs=$('div', '#'+page_id);
for( var i = 0; i<pagedivs.length; i++) //check for inline diagrams & refresh
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2012-01-06 19:01:41
|
Revision: 637
http://openautomation.svn.sourceforge.net/openautomation/?rev=637&view=rev
Author: mayerch
Date: 2012-01-06 19:01:35 +0000 (Fri, 06 Jan 2012)
Log Message:
-----------
Initial implementation of the writeonly attribute
=> To check if it's a solution to bug http://knx-user-forum.de/cometvisu/17655-bug-cometvisu-vergisst-manchmal-status.html
=> ONLY implemented for switch widget. (If it's a solution, the other widgets have to follow)
Modified Paths:
--------------
CometVisu/trunk/visu/designs/structure_pure.js
Modified: CometVisu/trunk/visu/designs/structure_pure.js
===================================================================
--- CometVisu/trunk/visu/designs/structure_pure.js 2012-01-06 00:17:44 UTC (rev 636)
+++ CometVisu/trunk/visu/designs/structure_pure.js 2012-01-06 19:01:35 UTC (rev 637)
@@ -380,8 +380,9 @@
var src = this.textContent;
var transform = this.getAttribute('transform');
var readonly = this.getAttribute('readonly');
+ var writeonly = this.getAttribute('writeonly');
ga_list.push( src )
- address[ '_' + src ] = [ transform, readonly=='true' ];
+ address[ '_' + src ] = [ transform, readonly=='true', writeonly=='true' ];
});
var actor = '<div class="actor switchUnpressed"><div class="value">-</div></div>';
var $actor = $(actor).data( {
@@ -393,7 +394,10 @@
'align' : $p.attr('align'),
'type' : 'switch'
} ).bind( 'click', this.action );
- for( var addr in address ) $actor.bind( addr, this.update );
+ for( var addr in address )
+ {
+ if( !address[addr][2] ) $actor.bind( addr, this.update ); // no writeonly
+ }
ret_val.append( label ).append( $actor );
return ret_val;
},
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <han...@us...> - 2012-01-06 00:17:50
|
Revision: 636
http://openautomation.svn.sourceforge.net/openautomation/?rev=636&view=rev
Author: hannesloehr
Date: 2012-01-06 00:17:44 +0000 (Fri, 06 Jan 2012)
Log Message:
-----------
Design will be read from the url, then from the config file; otherwise the selection dialog will be shown.
Modified Paths:
--------------
CometVisu/trunk/visu/lib/templateengine.js
Modified: CometVisu/trunk/visu/lib/templateengine.js
===================================================================
--- CometVisu/trunk/visu/lib/templateengine.js 2012-01-05 23:16:13 UTC (rev 635)
+++ CometVisu/trunk/visu/lib/templateengine.js 2012-01-06 00:17:44 UTC (rev 636)
@@ -41,9 +41,6 @@
}
var clientDesign = "";
-if ($.getUrlVar("design")) {
- clientDesign = $.getUrlVar("design");
-}
if (typeof forceReload == "undefined") {
var forceReload = false;
@@ -77,14 +74,9 @@
$(document).ready(function() {
- // only load the config and stuff if a design was specified
- if (clientDesign != "") {
- // get the data once the page was loaded
- $.ajaxSetup({cache: !forceReload});
- window.setTimeout("$.get( 'visu_config" + configSuffix + ".xml', parseXML );", 200);
- } else {
- selectDesign();
- }
+ // get the data once the page was loaded
+ $.ajaxSetup({cache: !forceReload});
+ window.setTimeout("$.get( 'visu_config" + configSuffix + ".xml', parseXML );", 200);
} );
@@ -155,9 +147,32 @@
// erst mal den Cache für AJAX-Requests wieder aktivieren
$.ajaxSetup({cache: true});
+
+ /* First, we try to get a design by url
+ * Secondly, we try to get a predefined design in the config file
+ * Otherwise we show the design selection dialog
+ */
+
+ // read predefined design in config
+ predefinedDesign = $( 'pages', xml ).attr("design");
+
+ // design by url
+ if ($.getUrlVar("design")) {
+ clientDesign = $.getUrlVar("design");
+ }
+ // design by config file
+ else if (predefinedDesign){
+ clientDesign = predefinedDesign;
+ }
+ // selection dialog
+ else {
+ selectDesign();
+ }
+
+
$( 'head' ).append( '<link rel="stylesheet" type="text/css" href="designs/' + clientDesign + '/basic.css" />' );
$( 'head' ).append( '<link rel="stylesheet" type="text/css" href="designs/' + clientDesign + '/mobile.css" media="only screen and (max-device-width: 480px)" />' );
-
+
// start with the plugins
var pluginsToLoad = 0;
$( 'meta > plugins plugin', xml ).each( function(i){
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <han...@us...> - 2012-01-05 23:16:19
|
Revision: 635
http://openautomation.svn.sourceforge.net/openautomation/?rev=635&view=rev
Author: hannesloehr
Date: 2012-01-05 23:16:13 +0000 (Thu, 05 Jan 2012)
Log Message:
-----------
Added jquery.ui.touch-punch.js; script simulates touch events as mouse events on jquery ui elements like a slider.
Modified Paths:
--------------
CometVisu/trunk/visu/index.html
Added Paths:
-----------
CometVisu/trunk/visu/lib/jquery.ui.touch-punch.js
CometVisu/trunk/visu/lib/jquery.ui.touch-punch.min.js
Modified: CometVisu/trunk/visu/index.html
===================================================================
--- CometVisu/trunk/visu/index.html 2012-01-05 16:25:17 UTC (rev 634)
+++ CometVisu/trunk/visu/index.html 2012-01-05 23:16:13 UTC (rev 635)
@@ -12,6 +12,7 @@
<script src="lib/compatibility.js" type="text/javascript"></script>
<script src="lib/jquery-ui.js" type="text/javascript"></script>
<script src="lib/scrollable.js" type="text/javascript"></script>
+ <script src="lib/jquery.ui.touch-punch.js" type="text/javascript"></script>
<script src="lib/cometvisu-client.js" type="text/javascript"></script>
<script src="lib/knx_decode.js" type="text/javascript"></script>
<script src="designs/structure_pure.js" type="text/javascript"></script>
Added: CometVisu/trunk/visu/lib/jquery.ui.touch-punch.js
===================================================================
--- CometVisu/trunk/visu/lib/jquery.ui.touch-punch.js (rev 0)
+++ CometVisu/trunk/visu/lib/jquery.ui.touch-punch.js 2012-01-05 23:16:13 UTC (rev 635)
@@ -0,0 +1,167 @@
+/*!
+ * jQuery UI Touch Punch 0.2.2
+ *
+ * Copyright 2011, Dave Furfero
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ *
+ * Depends:
+ * jquery.ui.widget.js
+ * jquery.ui.mouse.js
+ *
+ * https://github.com/furf/jquery-ui-touch-punch
+ *
+ */
+(function ($) {
+
+ // Detect touch support
+ $.support.touch = 'ontouchend' in document;
+
+ // Ignore browsers without touch support
+ if (!$.support.touch) {
+ console.log("Kein Touch Support");
+ return;
+ }
+ else {
+ console.log("MIT Touch Support");
+ }
+
+ var mouseProto = $.ui.mouse.prototype,
+ _mouseInit = mouseProto._mouseInit,
+ touchHandled;
+
+ /**
+ * Simulate a mouse event based on a corresponding touch event
+ * @param {Object} event A touch event
+ * @param {String} simulatedType The corresponding mouse event
+ */
+ function simulateMouseEvent (event, simulatedType) {
+
+ // Ignore multi-touch events
+ if (event.originalEvent.touches.length > 1) {
+ return;
+ }
+
+ event.preventDefault();
+
+ var touch = event.originalEvent.changedTouches[0],
+ simulatedEvent = document.createEvent('MouseEvents');
+
+ // Initialize the simulated mouse event using the touch event's coordinates
+ simulatedEvent.initMouseEvent(
+ simulatedType, // type
+ true, // bubbles
+ true, // cancelable
+ window, // view
+ 1, // detail
+ touch.screenX, // screenX
+ touch.screenY, // screenY
+ touch.clientX, // clientX
+ touch.clientY, // clientY
+ false, // ctrlKey
+ false, // altKey
+ false, // shiftKey
+ false, // metaKey
+ 0, // button
+ null // relatedTarget
+ );
+
+ // Dispatch the simulated event to the target element
+ event.target.dispatchEvent(simulatedEvent);
+ }
+
+ /**
+ * Handle the jQuery UI widget's touchstart events
+ * @param {Object} event The widget element's touchstart event
+ */
+ mouseProto._touchStart = function (event) {
+
+ var self = this;
+
+ // Ignore the event if another widget is already being handled
+ if (touchHandled || !self._mouseCapture(event.originalEvent.changedTouches[0])) {
+ return;
+ }
+
+ // Set the flag to prevent other widgets from inheriting the touch event
+ touchHandled = true;
+
+ // Track movement to determine if interaction was a click
+ self._touchMoved = false;
+
+ // Simulate the mouseover event
+ simulateMouseEvent(event, 'mouseover');
+
+ // Simulate the mousemove event
+ simulateMouseEvent(event, 'mousemove');
+
+ // Simulate the mousedown event
+ simulateMouseEvent(event, 'mousedown');
+ };
+
+ /**
+ * Handle the jQuery UI widget's touchmove events
+ * @param {Object} event The document's touchmove event
+ */
+ mouseProto._touchMove = function (event) {
+
+ // Ignore event if not handled
+ if (!touchHandled) {
+ return;
+ }
+
+ // Interaction was not a click
+ this._touchMoved = true;
+
+ // Simulate the mousemove event
+ simulateMouseEvent(event, 'mousemove');
+ };
+
+ /**
+ * Handle the jQuery UI widget's touchend events
+ * @param {Object} event The document's touchend event
+ */
+ mouseProto._touchEnd = function (event) {
+
+ // Ignore event if not handled
+ if (!touchHandled) {
+ return;
+ }
+
+ // Simulate the mouseup event
+ simulateMouseEvent(event, 'mouseup');
+
+ // Simulate the mouseout event
+ simulateMouseEvent(event, 'mouseout');
+
+ // If the touch interaction did not move, it should trigger a click
+ if (!this._touchMoved) {
+
+ // Simulate the click event
+ simulateMouseEvent(event, 'click');
+ }
+
+ // Unset the flag to allow other widgets to inherit the touch event
+ touchHandled = false;
+ };
+
+ /**
+ * A duck punch of the $.ui.mouse _mouseInit method to support touch events.
+ * This method extends the widget with bound touch event handlers that
+ * translate touch events to mouse events and pass them to the widget's
+ * original mouse event handling methods.
+ */
+ mouseProto._mouseInit = function () {
+
+ var self = this;
+
+ // Delegate the touch handlers to the widget's element
+ self.element
+ .bind('touchstart', $.proxy(self, '_touchStart'))
+ .bind('touchmove', $.proxy(self, '_touchMove'))
+ .bind('touchend', $.proxy(self, '_touchEnd'));
+
+ // Call the original $.ui.mouse init method
+ _mouseInit.call(self);
+ };
+
+})(jQuery);
\ No newline at end of file
Added: CometVisu/trunk/visu/lib/jquery.ui.touch-punch.min.js
===================================================================
--- CometVisu/trunk/visu/lib/jquery.ui.touch-punch.min.js (rev 0)
+++ CometVisu/trunk/visu/lib/jquery.ui.touch-punch.min.js 2012-01-05 23:16:13 UTC (rev 635)
@@ -0,0 +1,11 @@
+/*
+ * jQuery UI Touch Punch 0.2.2
+ *
+ * Copyright 2011, Dave Furfero
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ *
+ * Depends:
+ * jquery.ui.widget.js
+ * jquery.ui.mouse.js
+ */
+(function(b){b.support.touch="ontouchend" in document;if(!b.support.touch){return;}var c=b.ui.mouse.prototype,e=c._mouseInit,a;function d(g,h){if(g.originalEvent.touches.length>1){return;}g.preventDefault();var i=g.originalEvent.changedTouches[0],f=document.createEvent("MouseEvents");f.initMouseEvent(h,true,true,window,1,i.screenX,i.screenY,i.clientX,i.clientY,false,false,false,false,0,null);g.target.dispatchEvent(f);}c._touchStart=function(g){var f=this;if(a||!f._mouseCapture(g.originalEvent.changedTouches[0])){return;}a=true;f._touchMoved=false;d(g,"mouseover");d(g,"mousemove");d(g,"mousedown");};c._touchMove=function(f){if(!a){return;}this._touchMoved=true;d(f,"mousemove");};c._touchEnd=function(f){if(!a){return;}d(f,"mouseup");d(f,"mouseout");if(!this._touchMoved){d(f,"click");}a=false;};c._mouseInit=function(){var f=this;f.element.bind("touchstart",b.proxy(f,"_touchStart")).bind("touchmove",b.proxy(f,"_touchMove")).bind("touchend",b.proxy(f,"_touchEnd"));e.call(f);};})(jQuery);
\ 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: <ma...@us...> - 2012-01-05 16:25:23
|
Revision: 634
http://openautomation.svn.sourceforge.net/openautomation/?rev=634&view=rev
Author: makki1
Date: 2012-01-05 16:25:17 +0000 (Thu, 05 Jan 2012)
Log Message:
-----------
WireGat-Plugins: remove debug-code, cleanup, add maskver-Watchdog
Modified Paths:
--------------
wiregate/plugin/generic/DMX-Plugin.pl
wiregate/plugin/generic/EiWoMiSa
wiregate/plugin/generic/RFID-Leser
wiregate/plugin/generic/Taupunkt.pl
Added Paths:
-----------
wiregate/plugin/generic/EIB-Watchdog_maskver
Modified: wiregate/plugin/generic/DMX-Plugin.pl
===================================================================
--- wiregate/plugin/generic/DMX-Plugin.pl 2012-01-05 13:32:10 UTC (rev 633)
+++ wiregate/plugin/generic/DMX-Plugin.pl 2012-01-05 16:25:17 UTC (rev 634)
@@ -1,5 +1,5 @@
# Plugin DMX-Gateway
-# Version: 0.3 2011-05-28
+# Version: 0.4 2012-01-05
# Ben\xF6tigt DMX USB-Interface
##################
@@ -44,12 +44,6 @@
# Hauptverarbeitung
if (!$socket[$socknum]) { # socket erstellen
- if (defined $socket[$socknum]) { #debug
- if ($socket[$socknum]->opened) { $socket[$socknum]->close(); }
- undef $socket[$socknum];
- } #debug my $dgram = sprintf("C%03dL%03d\r\n",$dmxchan,hex($msg{'data'}));
-
- $socksel->remove($socket[$socknum]);
$socket[$socknum] = IO::Socket::INET->new(LocalPort => $dmx_recv_port,
Proto => "udp",
LocalAddr => $dmx_recv_ip,
Added: wiregate/plugin/generic/EIB-Watchdog_maskver
===================================================================
--- wiregate/plugin/generic/EIB-Watchdog_maskver (rev 0)
+++ wiregate/plugin/generic/EIB-Watchdog_maskver 2012-01-05 16:25:17 UTC (rev 634)
@@ -0,0 +1,21 @@
+### Variante maskver
+# Watchdog für KNX-Schnittstelle
+# relevant nur bei USB und evtl. FT1.2 !
+
+### Config physikalische Adresse - maskver muss lesbar sein!
+my $check_pa = "1.1.211";
+my $check_time = 120;
+### ENDE config
+
+# Eigenen Aufruf-Zyklus setzen
+$plugin_info{$plugname.'_cycle'} = $check_time;
+
+my $result=system("maskver local:/tmp/eib $check_pa");
+if ($result != 0) {
+ my $dummy = `/etc/init.d/eibd restart`;
+ return "EIB-Lesefehler!";
+}
+
+return 0;
+
+
Modified: wiregate/plugin/generic/EiWoMiSa
===================================================================
--- wiregate/plugin/generic/EiWoMiSa 2012-01-05 13:32:10 UTC (rev 633)
+++ wiregate/plugin/generic/EiWoMiSa 2012-01-05 16:25:17 UTC (rev 634)
@@ -1,5 +1,5 @@
# Plugin Eiwomisa RGB DMX-Controller
-# Version: 0.1 2011-01-21
+# Version: 0.11 2012-01-05
# Benötigt Eiwomisa RGB DMX Controller und socat Eintrag für USB-RS232 Wandler
##################
@@ -33,11 +33,6 @@
# Hauptverarbeitung
if (!$socket[$socknum]) { # socket erstellen
- if (defined $socket[$socknum]) { #debug
- if ($socket[$socknum]->opened) { $socket[$socknum]->close(); }
- undef $socket[$socknum];
- } #debug
- $socksel->remove($socket[$socknum]);
$socket[$socknum] = IO::Socket::INET->new(
Proto => "udp",
PeerPort => $dmx_send_port,
Modified: wiregate/plugin/generic/RFID-Leser
===================================================================
--- wiregate/plugin/generic/RFID-Leser 2012-01-05 13:32:10 UTC (rev 633)
+++ wiregate/plugin/generic/RFID-Leser 2012-01-05 16:25:17 UTC (rev 634)
@@ -1,5 +1,5 @@
# Plugin R.S-Systems RFID-Reader to KNX
-# Version: 0.2 2010-10-02
+# Version: 0.21 2012-01-05
# Ben\xF6tigt
# - RSS RFID-Reader an einem USB-Seriell-Wandler
# - Eintrag unter Socketverbindungen (socat)
@@ -27,11 +27,6 @@
# Hauptverarbeitung
# or ($fh and eof($socket[$socknum]))
if (!$socket[$socknum]) { # socket erstellen
- if (defined $socket[$socknum]) { #debug
- if ($socket[$socknum]->opened) { $socket[$socknum]->close(); }
- undef $socket[$socknum];
- } #debug
- $socksel->remove($socket[$socknum]);
$socket[$socknum] = IO::Socket::INET->new(LocalPort => $recv_port,
Proto => "udp",
LocalAddr => $recv_ip
Modified: wiregate/plugin/generic/Taupunkt.pl
===================================================================
--- wiregate/plugin/generic/Taupunkt.pl 2012-01-05 13:32:10 UTC (rev 633)
+++ wiregate/plugin/generic/Taupunkt.pl 2012-01-05 16:25:17 UTC (rev 634)
@@ -1,4 +1,8 @@
# Plugin zur Taupunktberechnung
+# *** ACHTUNG ***
+# Dieses Plugin ist im Prinzip obsolet, da Taupunkt seit PL29 direkter Bestandteil ist
+# *** ACHTUNG ***
+#
# Details zur N\xE4herungsformel unter http://www.wettermail.de/wetter/feuchte.html
# Das Plugin geht davon aus, das Temperatur&Luftfeuchte zyklisch
# auf den Bus geschrieben werden und/oder lesbar sind (Lese-Flag gesetzt)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2012-01-05 13:32:21
|
Revision: 633
http://openautomation.svn.sourceforge.net/openautomation/?rev=633&view=rev
Author: makki1
Date: 2012-01-05 13:32:10 +0000 (Thu, 05 Jan 2012)
Log Message:
-----------
russconnectd: Release 0.21, fixed bass/treble, better cfgmaker
Modified Paths:
--------------
tools/russconnectd/trunk/cfgmaker.pl
tools/russconnectd/trunk/openwrt/russconnectd/Makefile
tools/russconnectd/trunk/russ_galist.ods
Modified: tools/russconnectd/trunk/cfgmaker.pl
===================================================================
--- tools/russconnectd/trunk/cfgmaker.pl 2012-01-03 21:07:03 UTC (rev 632)
+++ tools/russconnectd/trunk/cfgmaker.pl 2012-01-05 13:32:10 UTC (rev 633)
@@ -1,14 +1,18 @@
#!/usr/bin/perl
use strict;
-my $ZONES_PER_CONTROLLER = 6; #static
-my @gfuncnames = qw(SetAllZonesPower WRITEONLYACT NA3 NA4 NA5 AllZonesPowerState);
my @funcnames = qw(SetPower SetSource SetVol SetBass SetTreble SetLoudness SetBalance SetParty SetDnD SetOnVol SourceSetCMD SourceKeypadCMD SetVolRelative);
my @statenames = qw(PowerState SourceSelected VolumeState BassState TrebleState LoudnessState BalanceState PartyState DnDState OnVolState);
my $NamePrefix = "Multiroom";
my @SourceNames = qw(UKW-Tuner vdr/mpd Denon-WZ WG1 WG2 Hobby);
+my $CV_switch_mapping = "On_Off";
+my $CV_switch_styling = "Green_Red";
+my $CV_source_mapping_name = "RussoundSRC";
+
### End config - Don't change below ###
#######################################
+my $ZONES_PER_CONTROLLER = 6; #static
+my @gfuncnames = qw(SetAllZonesPower WRITEONLYACT NA3 NA4 NA5 AllZonesPowerState);
use File::Copy;
use Config::Tiny;
@@ -58,7 +62,7 @@
print VISU1 " <page name=\"$NamePrefix\">\n";
print VISU2 "<!-- Change SourceNames in script and insert this on top between <mappings> and </mappings> -->\n";
-print VISU2 " <mapping name=\"RussoundSRC\">\n"
+print VISU2 " <mapping name=\"$CV_source_mapping_name\">\n"
." <entry value=\"0\">$SourceNames[0]</entry>\n"
." <entry value=\"1\">$SourceNames[1]</entry>\n"
." <entry value=\"2\">$SourceNames[2]</entry>\n"
@@ -103,7 +107,7 @@
print ESF "$NamePrefix.Controller$ctrl." . addr2str($basega+$i+20,1) . "\t" . "$NamePrefix $zonenames[$zone] C" . ($ctrl+1) . "-Z" . ($czone+1) . " $statenames[$i]" . "\t" . $EISmap{$statedpts[$i]} . "\tLow\n";
print XML "\t\t<object id=\"$zonenames[$zone]_C" . ($ctrl+1) . "_Z" . ($czone+1) . "_" . "$statenames[$i]\" gad=\"" . addr2str($basega+$i+20,1) . "\" type=\"$statedpts[$i]\">" . "$NamePrefix $zonenames[$zone] (C" . ($ctrl+1) . "/Z" . ($czone+1) . ") $statenames[$i]" . "</object>\n";
}
- print VISU1 ' <switch mapping="OnOff" styling="GreenRed">'
+ print VISU1 ' <switch mapping="'. $CV_switch_mapping .'" styling="'. $CV_switch_styling .'">'
."\n <label>$zonenames[$zone]</label>\n"
.' <address transform="DPT:1.001" readonly="false" type="">' . addr2str($basega,1) . "</address>\n"
.' <address transform="DPT:1.001" readonly="true" type="">' . addr2str($basega+20,1) . "</address>\n"
@@ -115,7 +119,7 @@
." </slide>\n";
print VISU2 " <page name=\"$NamePrefix $zonenames[$zone]\">\n";
- print VISU2 ' <switch mapping="OnOff" styling="GreenRed">'
+ print VISU2 ' <switch mapping="'. $CV_switch_mapping .'" styling="'. $CV_switch_styling .'">'
."\n <label>Power</label>\n"
.' <address transform="DPT:1.001" readonly="false" type="">' . addr2str($basega,1) . "</address>\n"
.' <address transform="DPT:1.001" readonly="true" type="">' . addr2str($basega+20,1) . "</address>\n"
@@ -136,7 +140,7 @@
.' <address transform="DPT:5.010" readonly="false">' . addr2str($basega+1,1) . "</address>\n"
.' <address transform="DPT:5.010" readonly="true">' . addr2str($basega+21,1) . "</address>\n"
." </infotrigger>\n";
- print VISU2 ' <switch mapping="OnOff" styling="GreenRed">'
+ print VISU2 ' <switch mapping="'. $CV_switch_mapping .'" styling="'. $CV_switch_styling .'">'
."\n <label>Loudness</label>\n"
.' <address transform="DPT:1.001" readonly="false" type="">' . addr2str($basega+5,1) . "</address>\n"
.' <address transform="DPT:1.001" readonly="true" type="">' . addr2str($basega+25,1) . "</address>\n"
@@ -172,12 +176,12 @@
.' <address transform="DPT:6.001" readonly="false" type="">' . addr2str($basega+6,1) . "</address>\n"
.' <address transform="DPT:6.001" readonly="true" type="">' . addr2str($basega+26,1) . "</address>\n"
." </infotrigger>\n";
- print VISU2 ' <switch mapping="OnOff" styling="GreenRed">'
+ print VISU2 ' <switch mapping="'. $CV_switch_mapping .'" styling="'. $CV_switch_styling .'">'
."\n <label>Party</label>\n"
.' <address transform="DPT:1.001" readonly="false" type="">' . addr2str($basega+7,1) . "</address>\n"
.' <address transform="DPT:1.001" readonly="true" type="">' . addr2str($basega+27,1) . "</address>\n"
." </switch>\n";
- print VISU2 ' <switch mapping="OnOff" styling="GreenRed">'
+ print VISU2 ' <switch mapping="'. $CV_switch_mapping .'" styling="'. $CV_switch_styling .'">'
."\n <label>DnD</label>\n"
.' <address transform="DPT:1.001" readonly="false" type="">' . addr2str($basega+8,1) . "</address>\n"
.' <address transform="DPT:1.001" readonly="true" type="">' . addr2str($basega+28,1) . "</address>\n"
Modified: tools/russconnectd/trunk/openwrt/russconnectd/Makefile
===================================================================
--- tools/russconnectd/trunk/openwrt/russconnectd/Makefile 2012-01-03 21:07:03 UTC (rev 632)
+++ tools/russconnectd/trunk/openwrt/russconnectd/Makefile 2012-01-05 13:32:10 UTC (rev 633)
@@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=russconnectd
-PKG_VERSION:=0.1
+PKG_VERSION:=0.21
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
Modified: tools/russconnectd/trunk/russ_galist.ods
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2012-01-03 21:07:09
|
Revision: 632
http://openautomation.svn.sourceforge.net/openautomation/?rev=632&view=rev
Author: mayerch
Date: 2012-01-03 21:07:03 +0000 (Tue, 03 Jan 2012)
Log Message:
-----------
* Change from Telnet to Socket
* Implement a few missing commands for the Russound
* Write status messages of the Russound (aquired by the WATCH command) to the KNX status addresses
Modified Paths:
--------------
wiregate/plugin/generic/Russound_RIO.pl
wiregate/plugin/generic/conf.d/Russound_RIO.conf_sample
Modified: wiregate/plugin/generic/Russound_RIO.pl
===================================================================
--- wiregate/plugin/generic/Russound_RIO.pl 2012-01-03 18:03:24 UTC (rev 631)
+++ wiregate/plugin/generic/Russound_RIO.pl 2012-01-03 21:07:03 UTC (rev 632)
@@ -12,6 +12,8 @@
#
#############################################################################
+#return; # uncomment to disable plugin
+
#############################################################################
# Configuration:
# --> change values in the conf.d directory!
@@ -20,6 +22,8 @@
my $numzones;
my $KNX_Start_Address;
+my $socknum; # unique number of the Socket
+
my $reset ; # set to 1 to reset the states, run script and change to 0 again
my $show_debug; # switches debug information that will be shown in the log
#############################################################################
@@ -27,6 +31,15 @@
#############################################################################
#############################################################################
+# Constants:
+my $MAX_ZONES = 31;
+my $ZONES_PER_CONTROLLER = 6;
+
+#############################################################################
+# Collect log information
+my $retval = '';
+
+#############################################################################
# Read config file in conf.d
my $confFile = '/etc/wiregate/plugin/generic/conf.d/'.basename($plugname,'.pl').'.conf';
if (! -f $confFile)
@@ -56,49 +69,88 @@
}
#############################################################################
-# External libraries:
-use Net::Telnet ();
+# Configure socket
+if (!$socket[$socknum]) { # if it doesn't exist: create socket
+ if ($IP_of_Russound) {
+ $socket[$socknum] = IO::Socket::INET->new(
+ PeerAddr => $IP_of_Russound,
+ PeerPort => '9621',
+ Proto => 'tcp',
+ Timeout => 120,
+ Blocking => 0
+ );
+ if(!$socket[$socknum]) # retry with WOL if first try didn't work
+ {
+ `wakeonlan $MAC_of_Russound`;
+ $socket[$socknum] = IO::Socket::INET->new(
+ PeerAddr => $IP_of_Russound,
+ PeerPort => '9621',
+ Proto => 'tcp',
+ Timeout => 120,
+ Blocking => 0
+ );
+ }
+ if(!$socket[$socknum]) { # fail if second try also didn't work
+ return "open of $IP_of_Russound failed: $!";
+ }
+ } else {
+ return "ERROR: No IP address configured!";
+ }
-#############################################################################
-# Constants:
-my $MAX_ZONES = 31;
-my $ZONES_PER_CONTROLLER = 6;
+ $socksel->add($socket[$socknum]); # add socket to select
+ $plugin_socket_subscribe{$socket[$socknum]} = $plugname; # subscribe plugin
+ $retval .= "opened Socket $socknum!" if $show_debug;
+}
+
#############################################################################
-# Collect log information
-my $retval = '';
-
my $destReadable = $msg{'dst'};
my $val = hex $msg{'data'};
# Convert to numeric GA
-(my $a, my $b, my $c) = split(/\//, $KNX_Start_Address );
-my $knxstartaddress = (($a << 11) + ($b << 8) + $c);
+my $knxstartaddress = str2addr( $KNX_Start_Address );
+my $dest = str2addr( $destReadable );
-# Convert to numeric GA
-($a,$b,$c) = split(/\//, $destReadable );
-my $dest = (($a << 11) + ($b << 8) + $c);
-
# Eigenen Aufruf-Zyklus ausschalten
$plugin_info{$plugname.'_cycle'} = 0;
-# aboniere alle relevanten GAs
-for (my $zone=0;$zone<$numzones;$zone++)
-{
- my $ctrl = int($zone/$ZONES_PER_CONTROLLER);
- my $czone = int($zone%$ZONES_PER_CONTROLLER);
- my $base = $knxstartaddress + 10 + ($czone*40) + ($ctrl*256);
- for( my $i = 0; $i < 13; $i++ ) # iterate funcnames
+if (%msg) { # KNX telegramm
+ $retval .= 'KNX:' if $show_debug;
+} elsif ($fh) { # incoming network message
+ my $sockInfo .= 'Socket: [';
+ my $cnt = 0;
+ my $line;
+ $/ = "\r\n"; # remove all new line
+ while( defined ($line = <$fh>) )
{
- my $a = $base + $i;
- my $gastr = sprintf "%d/%d/%d", ($a >> 11) & 0xf, ($a >> 8) & 0x7, $a & 0xff;
- $plugin_subscribe{$gastr}{$plugname} = 1;
+ chomp( $line );
+ $sockInfo .= ($cnt++) . ': ' . $line .';';
+ handleRussResponse( $line );
}
- for( my $i = 0; $i < 10; $i++ ) # iterate stateames
+ $retval .= $sockInfo if $show_debug;
+} else
+{ # called during init or on cycle intervall
+ syswrite( $socket[$socknum], "VERSION\r" );
+ syswrite( $socket[$socknum], "WATCH System ON\r" );
+
+ # aboniere alle relevanten GAs
+ for (my $zone=0;$zone<$numzones;$zone++)
{
- my $a = $base + $i + 20;
- my $gastr = sprintf "%d/%d/%d", ($a >> 11) & 0xf, ($a >> 8) & 0x7, $a & 0xff;
- $plugin_subscribe{$gastr}{$plugname} = 1;
+ my $ctrl = int($zone/$ZONES_PER_CONTROLLER);
+ my $czone = int($zone%$ZONES_PER_CONTROLLER);
+ my $base = $knxstartaddress + 10 + ($czone*40) + ($ctrl*256);
+ for( my $i = 0; $i < 13; $i++ ) # iterate funcnames
+ {
+ my $a = $base + $i;
+ my $gastr = sprintf "%d/%d/%d", ($a >> 11) & 0xf, ($a >> 8) & 0x7, $a & 0xff;
+ $plugin_subscribe{$gastr}{$plugname} = 1;
+ }
+ for( my $i = 0; $i < 10; $i++ ) # iterate stateames
+ {
+ my $a = $base + $i + 20;
+ my $gastr = sprintf "%d/%d/%d", ($a >> 11) & 0xf, ($a >> 8) & 0x7, $a & 0xff;
+ $plugin_subscribe{$gastr}{$plugname} = 1;
+ }
}
}
@@ -121,7 +173,10 @@
$controller = ($dest - $knxstartaddress) / 256;
}
- sendrussFunc( $controller, $zone, $func, $val );
+ if( $func < 20) # >= 20 = response addresses
+ {
+ $retval .= sendrussFunc( $controller, $zone, $func, $val );
+ }
}
return $retval;
@@ -131,19 +186,8 @@
sub sendcmd
{
my $cmd = shift;
- my $t = new Net::Telnet (
- Timeout => 10,
- Host => $IP_of_Russound,
- Port => 9621,
- Prompt => '/^/',
- Telnetmode => 0
- );
- $t->open();
- $t->print( $cmd );
- $t->close();
- my $res = $t->getline();
- $retval .= $cmd . '->' . $res if $show_debug;
- return $res;
+ syswrite( $socket[$socknum], "$cmd\r" );
+ return;
}
sub sendrussFunc
@@ -160,9 +204,15 @@
return 'Func ' . $func . ' not implemented or known';
} elsif( 0 == $func ) #power
{
- `wakeonlan $MAC_of_Russound`; # just to be sure
- sendcmd("EVENT $cz!ZoneOff") if( $val == 0 );
- sendcmd("EVENT $cz!ZoneOn" ) if( $val == 1 );
+ if( $val == 0 )
+ {
+ sendcmd("EVENT $cz!ZoneOff");
+ sendcmd("WATCH $cz OFF" );
+ } else {
+ `wakeonlan $MAC_of_Russound`; # just to be sure
+ sendcmd("EVENT $cz!ZoneOn" );
+ sendcmd("WATCH $cz ON" );
+ }
} elsif( 1 == $func ) #src
{
my $mapped = $val + 1;
@@ -181,17 +231,17 @@
sendcmd("SET $cz.treble=\"$mapped\"");
} elsif( 5 == $func ) #loud
{
- return 'Func ' . $func . ' not implemented or known';
+ sendcmd("SET $cz.loudness=\"" . ($val?'ON':'OFF') . '"');
} elsif( 6 == $func ) #bal
{
my $mapped = $val > 10 ? $val-256 : $val;
sendcmd("SET $cz.balance=\"$mapped\"");
} elsif( 7 == $func ) #party
{
- return 'Func ' . $func . ' not implemented or known';
+ sendcmd("EVENT $cz!PartyMode " . ($val?'ON':'OFF') );
} elsif( 8 == $func ) #dnd
{
- return 'Func ' . $func . ' not implemented or known';
+ sendcmd("EVENT $cz!DoNotDisturb " . ($val?'ON':'OFF') );
} elsif( 9 == $func ) #turnonvol
{
my $mapped = int( $val * 50/255 );
@@ -199,8 +249,104 @@
#TODO: 10 src cmd and 11 keypadcmd
} elsif( 12 == $func ) #volume relative up/down
{
- return 'Func ' . $func . ' not implemented or known';
+ sendcmd("EVENT $cz!KeyPress Volume" . ($val?'Up':'Down') );
} else {
- return 'Func ' . $func . ' not implemented or known';
+ return 'Func ' . $func . ' not implemented or known('.$val.')';
}
}
+
+sub handleRussResponse
+{
+ my $response = shift;
+
+ return if $response eq 'S';
+
+ if( $response =~ /^N C\[([0-9]*)\].Z\[([0-9]*)\].(.*)="(.*)"/ )
+ { # WATCH message from a controller
+ my $index = "${plugname}_$1_$2_$3";
+ return if $plugin_info{$index} eq $4; # no change
+
+ $plugin_info{$index} = $4;
+ sendKNXfuncCZ( $1, $2, $3, $4 );
+ } elsif( $response =~ /^N S\[([0-9]*)\].(.*)="(.*)"/ )
+ {
+ #$retval .= 'S:'.$1.'>'.$2.'>'.$3.';';
+ } elsif( $response =~ /^N System.(.*)="(.*)"/ )
+ {
+ #$retval .= 'System:'.$1.'>'.$2.';';
+ } elsif( $response =~ /^S / )
+ {
+ return; # don't care about response code...
+ } else {
+ $retval .= "<Unknown: $response>";
+ }
+}
+
+sub sendKNXfuncCZ
+{
+ my $C = shift;
+ my $Z = shift;
+ my $state = shift;
+ my $val = shift;
+ my $func; # KNX func number
+ my $dpt;
+
+ if( $state eq 'status' )
+ {
+ $func = 0;
+ $val = $val eq 'ON' ? 1 : 0;
+ $dpt = 1;
+ } elsif( $state eq 'currentSource' )
+ {
+ $func = 1;
+ $val = $val - 1;
+ $dpt = 5.004;
+ } elsif( $state eq 'volume' )
+ {
+ $func = 2;
+ $val = int($val * 255 / 50);
+ $dpt = 5.004;
+ } elsif( $state eq 'bass' )
+ {
+ $func = 3;
+ $val = $val < 0 ? 256+$val : $val;
+ $dpt = 5.004;
+ } elsif( $state eq 'treble')
+ {
+ $func = 4;
+ $val = $val < 0 ? 256+$val : $val;
+ $dpt = 5.004;
+ } elsif( $state eq 'loudness' )
+ {
+ $func = 5;
+ $val = $val eq 'ON' ? 1 : 0;
+ $dpt = 1;
+ } elsif( $state eq 'balance' )
+ {
+ $func = 6;
+ $val = $val < 0 ? 256+$val : $val;
+ $dpt = 5.004;
+ } elsif( $state eq 'partyMode' )
+ {
+ $func = 7;
+ $val = ($val eq 'ON' || $val eq 'MASTER') ? 1 : 0;
+ $dpt = 1;
+ } elsif( $state eq 'doNotDisturb' )
+ {
+ $func = 8;
+ $val = $val eq 'ON' ? 1 : 0;
+ $dpt = 1;
+ } elsif( $state eq 'turnOnVolume' )
+ {
+ $func = 9;
+ $val = int($val * 255 / 50);
+ $dpt = 5.004;
+ } else {
+ $retval .= "ERROR: Unknown state '$state' with value '$val'!";
+ return;
+ }
+
+ my $knxGA = $knxstartaddress+30+$func + (($Z-1)*40) + (($C-1)*256);
+ knx_write( addr2str( $knxGA, 1 ), $val, $dpt );
+ $retval .= 'KNX[' . addr2str( $knxGA, 1 ) . ',' . $dpt . ']:' . $val . ';' if $show_debug;
+}
\ No newline at end of file
Modified: wiregate/plugin/generic/conf.d/Russound_RIO.conf_sample
===================================================================
--- wiregate/plugin/generic/conf.d/Russound_RIO.conf_sample 2012-01-03 18:03:24 UTC (rev 631)
+++ wiregate/plugin/generic/conf.d/Russound_RIO.conf_sample 2012-01-03 21:07:03 UTC (rev 632)
@@ -10,6 +10,8 @@
$numzones = 6;
$KNX_Start_Address = '10/1/0';
+$socknum = 4711; # unique number of the Socket
+
$reset = 0; # set to 1 to reset the states, run script and change to 0 again
$show_debug = 1; # switches debug information that will be shown in the log
#############################################################################
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2012-01-03 18:03:30
|
Revision: 631
http://openautomation.svn.sourceforge.net/openautomation/?rev=631&view=rev
Author: mayerch
Date: 2012-01-03 18:03:24 +0000 (Tue, 03 Jan 2012)
Log Message:
-----------
Force full reload before index might overflow during long periods without interesting bus traffic
Modified Paths:
--------------
CometVisu/trunk/visu/lib/cometvisu-client.js
Modified: CometVisu/trunk/visu/lib/cometvisu-client.js
===================================================================
--- CometVisu/trunk/visu/lib/cometvisu-client.js 2012-01-03 15:39:57 UTC (rev 630)
+++ CometVisu/trunk/visu/lib/cometvisu-client.js 2012-01-03 18:03:24 UTC (rev 631)
@@ -32,7 +32,9 @@
this.xhr = false; // the ongoing AJAX request
this.watchdogTimer = 5; // in Seconds - the alive check intervall of the watchdog
this.maxConnectionAge = 60; // in Seconds - restart if last read is older
- this.lastIndex = 0; // index returned by the last request
+ this.maxDataAge = 3200; // in Seconds - reload all data when last successfull read is older
+ // (should be faster than the index overflow at max data rate, i.e. 2^16 @ 20 tps for KNX TP)
+ this.lastIndex = -1; // index returned by the last request
/**
* This function gets called once the communication is established and session information is available
@@ -55,7 +57,7 @@
*/
this.handleRead = function( json )
{
- if( !json && !this.doRestart )
+ if( !json && (-1 == this.lastIndex) )
{
if( this.running )
{ // retry initial request
@@ -181,9 +183,11 @@
*/
var watchdog = (function(){
var last = new Date();
+ var hardLast = last;
var aliveCheckFunction = function(){
var now = new Date();
if( now - last < thisCometVisu.maxConnectionAge * 1000 ) return;
+ if( now - hardLast > thisCometVisu.maxDataAge * 1000 ) thisCometVisu.lastIndex = -1; // reload all data
thisCometVisu.restart();
last = now;
};
@@ -191,6 +195,8 @@
return {
ping: function(){
last = new Date();
+ if( !thisCometVisu.doRestart )
+ hardLast = last;
}
};
})();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|