prometheus-givenergy


Nameprometheus-givenergy JSON
Version 1.0.3 PyPI version JSON
download
home_page
Summaryprometheus exporter for GivEnergy inverter metrics.
upload_time2023-12-12 14:38:15
maintainer
docs_urlNone
author
requires_python>=3.10
licenseApache-2.0
keywords development
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # prometheus-givenergy
prometheus exporter for GivEnergy inverter metrics

prometheus-givenergy is inspired by givenergy-modbus module.
givenergy-modbus does not work with current version of pymodbus.

```
Usage: prometheus_givenergy <host> [--port=<port>] [--prom-file=<prom-file> [--version]
    <host> ip-address or hostname
    <port> default 8899
    <prom-file> default /var/lib/prometheus/node-exporter/givenergy.prom
```

All holding metrics are prefixed with `givenergy_holding_`.
And all input metrics are prefixed with `givenergy_`.
The unit type of the metric is used to add a suffix.

| Unit | Suffix | Example |
|:-----|:-------|:--------|
| Scaler value | no suffix | givenergy_battery_num_cycles |
| kilo Watt Hours | _kwh | givenergy_grid_in_total_kwh |
| Watts | _w | givenergy_load_demand_w |
| VA | _va | givenergy_grid_apparent_va |
| Voltage | _volts | givenergy_holding_ac_high_in_volts |
| Current | _amps | givenergy_grid_port_amps |
| Amp Hours | _ah | givenergy_holding_battery_nominal_capacity_ah |
| Temperature C | _temp_c | givenergy_battery_temp_c |
| Frequency Hz | _hz | givenergy_ac1_hz |

## Installing on Fedora

 1. Install and configure Prometheus and Grafana
 1. sudo dnf copr enable barryascott/tools
 1. sudo dnf install python3-prometheus-givenergy

Use systemd service and timer units to run the command periodically
(or cron if you prefer).

Timer unit: `/etc/systemd/system/givenergy.timer`
```
[Unit]
Description=givenergy.timer

[Timer]
OnBootSec=60 seconds
OnUnitInactiveSec=30 seconds

[Install]
WantedBy=multi-user.target
```

Service unit: `/etc/systemd/system/givenergy.service`
```
[Unit]
Description=givenergy.service

[Service]
User=prometheus

Type=oneshot
TimeoutStartSec=0

ExecStartPre=/usr/bin/id
ExecStart=/usr/bin/prometheus-givenergy hf-a21.chelsea.private

[Install]
WantedBy=multi-user.target
```

Once the systemd unit files are in place:

 1. sudo systemctl daemon-reload
 1. sudo systemctl enable --now givenergy.timer

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "prometheus-givenergy",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": "",
    "keywords": "development",
    "author": "",
    "author_email": "Barry Scott <barry@barrys-emacs.org>",
    "download_url": "https://files.pythonhosted.org/packages/12/48/4a9f8ca339979e64da9a5a0f7d77b2aaea0b231a034c28f5fae4cc0ffbd4/prometheus-givenergy-1.0.3.tar.gz",
    "platform": null,
    "description": "# prometheus-givenergy\nprometheus exporter for GivEnergy inverter metrics\n\nprometheus-givenergy is inspired by givenergy-modbus module.\ngivenergy-modbus does not work with current version of pymodbus.\n\n```\nUsage: prometheus_givenergy <host> [--port=<port>] [--prom-file=<prom-file> [--version]\n    <host> ip-address or hostname\n    <port> default 8899\n    <prom-file> default /var/lib/prometheus/node-exporter/givenergy.prom\n```\n\nAll holding metrics are prefixed with `givenergy_holding_`.\nAnd all input metrics are prefixed with `givenergy_`.\nThe unit type of the metric is used to add a suffix.\n\n| Unit | Suffix | Example |\n|:-----|:-------|:--------|\n| Scaler value | no suffix | givenergy_battery_num_cycles |\n| kilo Watt Hours | _kwh | givenergy_grid_in_total_kwh |\n| Watts | _w | givenergy_load_demand_w |\n| VA | _va | givenergy_grid_apparent_va |\n| Voltage | _volts | givenergy_holding_ac_high_in_volts |\n| Current | _amps | givenergy_grid_port_amps |\n| Amp Hours | _ah | givenergy_holding_battery_nominal_capacity_ah |\n| Temperature C | _temp_c | givenergy_battery_temp_c |\n| Frequency Hz | _hz | givenergy_ac1_hz |\n\n## Installing on Fedora\n\n 1. Install and configure Prometheus and Grafana\n 1. sudo dnf copr enable barryascott/tools\n 1. sudo dnf install python3-prometheus-givenergy\n\nUse systemd service and timer units to run the command periodically\n(or cron if you prefer).\n\nTimer unit: `/etc/systemd/system/givenergy.timer`\n```\n[Unit]\nDescription=givenergy.timer\n\n[Timer]\nOnBootSec=60 seconds\nOnUnitInactiveSec=30 seconds\n\n[Install]\nWantedBy=multi-user.target\n```\n\nService unit: `/etc/systemd/system/givenergy.service`\n```\n[Unit]\nDescription=givenergy.service\n\n[Service]\nUser=prometheus\n\nType=oneshot\nTimeoutStartSec=0\n\nExecStartPre=/usr/bin/id\nExecStart=/usr/bin/prometheus-givenergy hf-a21.chelsea.private\n\n[Install]\nWantedBy=multi-user.target\n```\n\nOnce the systemd unit files are in place:\n\n 1. sudo systemctl daemon-reload\n 1. sudo systemctl enable --now givenergy.timer\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "prometheus exporter for GivEnergy inverter metrics.",
    "version": "1.0.3",
    "project_urls": {
        "Bug Tracker": "https://github.com/barry-scott/prometheus_givenergy/issues",
        "Homepage": "https://github.com/barry-scott/prometheus_givenergy"
    },
    "split_keywords": [
        "development"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3dc75890cdf51baecc0cdcdfb93fcb27d5f2a77909afaccb506de528ed39cb1c",
                "md5": "73b22d5b99ab729f6aceb5c30cf41c0c",
                "sha256": "34112a10abcf00e5577d2c6a1af0373980dc5a7c4408aae4aa1056bfeeed389c"
            },
            "downloads": -1,
            "filename": "prometheus_givenergy-1.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "73b22d5b99ab729f6aceb5c30cf41c0c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 17454,
            "upload_time": "2023-12-12T14:38:14",
            "upload_time_iso_8601": "2023-12-12T14:38:14.211848Z",
            "url": "https://files.pythonhosted.org/packages/3d/c7/5890cdf51baecc0cdcdfb93fcb27d5f2a77909afaccb506de528ed39cb1c/prometheus_givenergy-1.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "12484a9f8ca339979e64da9a5a0f7d77b2aaea0b231a034c28f5fae4cc0ffbd4",
                "md5": "77da99b0185135fb40eb0d2d40cb927d",
                "sha256": "c333ea0c7a2913459d4e2fc6a1289df9c2b27e6f44baea931ad74eb89d2b7c9b"
            },
            "downloads": -1,
            "filename": "prometheus-givenergy-1.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "77da99b0185135fb40eb0d2d40cb927d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 20580,
            "upload_time": "2023-12-12T14:38:15",
            "upload_time_iso_8601": "2023-12-12T14:38:15.547041Z",
            "url": "https://files.pythonhosted.org/packages/12/48/4a9f8ca339979e64da9a5a0f7d77b2aaea0b231a034c28f5fae4cc0ffbd4/prometheus-givenergy-1.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-12 14:38:15",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "barry-scott",
    "github_project": "prometheus_givenergy",
    "github_not_found": true,
    "lcname": "prometheus-givenergy"
}
        
Elapsed time: 0.59698s