Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CheapPower module #22529

Open
wants to merge 1 commit into
base: development
Choose a base branch
from
Open

CheapPower module #22529

wants to merge 1 commit into from

Conversation

dr-m
Copy link

@dr-m dr-m commented Nov 22, 2024

This fetches electricity prices and chooses the cheapest future time slot. Currently, the only data source is the Nordpool prices for Finland, as provided by ENTSO-E and https://sahkotin.fi. To use:

  • copy cheap_power.tapp to the file system
  • Invoke the Tasmota command CheapPower1, CheapPower2, … to
  • download prices for the next 24 to 48 hours
  • automatically choose the cheapest future time slot
  • to schedule Power1 ON, Power2 ON, … at the chosen slot
  • to install a Web UI in the main menu
  • For a full installation, you will want something like the following:
Backlog0 Timezone 99; TimeStd 0,0,10,1,4,120; TimeDst 0,0,3,1,3,180

Backlog0 SwitchMode1 15; SwitchTopic1 0
Backlog0 WebButton1 boiler; WebButton2 heat
PulseTime1 3700

Rule1 ON Clock#Timer DO CheapPower1 ENDON
Timer {"Enable":1,"Mode":0,"Time":"18:00","Window":0,"Days":"1111111","Repeat":1,"Output":1,"Action":3}
Rule1 1
Timers 1

The download schedule can be adjusted in the timer configuration menu. The prices for the next day will typically be updated in the afternoon or evening of the previous day.

In case the prices cannot be downloaded, the download will be retried in 1, 2, 4, 8, 16, 32, 64, 64, 64, … minutes until it succeeds.

The user interface in the main menu consists of 4 buttons: ⏮ moves to the previous time slot (or wraps from the first to the last) ⏯ pauses (switches off) or chooses the optimal slot 🔄 requests the prices to be downloaded and the optimal slot to be chosen ⏭ moves to the next time slot (or wraps from the last to the first)

The status output above the buttons may also indicate that the output is paused until further command or price update:

It may also indicate the start time and the price of the slot:
⭙ 2024-11-22 21:00 12.8 ¢

I am using this for controlling a 3×2kW warm water boiler. For my usage, 1 hour every 24 or 48 hours is sufficient.

Description:

Related issue (if applicable): fixes #

Checklist:

  • The pull request is done against the latest development branch
  • Only relevant files were touched
  • Only one feature/fix was added per PR and the code change compiles without warnings
  • The code change is tested and works with Tasmota core ESP8266 V.2.7.8
  • The code change is tested and works with Tasmota core ESP32 V.3.1.0.241117
  • I accept the CLA.

NOTE: The code change must pass CI tests. Your PR cannot be merged unless tests pass

This fetches electricity prices and chooses the cheapest future time slot.
Currently, the only data source is the Nordpool prices for Finland, as
provided by ENTSO-E and https://sahkotin.fi. To use:

 * copy cheap_power.tapp to the file system
 * Invoke the Tasmota command CheapPower1, CheapPower2, … to
  * download prices for the next 24 to 48 hours
  * automatically choose the cheapest future time slot
  * to schedule Power1 ON, Power2 ON, … at the chosen slot
  * to install a Web UI in the main menu
 * For a full installation, you will want something like the following:
```
Backlog0 Timezone 99; TimeStd 0,0,10,1,4,120; TimeDst 0,0,3,1,3,180

Backlog0 SwitchMode1 15; SwitchTopic1 0
Backlog0 WebButton1 boiler; WebButton2 heat
PulseTime1 3700

Rule1 ON Clock#Timer DO CheapPower1 ENDON
Timer {"Enable":1,"Mode":0,"Time":"18:00","Window":0,"Days":"1111111","Repeat":1,"Output":1,"Action":3}
Rule1 1
Timers 1
```
The download schedule can be adjusted in the timer configuration menu.
The prices for the next day will typically be updated in the afternoon
or evening of the previous day.

In case the prices cannot be downloaded, the download will be retried
in 1, 2, 4, 8, 16, 32, 64, 64, 64, … minutes until it succeeds.

The user interface in the main menu consists of 4 buttons:
⏮ moves to the previous time slot (or wraps from the first to the last)
⏯ pauses (switches off) or chooses the optimal slot
🔄 requests the prices to be downloaded and the optimal slot to be chosen
⏭ moves to the next time slot (or wraps from the last to the first)

The status output above the buttons may also indicate that the output
is paused until further command or price update:
⭘
It may also indicate the start time and the price of the slot:
⭙ 2024-11-22 21:00	12.8 ¢

I am using this for controlling a 3×2kW warm water boiler.
For my usage, 1 hour every 24 or 48 hours is sufficient.
@s-hadinger
Copy link
Collaborator

Thanks. Is it valid only for Finland? If so, I believe it should show in the name of the file like "cheap_power_Finland"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants