Code Monkey home page Code Monkey logo

optimalenergyuser's Introduction

GitHub all releases GitHub release (latest by date) GitHub GitHub issues

OptimalEnergyUser

Send daily update to family members for the most optimal time to run heavy devices as cheap as possible.

Goal of this script

Using dynamic energy tarifs, the cost of running heavy machinery can vary per hour. With this script you'll get a daily overview of the upcoming hourly tarifs, combined with the predicted solar panel delivery and the base power usage of your household. This graph will then be send to a Telegram Group chat, so the group members (family) now knows when to run heavy devices like a dishwasher, tumble dryer or washingmashine.

SolarForecast

To get the forecast of your solarpanels, we're using the https://forecast.solar/ API. Though this is possible for free, please reward the maker by maybe signing up for the 'personal' plan or use the 'buy me a coffee' button on the website.

To make the forecast for your solar panels, you need to determine:

  1. your exact location in latitude and longitude
  2. the declination of your panels
  3. the azimuth or orientation of your panels.
  4. the peak watt of your solar panels in kWh (float)
  5. Your timezone, for example 'Europe/Amsterdam'

Add these values to the .env file manually like:

LAT=54.9
LON=25.3
DEC=25
AZI=40
KWP=4.4
TIMEZONE=Europe/Amsterdam

Telegram Token and chat ID

To be able to send messages to Telegram, you'll need to have a Telegram API Token and chat ID. There are many guides to be found on how to get those details. Add them to your .env file like this:

TELEGRAMAPI=<Your telefgram API key>
TELEGRAMCHANNELID=<Channel ID telefgram>

Note: my chat ID started with a minus sign, be sure to include it aswell if that is the case for you.

Energy Prices

Currently I can only read information from EnergyZero in the Netherlands who's prices are also the prices for ANWB Energie, MijnDomein Energie, Energie van Ons, GroeneStroomLokaal.

Use of EnergyZero and Solar.Forecast

This project makes use of the following other projects:

Changes

  • March 22nd, 2023: Added TIMEZONE=Europe/Amsterdam to the .env, you should add this as well (with your timezone) to prevent the script from failing.
  • April 21st, 2023: Added TMPIMAGEPATH=/home/OptimalEnergyUser to the .env. This points to the temp directory for the image generated. If not specified it will use the directory of the script.
  • April 21st, 2023: Show the BASICHOUSEUSAGEWATT (Basic House Usage in WATT) in the image as third graph

optimalenergyuser's People

Contributors

thegabeman avatar

Stargazers

Evert Jan Hakvoort avatar Klaas Schoute avatar

Watchers

 avatar

optimalenergyuser's Issues

Don't scale forecast

Currently the forecast graph is auto scaling and therefore the peak for 300W looks as big as the peak of 2000W on a different day. The max of the forecast axis should be KWP of the .env information.

One hour time slip

Somehow there is a one hour time slip between the data pulled from EnergyZero and the data pulled from Forecast.Solar. This is caused by my conversion to UTC times. I need to correct this.

Graph - timezone correction

Graph:

  • X-as time frame in correct timezone
  • X-as time frame should be exactly one day from midnight to midnight

Include heavy devices

Make the graph show which of your heavy devices could be ran at specific times. Also take in account a baseline of power usage for the household:

Power Consumption
To know the power consumption of some heavy devices in your house hold add them manually in the .env file, using the following format:
device01='name',powerusage in kWh for one run, duration in hours
device02='name',powerusage in kWh for one run, duration in hours

If you tumbledryer use 3kWh for one cycle and it will take 1,5hrs for the cycle, this would be:
device01='tumbledryer long program', 3, 1.5
and for the shorter program maybe 1.5kWh for half an hour:
device02='tumbledryver short program',1.5,0.5

Show household baseline usage

In the graph it would be great to see what the baseline power usage is for the household. This can then also be used to see which heavy usage devices could be run.

Beter graph layout

  • X-as labels are too big
  • Legend labels overlap
  • X-as time frame in correct timezone
  • X-as time frame should be exactly one day from midnight to midnight
  • Title should include the date

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.