Hallo
Habe hier zwei Stromzähler einen von homematic und eine pca301
dazu dachte ich mir ein userreading monotonic für beide
Geräte anzulegen.
pca301
consumptionTotal:consumption monotonic {ReadingsVal($name,'consumption',0)},kWh_total:consumption monotonic {ReadingsVal($name,'consumption',0)}
und
Homematic
gesamtstrom:energy monotonic {ReadingsVal($name,'energy',0)/1000.0*0.28}
Leider wird mir das userreading nicht angelegt.
Auch wenn ich das userreading von Hand anlege passiert nichts es wird nicht mitgezählt.
Internals:
.lastTimecosts 1462438681.84497
.lastTimeeState 1462439968.96062
.lastTimeenergy 1462439968.96062
.lastTimeenergy_kwh 1462438445.10661
.lastTimefrequency 1462438669.87319
.lastTimekWh 1462439968.96062
.lastTimepower 1462439968.96062
.lastTimestate 1462438207.73769
.lastTimevoltage 1462438669.87319
DEF 3BD3FC
HMLAN1_MSGCNT 1065
HMLAN1_RAWMSG E3BD3FC,0000,1641B6E3,FF,FFB4,04865E3BD3FC000000FA28EC007080
HMLAN1_RSSI -76
HMLAN1_TIME 2016-05-05 11:19:28
IODev HMLAN1
LASTInputDev HMLAN1
MSGCNT 1065
NAME stromsensor.haus
NR 282
NTFY_ORDER 50-stromsensor.haus
STATE Zählerstand: 800.6 kWh , Aktuell: 288 Watt
TYPE CUL_HM
lastMsg No:04 - t:5E s:3BD3FC d:000000 FA28EC007080
protLastRcv 2016-05-05 11:19:28
rssi_at_HMLAN1 min:-89 max:-74 lst:-76 avg:-76.85 cnt:1065
.userReadings:
HASH(0xd3849a0)
HASH(0xcc761cc)
HASH(0xca8054c)
HASH(0xd58a92c)
HASH(0xcc299b8)
Readings:
2016-03-15 00:46:41 .R-mtrConstGas 0.01 m3/I
2016-03-15 00:46:41 .R-mtrConstIr 120 U/kWh
2016-03-15 00:46:41 .R-mtrConstLed 10000 i/kWh
2016-03-15 00:46:41 .R-mtrSensIr 0 %
2016-03-15 00:46:41 .R-mtrType IR
2016-03-14 23:17:53 .R-transmDevTryMax 6
2016-03-15 00:46:41 .R-transmitTryMax 6
2016-05-05 11:19:28 .protLastRcv 2016-05-05 11:19:28
2016-05-05 11:20:43 Activity dead
2016-03-15 00:46:40 CommandAccepted yes
2016-03-14 22:22:58 D-firmware 1.0
2016-03-14 22:22:58 D-serialNr MEQ0380842
2016-03-15 00:46:40 PairedTo 0x000000
2016-03-14 23:17:53 R-pairCentral 0x000000
2016-03-15 00:46:40 RegL_00. 02:00 53:8D 0A:00 0B:00 0C:00 B8:6D 14:06 00:00
2016-03-15 00:46:41 RegL_01. 08:00 30:06 95:02 96:00 97:78 98:00 99:0A 9A:27 9B:10 9C:00 00:00
2016-05-05 11:19:28 boot off
2016-05-05 10:58:01 costs 248.01116
2016-05-05 11:19:28 current 0
2016-05-05 11:19:28 eState E: 800586.8 P: 288 I: 0 U: 0 f: 50
2016-05-05 11:19:28 energy 800586.8
2016-05-05 11:19:28 energyCalc 800586.8
2016-05-05 10:54:05 energy_kwh 800.0361
2016-05-05 11:19:28 frequency 50
2016-05-05 11:04:37 gesamtstrom 800.0361
2016-05-05 11:20:43 kWh 72832.2
2016-05-05 11:19:28 power 288
2016-05-03 15:00:00 statCosts Hour: 0.000000 Day: 0.000000 Month: 0.000000 Year: 130.732177 (since: 2016-03-15 )
2016-05-03 14:59:55 statCostsLast Hour: 0.000000 Day: 0.000000 Month: 61.320573 Year: -
2016-05-05 10:59:55 statCostsTendency 1h: +78.491752 2h: +78.491752 3h: +78.491752 6h: +78.491752
2016-05-03 15:00:00 statEnergy_kwh Hour: 0.0000 Day: 0.0000 Month: 0.0000 Year: 421.7167 (since: 2016-03-15 )
2016-05-03 14:59:55 statEnergy_kwhLast Hour: 0.0000 Day: 0.0000 Month: 197.8083 Year: -
2016-05-05 10:59:55 statEnergy_kwhTendency 1h: +253.1993 2h: +253.1993 3h: +253.1993 6h: +253.1993
2016-05-05 11:19:28 state 800586.8
2016-05-05 11:20:43 total 2478.27
2016-05-05 11:19:28 voltage 0
Helper:
HM_CMDNR 4
_98_statistics statistic.geraete
mId 00DE
rxType 12
Expert:
def 1
det 0
raw 1
tpl 0
Io:
newChn +3BD3FC,00,00,00
nextSend 1462439969.05114
prefIO
rxt 2
vccu
p:
3BD3FC
00
00
00
Mrssi:
mNo 04
Io:
HMLAN1 -74
Prt:
bErr 0
sProc 0
Q:
qReqConf
qReqStat
Role:
chn 1
dev 1
Rssi:
At_hmlan1:
avg -76.8516431924883
cnt 1065
lst -76
max -74
min -89
Shadowreg:
Tmpl:
Attributes:
IODev HMLAN1
actCycle 000:01
actStatus dead
autoReadReg 4_reqStatus
event-min-interval energy:1800,power:200,kWh:3600,energy_kwh:2400,costs:1900,eState:3600,battery:3600,state:1800,voltage:3600,frequency:3600
event-on-change-reading eState,costs,energy,power,energy_kwh,kWh,statCosts,statEnergy,statCurrentDay,statCurrentMonth,statCurrentYear,statEnergyCalc,statEnergyCalcLast,statEnergyDay,statEnergyHour,statEnergyHourLast,statEnergyMonth,statEnergyYear,statEnergy_kwh,statPowerDay,statPowerMonth,kWh_total
expert 2_full
firmware 1.0
icon measure_power
model HM-ES-TX-WM
overflow 2
overflowvalue 838841.6
room Homematic,System
serialNr MEQ0380842
stateFormat {sprintf("Zählerstand: %.1f kWh , Aktuell: %s Watt",(ReadingsVal($name,"energy",0)/1000), ReadingsVal($name,"power",0))}
subType powerSensor
userReadings kWh {sprintf("%.1f",ReadingsVal("stromsensor.haus","energy","82987")/1000+72031.5639)},energy_kwh:energy { ReadingsVal("stromsensor.haus","energy",0)/1000 ;;},costs:energy {ReadingsVal("stromsensor.haus","energy",0)/1000*0.31 ;; },total {sprintf("%.2f",(ReadingsVal("stromsensor.haus", "energy" ,0)+AttrVal("stromsensor.haus","overflowvalue",0)*AttrVal("stromsensor.haus","overflow",0))/1000+AttrVal("stromsensor.haus","offset",0))},gesamtstrom:energy monotonic {ReadingsVal($name,'energy',0)/1000.0}
userattr overflow overflowvalue
Internals:
DEF 03F0CE 01
IODev nodemcu
LASTInputDev nodemcu
MSGCNT 1322
NAME pca301_sonos_player
NR 627
PCA301_lastRcv 2016-05-05 11:21:29
PCA301_lastSend 2016-05-03 15:19:33
STATE on
TYPE PCA301
addr 03F0CE
channel 01
nodemcu_MSGCNT 1322
nodemcu_RAWMSG OK 24 1 4 3 240 206 1 0 52 0 66
nodemcu_TIME 2016-05-05 11:21:29
.userReadings:
HASH(0xc9aacfc)
HASH(0xcc706d0)
HASH(0xd152bd4)
HASH(0xcac5888)
HASH(0xcbb6c94)
HASH(0xca452d0)
Readings:
2016-05-05 01:51:57 consumption 0.66
2016-05-05 11:21:29 consumptionEuro 0.19
2016-05-03 15:26:01 consumptionTotal 0.4
2016-05-05 11:21:29 consumptionTotalEuro 0.12
2016-05-05 11:17:28 power 5.2
2016-05-03 15:19:33 state on
Attributes:
IODev nodemcu
devStateIcon on:on:toggle off:off:toggle set.*:light_exclamation:off
room PCA301
userReadings consumptionTotal:consumption monotonic {ReadingsVal($name,'consumption',0)}, consumptionWeek:consumption monotonic {ReadingsVal($name,'consumption',0)}, consumptionMonth:consumption monotonic {ReadingsVal($name,'consumption',0)}, consumptionYear:consumption monotonic {ReadingsVal($name,'consumption',0)},consumptionEuro {euroBerechnen(ReadingsVal($name,"consumption","?"))}, consumptionTotalEuro {euroBerechnen(ReadingsVal($name,"consumptionTotal","?"))}
webCmd on:off:toggle:statusRequest
https://forum.fhem.de/index.php/topic,52299.msg440529.html#msg440529 (https://forum.fhem.de/index.php/topic,52299.msg440529.html#msg440529)
gruss
andre
Danke
Muss dann so aussehen
consumptionTotal:consumption.* monotonic {ReadingsVal("pca301_sonos_player","consumption",0)},consumptionWeek:consumption.* monotonic {ReadingsVal("pca301_sonos_player","consumption",0)}, consumptionMonth:consumption.* monotonic {ReadingsVal("pca301_sonos_player","consumption",0)}, consumptionYear:consumption.* monotonic {ReadingsVal("pca301_sonos_player","consumption",0)},consumptionEuro {euroBerechnen(ReadingsVal("pca301_sonos_player","consumption","?"))}, consumptionTotalEuro {euroBerechnen(ReadingsVal("pca301_sonos_player","consumptionTotal","?"))}
kWh {sprintf("%.1f",ReadingsVal("stromsensor.haus","energy","82987")/1000+72031.5639)},energy_kwh:energy.* { ReadingsVal("stromsensor.haus","energy",0)/1000 ;;},costs:energy.* {ReadingsVal("stromsensor.haus","energy",0)/1000*0.31 ;; },total {sprintf("%.2f",(ReadingsVal("stromsensor.haus", "energy" ,0)+AttrVal("stromsensor.haus","overflowvalue",0)*AttrVal("stromsensor.haus","overflow",0))/1000+AttrVal("stromsensor.haus","offset",0))},total_kWh:energy.* monotonic {ReadingsVal("stromsensor.haus","energy",0)/1000.0}
Nach dem reading energy und consumption ein ".*"
Habe wahrscheinlich noch mehrere userreadings die nicht mehr funktionieren ???
Funktioniert "$name" noch im userreading?
Andre
genau. alles andere ist gleich geblieben.
gruss
andre
:)
Was ist an folgendem UserReading falsch? Bei mir wird diese seit einem Update Mitte Mai nicht mehr aktualisiert:
attr Gefrierschrank_Pwr userReadings zaehler:energy.* monotonic {ReadingsVal("Gefrierschrank_Pwr","energy",0)}
Vorher war es so, was aber auch nicht mehr funktioniert:
attr Gefrierschrank_Pwr userReadings zaehler:energy monotonic {ReadingsVal("Gefrierschrank_Pwr","energy",0)}