HomeGenie Forum

General Category => General Discussion => Topic started by: Zen on December 10, 2015, 12:27:57 AM

Title: Modified Energy Monitor widget to use with whole house Power Monitor.
Post by: Zen on December 10, 2015, 12:27:57 AM
I changed the script of build-in Energy Monitor program to use data supplied by Aeon Energy Monitor. The default program adds whole house meter data to the individual devices power usage which is undesirable in my case.

a. Click Configure/Widget and select Energy Monitor.
b. Click Action and Import
c. Adjust ZWave node number in "var MainPower =" to match your Energy Meter node.

P.S> the script won't change the graph (I'm tying to find a way to change this). The script is based on HomeGenie v1.0 Java script with new v1.1 html code (I prefer to see daily watt usage graph instead of kW counter power graph). Original script is commented out in case you want to go back.

        var MainPower = HG.WebApp.Utility.GetModuleByDomainAddress('HomeAutomation.ZWave', '9');
        var wattLoad = parseFloat(HG.WebApp.Utility.GetModulePropertyByName(MainPower, 'Meter.Watts').Value.replace(',', '.'));
        var wattCounter = parseFloat(HG.WebApp.Utility.GetModulePropertyByName(MainPower, 'Meter.KilowattHour').Value.replace(',', '.'));
     
        var energyMonitor = HG.WebApp.Utility.GetModuleByDomainAddress('HomeAutomation.EnergyMonitor', '1');
       // var wattLoad = parseFloat(HG.WebApp.Utility.GetModulePropertyByName(energyMonitor, 'EnergyMonitor.WattLoad').Value.replace(',', '.'));
       // var wattCounter = parseFloat(HG.WebApp.Utility.GetModulePropertyByName(energyMonitor, 'EnergyMonitor.WattCounter').Value.replace(',', '.'));