[No Longer Maintained] Energy Cost Calculator

The answer is no. I had a thought to dump the string used to generate the table into a variable, but hub variables have a max length of 255 characters. It won't work.

For me I really only care about cost. I am graphing energy usage so maybe an option for just usage or cost or both?

1 Like

I could auto-hide the table sections. Something like a dropdown menu where you select which tables to show by default with options for:

  • Cost
  • Usage
  • Cost and Usage

Then, the table sections will auto-hide based on the selection. They'll still be there, just tucked away.

Version 0.4.4 Released

Small update mainly for new users but serving as a proof of concept for me.

A new install will show this:

And after installation, those two sections will hide by default.

2 Likes

I feel like I've potentially wasted my time, as this app appears from the shots to be far better than my webcore attempt.

I only attempted mine because at the time, there was no alternative.

The one part I can't see (and haven't accomplished myself, satisfactorily) is tracking the 'time on' figures too.

This would allow me to set maximums and report actual average costs/hour.

My current logic is based on a seperate virtual switch, which is flicked on/off according to rules which are tweaked per device, linked to power consumption.

Eg washing machine needs to have near-zero power change for say, 2 minutes before being confirmed as off.

Is any of this something you plan on adding?

Awesome work here....

2 Likes

Tried a reset of an individual device and it didn't seem to work. Or perhaps I don't understand what it's supposed to do.

See screenshots below.
Just before I hit the next button to commit change

This I believe, is the pertinent part of the debug log.

This is what the device looks like after the change, Exactly as it did before I tried to reset it.

1 Like

It's failing to get the right device ID. What type of device is that?

It's a virtual omni sensor.

1 Like

I was able to replicate this so I'll work on a fix later today.

I think something like this would be outside my defined scope for this app.

No worries. Ta.

1 Like

Version 0.4.6 Release

Hotfix for device reset.

@terminal3

Version 0.4.7 Released

Added an option to set static charges by day or month.
  • If month is selected, the monthly charge is divided by the number of days in the current month and added to the daily total.
  • If daily is selected, the cost entered is just added to the daily total cost.

@johnwill1

2 Likes

app:1032023-01-26 12:13:19.979errorgroovy.lang.GroovyRuntimeException: Ambiguous method overloading for method java.math.BigDecimal#plus.
Cannot resolve which method to invoke for [null] due to overlapping prototypes between:
[class java.lang.Character]
[class java.lang.String]
[class java.lang.Number]
[class java.math.MathContext] on line 800 (method energyHandler)

Error I'm now getting, not sure why and it doesn't seem to be causing an issue I can see, but it's new.

1 Like

Have you opened the app since you last updated? I added a new variable with the new option. I'm realizing now that where I defined the variable isn't called unless the main page of the app is opened. So, if you just update but don't open the app, then the variable isn't defined and it will cause the error whenever there is an energy update.

Version 0.4.8 Released

Hotfix for static charge option.

I'm working on some code optimizations to reduce resource usage. Early testing looks super promising. My main concern is that, at this point, it's a pretty big change, so I need to do pretty extensive testing.

Current public code on the left; test code on the right. Both instances are configured the exact same:

3 Likes

Still something going on with the cost calculation. Below is a screen shot from just a bit ago. I used the recalculate option and everything was put back right. Not sure when it went wrong. Had not checked it all day.

Looked through the event log for the exhaust fan device and all the energy readings were on track .

1 Like

You wouldn't happen to be logging to something like influx would you?

I have four instances of this app running across two different hubs with 22 devices and haven't had a single instance like that. I'd need to see trace logging to figure out where it's going awry but digging back through them would be painful without some external logging.

No, I am not. For now I will just see how often it happens.

I am running two instances of the app, this one and another that just has my whole house HEM attached. The other instance with one device did this as well. I didn't take a screenshot of it, should have I guess

The apps just reset yesterday so I have 28Kwh for today and it had a huge cost listed. Like this one I recalculated and it was right again. I turned on logging for the single device app and I will see if it happens again.

1 Like