Statistics Module und Dummy Device

Begonnen von Hackstall, 31 Dezember 2017, 19:54:13

Vorheriges Thema - Nächstes Thema

Hackstall

Hallo,

eine Frage zum Statistics Modul:

Ich habe ein Dummy Device angelegt welches von aussen (via Telnet) gesetzt wird.
define IP_S0_19 dummy
define IP_S0_11 dummy
define IP_S0_15 dummy
define IP_S0_09 dummy

########## Verbrauch Statistic Auswertung ###########
define Statistik_Strom_E statistics IP_S0_19
attr Statistics_Strom_E ignoreDefaultAssignments 1
attr Statistics_Strom_E minAvgMaxReadings IP_S0_19
attr Statistik_Strom_E singularReadings IP_S0_19:(Hour|Day|Month|Year)

define Statistik_Strom_V statistics IP_S0_11
attr Statistics_Strom_V ignoreDefaultAssignments 1
attr Statistics_Strom_V minAvgMaxReadings IP_S0_11
attr Statistik_Strom_V singularReadings IP_S0_11:(Hour|Day|Month|Year)

define Statistik_Gas statistics IP_S0_15
attr Statistics_Gas ignoreDefaultAssignments 1
attr Statistics_Gas minAvgMaxReadings IP_S0_15
attr Statistik_Gas singularReadings IP_S0_15:(Hour|Day|Month|Year)

define Statistik_H2O statistics IP_S0_09
attr Statistics_H2O ignoreDefaultAssignments 1
attr Statistics_H2O minAvgMaxReadings IP_S0_09
attr Statistik_H2O singularReadings IP_S0_09:(Hour|Day|Month|Year)

Nun möchte ich auf dieses Device das Statistics Modul anlegen.

Mein Problem ist das die Day, Month Year Erweiterungen nicht als Readings angelegt werden.

Kann das überhaupt funktionieren?

Danke Andreas

MadMax-FHEM

Das sind aber mehr als ein Dummy... ;)

Du musst nat. auch Werte setzen und warten, damit das Statistikmodul eben eine Statistik anlegen kann...

Dann gibst du kein Reading an, sondern das Device als solches, ob das geht: keine Ahnung (denke aber nicht)

Ich würde von "außen" per setreading ein Reading (Name freie Wahl) setzen und das dann als Basis für die Statistik nehmen...

Beispiel:

setreading IP_S0_19 ReadingName Wert

Und Defines, lists etc. bitte in Code-Tags, das '#' im "Menü"...

Gruß, Joachim
FHEM PI3B+ Bullseye: HM-CFG-USB, 40x HM, ZWave-USB, 13x ZWave, EnOcean-PI, 15x EnOcean, HUE/deCONZ, CO2, ESP-Multisensor, Shelly, alexa-fhem, ...
FHEM PI2 Buster: HM-CFG-USB, 25x HM, ZWave-USB, 4x ZWave, EnOcean-PI, 3x EnOcean, Shelly, ha-bridge, ...
FHEM PI3 Buster (Test)

Hackstall

Hallo vielen Dank für Deine Antwort aber die Devices musste lt Hersteller meines Zählers so anlegen denn
eine (vom Zählerhersteller) übermittelt die Zahlenwerte via telnet wie folgt:


setreading IP_SV_00 state 2016.03.14_12:57:11
setreading IP_SV_01 state 0000322991
setreading IP_SV_02 state 0000322991
setreading IP_SV_03 state 0000322991
setreading IP_sV_04 state 0000322991


Ich werte diese Zähler bereits aus mit
$mytmp = value(OP_SV_01)

Somit müsste ich dem Statistics Modul wohl den Value mitteilen?
also per zwischen TmpModul
Richtig?

Danke Andreas

MadMax-FHEM

Du kannst dir auch selber ein userReadings anlegen, welches du mit dem übermittelten Wert befüllst...

Siehe commandref...

Kurz, da nur Handy...

Gruß, Joachim
FHEM PI3B+ Bullseye: HM-CFG-USB, 40x HM, ZWave-USB, 13x ZWave, EnOcean-PI, 15x EnOcean, HUE/deCONZ, CO2, ESP-Multisensor, Shelly, alexa-fhem, ...
FHEM PI2 Buster: HM-CFG-USB, 25x HM, ZWave-USB, 4x ZWave, EnOcean-PI, 3x EnOcean, Shelly, ha-bridge, ...
FHEM PI3 Buster (Test)