2.5.0 • Published 1 year ago

myenergi-api v2.5.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

myenergi-api

DeepScan grade GitHub last commit Node.js CI Node.js Package npm npm NPM

NodeJS implementation of MyEnergi API for controlling Zappi, Eddi and other MyEnergi products

General

This node.js module is used for communicating with myenergi API. It enables you to communicate, retrieve data and control some of the myeneri products like Zappi and Eddi.

Zappi is a smart EV charger that is able to charge your EV using solar enegy or other renewable energy sources which saves energy and money. Eddi is a power diverter that controls up to two heating sources. It works in the same way as Zappi by diverting generated renewable enegy directly to the heating source and potentially draw the rest of the energy from the grid.

Prerequisites

In order to use this module you have to own a myenergi hub. This will have to be registered to the myenergi My Account. The hubs serial is used for the username and the password is the password you created when registering the product on myenergi My Account.

Installation

npm package https://www.npmjs.com/package/myenergi-api

npm install myenergi-api

Usage

Create an instance of MyEnergi class.

Here you find all methods needed to communicate with your myenergi hub. You will have to create one instance per hub if you have more than one.

const myenergi = new MyEnergi("1234567", "!3uper3ecretPassw0rd");

Get status of all myenergi devices

Return status of all myenergi devices connected to the hub. Zappi, Eddi and Harvi

const statusAll = await myenergi.getStatusAll();
console.log(statusAll);

Get status of all Zappi devices.

Return status of all Zappi devices connected to the hub.

const zappiAll: Zappi[] = await myenergi.getStatusZappiAll();
console.log(zappiAll);

Get status of one Zappi device.

Return status of a Zappi device with the provided serial number.

const sno = '1234567';
const statusZappi: Zappi = await myenergi.getStatusZappi(sno);
console.log(statusZappi);

Set Zappi charge mode.

Set the current charge mode for the specified Zappi device. You can also use this function to stop charging. See Charge Mode in the documentation below for more details.

const sno = '1234567';
const chargeMode = ZappiChargeMode.EcoPlus;
const result = await myenergi.setZappiChargeMode(sno, chargeMode);
console.log(result);

Set Zappi minimum green level (MGL)

Set minimum green level to decide how much grid power zappi uses to keep the 1.4kW minimum charge rate going. See MGL in the documentation below for more details.

const result = await myenergi.setZappiGreenLevel(sno, 75);
console.log(result);

Set Zappi boost mode

In ECO and ECO+ you can use the boosts to top up your battery quickly. There are three different boosts available. See Boost Mode in the documentation below for more details.

const result = await myenergi.setZappiBoostMode(sno, ZappiBoostMode.Smart, 22, '0615');
console.log(result);

Get status for all Harvi devices

Return status of all Harvi devices connected to the hub.

const result = await myenergi.getStatusHarviAll();
console.log(result);

Get status of a specific Harvi device

Return status of a Harvi device with the provided serial number.

const sno = '1234567';
const result = await myenergi.getStatusHarvi(sno);
console.log(result);

Get status for all Eddi devices

Return status of all Eddi devices connected to the hub.

const result = await myenergi.getStatusEddiAll();
console.log(result);

Get status of a specific Eddi device

Return status of a Eddi device with the provided serial number.

const sno = '1234567';
const result = await myenergi.getStatusEddi(sno);
console.log(result);

From myenergi documentation

Zappi charge modes.

zappi has four charge modes to help you charge your EV

ModeDescription
FASTCharge your EV as fast as possible – this is just like a dumb charger. As soon as your EV is plugged it it will start charging and draw as much power as it can
ECOIn this mode, zappi will try to control the power going to your EV to match any surplus generation. However, as the EV charging standard says that the minimum charge rate is 1.4kW. If your surplus generation goes below this then the car will continue charging, taking extra power from the grid as needed to get to the 1.4kW minimum charge rateIf you want to charge your car quickly (for instance to top up the battery with cheap overnight electricity) then use one of the boosts to charge it at full power
ECO+Like ECO, zappi will control the power going to your EV to match the surplus generation. However, if the surplus power goes below 1.4kW then zappi will pause the charge so you are not taking power from the grid. ( See MGL below ) If you want to charge your car quickly (for instance to top up the battery with cheap overnight electricity) then use one of the boosts to charge it at full power
STOPIn STOP mode zappi will not charge your car Boosts are also blocked.

Zappi boost modes.

In ECO and ECO+ you can use the boosts to top up your battery quickly. There are three different boosts available | Mode | Description | |------|-------------| | Manual | Charge your EV straight away with a set amount of energy (kWh) Use the slider in the app or touch on the boost power number to set an exact charge energy | | Smart | With Smart Boost you tell zappi how much energy you want to add to your battery and the target time. Zappi will start a quick charge at full power to test the charge speed but then goes back to the normal operation for ECO and ECO+, matching the charge rate to your spare generation. A boost at full power will then take place to top up your battery to the target value by the time set. With Smart Boost your charge will be as green as possible whilst making sure your battery has the desired energy added to it | | Scheduled | With Scheduled Boost you can set up to four time periods when the zappi will charge your EV at full power. This is useful for charging your car when electricity is cheap, but we would recommend you use the “My Flexible Tariff” settings in the myenergi online account (myaccount.myenergi.com) so these are set for you automatically. |

Minimum Green Level (MGL)

Minimum Green Level allows you to decide how much grid power zappi uses to keep the 1.4kW minimum charge rate going. The feature only works in ECO+ and was introduced for those people who want to squeeze as much of their surplus generation into the EV battery.

With MGL set to 100% all the power going to your EV will come from the local generation. If you have less than 1.4kW of local surplus generation available then zappi will pause the charge. Of course this means that you could be exporting some surplus generation to the grid…

With MGL set to 50% then zappi will take up to 700W from the grid to keep the charge going

If you want to make sure that all your surplus generation is used to charge your EV, then try setting MGL to 1%

2.5.0

1 year ago

2.4.1

1 year ago

2.4.2

1 year ago

2.1.2

2 years ago

2.2.0

2 years ago

2.1.4

2 years ago

2.4.0

1 year ago

2.3.1

2 years ago

2.1.3

2 years ago

2.4.0-beta.0

1 year ago

2.1.1

2 years ago

2.1.0

2 years ago

2.0.0

2 years ago

1.1.0

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

0.9.4

2 years ago

0.9.3

2 years ago

0.9.0

2 years ago

0.8.0

2 years ago

0.9.2

2 years ago

0.9.1

2 years ago

0.7.0

2 years ago

0.6.0

2 years ago

0.5.0

2 years ago

0.4.0

2 years ago

0.3.0

2 years ago

0.2.0

2 years ago

0.1.0

2 years ago

0.0.9-0

2 years ago

0.0.8-0

2 years ago

0.0.7-0

2 years ago

0.0.4-0

2 years ago