Skip to main content

Overview Zendure Schedule Management

AanleidingBackground

DeThe Zendure App optie“net-zero” nul-op-de-meteroption werktedid nietnot geodwork bijproperly omdatbecause dethe P1 data totlags by up to 20 secondenseconds. achterloopt. Elke seconden wort er wel eenA datagram verstuurdis maarsent dieevery looptsecond, tebut verthe achter.values Voorare zoverdelayed iktoo hebmuch. kunnnenAs achterhalenfar ligtas ditI aanhave debeen slimmeable to determine, this is caused by the smart meter, dethe Landis+Gyr-Gyr meter.

DaarnaastIn wiladdition, ikI zeflwant deto verschillendebe modiable uitto decombine the different modes from the Zendure app kunnenmyself. combineren.Ultimately, EnI uiteindelijkwant wilmore ik meer controlecontrol over hetcharging ladenand endischarging ontladenthe van de batterij.battery.

Set-up

HetThe systeemsystem bestaatconsists uitof dethe delen.following components.

LokaleLocal aansturingcontrol

IkFor gebruikthis hiervoorI eenuse oudean old Raspberry Pi2.Pi Wat2. jeWhat gebruiktyou maaktuse nietdoes uit,not maarmatter, jeas moetlong opas hetzelfdeit netwerkis zittenon alsthe desame batterijnetwork enas dethe battery and the P1 meter. HetThe Python script leestreads eena laad/ontlaadcharge/discharge schemaschedule enand handeltacts volgensaccording ditto schema.this schedule. The schedule defines when the battery should charge or discharge and at how many watts. In ditaddition, schemaI staatadded wanneertwo despecial batterij met hoeveel watt moet laden/ontladen. Daarnaast heb ik twee speciale modi toegevoegd:modes: NetZero enand NetZero+.

NetzeroNetZero is nul-op-de-meternet-zero enand probeertattempts jeto verbruikcompensate teyour compenserenconsumption doorby dedischarging batterijthe te laten ontladen.battery.

NetZero+ is nul-op-de-meter,net-zero, maarbut danonly alleenfor voorcharging. laden.So Dusall alleelectricity stroomthat diewould jeotherwise zoube terugleverenfed wordtback opgeslagen.into the grid is stored.

SchemaManaging beherenthe schedule

HetThe schemaschedule is opgelagenstored in JSON enformat isand can be accessed via eenan APIAPI. teThe bereiken.schedule Hetcan schemabe kanhosted opon elkeany Webserverweb staanserver (PHP, CSS, JS) staanand enis wordtmodified and/or retrieved via eenAPI calls. This ensures that the schedule management component can be hosted on any server.

Because we use a standard JSON schema, we can manage and/or modify the schedule using different tools.

Automation System

Within the local LAN there is a simple computer such as a Raspberry Pi. This reads the schedule and controls the Zendure battery. The automation system makes 6 different types of API callcalls:

bewerkt
    en
  1. Control the Zendure battery via LAN (write)
    Set charge/discharge level or set teh battery in stand-by mode.
    This is done via the LAN access to the local API port of opgevraagd.teh Ditbattery.
  2. zorgt
  3. Read ervoorZendure datbattery hetstatus schema-beheervia gedeelteLAN
    Checks opthe elkelevel of charge in the battery. Mainly used for keeping the charge in between the set limts. These limits are set in the config of the application.
  4. Read P1 meter data via LAN
    Needs to know the home usage in order to run NetZero (or NetZero+)
  5. Store data
    Store P1 and Zendure data (read by 2 and 3) via API to the main web server kanon staan.the

    Internet.
  6. Fetch charge schedule
    Every 5 minutes the schedule is loaded from the Internet. 
  7. Post automation status updates
    Status, show the last charge/discharge command and a timestamp to indicate that the process is still alive.

Doordat we een standaard JSON schema hebben kunnen we met verschillende tools het schema beheren en of aanpassen.