TMC is an independent, primarily volunteer organization that relies on ad revenue to cover its operating costs. Please consider whitelisting TMC on your ad blocker and becoming a Supporting Member. For more info: Support TMC

TOU api

Discussion in 'Tesla Energy' started by Sylvia Else, Aug 3, 2018.

  1. Sylvia Else

    Sylvia Else Member

    May 28, 2018
    I've captured some requests and responses to Tesla's servers for the ap, for those who already know how to access the servers.

    POST /api/1/energy_sites/nnn/time_of_use_settings

    where nnn is your site id.



    It appears that it only includes the "timestamp" values when you change between balanced and cost saving, and vice versa.

    Changing the backup reserve

    POST /api/1/energy_sites/nnnn/backup


    Changing modes:

    POST /api/1/energy_sites/nnn/operation




    This latter is for "Advanced mode, or TOU".

    In all cases the respone is


    It may be that the "default_real_mode" is just "default_mode" prior to firmware 1.21.0
    • Informative x 1
  2. BJReplay

    BJReplay Member

    Oct 13, 2017
    St Kilda West
    Thanks. From this it appears that you have a three part tariff, with shoulder on weekdays from 7:30 to 14:00 and again from 21:00 to 22:00, and the message defines peak and off peak, with shoulder "everything else"?

    Weekend is shoulder and off peak, and no peak period?

    Off Peak end seconds can be "after" start seconds, so it wraps around midnight.
  3. Sylvia Else

    Sylvia Else Member

    May 28, 2018
    That's how mine is set, yes - there's no peak at weekends, so it appears that to represent that it specifies null for the start and end times. As you surmised, shoulder is everything not included in the specified periods.

    It looks as if there are a couple of minor things that could be achieved with the api, that the ap won't allow. Once is to change the week/weekend split, perhaps to handle a forthcoming public holiday. The other is to specify boundaries that are not multiples of 30 minutes, though I'd be surprised if there are my tariffs like that.

    Still pretty basic stuff, though.

Share This Page

  • About Us

    Formed in 2006, Tesla Motors Club (TMC) was the first independent online Tesla community. Today it remains the largest and most dynamic community of Tesla enthusiasts. Learn more.
  • Do you value your experience at TMC? Consider becoming a Supporting Member of Tesla Motors Club. As a thank you for your contribution, you'll get nearly no ads in the Community and Groups sections. Additional perks are available depending on the level of contribution. Please visit the Account Upgrades page for more details.