Autor Thema: neues Modul 98_powerMap  (Gelesen 9332 mal)

Offline nils_

  • Full Member
  • ***
  • Beiträge: 408
Antw:neues Modul 98_powerMap
« Antwort #90 am: 06 September 2017, 15:02:24 »
Hallo,

zur Info:

bei Verwendung von readingsProxy muss event-on-update-reading auf 1 gesetzt werden damit es funktioniert.

Gruß
Eisix

sicher??
https://fhem.de/commandref.html#readingFnAttributes
viele Wege in FHEM es gibt!

Offline Eisix

  • Full Member
  • ***
  • Beiträge: 401
Antw:neues Modul 98_powerMap
« Antwort #91 am: 06 September 2017, 18:17:32 »
Hallo,

Vielleicht etwas falsch ausgedrückt. event-on-update-reading wird ohne Parameter zugefügt und dann von fhem auf 1 gesetzt.
Was im Endeffekt zu dem in der von dir verlinkten Doku zu Punkt 1. führt. Also wird bei jeder Änderung eines readings ein Event generiert.

event-on-change-reading      state

sollte aber auch funktionieren da hier nur bei state ein event generiert. Sofern man auf state filtert.

Ich bin sicher das es bei mir danach funktioniert hat. Mehr kann ich dazu nicht sagen.

Gruß
Eisix

Offline spaceboy

  • New Member
  • *
  • Beiträge: 9
Antw:neues Modul 98_powerMap
« Antwort #92 am: 14 November 2017, 21:46:51 »
Einzig im Filelog habe ich die Readings nicht regelmässig drin, sondern nur sporadisch. Hängt das damit zusammen?

Sorry to write in english, but I'm facing the same issue that the pM_energy and pM_consumption are updated for the device and I see the events generated in event monitor, but the FileLog doesn't capture these every time, only sporadically. It looks like these events are logged only first time after restart or something like that. I'm using powerMap with EnOcean devices from Eltako.

Thanks for help!

Petr
« Letzte Änderung: 15 November 2017, 09:15:32 von spaceboy »

Offline Amenophis86

  • Hero Member
  • *****
  • Beiträge: 1619
  • Anti-Statement befreite Zone ;)
Antw:neues Modul 98_powerMap
« Antwort #93 am: 15 November 2017, 12:57:48 »
Are you sure you are not working with attributes like event-on-change-reading/update?? If you see the event in the event Monitor the logfile should log it. Post a list of the device and the log file device.
FHEM auf Raspberry3, Betriebssystem Jessy, HMLan, HM Komponenten, LD382A, H801, Sonoff, Harmony Hub und vieles mehr. Einfach ein tolles universelles System

Offline spaceboy

  • New Member
  • *
  • Beiträge: 9
Antw:neues Modul 98_powerMap
« Antwort #94 am: 15 November 2017, 14:05:02 »
@Amenophis86: I'm pretty sure, here are the relevant devices:

define EnO_FFEB0424 EnOcean FFEB0424
attr EnO_FFEB0424 IODev TCM_ESP3_0
attr EnO_FFEB0424 comMode confirm
attr EnO_FFEB0424 eep A5-38-08
attr EnO_FFEB0424 gwCmd switching
attr EnO_FFEB0424 manufID 00D
attr EnO_FFEB0424 powerMap {'state' => {'off' => 0,'on' => 320}}
attr EnO_FFEB0424 subDef XXXXXXXX
attr EnO_FFEB0424 subType gateway
attr EnO_FFEB0424 switchMode switch
attr EnO_FFEB0424 verbose 5

setstate EnO_FFEB0424 on
setstate EnO_FFEB0424 2017-11-15 13:49:47 pM_consumption 320
setstate EnO_FFEB0424 2017-11-15 13:49:47 pM_energy 30615.3000000003
setstate EnO_FFEB0424 2017-08-31 19:29:42 pM_energy_begin 1504200582.10656
setstate EnO_FFEB0424 2017-11-15 13:49:47 state on

define FileLog_EnO_FFEB0424 FileLog ./log/EnO_FFEB0424-%Y.log EnO_FFEB0424
attr FileLog_EnO_FFEB0424 logtype text

setstate FileLog_EnO_FFEB0424 active
setstate FileLog_EnO_FFEB0424 2017-11-15 13:49:47 linesInTheFile 12684

and this what I get in the logfile
2017-11-15_11:25:47 EnO_FFEB0424 off
2017-11-15_12:04:44 EnO_FFEB0424 block: unlock
2017-11-15_12:04:46 EnO_FFEB0424 on
2017-11-15_12:07:44 EnO_FFEB0424 block: unlock
2017-11-15_12:07:46 EnO_FFEB0424 on
2017-11-15_12:10:44 EnO_FFEB0424 block: unlock
2017-11-15_12:10:47 EnO_FFEB0424 off
2017-11-15_12:49:45 EnO_FFEB0424 block: unlock
2017-11-15_12:49:46 EnO_FFEB0424 on
2017-11-15_12:52:45 EnO_FFEB0424 block: unlock
2017-11-15_12:52:47 EnO_FFEB0424 on
2017-11-15_12:55:45 EnO_FFEB0424 block: unlock
2017-11-15_12:55:48 EnO_FFEB0424 on
2017-11-15_12:58:45 EnO_FFEB0424 block: unlock
2017-11-15_12:58:47 EnO_FFEB0424 off
2017-11-15_13:49:46 EnO_FFEB0424 block: unlock
2017-11-15_13:49:47 EnO_FFEB0424 on
2017-11-15_13:52:46 EnO_FFEB0424 block: unlock
2017-11-15_13:52:48 EnO_FFEB0424 on

There are few lines with pM_energy, last one is
2017-11-14_19:53:13 EnO_FFEB0424 pM_energy: 29773.9666666669

I found that this line occurs when I modify the powerMap attribute (by adding a space or just clicking the attr button)

Is there anything else I can do to help to debug this?

Thanks for help!

Petr

Offline Amenophis86

  • Hero Member
  • *****
  • Beiträge: 1619
  • Anti-Statement befreite Zone ;)
Antw:neues Modul 98_powerMap
« Antwort #95 am: 15 November 2017, 14:44:58 »
I dont know powermap this much but you are right the Events are coming as on and off. I think the problem is the change from on/off to the value. This event is not happening. How you get this to happen I dont know.

And try working with list <device> not with the raw-definition. With list you can Show others more Information.
FHEM auf Raspberry3, Betriebssystem Jessy, HMLan, HM Komponenten, LD382A, H801, Sonoff, Harmony Hub und vieles mehr. Einfach ein tolles universelles System

Offline spaceboy

  • New Member
  • *
  • Beiträge: 9
Antw:neues Modul 98_powerMap
« Antwort #96 am: 16 November 2017, 10:17:26 »
Just FTR, here are the non-raw definitions. Thanks everyone for help!

Internals:
   DEF        FFEB0424
   IODev      TCM_ESP3_0
   LASTInputDev TCM_ESP3_0
   MSGCNT     210
   NAME       EnO_FFEB0424
   NR         640
   NTFY_ORDER 50-EnO_FFEB0424
   STATE      off
   TCM_ESP3_0_DestinationID FFFFFFFF
   TCM_ESP3_0_MSGCNT 210
   TCM_ESP3_0_PacketType 1
   TCM_ESP3_0_RSSI -49
   TCM_ESP3_0_ReceivingQuality excellent
   TCM_ESP3_0_RepeatingCounter 0
   TCM_ESP3_0_SubTelNum 3
   TCM_ESP3_0_TIME 2017-11-16 09:34:55
   TYPE       EnOcean
   READINGS:
     2017-11-16 09:34:54   block           unlock
     2017-11-16 09:34:55   pM_consumption  0
     2017-11-16 09:34:55   pM_energy       31567.3888888891
     2017-08-31 19:29:42   pM_energy_begin 1504200582.10656
     2017-11-16 09:34:55   state           off
     2017-01-17 17:00:18   teach           4BS teach-in sent
   helper:
   powerMap:
     map:
       state:
         off        0
         on         320
     map.module:
       state:
         off        0
         on         320
   readingsDesc:
     pM_consumption:
       rtype      w
     pM_energy:
       rtype      whr
Attributes:
   IODev      TCM_ESP3_0
   comMode    confirm
   eep        A5-38-08
   gwCmd      switching
   manufID    00D
   powerMap   {'state' => {'off' => 0,'on' => 320}}
   room       EnOcean,1NP koupelna,PWM
   subDef     XXXXXXXX
   subType    gateway
   switchMode switch

Internals:
   DEF        ./log/EnO_FFEB0424-%Y.log EnO_FFEB0424
   NAME       FileLog_EnO_FFEB0424
   NOTIFYDEV  EnO_FFEB0424
   NR         641
   NTFY_ORDER 50-FileLog_EnO_FFEB0424
   REGEXP     EnO_FFEB0424
   STATE      active
   TYPE       FileLog
   currentlogfile ./log/EnO_FFEB0424-2017.log
   logfile    ./log/EnO_FFEB0424-%Y.log
   READINGS:
     2017-11-16 09:34:55   linesInTheFile  12840
Attributes:
   logtype    text
   room       EnOcean