Skip to content

Example flow

Johan Enell edited this page Dec 2, 2023 · 1 revision

Example flow

An example flow to calculate and set a battery Time-of-Use schedule

battery_schedule_flow.json

Requirements:

Before you execute the flow:

  1. Set your Tibber home id in the "Set tibber payload" node
  2. Set you Huawei Solar device id in the "Set ToU period" node

Flow breakdown:

  1. Fetch price information for current and next day
  2. Modify payload to specify import and export price and add the current battery SoC
  3. Run the schedule calculator based on a 5 kWh battery
  4. Convert the result to a ToU pattern that Huawei batteries excepts
  5. Call the set_tou_periods service from Huawei Solar

FAQ:

How do I get my Tibber home id?

Open Tibber API Explorer and execute this query {viewer {homes {id}}}

How do I get my battery device id?

  1. Go to Developer Tools-> Services
  2. Find "Huawei Solar: Set TOU Periods"
  3. Choose you battery in the drop-down
  4. Switch to yaml and you will see the id