Skip to content

Commit

Permalink
Merge pull request #43 from robbinjanssen/robbinjanssen/update-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
robbinjanssen authored Sep 13, 2021
2 parents 0b69e20 + a6147a3 commit 868fb1f
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 78 deletions.
87 changes: 26 additions & 61 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
[![hacs_badge](https://img.shields.io/badge/HACS-Default-orange.svg?style=for-the-badge)](https://github.com/custom-components/hacs)

# Omnik Inverter Sensor Component for Home Assistant
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, 2k TL2 and it might work for other inverters as well.
# Omnik Inverter Sensor for Home Assistant
The Omnik Inverter Sensor component will scrape data from an Omnik inverter connected to your local network.
It has been tested and developed on the following inverters:

The values will be presented as sensors in [Home Assistant](https://home-assistant.io/).
## Supported models
- Omnik1000TL
- Omnik1500TL
- Omnik2000TL
- Omnik2000TL2
- Omnik4000TL2
- Ginlong stick (JSON)

After installation you can add the sensors through the integration page. The values will be presented as sensors in [Home Assistant](https://home-assistant.io/).

## Requirements

Expand All @@ -23,40 +31,17 @@ This is how your custom_components directory should be:
```bash
custom_components
├── omnik_inverter
│ ├── translations
│ │ ├── en.json
│ │ └── nl.json
│ ├── __init__.py
│ ├── config_flow.py
│ ├── const.py
│ ├── manifest.json
│ └── sensor.py
```

## Configuration example

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

``` YAML
sensor:
- platform: omnik_inverter
host: 192.168.100.100
```
By default caching the power today value is enabled, you can disable it using the `cache_power_today` configuration attribute. Check "How does it work?" when/why you might need to disable it.

``` YAML
sensor:
- platform: omnik_inverter
host: 192.168.100.100
cache_power_today: false
│ ├── sensor.py
│ └── strings.json
```

Most inverters update the JS or JSON every 5 minutes. You increase or decrease this scan interval by setting the `scan_interval` config variable to the number of seconds you want.
The default is set to 300 seconds (5 minutes).

``` YAML
sensor:
- platform: omnik_inverter
host: 192.168.100.100
scan_interval: 900
```

## How does it work?

Expand All @@ -72,14 +57,11 @@ var myDeviceArray=new Array(); myDeviceArray[0]="AANN3020,V5.04Build230,V4.13Bui
// ... Even more data
```

This output 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 output contains your serial number, firmware versions, hardware information, the
current power output: 1920, the energy (kWh) generated today: 429 and the total energy (kWh) generated: 87419.

The 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)
The component basically requests the URL, looks for the _webData_ part and extracts the
values as sensors.

### My inverter doesn't show any output when I go to the URL.

Expand All @@ -90,29 +72,12 @@ inverter outputs JSON data by navigating to: `http://<your omnik ip address>/sta

If so, then use the `use_json` config boolean to make the component use the URL above.

``` YAML
sensor:
- platform: omnik_inverter
host: 192.168.100.100
use_json: true
```

### Caching "power today".

In a few cases the Omnik inverter resets the `solar_power_today` to 0.0 after for example 21:00. By
setting the `cache_power_today` config attribute to `true` (default) this component will cache the
value and only resets to 0.0 after midnight. If you do not experience this, then disable the
cache by setting the config variable to `false`.

``` YAML
sensor:
- platform: omnik_inverter
host: 192.168.100.100
cache_power_today: false
```
### Thanks
Special thank you to [@klaasnicolaas](https://github.com/klaasnicolaas) for taking this component to the next level 🚀 and [@relout](https://github.com/relout) for testing :-)

## References

- https://community.home-assistant.io/t/omink-inverter-in-home-assistant/102455/36
- https://github.com/heinoldenhuis/home_assistant_omnik_solar (This uses omnikportal.com to get data for your inverter, check it out!)
- https://github.com/sincze/Domoticz-Omnik-Local-Web-Plugin
- https://github.com/klaasnicolaas/python-omnikinverter
Binary file added images/all_entities.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed images/entities.png
Binary file not shown.
19 changes: 2 additions & 17 deletions info.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,9 @@
The Omnik solar sensor component will retrieve data from an Omnik solar inverter.
The values will be presented as sensors (or attributes of sensors) in Home Assistant.

## Configuration

``` YAML
sensor:
- platform: omnik_inverter
host: 192.168.100.100
```
### Entities
- `sensor.solar_power_current` (Watt)
- `sensor.solar_power_today` (kWh)
- `sensor.solar_power_total` (kWh)
Find the full documentation [here](https://github.com/robbinjanssen/home-assistant-omnik-inverter).

### Example

![Omnik Inverter Sensor Entities](https://github.com/robbinjanssen/home-assistant-omnik-inverter/blob/master/images/entities.png)

### Documentation
![Omnik Inverter Sensor Entities](https://github.com/robbinjanssen/home-assistant-omnik-inverter/blob/master/images/all_entities.png)

Find the full documentation [here](https://github.com/robbinjanssen/home-assistant-omnik-inverter).

0 comments on commit 868fb1f

Please sign in to comment.