
Von *.js und *.html verstehe ich aber so richtig wenig
.

.
/**
* A simple widget for plotting stacked charts
*
* @param unique id for this widget
* @param series of item/s. More item/s in array form: [ item1 , item2 ]
* @param the mode: 'avg', 'sum', 'min', 'max'
* @param the minimum time (x-axis): '1h', '2h'... (duration-format)
* @param the maximum time (x-axis): '', '1h', '2h'... (duration-format, default: now)
* @param the minimum y-axis (optional)
* @param the maximum y-axis (optional)
* @param label/s for each series (optional)
* @param stacklabel if the aggregated values should be shown, true/false (optional, default true)
* @param color/s for each series e. g. '#f00' for red (optional, default: sutiable for design)
* @param type/s for each series (exposure): 'line', 'stair', 'spline', 'area', 'areaspline', 'column' (optional, default 'line')
* @param count number of data points to load, default 100
* @param correctdate whether to delete last data point (if stats from previous
*
* @see misc/fundamentals#Array-Form
* @see misc/fundamentals#Duration-Format
*/
{% macro stacked(id, gad, mode, tmin, tmax, ymin, ymax, label, stacklabels, color, exposure, count, correctdate) %}
<div id="{{ uid(page, id) }}" data-widget="plot.stacked" data-item="{{ implode(gad, [mode|default('avg'), tmin|default('1h'), tmax|default('now')]) }}"
{% if ymin is not empty %} data-ymin="{{ ymin }}" {% endif %} {% if ymax is not empty %} data-ymax="{{ ymax }}" {% endif %}
data-label="{{ implode(label) }}" data-stacklabels="{{ stacklabels|default(true) }}" data-correctdate="{{ correctdate|default('false') }}"
data-color="{{ implode(color) }}" data-exposure="{{ implode(exposure) }}" data-axis="{{ implode(axes) }}"
{% if count is not empty %} data-count="{{ count }}" {% endif %}
class="plot"></div>
{% endmacro %}
<div class="block" style="width: 100%;">
<div class="set-2" data-role="collapsible-set" data-theme="c" data-content-theme="a" data-mini="true">
<div data-role="collapsible" data-collapsed="false">
<h3>Stromverbrauch pro Stunde (kwh)</h3>
{{ plot.period('pstunde', 'zaehler1.verbrauch.stuendlich', 'max', '48h', '', '', '', '', 'Haushalt', '#aa0', 'column', ['', ''], '1h') }}
</div>
</div>
</div>
<div class="block" style="width: 100%;">
<div class="set-2" data-role="collapsible-set" data-theme="c" data-content-theme="a" data-mini="true">
<div data-role="collapsible" data-collapsed="false">
<h3>Stromverbrauch pro Tag (kwh)</h3>
{{ plot.period('ptag', 'zaehler1.verbrauch.gestern', 'avg', '2w', '', '', '', '', 'Haushalt', '#aa0', 'column', ['', ''], '1h') }}
</div>
</div>
</div>
<div class="block" style="width: 100%;">
<div class="set-2" data-role="collapsible-set" data-theme="c" data-content-theme="a" data-mini="true">
<div data-role="collapsible" data-collapsed="false">
<h3>Kosten pro Tag (EUR)</h3>
{{ plot.period('pkost', ['zaehler1.kosten.gestern', 'zaehler1.kosten.gestern.weekly_avg'], 'max', '2w', '', '', '', '', ['Haushalt', 'Wochendurchschnitt'], ['#aa0', '#a6f829'], ['column', 'line'], ['', ''], '1h') }}
</div>
</div>
</div>
2015-01-18 19:57:34 WARNING Main Client 192.168.178.31:55452 requested invalid item: ehz.haus.verbrauch.stuendlich.max.48h.now.100 2015-01-18 19:57:34 WARNING Main Client 192.168.178.31:55452 requested invalid item: ehz.haus.kosten.gestern.max.2w.now.100 2015-01-18 19:57:34 WARNING Main Client 192.168.178.31:55452 requested invalid item: ehz.kosten.gestern.weekly_avg.max.2w.now.100 2015-01-18 19:57:34 WARNING Main Client 192.168.178.31:55452 requested invalid item: ehz.haus.verbrauch.gestern.avg.2w.now.100
2015-01-18 13:31:42 WARNING Main Item ehz.haus.verbrauch.aktuell: problem reading cache: [Errno 2] No such file or directory: '/usr/local/smarthome/var/cache/ehz.haus.verbrauch.aktuell'
2015-01-18 13:31:42 WARNING Main Item ehz.haus.verbrauch.gestern.weekly_avg: problem reading cache: [Errno 2] No such file or directory: '/usr/local/smarthome/var/cache/ehz.haus.verbrauch.gestern.weekly_avg'
2015-01-18 13:31:42 WARNING Main Item ehz.haus.verbrauch.gestern: problem reading cache: [Errno 2] No such file or directory: '/usr/local/smarthome/var/cache/ehz.haus.verbrauch.gestern'
2015-01-18 13:31:42 WARNING Main Item ehz.haus.verbrauch.stuendlich: problem reading cache: [Errno 2] No such file or directory: '/usr/local/smarthome/var/cache/ehz.haus.verbrauch.stuendlich'
2015-01-18 13:31:42 WARNING Main Item ehz.haus.verbrauch.monat: problem reading cache: [Errno 2] No such file or directory: '/usr/local/smarthome/var/cache/ehz.haus.verbrauch.monat'
2015-01-18 13:31:42 WARNING Main Item ehz.haus.kosten.gestern.weekly_avg: problem reading cache: [Errno 2] No such file or directory: '/usr/local/smarthome/var/cache/ehz.haus.kosten.gestern.weekly_avg'
2015-01-18 13:31:42 WARNING Main Item ehz.kosten.gestern.weekly_avg: problem reading cache: [Errno 2] No such file or directory: '/usr/local/smarthome/var/cache/ehz.kosten.gestern.weekly_avg'
2015-01-18 13:31:42 WARNING ehz.haus.verbrauch.aktuell Item ehz.haus.verbrauch.aktuell: problem evaluating sh.ehz.haus() - sh.ehz.haus.db('max', '1d', sh.minute.since.midnight.dbstr()): string index out of range
2015-01-18 13:31:59 WARNING ehz.haus.verbrauch.aktuell Item ehz.haus.verbrauch.aktuell: problem evaluating sh.ehz.haus() - sh.ehz.haus.db('max', '1d', sh.minute.since.midnight.dbstr()): unsupported operand type(s) for -: 'float' and 'NoneType'
[[[[gestern]]]]
type = num
cache = on
sqlite = yes
eval_trigger = zaehler.haushalt.stand
#eval = sh.zaehler.haushalt.stand.sql() - sh.zaehler.haushalt.stand.sql.db('max', '1d', '1d')
eval = sh.zaehler.haushalt.stand.tag() - sh.zaehler.haushalt.stand.sql.db('min', str(sh.minute.since.midnight() + 1440) + 'i' , sh.minute.since.midnight.dbstr())
[[[[gestern]]]]
type = num
cache = on
sqlite = yes
crontab = 0 0 * * = 1
eval = sh.ehz.haus() - sh.ehz.haus.db('max', '1d', '1d')
[[[[gestern]]]]
type = num
cache = on
sqlite = yes
eval_trigger = zaehler.haushalt.stand
#eval = sh.zaehler.haushalt.stand.sql() - sh.zaehler.haushalt.stand.sql.db('max', '1d', '1d')
eval = sh.zaehler.haushalt.stand.tag() - sh.zaehler.haushalt.stand.sql.db('min', str(sh.minute.since.midnight() + 1440) + 'i' , sh.minute.since.midnight.dbstr())
<div id="room0_ehz-p22" data-widget="plot.stacked" data-item="zaehler.haushalt.verbrauch._60min.max.48h.now.100, zaehler.wp.verbrauch._60min.max.48h.now.100" data-label="Haushalt, Wärmepumpe" data-stacklabels="false" data-correctdate="false" data-color="" data-exposure="column, column" data-axis="" class="plot"></div>
<div id="ehz-p1verbrauchprotag" data-widget="plot.stacked" data-item="ehz.haus.verbrauch.gestern.avg.2w.now.100, ehz.wp.tag.verbrauch.gestern.avg.2w.now.100, ehz.wp.nacht.verbrauch.gestern.avg.2w.now.100" data-label="Haushalt, Wärmepumpe Tag, Wärmepumpe Nacht" data-stacklabels="true" data-correctdate="1" data-color="" data-exposure="column, column, column" data-axis="" class="plot" data-highcharts-chart="0">
Wir verarbeiten personenbezogene Daten über die Nutzer unserer Website mithilfe von Cookies und anderen Technologien, um unsere Dienste bereitzustellen. Weitere Informationen findest Du in unserer Datenschutzerklärung.
Indem Du unten auf "ICH stimme zu" klickst, stimmst Du unserer Datenschutzerklärung und unseren persönlichen Datenverarbeitungs- und Cookie-Praktiken zu, wie darin beschrieben. Du erkennst außerdem an, dass dieses Forum möglicherweise außerhalb Deines Landes gehostet wird und bist damit einverstanden, dass Deine Daten in dem Land, in dem dieses Forum gehostet wird, gesammelt, gespeichert und verarbeitet werden.


Einen Kommentar schreiben: