[No Longer Maintained] Energy Cost Calculator

Happened again. The same thing, but on a different device. The one yesterday was a Zooz Zen15 power switch, this one is a Aeotec smartplug. What I realized was it's reading the value of my Aeotec HEM whole home energy meter.

This is from the event page of the Aeotec smartplug at the time of the erroneous reading.

This is from the event page of the HEM whole house energy meter.

I PMed you the error from your app.

Which driver are you using for the HEM?

Found here.

1 Like

What all is using the HEM?

Nothing uses it, It's just an energy/power meter that attaches to the main feed of the house.

1 Like

I should have been more specific....what other apps are using it?

A few RM rules and webcore pistons but no other apps.

1 Like

You think you could add a option to set a switch that would recalculate cost when activated. It takes my system about 30 seconds or more to open the app sometimes.

1 Like

That's not normal. Even on my production hub, where I'm monitoring something like 30 devices, it doesn't take any longer than 2-3 seconds to open. The latest update should have cut that time down as well.

I don't see any issues anywhere else. When I look at the Hub stats nothing looks out of the ordinary not even your app.

1 Like

Getting strange results from the app after resetting some devices.
For example:

Side flood shows less energy use for current day but much higher cost compared to Server UPS on top with higher energy use but much lower cost. (The cost for Server UPS is correct. Side Flood has a completely incorrect cost.
I haven't changed the cost/kwH at all so it shouldn't be related to that.

1 Like

Could you provide some context?

  • What version of the app are you running?
  • How did you "after resetting some devices."?
  • Are you using a static cost or a rate schedule?
  • What do you have the cost set to?
  • Is this still a problem after the daily reset?
  • Can you enable logging and provide a snapshot for when one of the problem devices updates?

If you reset the devices energy reading outside the app, the cost for the day does not automatically reset. It's a rolling total.

Had anoterh cost error. This time it was in the Whole House calculator. The sensor I monitor is a Virtual Omni Sensor.

I have the actual HEM pass it's reading to the virtual sensor and that is the sensor I monitor. I do this so that is if I have to shut down the energy meter for whatever reason, I can add a offset into the virtual sensor to bring it up to the actual home energy usage. Device event logs don't go back far enough so that I can see if there actually was a high reading sent to the device.

1 Like

There's nothing in the app code that would cause an energy reading of 32000. This is the device and/or the driver reporting that value. It's almost like it stuck the decimal in the wrong spot.

image

It seems the issues all stem from that one device. I wonder if there's an issue with the driver that you're using or maybe with your hub as a whole. That previous issue with the random device having the value from the HEM is super suspect. If I recall correctly...device drivers can't write to other devices.

  • What version of the app are you running?
    --Current - I update as soon as new versions are available

  • How did you "after resetting some devices."?
    ---I just repeated this. For this device "Side Flood", I did a reset of energy use for the Day, then week, then month. So I zeroed out everything I could. Initially it showed zero in the app as would be expected.

  • Are you using a static cost or a rate schedule?
    --Static

  • What do you have the cost set to?
    --0.14622

  • Is this still a problem after the daily reset?
    --After I repeated the reset (as described above), the next day, the app brought in the current accumulated energy as Energy Used Today. In other words, it calculated today's energy from what was already in the device, rather than change since reset. This seems to be happening with just this device, which is a shelly dimmer. I have other shelly dimmers and they are not experiencing this problem.
    Possibly I should just remove this device and re-add it.

  • Can you enable logging and provide a snapshot for when one of the problem devices updates?
    ---Will do that when I have some time.

If you reset the devices energy reading outside the app, the cost for the day does not automatically reset. It's a rolling total.
--- The shelly devices have no way to reset without connecting a physical switch which I don't have. This has only been reset via your app.

UPDATE 2/12/23: Device is logging correctly now since 2nd day. That is, it took all the accumulated energy as day 1 use, but since then it's been correct.

2 Likes

Version 0.6.0 Released

Added table enhancements. All columns are now sortable. There is a search option that will filter the list. Default sort will continue to be device name.

Sorted by "Energy Use Today":

Filtered:

The enhancements were also made to the variable page.

3 Likes

So, the answer after a little work, is yes. The problem is that it requires writing the HTML to a local file on the hub and then linking to the file in the dashboard. That problem is what impact reading/writing to the flash too often might have.

1 Like

@FriedCheese2006,
Please see error log below:

Summary

Summary

[totalCostWeek:2.01790, totalCostMonth:0.59568, energiesList:[1152, 1153, 1541, 1542, 1560, 1697], weekTotalVar:total_week, todayTotalEnergy:1.752, yesterdayTotal:1.148, staticCharge:0, lastWeekTotal:8.344, onceReset:2, energies:[1697:[lastEnergy:0.15, thisWeekCost:0.0476, monthStart:0, thisMonthCost:0.0442, todayVar:Ajax_today, thisMonthEnergy:0.13, todayCost:0.0442, energyChange:0.01, thisWeekEnergy:0.14, yesterdayEnergy:0.01, dayStart:0.02, weekVar:Ajax_week, weekStart:0.01, lastWeekEnergy:0, lastMonthEnergy:0.01, monthVar:Ajax_month, todayEnergy:0.13], 1542:[lastEnergy:0.006, thisWeekCost:0.01700, monthStart:0, thisMonthCost:0.00204, todayVar:ExeMachine_today, thisMonthEnergy:0.006, todayCost:0.00204, energyChange:0.001, thisWeekEnergy:0.018, yesterdayEnergy:0, dayStart:0, weekVar:ExeMachine_week, weekStart:0.012, lastWeekEnergy:0, lastMonthEnergy:0.012, monthVar:ExeMachine_month, todayEnergy:0.006], 1541:[lastEnergy:0.214, thisWeekCost:0.36210, monthStart:0, thisMonthCost:0.04964, todayVar:Computer_today, thisMonthEnergy:0.146, todayCost:0.04964, energyChange:0.001, thisWeekEnergy:0.253, yesterdayEnergy:0.068, dayStart:0.068, weekVar:Computer_week, weekStart:0.107, lastWeekEnergy:0.054, lastMonthEnergy:0.335, monthVar:Computer_month, todayEnergy:0.146], 1560:[lastEnergy:38.37, thisWeekCost:0.8568, monthStart:0, thisMonthCost:0.1836, todayVar:Freezer_today, thisMonthEnergy:0.54, todayCost:0.1836, energyChange:0.01, thisWeekEnergy:2.52, yesterdayEnergy:0.67, dayStart:37.83, weekVar:Freezer_week, weekStart:1.98, lastWeekEnergy:4.75, lastMonthEnergy:15.91, monthVar:Freezer_month, todayEnergy:0.54], 1153:[lastEnergy:71.65, thisWeekCost:0.5100, monthStart:0, thisMonthCost:0.0918, todayVar:TV_today, thisMonthEnergy:0.27, todayCost:0.0918, energyChange:0.01, thisWeekEnergy:1.50, yesterdayEnergy:0.40, dayStart:71.38, weekVar:TV_week, weekStart:1.23, lastWeekEnergy:3.09, lastMonthEnergy:9.75, monthVar:TV_month, todayEnergy:0.27], 1152:[lastEnergy:22.38, thisWeekCost:0.2244, monthStart:0, thisMonthCost:0.2244, todayVar:WashMachine_today, thisMonthEnergy:0.66, todayCost:0.2244, energyChange:0.01, thisWeekEnergy:0.66, yesterdayEnergy:0.00, dayStart:21.72, weekVar:WashMachine_week, weekStart:0.00, lastWeekEnergy:0.45, lastMonthEnergy:2.27, monthVar:WashMachine_month, todayEnergy:0.66]], finalStaticCharge:0, lastMonthTotal:28.287, thisMonthTotal:1.752, monthTotalVar:total_month, energyRate:0.34, todayTotalVar:total_today, thisWeekTotal:5.091, totalCostToday:0.59568]

1 Like

That can safely be ignored. I think I'll pull that logic out. It was intended to catch the problem that terminal was having but I think that's more or less an isolated issue.

1 Like

Version 0.6.1 Released

Made info logging toggleable. Suppressed some error logging logic.

2 Likes