Docker support for Omnik data logger

Omnik data logger now also can be installed in docker container. This makes it easy to integrate in a docker based environment. This is an alternative to using AppDaemon with HACS.

Install the docker image

Use the command docker pull jbouwh/omnikdatalogger to pull the latest image.

To build image your self from git:

git clone https://github.com/jbouwh/omnikdatalogger
cd omnikdatalogger/
docker build --tag jbouwh/omnikdatalogger:latest .

Running the docker image

In the folowing example assumed is that the config file outside the container is at /home/pi/.omnik/config.yaml (user pi). In the docker image the user is omnik and the default location for the configuration inside the container is at /config/config.yaml

The -p option is only needed when the localproxy client is used with the tcp_proxy plugin.

Use --device option to give direct access to a DSMR compliant USB monitoring cable. Alternatively use ser2net.

Run image in the background using the following command:

docker run -d -v /home/pi/.omnik/config.yaml:/config/config.yaml -p 10004:10004 --device /dev/ttyUSB0 --name omnikdatalogger jbouwh/omnikdatalogger:latest

Omnik data logger DSMR P1 support

With the new brand new release of Omnik data logger I have included support for the Dutch Smart Meter Requirements compliant Electricity meter. With a simple FTDI P1 to USB serial adapter Omnik datalogger now also publish your smart meter data including gas. With PVoutput this means we can also upload the consumed energy and calculate the netto energy used/delivered.

The P1 adapter can be either connected directly to your device or using TCP. I used ser2net to be able to connect multiple sessions to my P1 meter. To make this possible you will need at least ser2net v3.5. I have used a docker container installing ser2net (jsurf/rpi-ser2net:buster). Adding the max-connections option will enable me to do some debugging and in the mean will logging my data.

3333:raw:600:/dev/ttyUSB0:115200 NONE 1STOPBIT 8DATABITS -XONXOFF RTSCTS max-connections=3

/etc/ser2net.conf

If you publish your smart meter to Home Assistant this can replace the native dsmr integration include with Home Assistant. Over MQTT auto discovery Home Assistant will discover automatically. In the config file you can rename the entities for your smart meter. Addition direct use, direct consumption and the real calculated consumption data will be published over MQTT and InfluxDB.

HACS Default

Omnik data logger now has been added to the default store. This means there is no need to add a custom repository any more. You can find Omnik data logger at the Automation section.

Make sure you have installed the AppDaemon Add-on from the official Home Assistant Add-on store.

TCPclient tested and working now

Thanks to Han Lubach the tcpclient could be tested and corrected. It seems this client, based on Wouter van der Zwan’s logger is now usable with Omnik data logger as well.

Omnik data logger news update

PIP support for omnikdatalogger and omnikdatalogerproxy

Omnikdatalogger can now be installed using PIP:

sudo pip3 install omnikdatalogger

To install only omnikdataloggerproxy use sudo pip3 install omnikdataloggerproxy

HACS default support

Omnikdatalogger could be installed as a custom repository within HACS. A request to include Omnik data logger in the default repository was requested and approved.

Caching automation application for Home Assistant

When automating with Home Assistant, you can use elements like:

They can be set through the config at be set to initial values. The current state will be reset to the initial value. You can use ha-entity-cache to recover to the last value set. Be aware that Home Assistant already restores certain values at restart.

If you have other properties or attributes you want to make persistent, then have a look at this project.

P.s. when you do not supply an initial value, Home assistant will recover state as well.

See my project that enables caching the state and attributes of custom controls within Home Assistant.

https://github.com/jbouwh/ha-entity-cache

Outage omnik portal

The last few days, the omnik portal and app and API have been unavailabe. So the data loggging is not possible at the moment. I have found out Omnik dataloggers log to the database of SolarmanPV. It seems you can still see your live output and history.

The URL is https://www.solarmanpv.com/portal/LoginPage.aspx and you can use your omnik portal credentials. I am working to get the API working so the software can be updated. Unfortunally there is only a working unsecure API interface. There is a secure alternative, but an API-key is needed for that. I am working on this.

Have some patience, I will come with a working update coming days.

Regards,

Jan

omnik-data-logger

https://github.com/jbouwh/omnikdatalogger

Some time ago I found this https://github.com/paprins/omnik-data-logger/ at github. A python based project to read out the statistics from https://www.omnikportal.com/. I own an inverter of Omnik (Omniksol-3.0-TL) and was installed october 2012. Pascal Prins, the author implemented a plugin based logger with a working example for pvoutput.org.

Issue fixed

Pascals code had some issues, and I decided to report them. In de mean wile I went on with a clone copy of the project, fixed some issues and optimized the code.

AppDaemon and Home Assistant integration with MQTT

I wrote an additional plugin (mqtt) to enable an easy integration with Home Assistant or any other MQTT based home automation solution.

The AppDaemon integration further enables updating the config without the need to restart.

New version at github

After integration with AppDaemon I ended up with an alternative that can be configured with AppDaemon through apps.yaml. The logging was adapted so it supports the AppDaemon logging system. When using the command line native logging is used.

I submitted the new code to github and did a pull request.

See: https://github.com/jbouwh/omnikdatalogger

Using MQTT Auto discovery logging now can be easily integrated with Home Assistant.