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.

Mass-unscrobble Last.fm scrobbles based on artist, track title, or time of day of the scrobble.

Unscrobbler This program is designed to mass-unscrobble Last.fm scrobbles based on artist, track title, or time of day of the scrobble. For example, i

Nathan 6 Nov 04, 2022
Slack->DynamDB->Some applications

slack-event-subscriptions About The Project Do you want to get simple attendance checks? If you are using Slack, participants can just react on a spec

UpstageAI 26 May 28, 2022
A crashbot for Discord

Description A Effective crash bot code How to use Setup First, we need to install the library: pip install discord or (for linux users): pip3 install

3 Sep 17, 2021
Discord bot that performs various functions.

rikka-bot A Discord bot that performs various functions. Table of Contents Commands Main Commands Utility Commands Admin Commands Self-Assignable Role

Carlos Saucedo 7 Aug 27, 2021
An api, written in Python, for Investopedia's paper trading stock simulator.

investopedia-trading-api An API, written in Python, for Investopedia's paper trading stock simulator. Pull requests welcome. This library is now Pytho

Kirk Thaker 178 Jan 06, 2023
Send to Telegram, Vk, Discord

Triple send Версия для русских: здесь Demo: Telegram: @Triple_project_bot Discord: Triple project#0877 Vkontakte: @dev.santaspeen How to run Install r

2 Sep 27, 2022
This Telegram bot is created to help monitor individual mood. Lean and mean

Mood bot This bot is created to help monitor your mood. Lean and mean. Deployment Install Docker and Docker Compose Populate .env file cp .env.dist .e

Piotr Markielau 1 Dec 05, 2021
This repository is used to provide data to zzhack,

This repository is used to provide data to zzhack, but you don't have to care about anything, just write your thinking down, and you can see your thinking is rendered in zzhack perfectly

5 Apr 29, 2022
Copier template for solving Advent of Code puzzles with Python

Advent of Code Python Template for Copier This template creates scaffolding for one day of Advent of Code. It includes tests and can download your per

Geir Arne Hjelle 6 Dec 25, 2022
Get your Pixiv token (for running upbit/pixivpy)

gppt: get-pixivpy-token Get your Pixiv token (for running upbit/pixivpy) Refine pixiv_auth.py + its fork Install ❭ pip install gppt Run Note: In advan

haruna 58 Jan 04, 2023
Production Ontology Merging (PrOM) Framework

Production Ontology Merging (PrOM) Framework OWL 2 DL ontology merging framework tailored to the production domain Features preprocessing: translation

4 Nov 02, 2022
Twitter-bot - A Simple Twitter bot with python

twitterbot To use this bot, You will require API Key and Access Key. Signup at h

Bentil Shadrack 8 Nov 18, 2022
Python client for Arista eAPI

Arista eAPI Python Library The Python library for Arista's eAPI command API implementation provides a client API work using eAPI and communicating wit

Arista Networks EOS+ 124 Nov 23, 2022
Sends notifications when Pokemon Center products are in stock

Sends notifications when Pokemon Center products are in stock! If you use this for scalping, I will break your kneecaps

2 Jan 20, 2022
A tool for exporting Telegram group chats into static websites, preserving chat history like mailing list archives.

tg-archive is a tool for exporting Telegram group chats into static websites, preserving chat history like mailing list archives. Preview The @fossuni

Kailash Nadh 400 Dec 27, 2022
A jokes api python module

A jokes api python module

Fayas Noushad 3 Nov 28, 2021
A basic implementation of the Battlesnake API in Python

Getting started with Battlesnake and Python This is a basic implementation of the Battlesnake API in Python. It's a great starting point for anyone wa

Gaurav Batra 2 Dec 08, 2021
just a program i made cuz a friend got tokenlogged and spammed me with these scam/phishing links so i made a programm to spam these websides with fake logins

scam-webside-spammer just a program i made cuz a friend got tokenlogged and spammed me with these scam/phishing links so i made a programm to spam the

TerrificTable 3 Sep 23, 2022
Wrapper around the latest Tuenti API

python-tuenti Overview Wrapper around the latest Tuenti API. Installation Install using pip, including any optional packages you want... $ pip install

Juan Riaza 10 Mar 07, 2022
Discord bot for name verifying. Created for TinkerHubGCEK discord server. Tinky is now deployed in heroku

Custom Discord bot This custom discord-python bot assigns roles to members joined at discord server. It looks and compares a list before verifying the

Edwin Jose George 2 Dec 16, 2021