Welcome to Tesla Motors Club
Discuss Tesla's Model S, Model 3, Model X, Model Y, Cybertruck, Roadster and More.
Register

Search results

  1. M

    Tesla Virtual Power Plant in CA

    I made sense to me that it's all gravy. I mean, PG&E didn't have this extra energy before and now they do and should pay a premium for it since it's during an emergency.
  2. M

    Tesla Virtual Power Plant in CA

    I see. For some reason (because I have solar I think) I'm not allowed to export the battery to grid, except for VPP events. So yeah, typically during the VPP hours I'm discharging to the home because I have it set on TOU so it's exporting all my solar and minimizing my home use during peak...
  3. M

    Tesla Virtual Power Plant in CA

    Thanks for clarifying. Are you saying the compensation calculation is the difference of Powerwall discharge during VPP events and baseline average of the same hours during non-VPP events, i.e. discharging to my home? Using Tesla's example on their website: So in this example when it says "If...
  4. M

    Tesla Virtual Power Plant in CA

    If that's the case, there's no incentive for me to participate in VPP. VPP would only make sense is if someone had a large battery storage system such that Powerwall exports will exceed the solar export baseline average during those hours.
  5. M

    Getting daily production from Tesla Gateway API

    So this is the endpoint I use (python 3): url = (BASE_URL + '/energy_sites/' + SITE_ID + '/calendar_history' + '?kind=power' + '&start_date=' + datetime.strftime( s_date.astimezone(pytz.utc)...
  6. M

    Tesla Virtual Power Plant in CA

    If you like to tinker, you could use the Tesla API to get this value: grid_energy_exported_from_battery It can be retrieved for All Day, Off Peak, Partial Peak, and Peak depending on what mode your system is in. For PG&E the system is blocked from exporting to the grid from your Powerwall...
  7. M

    Getting daily production from Tesla Gateway API

    No my refresh token stopped working as well. I used the “Auth for Tesla” iOS app to get a new set of tokens and the repeated refresh works again, with the new endpoint and parameters.
  8. M

    Getting daily production from Tesla Gateway API

    Yeah this changed a few months ago and I stopped trying to keep up with all the changes, relying on the refresh token. There's a long list of discussions on Tim Dorr's Github with varying solutions.
  9. M

    Getting daily production from Tesla Gateway API

    Though I don't use calendar_history, kind=power, I played around with it and I was able to get data for period=day in 5 minute increments. Oddly enough nothing came up for Dec 9 but Dec 10 had values. Here's what I used: local = pytz.timezone(TIME_ZONE) date =...
  10. M

    Getting daily production from Tesla Gateway API

    Yes though it's a bit different than before: url = 'https://auth.tesla.com/oauth2/v3/token' payload = { 'grant_type': 'refresh_token', 'client_id': 'ownerapi', 'refresh_token': REFRESH_TOKEN, 'scope': 'openid email offline_access' } The response is a bit different too.
  11. M

    Getting daily production from Tesla Gateway API

    Oh yeah, that's a daily summary. For the 5 minute increments I use: /powerhistory but that only gets the previous day. There must be an endpoint that you can query for a particular day because it's available in the app.
  12. M

    Getting daily production from Tesla Gateway API

    So this is using a start_date in local (Pacific) date/time Jan 12, 2022 00:00:00 and an end_date in local (Pacific) date/time Jan 12, 2022 23:59:59 then converting it to UTC into the URL below...
  13. M

    Getting daily production from Tesla Gateway API

    Make sure you're using UTC with the dates: Python 2.7: url = ('https://owner-api.teslamotors.com/api/1/energy_sites/' + SITE_ID + '/calendar_history' + '?kind=time_of_use_energy' + '&period=' + period + '&start_date=' +...
  14. M

    Getting daily production from Tesla Gateway API

    Good point. It might be because of that German teen who hacked 3rd party apps that held people's access token.
  15. M

    Getting daily production from Tesla Gateway API

    Not sure if this is exactly what you're talking about but back in late Nov calendar_history and kind=time_of_use_energy stopped working for me and I noticed that it worked when I also passed the start_date parameter. Previously I had it working with just the end_date.
  16. M

    Getting daily production from Tesla Gateway API

    I experienced the same. The access and refresh tokens are a much longer length and the access token expires in 8 hours instead of 45 days. You can use the same refresh token to generate a new access token more frequently now but the URL and parameters are different.
  17. M

    Adjust Tesla charge rate from mobile app, API & PW2 to allow use of excess solar

    I dug it out of the decompiled Android app: kind=soe
  18. M

    Discussion: How to get status information from your Powerwalls

    Sorry I moved it to tidy things up, new link: tesla/GoogleSheetScriptEditor.gs at master · themonomers/tesla
  19. M

    Discussion: How to get status information from your Powerwalls

    Yay! If you run Get Products from the Google Sheet it will list all your Tesla products, vehicles, solar, and battery. It will be grouped with attributes like "energy_site_id" and "resource_type". The battery ID will be the "id" attribute in that group. Mine starts with "STE".
  20. M

    Discussion: How to get status information from your Powerwalls

    Sorry, what are you referring to? Auth page from an app; which app? If you're talking about Tokens For Teslas • API token generator for the Tesla API, I noticed that it's not working. You can either use ‎Auth app for Tesla or I can post how to get the tokens from Google Sheets (more complicated).
  21. M

    Discussion: How to get status information from your Powerwalls

    I figured out how to get the access and refresh tokens working again via Google Apps Script. If you're interested, let me know and I can add it as a function to run from the Google Sheet.
  22. M

    Powerwall 2 Available Energy After 2 Years

    I was wondering why there's a ~2% difference between the PW percentage readings.
  23. M

    Discussion: How to get status information from your Powerwalls

    Ok thanks, let me know if there is a difference. Also, I added 2 more API calls "Get Battery Status" and "Get Battery Data" if you want to try those calls using the battery ID ("id" from Get Products) and see if that shows any difference. You'll have to grab the updated code from GitHub and...
  24. M

    Discussion: How to get status information from your Powerwalls

    I'm truly baffled by this as these API's are the same way the mobile app gets this data to show. Out of curiosity, do you get the same values for those 3 attributes when you run "Get Site Status" vs. "Get Site Live Status"?
  25. M

    Discussion: How to get status information from your Powerwalls

    Sorry I haven't played around with data from the gateway yet.
  26. M

    Discussion: How to get status information from your Powerwalls

    This, and more data, is available directly from the gateway. This is probably the best and most comprehensive documentation of it I've see so far: vloschiavo/powerwall2
  27. M

    Discussion: How to get status information from your Powerwalls

    The battery power difference is probably a timing issue as I'm noticing it changes frequently over a wide range. The difference in the percentage_charged is weird because that doesn't change quickly. Do you have more than 1 Powerwall? Oh by the way, I wasn't explicit about this but the data...
  28. M

    Tesla API and Google Script

    I think your syntax is wrong. Try: var options = { 'headers': {insert your headers here} }; var url = 'https://owner-api.teslamotors.com/api/1/vehicles'; var carlist = UrlFetchApp.fetch(url, options);
  29. M

    Discussion: How to get status information from your Powerwalls

    Try using this iOS app: ‎Auth app for Tesla I'm not as familiar with Android but I'm guessing you can probably find an equivalent.
  30. M

    Discussion: How to get status information from your Powerwalls

    This is the best I can do that's as "easy" as possible, all done in a Chrome browser. Using your gmail account create a new blank Google Sheet. In your new blank Google Sheet open Tools > Script editor: When the Apps Script page loads in another tab, clear whatever is in there and paste in...
  31. M

    Discussion: How to get status information from your Powerwalls

    That is a concerning amount of degradation after only 17 months. I'll share my Powerwall data after collecting over a longer period of time. I've had my Model 3 for about 2 years and it's only recently degraded slightly to about 98%-99% of original capacity.
  32. M

    Discussion: How to get status information from your Powerwalls

    In my opinion, the simplest way to get into this API programming is by using Google Apps Script. You don't need a specific type of hardware, operating system, or server. You just need a browser, preferably Chrome, and an internet connection. Best of all, this service is free! I started by...
  33. M

    Discussion: How to get status information from your Powerwalls

    Doesn't using total_pack_energy work, as posted here? If not you can always take energy_left / percentage_charged, though I suspect you'll get the exact figure as total_pack_energy. It's the same calculation you're suggesting above but not time dependent.
  34. M

    Discussion: How to get status information from your Powerwalls

    Which API's are used to create the different cards in the Tesla Mobile App: Cards API url = ('https://owner-api.teslamotors.com/api/1/powerwalls/' + BATTERY_ID + '/powerhistory') response = json.loads( requests.get( url...
  35. M

    Discussion: How to get status information from your Powerwalls

    Ah I see. The hardest part is getting the authentication token, now that Tesla has changed the method. I did make a tutorial video about it Access Token The hardest part is getting the authentication token, now that Tesla has changed the method, you unfortunately can't run off a simple...
  36. M

    Discussion: How to get status information from your Powerwalls

    What kind of format/table of contents were you thinking? There is already a site that describes all the Tesla API endpoints but maybe you're thinking more of a tutorial style?
  37. M

    Getting daily production from Tesla Gateway API

    I'm able to recreate all the charts and data from the Tesla mobile app. I use a mix of Google Sheet and Grafana/InfluxDB. If interested: themonomers/tesla