PHPackages                             mapsight/pulp-datex-energy - 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. mapsight/pulp-datex-energy

ActiveLibrary

mapsight/pulp-datex-energy
==========================

AFIR DATEX II energy-infrastructure helpers for Pulp pipelines.

v1.0.0(today)03↑2900%MITPHPPHP ^8.2

Since Aug 28Pushed todayCompare

[ Source](https://github.com/open-mapsight/pulp-datex-energy)[ Packagist](https://packagist.org/packages/mapsight/pulp-datex-energy)[ Docs](https://github.com/open-mapsight/mapsight-pulp)[ RSS](/packages/mapsight-pulp-datex-energy/feed)WikiDiscussions main Synced today

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

Pulp DATEX Energy
=================

[](#pulp-datex-energy)

AFIR DATEX II v3 energy-infrastructure helpers for Pulp pipelines. Two layers: Mobilithek source defaults, then presentation-neutral JSON → GeoJSON.

Features
--------

[](#features)

- **Mobilithek src helper:** Configures `Pulp::srcHttp` with the default subscription URL, `Accept-Encoding: gzip`, and P12 client-cert curl options. Certificate path, password, and subscription ID stay caller-supplied.
- **Static table → GeoJSON:** One point feature per `energyInfrastructureSite`from `aegiEnergyInfrastructureTablePublication`.
- **Status records:** EVSE records from `aegiEnergyInfrastructureStatusPublication`(`available`, `charging`, `occupied`, `reserved`, `outOfOrder`, `inoperative`, …).
- **Bounding box filtering:** Limits sites to `[minLon, minLat, maxLon, maxLat]`.
- **Presentation-neutral output:** Source and data properties only. Applications add icons, HTML descriptions, and localized labels afterwards.

Installation
------------

[](#installation)

```
composer require mapsight/pulp-datex-energy
```

This package depends on `mapsight/pulp`.

Fetch a subscription
--------------------

[](#fetch-a-subscription)

```
use OpenMapsight\Pulp;
use OpenMapsight\PulpCache;
use OpenMapsight\PulpDatexEnergy;
use OpenMapsight\PulpJSON;

$source = Pulp::start()
    ->pipe(PulpDatexEnergy::srcMobilithek(
        $subscriptionId,
        $certPath,
        $certPassword,
        $ifModifiedSince,
    ));

$files = Pulp::start()
    ->pipe(PulpCache::remember($source, __DIR__ . '/cache', [
        'key' => 'datex-energy-static',
        'ttl' => 86400,
        'fallbackToStale' => true,
    ]))
    ->pipe(PulpJSON::decodeJSON())
    ->pipe(PulpDatexEnergy::sitesGeoJson(
        [10.42, 52.18, 10.65, 52.36],
        'https://example.com/open-data-docs',
        'DATEX Energy',
        'https://example.com/open-data-docs',
        'https://example.com/open-data-docs',
    ))
    ->run();
```

`Pulp::srcHttp` still loads the full response body as a string. That OOMs on the ~103 MB nationwide static table. A disk sink belongs in core pulp, not this package.

Sites GeoJSON
-------------

[](#sites-geojson)

```
use OpenMapsight\Pulp;
use OpenMapsight\PulpDatexEnergy;
use OpenMapsight\PulpJSON;

Pulp::start()
    ->pipe(Pulp::src('table.json', __DIR__ . '/input'))
    ->pipe(PulpJSON::decodeJSON())
    ->pipe(PulpDatexEnergy::sitesGeoJson(
        [10.42, 52.18, 10.65, 52.36],
        'https://example.com/open-data-docs',
    ))
    ->pipe(PulpJSON::encodeJSON(JSON_PRETTY_PRINT))
    ->pipe(Pulp::dest(__DIR__ . '/result'))
    ->run();
```

The handler also accepts a raw JSON string. Prefer a `preferredLang` option when DATEX `values` include more than one language; otherwise the first non-empty value is used.

```
PulpDatexEnergy::sitesGeoJson($bbox, $sourceUrl, options: [
    'preferredLang' => 'en',
])
```

Status records
--------------

[](#status-records)

```
$points = PulpDatexEnergy::extractPointStatuses($publication);
$cache = PulpDatexEnergy::applyPacketToCache($cache, $points, $packetType, $lastModified);
$merged = PulpDatexEnergy::mergeStatusIntoFeatureCollection($featureCollection, $cache['points']);
```

Or in a pipeline:

```
Pulp::start()
    ->pipe(Pulp::src('status.json', __DIR__ . '/input'))
    ->pipe(PulpDatexEnergy::statusRecords())
    ->run();
```

A `SNAPSHOT` packet replaces the EVSE cache. A `DELTA` packet upserts by EVSE ID.

Site properties
---------------

[](#site-properties)

Site features include:

- `siteId`
- `name`
- `operator`
- `addressLine`, `postcode`, `city`, `countryCode`
- `evseIds`
- `chargingPoints` (`evseId`, `stationId`, `watts`, `currentType`, `connectorTypes`)
- `connectorTypes` (DATEX codes such as `iec62196T2`, `iec62196T2COMBO`)
- `currentTypes` (`ac`, `dc`)
- `maxPowerWatts`
- `lastUpdated`
- `source`, `sourceUrl`

After a status merge, matched features also include:

- `chargingAvailability`: `available`, `partial`, `occupied`, `inoperative`, or `unknown`
- `chargingAvailablePoints`
- `chargingObservedPoints`
- `chargingStatuses`
- `chargingUpdatedAt`
- `evseStatuses`

Notes
-----

[](#notes)

- Do not put a `.p12` or city-specific subscription IDs in this package.
- Keep German copy, Mapsight icons, and CSV spatial merge in the consuming city job.
- `srcMobilithek()` only configures `Pulp::srcHttp`. Cache with `PulpCache::remember`.

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance100

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50% 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

Unknown

Total

1

Last Release

0d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/684458?v=4)[Paul Golmann](/maintainers/pjeweb)[@pjeweb](https://github.com/pjeweb)

---

Top Contributors

[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")[![pjeweb](https://avatars.githubusercontent.com/u/684458?v=4)](https://github.com/pjeweb "pjeweb (1 commits)")

---

Tags

energyChargingmapsightpulpdatexafir

### Embed Badge

![Health badge](/badges/mapsight-pulp-datex-energy/health.svg)

```
[![Health](https://phpackages.com/badges/mapsight-pulp-datex-energy/health.svg)](https://phpackages.com/packages/mapsight-pulp-datex-energy)
```

PHPackages © 2026

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