Parsing P1 serial to Influx DB
Reason this release was yanked:
Semantic Version gone wrong
Project description
p1-influx-db
A python implementation for pushing data to influxDB from a P1 meter
This packages uses the HTTP api from influxDB to store the given data of the P1 meter The package contains a python module named p1_influx_db which requires a path towards the config as input. An example config can be found in the package. This config is a toml which let's the module know what kind of behaviour you want to use. In order to process the DSMR p1 information the config requires a [p1] clause. Depending on the method of transmission either a [influx2] block or a [mqtt] block. Both are valid protocols for transmitting the data. The keys are the given fields that you want to receive data on; these can be changed depending on the type of meter available and the interest in the values.
Getting started
To start the module just use python -m p1_influx_db --config <path_to_config>
For which the following is an example config:
# TOML-based config
[influx2]
url = "http://localhost:8086"
org = "my-org"
token = "my-token"
[mqtt]
broker = "localhost"
port = 433
client_id = "client_id"
ca_certs = "/etc/certificate/abc"
certfile = "/etc/certificate/abc"
key = "etc/certificate/key"
[p1]
device = "/dev/serial0"
[p1.electricity]
keys = ["ELECTRICITY_USED_TARIFF_1",
"ELECTRICITY_USED_TARIFF_2",
"ELECTRICITY_DELIVERED_TARIFF_1",
"ELECTRICITY_DELIVERED_TARIFF_2"]
[p1.electricity_current]
keys = ["CURRENT_ELECTRICITY_USAGE",
"CURRENT_ELECTRICITY_DELIVERY",
"INSTANTANEOUS_ACTIVE_POWER_L1_POSITIVE",
"INSTANTANEOUS_ACTIVE_POWER_L2_POSITIVE",
"INSTANTANEOUS_ACTIVE_POWER_L3_POSITIVE",
"INSTANTANEOUS_ACTIVE_POWER_L1_NEGATIVE",
"INSTANTANEOUS_ACTIVE_POWER_L2_NEGATIVE",
"INSTANTANEOUS_ACTIVE_POWER_L3_NEGATIVE"]
[p1.voltage]
keys = ["INSTANTANEOUS_VOLTAGE_L1",
"INSTANTANEOUS_VOLTAGE_L2",
"INSTANTANEOUS_VOLTAGE_L3"]
[p1.current]
keys = ["INSTANTANEOUS_CURRENT_L1",
"INSTANTANEOUS_CURRENT_L2",
"INSTANTANEOUS_CURRENT_L3"]
[p1.gas]
keys = ["HOURLY_GAS_METER_READING"]
Instalation
The package has multiple modes of installation namely full, influxdb or mqtt. In other to save space it is advised to use the extra install fields just for the protocol required so either.
pip install p1-influx-db[mqtt] or pip install p1-influx-db[influxdb]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file p1_influx_db-1.5.2.tar.gz.
File metadata
- Download URL: p1_influx_db-1.5.2.tar.gz
- Upload date:
- Size: 17.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
35f0b42b5fa037d8a7bbfb94a6a1e0d016e62516929d24a7781a663013b43d51
|
|
| MD5 |
8c0ae6a4770f4b62983a6f41ce4dd4d6
|
|
| BLAKE2b-256 |
3931d7c544544e5f18c54da785dd14da53b909ae1d90f7bd6c430499c3aa30d5
|
File details
Details for the file p1_influx_db-1.5.2-py3-none-any.whl.
File metadata
- Download URL: p1_influx_db-1.5.2-py3-none-any.whl
- Upload date:
- Size: 20.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d988e0a5c6c809e7dab40e03eea086c904b9253cf15881c9e3f86d94a13ec56f
|
|
| MD5 |
372281c33934ac7a2c3b4e67634c39e6
|
|
| BLAKE2b-256 |
e63e93fdcae83b103fd95dc79fbd01e34a75afc43f0aebdabc4745792d9aba79
|