Git Product home page Git Product logo

ha_powercontrol_en's Introduction

NB, currently the translated software is not running!!! Still investigating.

HA_PowerControl

The following package, combined with the python script "update_entities.py" aims to avoid the detachment of the meter due to too much power absorbed by the various appliances (loads). A fundamental hardware requirement is the presence of switches on the loads to be controlled and a sensor that measures the power of the individual loads. I used Shelly 1PM and Shelly Plug S devices, perfect for the purpose. It is recommended, but not mandatory, to use a sensor that monitors the overall consumption of the system (eg Shelly EM or an ESP8266 + PZEM). The logic envisages the configuration of two maximum power thresholds and two intervention times (which reflect the operating logic of the electricity meters used in Italy):

  • if the overall absorption exceeds the value of "Maximum Delayed Power", the package waits for the value in minutes of "Delayed Detachment Minutes", after which it starts to disconnect the loads;
  • if the overall absorption exceeds the value of "Immediate maximum power", wait for a number of seconds set in "Seconds immediate detachment" and then start the detachment.

The disconnection of the loads that are absorbing energy starts from those with lower priority (Load 20) up to those with higher priority (Load 1), until the overall use of power is within the set limit. If a load is not absorbing, it is not detached. The script keeps memory of the load absorption before the detachment and reconnects it only when the availability of power is sufficient not to cause a new detachment, in reverse priority order (from Load 1 to Load 20). The configuration is entirely via graphical interface, except for the notification group (notify.all) which must be set manually.

Installing

  • Copy the file "packages/pc.yaml" to the "packages" directory
  • Copy the files "python_scripts/update_entities.py" and "python_scripts/update_entities_new.py" to the "python_scripts" directory
  • Alternatively, you can download the ZIP file and extract the contents of the "HA_PowerControl-main" folder to the Home Assistant folder.
  • Enable packages
  • Enable python scripts
  • Add the contents of the file "pc.lovelace" to the Lovelace interface.
  • Create a notification group "notify.all" in the file "configuration.yaml" and insert the devices that will receive the intervention notifications.
  • Configure the recoder to include the following sensors:
    • sensor.selected_power_loads
    • sensor.suspended_power_loads
    • sensor.maximum_power

Configuration

Set the configuration parameters of the Lovelace graphical interface.

Power Load Sensor

The most effective solution is to use a power sensor upstream of the system, just before the meter. In this case, simply select the appropriate sensor in the configuration. Alternatively, it is possible to use the power sensors of the increased loads used (sensor.virtual_power_load) and maintain a certain margin of tolerance. This involves monitoring all major loads (oven, stove, hair dryer, air conditioners, etc ...). Of course, in this way the overall consumption cannot be assessed, so the limit value could be exceeded without load control intervening. But using a conservative maximum power value (e.g. 3kW) and counting on the tolerances of 180 minutes up to 33% (e.g. 4kW) should be functional.

Screenshot

image 1

Debug

It is possible to activate the writing of log messages by enabling the relative component in the logger section of the configuration.yaml configuration file: '''python Logger: default: error Logs: homeassistant.components.pc: debugging

ha_powercontrol_en's People

Contributors

andbad avatar whulshof avatar

Stargazers

Matthias Füg avatar

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.