Skip to content

Commit

Permalink
Merge pull request #25 from gcoan/patch-1
Browse files Browse the repository at this point in the history
Update README.md, explanation how to configure octoblock
  • Loading branch information
badguy99 authored Oct 29, 2023
2 parents 562a566 + 68975be commit 38410fa
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ sensor.octopus_export_next_price

## Installation

Use [HACS](https://github.com/custom-components/hacs) or download the octoblock directory from inside the apps directory [here](https://github.com/badguy99/octoblock/releases) to your local apps directory, then add the configuration to enable the octoblock module.
Use [HACS](https://github.com/custom-components/hacs) or download the octoblock directory from inside the apps directory [here](https://github.com/badguy99/octoblock/releases) to your local apps directory, then add and customise the following configuration to appdaemon/apps/apps.yaml to enable the octoblock module.

## apps.yaml Configuration
## Example apps.yaml Configuration
```yaml
octoblock:
module: octoblock
Expand Down Expand Up @@ -87,13 +87,23 @@ octoblock:
The module and class sections need to remain as above, other sections should be changed as required.
### Blocks
### Octoblock module
You can have multiple blocks with different time periods (`hour` setting) or starting points (`start_period` setting) as needed. It will work with whole hour or half hour blocks in the `hour` setting.
`region` is the region letter (e.g. `H`) from the end of your tariff code which will look something like `E-1R-AGILE-18-02-21-H`. The tariff code used to be found on the [Octopus Energy developer dashboard](https://octopus.energy/dashboard/developer/) webpage in the Unit Rates section for your account, but Octopus seem to have removed this.

The easiest way now to get the tarrif code (and region) for your import and export account is using the [Octopus Energy Integration](https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/):

Install, configure and start the integration, go to Developer Tools/States and filter on `current_day_rates`, then look at the attributes of the _current_day_rates and _export_current_day_rates entities for the tarrif_code attribute which will be formatted something like `E-1R-AGILE-FLEX-22-11-25-H`.

`import_code` and `export_code` should be specified from the tariff code retrieved above with the preceeding `E-1R-` and the trailing `-H` removed. If not specified they default to `AGILE-FLEX-22-11-25` and `AGILE-OUTGOING-19-05-13` respectively.

NB: If you get the tariff code wrong (e.g. forget to remove the E-1R- prefix or -H suffix) you will get an error `ERROR octoblock: Error 404 getting incoming tariff data: {"detail":"Not found."}` reported in the appdaemon log and the rest of the octoblock configuration (custom blocks etc) will be ignored!

`region` is the region letter from the end of `E-1R-AGILE-18-02-21-H` which can be found on the [Octopus Energy developer dashboard](https://octopus.energy/dashboard/developer/) webpage in the Unit Rates section for your account.
`use_timezone` can be set to True or False, and defaults to False, it allows you to specify if the date/time should be displayed in UTC (False), or using Europe/London (True) as the timezone. For example, `2020-03-29T02:00:00Z` or `2020-03-29T03:00:00 BST` respectively.

### Blocks

`import_code` and `export_code` can be specified, they default to `AGILE-FLEX-22-11-25` and `AGILE-OUTGOING-19-05-13` respectively.
You can have multiple blocks with different time periods (`hour` setting) or starting points (`start_period` setting) as needed. It will work with whole hour or half hour blocks in the `hour` setting.

`start_period` is optional, it can be set to either `now` or `today`, and will default to `now`

Expand All @@ -115,8 +125,6 @@ Setting `start_period` to `now` and `hours` to `0` will give the current import

When using `today` for the `start_period` it can be limited further usings `limits > start_time` and/or `limits > end_time` (please note the formating in the example yaml above) to restrict the period searched. This may be useful for example if you have something that you only want to run within certain times of the day, due to noise issues etc.

`use_timezone` can be set to True or False, and defaults to False, it allows you to specify if the date/time should be displayed in UTC (False), or using Europe/London (True) as the timezone. For example, `2020-03-29T02:00:00Z` or `2020-03-29T03:00:00 BST` respectively.

`import` and `export` should be set to True or False as required, `import: True` and `export: False` for the Agile Octopus tariff, and `import: False` and `export: True` for the Agile Outgoing Octopus tariff.

### Lookaheads
Expand Down

0 comments on commit 38410fa

Please sign in to comment.