######################################################################################## # # 15_EMX.pm MUST be saved as 15_CUL_EM.pm !!! # # FHEM module to read the data from an EM1000 WZ/EM/GZ power sensor # # Prof. Dr. Peter A. Henning, 2011 # # $Id: 15_EMX.pm 2.0 2013-02 - pahenning $ # ######################################################################################## # # define EMX # # where # may be replaced by any name string # is a number 1 - 12 or the keyword "emulator". # is the scale factor = rotations per kWh or m^3 (not needed for emulator) # # get midnight => todays starting value for counter and power meter # get cnt_midnight => todays starting value for counter # get pm_midnight => todays starting value for power meter # get month => summary of current month # # set cnt_midnight => todays starting value for counter # set pm_midnight => todays starting value for power meter # set pm_current => current power meter reading # # Attributes are set as # # Monthly and yearly log file # attr emx LogM EnergyM # attr emx LogY EnergyY # # Basic fee per Month (€ per Month) # attr emx CostM # # Cost rate during daytime (€ per kWh) # attr emx CostD # # Start and end of daytime cost rate - optional # attr emx CDStart