[No Longer Maintained] Energy Cost Calculator

From Chrome on desktop, I use an extension called "Dark Reader" mainly because it has a quick toggle for bouncing between dark and light.

If you use Chrome for mobile, you can go to "chrome://flags/", search for dark, and force enable it:

Thanks for that, will have a look into it in the next few days. Second chemo tomorrow.

Thanks again. It seems to be working OK but will only know tomorrow when most stuff will be running.

Rosie

PS: Are the variable link options to connect to the dashboard?

1 Like

That's one use. There's too many to list, but there's quite a number of ways to use a hub variable.

I truly wish you the best.

Thanks. I have a feeling this one's going to be much more unpleasant.

As for the app, everything is reporting perfectly as far as I can tell and it's exactly what I need if the electric company start playing silly buggers again.

Rosie

1 Like

@RosieUK all the best, my mum took a bit of a kick-in with something similar and the results were worth it. And the doctors and nurses were phenomenal.

With regards to the app, I'll be honest and say I haven't looked at it in any detail as I'd already embarked on a webcore-esque solution.

An initial issue was relying on the tasmota plugs knowing the correct time zone. I couldn't be arsed and thus pursued webcore instead. Anyhoo, my plugs retain a 'total kwh so far' figure which is what I'm working from with a bit of sexy webcore for calcs....

1 Like

Thumbs Ok GIF by MOODMAN

I've really got to figure out the app side of thingas. I tend to botch stuff together. The app is a far better route.

1 Like

@FriedCheese2006,
I am still learning how to use rule machine and variables, could you please show an example or point me in the right direction to calculate the "cost data" and link to the new hub variables?
Thanks again.

1 Like

Could you maybe elaborate on what you're looking for? The app will calculate the "cost data" for you. If you'd like to have the information in a standard dashboard, or if you'd like to use the cost information in a rule, then you can link each "cost" value to a variable as needed from the menu inside the app. Using variables inside of rule machine has a wide array of use cases.

1 Like

I see, I think I may have misunderstood this aspect.
So, if I just set up some variables i.e. device.x_today, device.x_week and device.x_month and link in the table then the app will calculate these respective costs for me?

1 Like

Correct. What it does is link the "cost value" to the variable value. Using my setup as an example:


image
image

Any time "Today's Cost" for "Dryer" is updated, then the variable "dev2_today" is also updated.

2 Likes

Thanks for your quick, this is great!
Now to set up all my devices and some dashboards as well.

1 Like

Yeah, it's fun. Yesterday was a disaster. They tried to stick me 4 times, blew out the vessel 4 times. Had two muscular seizures from the cold and the stress. Most pointless 2 hours of my life.

I am so stiff today you could use me as a small bridge or half a set of maxtrax.

Feeling exhausted and depressed.

Everything on the app seems to be working fine, it's all updating and seems to be reporting the right values.

Rosie

PS. Have set up variable (decimal) called DailyEnergy. Hub seems to accept it (and it shows up on the dashboard as 0), but how exactly do I then link this to the daily energy total in this app? I have tried to select on the table and using the drop down and no go.. If I hit next it just goes back to the main screen..

1 Like

The variable must be a string type. I need to make that clearer inside the app. A decimal type cannot accommodate the currency symbols. I settled on using string to accommodate both just a number and the currency.

Yeah, works OK now.

1 Like

Getting there:

@Inge_Jones This should be along the lines of what you were looking for.

4 Likes

Good bit of changes accomplished today...still have some more stuff to work out before pushing another update, but here's some sneak peaks:

Revamped the color coding and formatting of the main table.

Added a page for setting the rate information. There's a toggle to flip between having a static rate or needing to input a schedule:


Rate scheduling!!!

The basic approach is to create scheduled jobs to change the rate at the beginning of each window. Here's an example with my power company's time of use rate schedule:


And the power company schedule:


So, at 7:00:01 am tomorrow, the rate will be set to $0.067258 and then at 12:00:01 PM tomorrow afternoon will set back to $0.053707.

  • Enforcing app installation before generating the tables.
    Had some weird issues during initial setup due to the table generating before the app was actually installed.

To-Do List:

  • Figure out a way to handle holidays
  • Add the ability to overwrite the current effective cost. This will be to serve as a fallback for issues with the scheduling and if the power company announces critical window schedules.
  • Display the current cost rate on the main page.
3 Likes

Knocked out two of the to-dos and squashed a few bugs I found. Also spent waayyy too long trying to decide on the teal color I'm now using for some of the advisement text.

Rate Overriding
  • if you are on a static rate, you'll just re-set the rate
    image
  • if you're using a schedule, there's an extra menu to override the current rate:
Current Rate Notification
Variable Page

The biggest hurdle to get over now before releasing the next update is incorporating the rate scheduling into computing the cost. Right now, the cost values are a simple formula of (today use * rate). This is computed every time there is an energy update. That doesn't work if the rate changes throughout the day/week/month. I need to re-work the computation to account for variation in the rate at any given time.

2 Likes

Got an odd line 404 error that killed the app for some reason, wouldn't start just got an error message. Reinstalled the app and it cleared up. Two possibilities - I changed the £/KWh value and it didn't like it; I made variables without properly specifying a start value. More likely the latter of the two.

Whatever the issue is its something to do with line 404 in the code. Just a heads up.

Seems to be working fine although hubitat is a bit overkill for what I need - that said the peace of mind is worth it in case MuteMute or Shartlife fall over again..

1 Like

Without the specific error, I won't be able to do much. Could you look at the past logs and screenshot or copy the log entry? Line 404 is around updating the weekly total variable value, so I'd lean towards an issue with the variable itself.