PHPackages                             tvup/ewiiapi - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. tvup/ewiiapi

AbandonedArchivedLibrary[API Development](/categories/api)

tvup/ewiiapi
============

API for getting consumption data as an Ewii customer

v2.1.1(3y ago)01.3kMITPHPPHP &gt;=7.1

Since Sep 9Pushed 3y ago2 watchersCompare

[ Source](https://github.com/Tvup/ewiiapi)[ Packagist](https://packagist.org/packages/tvup/ewiiapi)[ RSS](/packages/tvup-ewiiapi/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (25)Used By (0)

ewiiapi
=======

[](#ewiiapi)

This repository contains PHP library code to facilitate communication with Ewii Api's. It is intended to be loaded into another PHP application as a composer package through packagist. The API exposes functions for login and for getting consumption data and the requests neccesary in between.

**Use at own risk**

Prerequisites
-------------

[](#prerequisites)

Requires an account at  with the possibility to login with E-mail and password.

### If you are an existing customer but doesn't have the setup with login using e-mail and password, follow these steps:

[](#if-you-are-an-existing-customer-but-doesnt-have-the-setup-with-login-using-e-mail-and-password-follow-these-steps)

- Login as normal (nem-id)
- In upper right corner click "Min profil" (My profile)
- Choose "Mine oplysninger" (My information)
- Find the card "Tildel andre adgang" (Grant access to others) and click "Tildel adgang" (Grant access)
- Follow the steps to setup an account which can access your consumption data. I don't know if it will break anything if you choose an email-adress which Ewii already has - probably choose another email than your primary or use the "google dot"-trick if you're familiary with that.

This should set you up with a secondary login using email and password.

Installation with composer
--------------------------

[](#installation-with-composer)

```
composer require tvup/ewiiapi

```

Work-flow of the api
--------------------

[](#work-flow-of-the-api)

Obviously you will need to make a call through the api to login. This will set a cookie which is used to authenticate you during all other requests.

The flow has these steps:

1. Login
2. Get "AddressPickerViewModel" - a list of your addresses - probably only has one if you don't have products at multiple addresses

- For each address is a list of installations. Again probably only one, but there shouldn't be much imagination to imagine that you could electricity and internet broadband or multiple electricity installations each with their own meter.
    - Pick "the one"

3. Set "the one" with call to "setSelectedAddressPickerElement" - somehow this seems mandatory else the next request will fail `¯\_(ツ)_/¯`
4. Get metadata for the meter
5. Use some of the metadat to get the consumption data

### Example code

[](#example-code)

```
require_once 'vendor/autoload.php';

$ewiiApi = new Tvup\EwiiApi\EwiiApi();
//$ewiiApi->setDebug(true);

//1
$ewiiApi->login('AN_EMAIL_ADDRESS','A_PASSWORD');

//2
$addressElement = $ewiiApi->getAddressPickerViewModel();

//3
$ewiiApi->setSelectedAddressPickerElement($addressElement);

//4
$consumptionMeterMetaData = $ewiiApi->getConsumptionMeters();

//5
$response = $ewiiApi->getConsumptionData('csv', $consumptionMeterMetaData);

print_r($response);

```

Cookies and login
-----------------

[](#cookies-and-login)

The api is handling the cookies from Ewii and saves them to disk. If a cookie is present at disk, it will be used and login will not be called even though you hit the method `public function login(string $email, string $password): void`Please remember, that this api wasn't created for you to make tons of requests to Ewii's services and drawing attention.

Feedback
--------

[](#feedback)

Always welcome. This project was created because I was curious if it was possible, and I tend to lose interest when the goal has been accomplished. You wan't something differently - you can make a pull-request we can share a bit of each other's understanding.

Appreciate it?
--------------

[](#appreciate-it)

Great. Glad I could help.

### I want to make a donation as a sign of appreciation

[](#i-want-to-make-a-donation-as-a-sign-of-appreciation)

Don't

#### I insist

[](#i-insist)

It will probably be spent on beer:

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~3 days

Recently: every ~9 days

Total

24

Last Release

1331d ago

Major Versions

v1.0.31 → v2.0.12022-10-31

### Community

Maintainers

![](https://www.gravatar.com/avatar/bf815233f76ab55016ae90a8972b73dad594f73fa5f791d4c9cba6c4e94797bb?d=identicon)[tvupper](/maintainers/tvupper)

---

Top Contributors

[![tvup](https://avatars.githubusercontent.com/u/4526352?v=4)](https://github.com/tvup "tvup (52 commits)")

### Embed Badge

![Health badge](/badges/tvup-ewiiapi/health.svg)

```
[![Health](https://phpackages.com/badges/tvup-ewiiapi/health.svg)](https://phpackages.com/packages/tvup-ewiiapi)
```

###  Alternatives

[statamic/cms

The Statamic CMS Core Package

4.8k3.6M991](/packages/statamic-cms)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M46](/packages/tencentcloud-tencentcloud-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k39](/packages/neuron-core-neuron-ai)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

273.0k](/packages/eslazarev-wildberries-sdk)[avalara/avataxclient

Client library for Avalara's AvaTax suite of business tax calculation and processing services. Uses the REST v2 API.

528.5M7](/packages/avalara-avataxclient)[files.com/files-php-sdk

Files.com PHP SDK

2481.1k](/packages/filescom-files-php-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
