Skip to main content

omnik-data-logger

This is a Python3 based PV data logger with plugin support, specifically build for the Omniksol-5k-TL2. This datalogger uses the omnikportal to fetch data pushed by the inverter. I tried using the inverter directly, but the firmware is very buggy: it either spontanious reboots, hangs or returns seemingly random data.

Installation

Install using the following command:

$ pip install omnik-data-logger

Help

usage: omnik-logger [-h] [--config FILE] [--every EVERY] [-d]

optional arguments:
  -h, --help     show this help message and exit
  --config FILE  path to configuration file
  --every EVERY  execute every n seconds
  -d, --debug    debug mode

Configuration

Example configuration

This data logger needs a configuration file. By default, it look for a config file called ~/.omnik/config.ini. You can override this path by using the --config parameter.

[default]
timezone = Europe/Amsterdam

[omnikportal]
username = john.doe@example.com
password = S3cret!

[plugins]
output=pvoutput

[pvoutput]
api_key = <YOUR API KEY>
sys_id = <YOUR SYSTEM ID>
use_temperature = true

[openweathermap]
api_key = <YOUR API KEY>
endpoint = api.openweathermap.org
lon = 4.2232362
lat = 51.8819023
units = metric

PS: openweathermap is currently only used when use_temperature = true.

Manual Run

Just run omnik-logger ... that's it ... for now.

Scheduled Run

You've got your default options to schedule this logger, but I included a systemd service file to run this as a service on Linux.

PS: I'm using Ubuntu 18.04 LTS

First, install this thing (~ using Python 3 !!!)

If you don't have Python3.x installed, do that first (~ don't forget to install python3-pip as well)

$ pip3 install omnik-data-logger

# check if properly installed
$ omnik-logger -h
usage: omnik-logger [-h] [--config FILE] [--every EVERY] [-d]

optional arguments:
  -h, --help     show this help message and exit
  --config FILE  Path to configuration file
  --every EVERY  Execute every n seconds
  -d, --debug    Debug mode

Copy scripts/omnik-data-logger.service to /lib/systemd/system/omnik-data-logger.service

Next, enable and start service:

$ systemd enable omnik-data-logger
Created symlink /etc/systemd/system/multi-user.target.wants/omnik-data-logger.service → /lib/systemd/system/omnik-data-logger.service.
$ systemd start omnik-data-logger

Check if omnik-data-logger.service is running correctly:

$ systemd status omnik-data-logger
● omnik-data-logger.service - Omnik Data Logger service
   Loaded: loaded (/lib/systemd/system/omnik-data-logger.service; enabled; vendor preset: enabled)
   Active: active (running) since Tue 2019-06-18 06:55:08 UTC; 4min 36s ago
 Main PID: 2445 (python3)
    Tasks: 2 (limit: 4915)
   CGroup: /system.slice/omnik-data-logger.service
           └─2445 /usr/bin/python3 /usr/local/bin/omnik-logger --config /etc/omnik/config.ini --every 300

Plugins

Working on a couple of plugins to customize processing of the omnik-portal data:

  • pvoutput ~ write data to PVOutput
  • influxdb ~ write data to a InfluxDB time series database (WORK IN PROGRESS)
  • ...

BONUS: Docker

Instructions on how to use the omnik-data-logger with Docker can be found here

~ the end

Metadata

Release files for omnik-data-logger 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for omnik-data-logger 1.0.0
File Size Uploaded Provenance Actions
omnik-data-logger-1.0.0.tar.gz 6.8 kB Without provenance Details for omnik-data-logger-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for omnik-data-logger 1.0.0
File Interpreter ABI Platform Actions
omnik_data_logger-1.0.0-py3.7.egg Legacy Egg format - - Details for omnik_data_logger-1.0.0-py3.7.egg

Total release size: 21.6 kB

Release files / omnik-data-logger-1.0.0.tar.gz

Download URL omnik-data-logger-1.0.0.tar.gz
Size 6.8 kB
Tags Source
SHA-256 checksum
How to use checksums
c4f80b680a9ec5802bd9f2ea10097f192d24c2fff9a9a7b341518286cf66694e
BLAKE2b-256 checksum
How to use checksums
ef302d940f6c19a2b7605726e2eddc8fa16f1dad1b13ec805146a7ec6b3dd67a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.5

Release files / omnik_data_logger-1.0.0-py3.7.egg

Download URL omnik_data_logger-1.0.0-py3.7.egg
Size 14.7 kB
Tags Egg
SHA-256 checksum
How to use checksums
759fc6b7da41336b7d11565dd0efb25f22a6d9b6e5c8e3784a807b6646782c11
BLAKE2b-256 checksum
How to use checksums
35ddca590186217d66f33014e4b6d1ff76fed198c54e37f9a814d20a58187b15
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.5

Security for omnik-data-logger 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page