Python client and API for monitoring and controling energy diversion devices from MyEnergi

Overview

Python client and API for monitoring and controling energy diversion devices from MyEnergi

A set of library functions and objects for interfacing with the cloud servers of MyEnergi to monitor and control their Zappi and Eddi power diversion products, supports fetching latest data, as well as changing charge modes, setting boost timers automatically from Octopus Agile pricing.

Includes the ability to run as a deamon to manage the system, automatically changing modes/priorities based on available power and other inputs, as well as control TP-LINK HS110 wifi power sockets, automaticaly querying the Nissan API for Leaf SOC data and displaying results to e-Paper display connected to a Raspberry Pi. This includes a "charge to 80%" and "automatically charge if below 20% when connected" features.

This builds heavily on https://github.com/twonk/MyEnergi-App-Api and https://myenergi.info/api-f54/

Configuration

The code can be run directly from a checkout, no install process is required however some non-core python libs might be needed.

A config file is required and should contain at least the credentials used to authenticate against the MyEnergi severs,

username: 
   
    
password: 
    

    
   

Additionally, to use the Leaf integration the you need the Nissan credentials, as well as the location of a local checkout of https://github.com/filcole/pycarwings2.git

leaf:
    username: 
   
    
    password: 
    
     
    region: 
     
      
pycarwings_path: 

     
    
   

To use the Jaguar Land Rover integration the you need to pip install jlrpy and set config file with permissions. Config includes a max SOC - set to 100 if you wish to control max SOC from this application (https://github.com/ardevd/jlrpy.git)

jlr:
    username: 
   
    
    password: 
    

    
   

For all cars it's possible to set the battery capacity and control the behaviour based on battery charge. Setting the capacity is required to perform SOC calculations, the value here should be the amount of power requried to be delived to the car to change from 0% SOC to 100% SOC, as measured by the Zappi. charge_below is the SOC value at which the Zappi will automatically change to ECO mode regardless of surplus, this allows for protection of battery against sitting at low SOC values and ensuring there's a minimum SOC available. stop_at is the value that the Zappi will change into Stop mode, again to preserve battery. charge_below and stop_at can both be set to 'null' to disable this feature.

leaf:
    capacity: 35
    charge_below: 20
    stop_at: 80

If using the Octopus Agile features it's necessary to set the region

agile:
    region: H

Finally, it's possible to apply some manual configuration to the CT clams on individual devices, for example if they are configured as 'Monitor' or 'AC Storage'. In this way I am able to have mine report figures for my iBoost although it's seen by the Zappi as a AC Battery.

If you have a 3 phase Zappi and net across phases then you need to note this in the config as below or the system will assume non-netting and take grid values from phase 1 only. You can ignore this for single phase and non-netting 3phase.

For clarity on logging or display its optional to add a name for your Zappi here too

house_data:
    
   
    :
        ectt2: 
    
     
        name: Outside Zappi
    
     
      :
        ectt3: 
      
       
        name: Garage Zappi
    net_phases1: True

      
     
    
   

Use

Most scripts can be run directly, and will print results to screen, as well as logging to logs/myenergi.log

get_zappi_boost.py

Shows the currently configured boost timers

get_zappi_history.py

Shows the historic data from the cloud. Can show both per minute data or per hour data for any specified day (if present on the servers) as well as fetching the data but reporting only daily totals.

set_zappi_mode.py

Sets the current mode of the Zappi. Currently sets the mode of all Zappis to stop, needs command line options added.

set_boost_charge.py

Sets boost timers on the Zappi. Automatically configures boost timers for the Zappi, based on Octopus Agile pricing. Accepts options for desired SOC (Nissan Leaf only), desired time, charge rate, amount of charge and to clear existing timers.

run_zappi.py

Reports current state of system to stdout, and can run as a server controlling the system.

run_zappi.py start

Launches the deamon in the background.

Will run as a server if run with no argunments and change Zappi mode automatically, use "run_zappi.py once" to simply display data and exit_

API

The API is much wider than the utilities provided, and understands most of the known endpoints, including almost all of the functionality that exists in the App. It is antipiated that most people will want to interface directly with existing applications or monitoring systems rather than using the scripts directly.

Predict the Site EUI, given the characteristics of the building and the weather data for the location of the building.

wids_datathon_2022 Description: Contains a data pipeline used to predict energy EUI Goals: Dataset exploration Automating the parameter fitting, gener

1 Mar 25, 2022
QuickStart specific rules for cfn-python-lint

AWS Quick Start cfn-lint rules This repo provides CloudFormation linting rules specific to AWS Quick Start guidelines, for more information see the Co

AWS Quick Start 12 Jul 30, 2022
Discord-Lite - A light weight discord client written in Python, for developers, by developers.

Discord-Lite - A light weight discord client written in Python, for developers, by developers.

Sachit 142 Jan 07, 2023
Discord bot to monitor collection of mods on the Steam Workshop and notify on update to selected discord server via Nextcordbot API.

Steam-Workshop-Monitor Discord bot to monitor collection of mods on the Steam Workshop and notify on update to selected Discord channel via Nextcordbo

7 Nov 03, 2022
Google Search Results via SERP API pip Python Package

Google Search Results in Python This Python package is meant to scrape and parse search results from Google, Bing, Baidu, Yandex, Yahoo, Home depot, E

SerpApi 254 Jan 05, 2023
pyhakuna is a client to access the API of the time keeping service hakuna.ch.

pyhakuna pyhakuna is a client to access the API of the time keeping service hakuna.ch. The Hakuna API is – unfortunately – personal and currently does

Christian Mäder 1 Feb 15, 2022
A program that automates the boring parts of completing the Daily accounting spreadsheet at Taos Ski Valley

TSV_Daily_App A program that automates the boring parts of completing the Daily accounting spreadsheet at my old job. To see how it works you will nee

Devin Beck 2 Jan 01, 2022
Discord bot for calculating basic operations and formulas. (Early Development)

MathBot Discord bot for calculating basic operations and formulas. (Early Development) Commits Feel free to contribute to this bot by forking and pull

4 Jul 14, 2022
🛒 Bot de lista de compras compartilhada para o Telegram

Lista de Compras Lista de compras de Cuducos e Flávia. Comandos do bot Comando Descrição /add item Adiciona item à lista de compras /remove item

Eduardo Cuducos 4 Jan 15, 2022
Scripts to help you win the Pizza Express

Slice of the Prizes Slice of the Prizes is a Python Script designed to enter the "Slice of the Action" competition hosted by Pizza Express the competi

Luke Bendall 1 Nov 04, 2021
A discord tool to use bugs and exploits

DiscordTool A discord tool to use bugs and exploits Features: send a buggy messa

6 Aug 19, 2022
Discord nuke bot with python

Discord-nuke-bot 🇷🇺 🇷🇺 🇷🇺 🇷🇺 🇷🇺 TODO: Добавить команду: Удаления всех ролей Спама каналами Спама во все каналы @everyone Удаления всего aka

Nikita Maykov 10 Oct 14, 2022
Generate discord nitro codes and check them

Discord Nitro Generator and Checker A discord nitro generator and checker for all your nitro needs Explore the docs » Report Bug · Request Feature · J

509 Jan 02, 2023
Robocord is a bot created for the Pycord community.

Robocord is a bot created for the community of the Pycord Server. Just a bot created for Pycord Server. You can start pull requests, I will check it and if its good I will add it to the bot. 👍

Bruce 7 Jun 26, 2022
A decentralized messaging daemon built on top of the Kademlia routing protocol.

parakeet-message A decentralized messaging daemon built on top of the Kademlia routing protocol. Now that you are done laughing... pictures what is it

Jonathan Abbott 3 Apr 23, 2022
A simple Discord Bot that uses the free CryptoCompare API to display cryptocurrency prices

What is this? This is a simple Discord Bot coded in Python that uses the free CryptoCompare API to display cryptocurrency prices Download Use git to c

Kevin 10 Apr 17, 2022
Telegram group manager moderen and simple.

Upin Robot A Advanced Powerful, Smart And Intelligent Group Management Bot With New And Powerful Features ... Written with Pyrogram and Telethon... If

Muhammad Nawawi 3 Dec 23, 2021
An Simple Advance Auto Filter Bot Complete Rewritten Version Of Adv-Filter-Bot

Adv Auto Filter Bot V2 This Is Just An Simple Advance Auto Filter Bot Complete Rewritten Version Of Adv-Filter-Bot.. Just Sent Any Text As Query It Wi

0 Dec 18, 2021
TORNADO CASH Pancakeswap Sniper BOT 2022-V1 (MAC WINDOWS ANDROID LINUX)

TORNADO CASH Pancakeswap Sniper BOT 2022-V1 (MAC WINDOWS ANDROID LINUX)

Crypto Trader 1 Jan 06, 2022
Save data from Instagram takeout to a SQLite database

instagram-to-sqlite Save data from a Instagram takeout to a SQLite database. Mise En Place git clone https://github.com/gavindsouza/instagram-to-sqlit

gavin 8 Dec 13, 2022