Emporia Community

Community Forum for Emporia

Forum Replies Created

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • in reply to: API to pull data #10141 Report Abuse
    sarbuk
    Member

    Hi chrwei

    I’m most interested in this for pulling live usage data into HomeAssistant for use in automation, and into a monitoring platform for record keeping. I am using a HomeAssistant integration that doesn’t pull through live data but it does pull through hourly historic data. Are there any integrations currently available to pull live data out of Emporia?

    The risk to credentials with techwizard’s API is relatively low as long as you’re using unique credentials for Emporia (which everyone should be these days), and Emporia is a simple read-only system, so there’s not much that could go wrong if that data got out or control was gained over my Emporia account (although that is different for customers using their smart plugs and/or EV charger, possibly). But even so, I want to know more before I commit!

    Thanks!

     

    in reply to: API to pull data #10138 Report Abuse
    sarbuk
    Member

    This looks really interesting, but I have a few questions.

    1. What’s the flow of data? Is this API an intermediary between the Emporia servers and the API endpoints?
    2. If so, how are you protecting data in transit?
    3. Are you storing any data, and if so, how is this protected?
    4. How are you protecting credentials and what risk is there to me submitting my credentials on your platform?
    5. How are you planning to cover costs when this scales up?

    You could do with including some basic instructions on how to get started. I’m making some guesses, but I’m assuming I need to click “Authorize” first, enter my Emporia creds, then use Postman or some other API tool to run queries using a token and URL that is subsequently given, but that’s not clear.

    I do appreciate that you’ve put effort into this, so thank you!

     

    in reply to: API to pull data #9327 Report Abuse
    sarbuk
    Member

    If this is just one time that you want to export this data, then you can do that using Emporia’s built-in export tool. In the app, go to the menu in the top left, scroll to “Export Raw Data to CSV”, and then choose your device, and then dates. The data will be made available by a link that’s emailed to you. It will be a zip file containing CSV files for per second, per minute, per hour and per day data. Possibly per month as well, I can’t remember.

    That should give you everything you need to calculate if a battery is of any use to you.

    in reply to: API to pull data #8922 Report Abuse
    sarbuk
    Member

    Ah, thanks @magico13, that’s really helpful! Looks like I need to utilise one of the methods kindly provided by others here.

    in reply to: API to pull data #8919 Report Abuse
    sarbuk
    Member

    I’m wondering if anyone can help me with how I find the authtoken I need to query the API directly at https://api.emporiaenergy.com ?

    I’m not a developer so although I’ve looked through all the various github projects on integrating the Vue 2 with mostly Home Assistant, I can’t see anything obvious on how to get the authtoken that’s needed in the headers and deriving that from the web credentials.

    I have a monitoring/graphing app I use (PRTG) that can query APIs directly and will parse the JSON response in whatever way I tell it to, I just need the API key/auth token.

Viewing 5 posts - 1 through 5 (of 5 total)