Home > Personal Life, Technology > Amazon Alexa Skill – Electric Price

Amazon Alexa Skill – Electric Price

amazonecho

I was sick of opening up my phone to check the ComEd hourly price of electric supply, so I decided to make an Alexa app for my Amazon Echo!

It took about 2 hours. It was strange I had to set up both an Alexa skill and the AWS Lamda function, then link the two. I ended up copying most of the code from someones reference code on checking stock prices. Changed the regular expression function which found the stock price to a substring of the ComEd API returned text. Works pretty well! Only problem I’ve had is when the ComEd API is down. If it happens too much, I guess I’ll have to update it with some error handling.

Alexa Skill: Electric Price

Ask: “Alexa, ask Electric Price for Current Price.”

The logo is crap, I know.  And I couldn’t use the ComEd company name in any of the program details/functions, so its a bit generic.  But pretty good for my first try if I do say so myself!

  1. July 26, 2017 at 8:05 PM

    Alexa, How much is a KWH?
    Alexa, How much does it cost for electricity?
    Alexa, What does electricity cost right now?
    Alexa, Should I try to save electricity today?
    Alexa, How much is ComEd charging for electricity today?

  2. July 26, 2017 at 8:06 PM

    “Alexa, ask Electric Price for Current Price.” Is NOT natural speech =)

    • July 27, 2017 at 7:22 AM

      I have to have the “ask Electric Price” per the rules. It’s almost like I ask Alexa to ask a friend to do something. If you think about it like that, it kindof makes sense, but I agree, it’s not the best approach. But if you think about all of the stuff they are doing in the background to make sure things get handled correctly, its not that bad.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: