Hacking your ComEd electricity bill

@jdog09 if your Capacity Obligation is that high I would cancel RTP immediately and go back to fixed. Then after taking steps to lower your Capacity Obligation for a summer, switch back to RTP the following June. I moved to a new house this June. I have not switched to RTP yet because my Capacity Obligation based on the previous owner’s usage would be about 4.5 - 5 kW. After running my code during this summer, I calculate my Capacity Obligation for next year to be around 0.6 kW.

I’d be interested in seeing what your detailed report looks like.

Email Body
The Capacity Charge is determined by multiplying an account’s Capacity Obligation by the Capacity Charge Rate ($/kW month). The PDF attached shows the implementation of the M-2 calculation that is used to calculate an account’s specific Peak Load Contribution (PLC) and Capacity Obligation. I have included your account specific information in the worksheet so you can see how your account’s PLC was calculated. You can cross reference this information with other sources listed at the end of this email.

The PLC is based on your individual electricity usage data from that time period (Summer 2020). ComEd calculates your highest electricity demand (adjusted for Transmission and Distribution losses) that coincides with the five hours of the summer when the overall PJM System demand was highest and the five hours of the summer when ComEd’s System demand was highest. These two sets of five coincident hours are averaged and adjusted to determine your contribution to the system load.

On the PDF, the data in blue shows your kWh usage during the five hours of ComEd Peaks and the data in yellow shows your kWh usage during the five hours of PJM Peaks. This data is used to calculate your PLC value ([4.599 kW]) which is then multiplied by two factors from PJM Reliability Pricing Model to reach your Capacity Obligation of (5.655 kW)

I hope this information helps clarify how we arrive at your Capacity Charge. As always, thank you for participating in ComEd’s Hourly Pricing program. We enjoy working with you to save energy and money.

I just got a HA primarily for your ComEd hack as a better way to control my capacity obligation/ that being sad I am completely new to setting things up in HA. I do not know how to set up the init.py and
manifest.json files in the pjm subdirectory . Can you provide the script for these two files.

I just updated the gist to include those files

All I have to say is this write up and idea/implementation is awesome! I am watching this and really considering doing everything here! I don’t do hourly yet but just might consider it. Thanks!

Long time no chat!

I just updated to HA 2022.4 and the pjm sensors aren’t working anymore. In the log I see the below. I haven’t had a chance to dive in what changed/what’s causing it, but figured I’d start the conversation.

Also with 2022.4 - there were a lot of DB updates it appears. I wonder what updates might be needed on the sensor queries if any.

pjm: Error on device update!
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 431, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 735, in async_device_update
    await task
  File "/config/custom_components/pjm/sensor.py", line 111, in async_update
    await self._pjm_data.async_update()
  File "/config/custom_components/pjm/sensor.py", line 147, in async_update
    with async_timeout.timeout(60, loop=self._loop):
TypeError: timeout() got an unexpected keyword argument 'loop'

Just updated the gists for the Appdaemon App and the PJM Sensor to my latest.

Note that I no longer have a Nest so the code now activates ‘Eco mode’ by just turning the thermostat off.

Let me know if you have any issues.

That did it! Thank you!

Hey @jdog09 - I’m just getting around to looking at your MariaDB SQL :slight_smile:

I’m far from a SQL expert (especially MariaDB), but I think there might be an issue with your ‘total load current hour high’ queries. You’re grabbing the max load from the previous hour (to fill the current hour when the current hour is not yet known), however I don’t think you’d want the max. You’d want the most recent. For example if the last hour had a peak in the middle of the hour, you’d want to most recent value at the end of the hour, not the peak.

I could be reading your SQL completely wrong as well… If that’s the case - ignore me!

Hello. This is a great write-up! I have been wanting to get this going for quite some time and wondered if anyone could give me a bit of help? Very new to Home Assistant!

Hey Alex. I am kind of new to Home Assistant and wanted to try to get this setup. Any chance you can give me a few pointers?

Hey @keithjust - apologies for the delayed response. If you are new to home assistant, this might not be the best place to start unforch as it’s a bit advanced. To get started though, I would add the PJM sensor custom component and the home assistant sensors if you can. However it gets into the weeds a bit depending on what database you are using for your backend.

I’m working on a write up for this setup and will happily share it when ready. However I have no timeline at this point - life is complicated! :slight_smile:

Thanks Alex would love to see it when it’s done! Appreciate it.

Heads up to anyone following this that I decided not to switch to hourly pricing at my new house this summer. I was watching the electricity market prices in April and May and they were pretty volatile and elevated in general. I think prices are going to be even crazier this summer and I think very few people, if any, will come out ahead with hourly pricing if things continue as they are now. I ended up signing up with an alternate energy supplier and locked in a fixed supply rate of 8.99c / kWh for 36 months (Comed’s summer 2022 supply rate is 11.04c / kWh). Hopefully prices will drop and stabilize at some point over the next few years at which point I’ll switch to hourly pricing. I’m still continuing to run my code to reduce usage during peak load events so that my capacity charge will stay low whenever I’m ready to switch.

I’ve noticed this volatility as well. It’s making it more difficult to come out on top. Hourly pricing is still probably the way to go for me regardless since I’m charging EVs at night. We’ll see how this summer goes.

Question for you - the peak days, what timezone is this in? I just realized my SQL that’s calculating the top 5 peak days is in UTC (so at 7pm CT, it’s a new day). I thought this would be right, but don’t think so because the code thinks 6pm and 7pm are two different days (which could cause it to have 2 peaks in the same day).

Ah, I forgot about EV’s. You’re right, for people who have a large load like an EV that they can choose to charge overnight, hourly pricing may still save money.

It’s been a while since I wrote the SQL queries to calculate the current peak days so I’m trying to remember how it works. The PARTITION BY date_trunc is partitioning the data into days to select only the single highest hour value from each day. I’m pretty sure Postgres’ date_trunc is using the time zone of the last_updated timestamps in the database, which for me is central time. You definitely don’t want to use UTC for the reason you described. What time zone are your last_updated timestamps in?

Ahh - good point on the timezones on last updated. I’ll check that out.

Also question on your 8.99c/kWh - that’s just the supply rate right? So with delivery and other costs are you estimating around 17c /kWh then? Just trying to get my math right. Right now, I pay about 8.5c for delivery and customer (fixed) charges. I calculated this by taking my entire bill and breaking it down by kWh and separating the supply costs from other charges.

Correct, 8.99c is just for supply. My additional costs are about 9.5c, so about 18.5c total. However, starting this month there’s a rebate of 4.3c in summer months and 3.57c in non-summer months due to the passing of the Climate and Equitable Jobs Act (more info here) which brings my total to 14.2c for summer months.

I’m not certain but I think the rebate applies to all ComEd customers regardless of what they choose for supply. My alternate supplier just kicked in so I won’t know for sure until I get my bill next month. If you’ve gotten your June bill, do you see the rebate? The line item is “Carbon-Free Energy Resources Adj”.

Got it; thanks much for the clarification and the heads up about CEJA. I have not received my June bill yet but will take a look!

I also found this part interesting. I wonder what this will actually mean to Hourly Pricing customers.

Sets the stage for lower “capacity” charges, hidden fees on our electric bills that pay big generators for reserve power. ComEd customers pay too much for capacity: about $1.7 billion a year, much of that to support fossil fuels. But federal regulators are reforming the system to support cleaner energy, so CEJA’s historic expansion of low-cost clean energy opens the door to lower capacity costs.

Just received my bill. The CEJA adjustment is on there - pretty decent impact!

AND my new capacity obligation is down to 1.36! The system works! Down from 2.25 the year before, 4.47 before that, and (eek) 6.7 kWh before that.