Hi,
I got the module for smart power metering, but I want to us statistics module to calculate te values for low and normal tarif
I get these values in fhem for the smart meter
ElectricityDeliveredLowTariff 4990.403 kWh 2016-08-01 06:59:53
ElectricityDeliveredNormalTariff 3115.740 kWh 2016-08-01 20:40:20
I defined a statistics like this
define STAT_EL statistics ElectricityD*.*|SmartMeterP1
attr STAT_EL singularReadings SmartMeterP1:ElectricityD*:Delta
I get not the right values I get these values
statStateDay Initialized: 20:45:25 Initialized_Count: 1 2016-08-01 20:45:20
statStateDayLast Initialized: 00:34:49 Initialized_Count: 1 2016-07-31 23:59:55
statStateMonth Initialized: 20:45:25 Initialized_Count: 1 2016-08-01 20:45:20
Any idea how to get it right, so I get the values for de low and normal tarif.
regards Richard
I don't use either of those modules (so probably have no real idea ;) ) but perhaps you can extract low and normal tarrif values to separate dummies and run the statistics module on each of those?
Hoi,
I created a dummy device like this
define SmartN dummy
attr SmartN room Meterkast
define Smart_Norm notify SmartMeterP1:ElectricityDeliveredNormalTariff.* setreading SmartN state $EVTPART1
attr SmartN room Meterkast
and the statistics like this
define STAT_EL statistics SmartN
attr STAT_EL singularReadings SmartN:state:Delta:(Hour|Day|Month|Year)
But i get not the right readings?? not hourly and statStateday is not really one valut for the day??
What I do wrong?
fhem> l SmartN
Internals:
NAME SmartN
NR 7
STATE 3117.449
TYPE dummy
Readings:
2016-08-02 16:41:00 statStateDay 3116.956: 00:02:08 3116.956_Count: 1 3116.963: 00:02:00 3116.963_Count: 1 3116.969: 00:02:11 3116.969_Count: 1 3116.976: 00:02:10 3116.976_Count: 1 3116.983: 00:02:00 3116.983_Count: 1 3116.989: 00:02:10 3116.989_Count: 1 3116.996: 00:01:00 3116.996_Count: 1 3116.999: 00:02:10 3116.999_Count: 1 3117.006: 00:02:00 3117.006_Count: 1 3117.012: 00:02:10 3117.012_Count: 1 3117.019: 00:02:00 3117.019_Count: 1 3117.025: 00:02:10 3117.025_Count: 1 3117.032: 00:02:00 3117.032_Count: 1 3117.038: 00:02:10 3117.038_Count: 1 3117.045: 00:02:00 3117.045_Count: 1 3117.051: 00:02:10 3117.051_Count: 1 3117.058: 00:02:10 3117.058_Count: 1 3117.065: 00:02:00 3117.065_Count: 1 3117.071: 00:02:10 3117.071_Count: 1 3117.078: 00:02:00 3117.078_Count: 1 3117.084: 00:02:10 3117.084_Count: 1 3117.091: 00:02:00 3117.091_Count: 1 3117.097: 00:02:10 3117.097_Count: 1 3117.104: 00:02:00 3117.104_Count: 1 3117.110: 00:02:10 3117.110_Count: 1 3117.117: 00:02:00 3117.117_Count: 1 3117.132: 00:02:00 3117.132_Count: 1 3117.206: 00:02:20 3117.206_Count: 1 3117.220: 00:02:10 3117.220_Count: 1 3117.224: 00:02:10 3117.224_Count: 1 3117.228: 00:02:10 3117.228_Count: 1 3117.232: 00:02:10 3117.232_Count: 1 3117.236: 00:02:20 3117.236_Count: 1 3117.240: 00:02:10 3117.240_Count: 1 3117.244: 00:02:10 3117.244_Count: 1 3117.248: 00:02:10 3117.248_Count: 1 3117.252: 00:02:10 3117.252_Count: 1 3117.256: 00:02:10 3117.256_Count: 1 3117.260: 00:02:00 3117.260_Count: 1 3117.264: 00:02:10 3117.264_Count: 1 3117.268: 00:02:10 3117.268_Count: 1 3117.272: 00:02:10 3117.272_Count: 1 3117.276: 00:02:10 3117.276_Count: 1 3117.280: 00:02:10 3117.280_Count: 1 3117.284: 00:02:10 3117.284_Count: 1 3117.288: 00:02:10 3117.288_Count: 1 3117.292: 00:02:20 3117.292_Count: 1 3117.296: 00:02:20 3117.296_Count: 1 3117.301: 00:02:10 3117.301_Count: 1 3117.305: 00:02:10 3117.305_Count: 1 3117.309: 00:02:10 3117.309_Count: 1 3117.313: 00:02:10 3117.313_Count: 1 3117.317: 00:02:20 3117.317_Count: 1 3117.321: 00:02:10 3117.321_Count: 1 3117.325: 00:02:10 3117.325_Count: 1 3117.329: 00:02:10 3117.329_Count: 1 3117.333: 00:02:10 3117.333_Count: 1 3117.337: 00:02:10 3117.337_Count: 1 3117.341: 00:02:10 3117.341_Count: 1 3117.345: 00:02:20 3117.345_Count: 1 3117.349: 00:02:10 3117.349_Count: 1 3117.353: 00:02:11 3117.353_Count: 1 3117.357: 00:02:10 3117.357_Count: 1 3117.361: 00:02:10 3117.361_Count: 1 3117.365: 00:02:10 3117.365_Count: 1 3117.369: 00:02:10 3117.369_Count: 1 3117.373: 00:02:10 3117.373_Count: 1 3117.377: 00:02:10 3117.377_Count: 1 3117.381: 00:02:20 3117.381_Count: 1 3117.385: 00:02:10 3117.385_Count: 1 3117.389: 00:02:10 3117.389_Count: 1 3117.393: 00:02:10 3117.393_Count: 1 3117.397: 00:02:10 3117.397_Count: 1 3117.401: 00:02:10 3117.401_Count: 1 3117.405: 00:02:10 3117.405_Count: 1 3117.409: 00:02:10 3117.409_Count: 1 3117.413: 00:02:20 3117.413_Count: 1 3117.417: 00:02:10 3117.417_Count: 1 3117.421: 00:02:10 3117.421_Count: 1 3117.425: 00:02:10 3117.425_Count: 1 3117.429: 00:02:10 3117.429_Count: 1 3117.433: 00:02:10 3117.433_Count: 1 3117.437: 00:02:10 3117.437_Count: 1 3117.441: 00:02:10 3117.441_Count: 1 3117.445: 00:02:10 3117.445_Count: 1 3117.449_Count: 1 (since: 2016-08-02_13:38:50)
I am finding it difficult to see what is going on, partly as you haven't shown the exact module you are using for power monitoring, perhaps a screenshot of that module would help
From your first post
define STAT_EL statistics ElectricityD*.*|SmartMeterP1
do you have a device that matches ElectricityD*.* or should it be just SmartMeterP1?
Searches for statistics delta power or similar may give some workable examples but also look at https://forum.fhem.de/index.php/topic,55151.msg468187.html#msg468187 (https://forum.fhem.de/index.php/topic,55151.msg468187.html#msg468187)
I got it to work without the need of dummy devices
define STAT_P1 statistics SmartMeterP1
attr STAT_P1 deltaReadings GasDelivered,ElectricityDeliveredLowTariff,ElectricityDeliveredNormalTariff
attr STAT_P1 ignoreDefaultAssignments 1
attr STAT_P1 singularReadings SmartMeterP1:GasDelivered:Delta:(Year|Month|Day|Hour)|SmartMeterP1:ElectricityDeliveredLowTariff:Delta:(Year|Month|Day|Hour)|SmartMeterP1:ElectricityDeliveredNormalTariff:Delta:(Year|Month|Day|Hour)
Zitat von: kroonen am 04 August 2016, 18:25:36
I got it to work without the need of dummy devices
That is good. Following my searches I thought you might be able to do it without the dummies