AI Workflows: Electric Company Edition

AI Workflows

So, I have been considering make.com for some time now to help me out with workflow automation. I had seen someone using it in the past and thought it was interesting...

Then, NetworkChuck's video on n8n crossed my FYP on YouTube...

Introducing n8n

Workflow automation that you can host yourself and get to automating like a pro! Has tons of integrations and this really got me thinking about things that I could automate.

This works great as workflow automation visualization tool. In this way, I don't have to hook up all the plumbing for automation, this can serve that purpose.

Background: Electricity in Texas

Disclaimer: I may not get all these details correct, so don't quote me on how all this works. I just know the players.

So, the way electric works here in Texas is you have to select your power company who basically is responsible for collecting the bill and "delivering" electric to your home. I suppose this is great because it creates a marketplace for it, but it's also a challenge because it involves researching to find the best deals when your contract is up for renewal. The game is kinda like insurance: you have to shop around.

The Players Involved

PUCT I should make an honourable mention of the governing body here in TX: Public Utility Commission Texas.

ERCOT manages the overall delivery of the electric to home.

Oncor is the major service provider. Expect to pay part of your electric dues to them.

You can track your electric usage with Smart Meter Texas. They have an online portal where you can view your electric usage based on your Meter ID regardless of who is your provider.

They also offer an API to access the meter reads. I previously wrote up a Python project to collect those meter reads and store them in a MongoDB for my personal tracking and historic records since the API only allows up to 2 years of metric history.

It's called SmartMeterTX if you're curious about the technical details.

Some of the most notable websites to research power companies include:

Automating The Search

Some of these marketplaces have API endpoints. This works great because I can plug into those search feeds.

I leveraged n8n to go and ping the API endpoint to search for providers and collect the companies on the list.

Right now, it just searches PowerToChoose and sorts according to the cheapest provider.

However, there's EFL's or Electricity Fact Labels. This is where the fine print often obscures the details like the cost of canceling early, how much power is actually charged, do they offer free nights and so on.

It's a chore to have to read and interpret all of these EFL's.

The Large Language Model has just stepped into the room.

In this way, I can setup n8n to do the fetching and orchestration of the data. I can collect the list of providers. I can fetch the EFL's for all the plans and I can feed them into a LLM with specific instructions on my preferences, search objectives and other details I can capture into the context window of the prompt I would send to the LLM for a response to generate.

Summarizing the Search

I can then take that output from the LLM and generate a decent human-readable report on the best electric plan based on my desires and needs with just the push of a button.

I can also optionally run this report daily or weekly as my contract comes to a close and search the results of the report generations for anyone who may be running a special that I may have missed because these plans and offerings are constantly changing.

I've been known to search the publications and sometimes come across 9¢/kWh when the market price was 13¢/kWh. With this, I can increase my chances of coming across a good deal without having to spend the hours pouring over the websites to find the best deal.

I thought I'd share this as an example of how I am leveraging workflow automation software like this.

For now, I have n8n setup to just automate the search for a single marketplace and report the results in my Discord server so I can easily keep up to date with the options as my contract comes to a close here soon. Here's a screenshot of my workflow so far.



I plan to enhance this as I go thru my search to optimize what the LLM finds as a result of my instructions. This pairs well with ollama as well if you don't want to use the API's of the big LLM providers out there. Just be mindful the context window is much lower and it will rely on your own compute for generation.

I can then take the top providers with the best pricing and terms and feed that with metrics collected from my meter and in my personal DB to get an idea of what my bill will look like thru the year.

This may take me a term renewal or two to make sure it's still relevant and performant, but I'm confident that this will be pretty robust as I make progress. I'll be sure to post updates as I get along.

Happy coding!

Comments

Popular posts from this blog

Setup and Install Monero(d) -- p2pool -- xmrig

Build xmrig on Linux

Subversion Tutorial