https://github.com/cityssm/node-green-button-parser
Parse Green Button® formatted energy consumption feeds into JSON.
https://github.com/cityssm/node-green-button-parser
download-my-data energy-consumption energy-usage espi green-button openespi xml-parser
Last synced: 3 months ago
JSON representation
Parse Green Button® formatted energy consumption feeds into JSON.
- Host: GitHub
- URL: https://github.com/cityssm/node-green-button-parser
- Owner: cityssm
- License: mit
- Created: 2023-07-19T14:13:57.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-24T17:58:24.000Z (7 months ago)
- Last Synced: 2025-05-10T20:21:42.088Z (5 months ago)
- Topics: download-my-data, energy-consumption, energy-usage, espi, green-button, openespi, xml-parser
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/@cityssm/green-button-parser
- Size: 2.09 MB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# Green Button® Parser for Node
[](https://www.npmjs.com/package/@cityssm/green-button-parser)
[](https://app.deepsource.com/gh/cityssm/node-green-button-parser/?ref=repository-badge)
[](https://codeclimate.com/github/cityssm/node-green-button-parser/maintainability)
[](https://codecov.io/gh/cityssm/node-green-button-parser)Parse Green Button® formatted energy consumption feeds into JSON.
## Features
- Fully typed output.
- Support for Green Button® XML containing full feeds and single entries.
- Enumerated values translated to meaningful text.
- Helpful functions to link things together.## Important Note
This code is for use with the
[Green Button Download My Data® (DMD) standard](https://www.greenbuttonalliance.org/green-button-download-my-data-dmd),
or with Green Button® formatted XML.💡 If you are looking to subscribe to Green Button® data using the
[Green Button Connect My Data® (CMD) standard](https://www.greenbuttonalliance.org/green-button-connect-my-data-cmd),
see the
[City of Sault Ste. Marie's Green Button® Subscriber](https://github.com/cityssm/node-green-button-subscriber).💡 If you are looking for a full application to report on energy usage,
see [EMILE (Energy Monitoring in Less Effort)](https://github.com/cityssm/EMILE).## Installation
```sh
npm install @cityssm/green-button-parser
```## Usage
```javascript
import { atomToGreenButtonJson } from '@cityssm/green-button-parser'const greenButtonJson = await atomToGreenButtonJson(' ... ')
```## Helpful Links
- [Green Button Alliance](https://www.greenbuttonalliance.org/)
- [XML XSDs](https://github.com/GreenButtonAlliance/OpenESPI-Common-java/tree/master/src/main/resources/schemas)
- [XML Format Documentation by UtilityAPI](https://utilityapi.com/docs/greenbutton/xml)## Trademarks
® GREEN BUTTON is a registered trademark owned by Departments of the U.S. Government.
The City of Sault Ste. Marie is a [Liaison member of the Green Button Alliance](https://www.greenbuttonalliance.org/members/sault-ste-marie).