Skip to content

Latest commit

 

History

History
67 lines (48 loc) · 2.99 KB

README.md

File metadata and controls

67 lines (48 loc) · 2.99 KB

Home Assistant Omnik Inverter

The Omnik Inverter Sensor component will retrieve data from an Omnik inverter connected to your local network. It has been tested and developed on an Omnik 4K TL2 and it might work for other inverters as well.

The values will be presented as sensors in Home Assistant.

Requirements

Your Omnik Inverter needs to be connected to your local network, as this custom component will utilise the web interface of the Omnik inverter to read data. All you need to know is the IP address of the Omnik inverter and you are good to go.

HACS installation

Add this component using HACS by adding this repository as a custom repository in your settings.

Manual installation

Create a directory called omnik_inverter in the <config directory>/custom_components/ directory on your Home Assistant instance. Install this component by copying all files in /custom_components/omnik_inverter/ folder from this repo into the new <config directory>/custom_components/omnik_inverter/ directory you just created.

This is how your custom_components directory should be:

custom_components
├── omnik_inverter
│   ├── __init__.py
│   ├── manifest.json
│   └── sensor.py

Configuration example

To enable this sensor, add the following lines to your configuration.yaml file:

sensor:
  - platform: omnik_inverter
    host: 192.168.100.100

How does it work?

The web interface has a javascript file that contains the actual values. This is updated every minute (afaik). Check it out in your browser at http://<your omnik ip address>/js/status.js

The result contains a lot of information, but there is one part we're interested in:

// ... Bunch of data
var webData="NLBN1234567A1234,iv4-V6.5-140-4,V5.2-42819,omnik4000tl2,4000,1920,429,87419,,3,";
// Or for some inverters:
var myDeviceArray=new Array(); myDeviceArray[0]="AANN3020,V5.04Build230,V4.13Build253,Omnik3000tl,3000,1313,685,9429,,1,";
// ... Even more data

This variable declaration contains your serial number, firmware versions, hardware information, the current power output: 1920, the energy generated today: 429 and the total energy generated: 87419.

This custom component basically requests the URL, looks for the webData part and extracts the values as the following sensors:

  • sensor.solar_power_current (Watt)
  • sensor.solar_power_today (kWh)
  • sensor.solar_power_total (kWh)

Note: I ran into the problem that my Omnik inverter resets the solar_power_today to 0.0 after 21:00. This component therefor caches the value and only resets to 0.0 after midnight.

References