Python Plugin: Omnik Inverter local webinterface

Python and python framework

Moderator: leecollings

majo
Posts: 1
Joined: Saturday 27 May 2023 23:02
Target OS: Linux
Domoticz version:
Contact:

Re: Python Plugin: Omnik Inverter local webinterface

Post by majo »

Hi @parallax, @henkie

did you fix the "waiting 0s" problem ?

Br,
Majo
manjh
Posts: 708
Joined: Saturday 27 February 2016 12:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Re: Python Plugin: Omnik Inverter local webinterface

Post by manjh »

I am puzzled.
Have been using the Omnik-Data-Logger for a long time now, logging the total energy on a daily basis.
I seldom look at this, as always statistics only become valuable when there is a lot of data.
This morning I looked at the log file, and noticed that the PV system has not delivered any energy since Feb 10.
Not really, the online monitoring tool shows that the system is still going strong.

A small bit of research shows me an error: import of ConfigParser failed. I found on the web that this module has been renamed to configparser.
Changed that in OmnikExport.py, but then I see other errors....

Code: Select all

Traceback (most recent call last):
  File "/home/pi/Omnik-Data-Logger/LiveStats.py", line 7, in <module>
    import OmnikExport
  File "/home/pi/Omnik-Data-Logger/OmnikExport.py", line 14, in <module>
    import InverterMsg  # Import the Msg handler
  File "/home/pi/Omnik-Data-Logger/InverterMsg.py", line 73
    print self.__get_short(59)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
So I found this alternative for getting data from the inverter.
Question, before I start setting this up.
It says it will pull data from the web interface of the inverter. But I am not aware of such web UI. When I go into the inverter via the IP address, I get a fairly rudimentary panel with some network settings, but that's it. No data about power.
At the bottom of the screen it says "Ver:4.01.9.d1".
Does this ring any bells?
Hans
User avatar
sincze
Posts: 1299
Joined: Monday 02 June 2014 22:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands / Breda Area
Contact:

Re: Python Plugin: Omnik Inverter local webinterface

Post by sincze »

Version 2.0.0 of the plugin has been released.
Works with 2023 versions of Domoticz now.

https://github.com/sincze/Domoticz-Omni ... Web-Plugin
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
manjh
Posts: 708
Joined: Saturday 27 February 2016 12:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Re: Python Plugin: Omnik Inverter local webinterface

Post by manjh »

sincze wrote: Tuesday 05 September 2023 20:57 Version 2.0.0 of the plugin has been released.
Works with 2023 versions of Domoticz now.

https://github.com/sincze/Domoticz-Omni ... Web-Plugin
Doesn't work for me. My inverter only supports the /home.html extension to the IP.
I installed the plugin and tried different combinations, and 4 devices are created. But values remain zero.
Hans
User avatar
sincze
Posts: 1299
Joined: Monday 02 June 2014 22:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands / Breda Area
Contact:

Re: Python Plugin: Omnik Inverter local webinterface

Post by sincze »

manjh wrote: Wednesday 06 September 2023 9:26
sincze wrote: Tuesday 05 September 2023 20:57 Version 2.0.0 of the plugin has been released.
Works with 2023 versions of Domoticz now.

https://github.com/sincze/Domoticz-Omni ... Web-Plugin
Doesn't work for me. My inverter only supports the /home.html extension to the IP.
I installed the plugin and tried different combinations, and 4 devices are created. But values remain zero.
did you check the pre requirements first??
Omnik inverters store the data in different values. Check http://inverter-ip/js/status.js
omnik.png
omnik.png (26.55 KiB) Viewed 2057 times
Without providing more info about fw version screenshots, things you already tried it it's pretty hard to help out.
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
manjh
Posts: 708
Joined: Saturday 27 February 2016 12:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Re: Python Plugin: Omnik Inverter local webinterface

Post by manjh »

sincze wrote: Wednesday 06 September 2023 9:40
manjh wrote: Wednesday 06 September 2023 9:26
sincze wrote: Tuesday 05 September 2023 20:57 Version 2.0.0 of the plugin has been released.
Works with 2023 versions of Domoticz now.

https://github.com/sincze/Domoticz-Omni ... Web-Plugin
Doesn't work for me. My inverter only supports the /home.html extension to the IP.
I installed the plugin and tried different combinations, and 4 devices are created. But values remain zero.
did you check the pre requirements first??
Omnik inverters store the data in different values. Check http://inverter-ip/js/status.js

omnik.png

Without providing more info about fw version screenshots, things you already tried it it's pretty hard to help out.
I can install the plugin. But when I try to find the info about different values using http://10.0.0.198/js/status.js I get

Code: Select all

404 Not Found
File not found.
Hans
User avatar
sincze
Posts: 1299
Joined: Monday 02 June 2014 22:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands / Breda Area
Contact:

Re: Python Plugin: Omnik Inverter local webinterface

Post by sincze »

manjh wrote: Wednesday 06 September 2023 11:15
sincze wrote: Wednesday 06 September 2023 9:40
manjh wrote: Wednesday 06 September 2023 9:26
Doesn't work for me. My inverter only supports the /home.html extension to the IP.
I installed the plugin and tried different combinations, and 4 devices are created. But values remain zero.
did you check the pre requirements first??
Omnik inverters store the data in different values. Check http://inverter-ip/js/status.js

omnik.png

Without providing more info about fw version screenshots, things you already tried it it's pretty hard to help out.
I can install the plugin. But when I try to find the info about different values using http://10.0.0.198/js/status.js I get

Code: Select all

404 Not Found
File not found.
Is that official OMNIK Inverter??
What type and what FW is installed??

To have a closer look.
Can you install FIDDLER.
Visit your inverter as normal.
Fiddler should show you all the traffic between your inverter and your browser.
Capture the traffic to see how the data flows into your html.
See if there is some separate file that we should be using for your inverter.
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
manjh
Posts: 708
Joined: Saturday 27 February 2016 12:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Re: Python Plugin: Omnik Inverter local webinterface

Post by manjh »

It is an official Omnik, but it is old: about 10 years.

Later today I will check out Fiddler and show results here.
Hans
manjh
Posts: 708
Joined: Saturday 27 February 2016 12:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Re: Python Plugin: Omnik Inverter local webinterface

Post by manjh »

OK, I installed Fiddler and it gives me a long list of info, will have to look into that.
Meanwhile, I made a screenshot of the one and only screen that the inverter has for me. Not sure if that will help, though...
Image
Attachments
Omnik screen.png
Omnik screen.png (126.33 KiB) Viewed 2025 times
Hans
User avatar
sincze
Posts: 1299
Joined: Monday 02 June 2014 22:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands / Breda Area
Contact:

Re: Python Plugin: Omnik Inverter local webinterface

Post by sincze »

manjh wrote: Wednesday 06 September 2023 11:35 OK, I installed Fiddler and it gives me a long list of info, will have to look into that.
Meanwhile, I made a screenshot of the one and only screen that the inverter has for me. Not sure if that will help, though...
Image
Looks like the standard interface indeed. Please look for a .js extension just click through the items one at a time.
Wat helpss

Press the red cross in fiddler.
Open your browser and click straight on the overview of your inverter W / kwH.
The thing you are looking for will then be somewhere near the top. Saves you some time.

Or else send me the captured file and I can help you. (do not send login credentials) ;-)
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
manjh
Posts: 708
Joined: Saturday 27 February 2016 12:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Re: Python Plugin: Omnik Inverter local webinterface

Post by manjh »

sincze wrote: Wednesday 06 September 2023 11:42 Open your browser and click straight on the overview of your inverter W / kwH.
I never found such a page on the local interface. Screenshot I sent is the only one, it can be used for technical setup only. And I donot see any links to other pages!
I also tried logging in directly to the AP of the inverter, no luck.
Found this manual:
https://geaskb.nl/wp-content/uploads/20 ... 2kW_TL.pdf
Hans
User avatar
sincze
Posts: 1299
Joined: Monday 02 June 2014 22:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands / Breda Area
Contact:

Re: Python Plugin: Omnik Inverter local webinterface

Post by sincze »

That is interesting indeed.

Normally Omnik would look like this:
Omnik-Inverter.png
Omnik-Inverter.png (25.89 KiB) Viewed 1995 times
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
manjh
Posts: 708
Joined: Saturday 27 February 2016 12:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Re: Python Plugin: Omnik Inverter local webinterface

Post by manjh »

manjh wrote: Wednesday 06 September 2023 13:06
sincze wrote: Wednesday 06 September 2023 11:42 Open your browser and click straight on the overview of your inverter W / kwH.
I never found such a page on the local interface. Screenshot I sent is the only one, it can be used for technical setup only. And I donot see any links to other pages!
I also tried logging in directly to the AP of the inverter, no luck.
Found this manual:
https://geaskb.nl/wp-content/uploads/20 ... 2kW_TL.pdf
Hans
manjh
Posts: 708
Joined: Saturday 27 February 2016 12:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Re: Python Plugin: Omnik Inverter local webinterface

Post by manjh »

sincze wrote: Wednesday 06 September 2023 13:51 That is interesting indeed.

Normally Omnik would look like this:
Omnik-Inverter.png
looks more like the Solarman online interface...
Also interesting is the version number. Mine says it is Ver:4.01.9.d1!
Hans
manjh
Posts: 708
Joined: Saturday 27 February 2016 12:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Re: Python Plugin: Omnik Inverter local webinterface

Post by manjh »

Although I did not really dive deep into the python code, I think that the data logger here:
https://github.com/Woutrrr/Omnik-Data-Logger
pulls data directly from the inverter. Unfortunately the code has not been maintained for many years. When I install and run it, it comes back with a lot of errors. I tried correcting them, but am stuck with an improper "decode" which I donot know how to correct.
Pity, since it looks like a nice usable plugin...
Hans
User avatar
sincze
Posts: 1299
Joined: Monday 02 June 2014 22:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands / Breda Area
Contact:

Re: Python Plugin: Omnik Inverter local webinterface

Post by sincze »

I kniw that one. I use the php version of that script.
I can have a look to convert it into a Domiticz plugin.

It works only with inverters that have specific serial numbers.
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
manjh
Posts: 708
Joined: Saturday 27 February 2016 12:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Re: Python Plugin: Omnik Inverter local webinterface

Post by manjh »

sincze wrote: Wednesday 06 September 2023 18:41 I kniw that one. I use the php version of that script.
I can have a look to convert it into a Domiticz plugin.

It works only with inverters that have specific serial numbers.
Sounds great, looking forward to testing. Thank you!
Hans
User avatar
sincze
Posts: 1299
Joined: Monday 02 June 2014 22:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands / Breda Area
Contact:

Re: Python Plugin: Omnik Inverter local webinterface

Post by sincze »

manjh wrote: Wednesday 06 September 2023 14:33 looks more like the Solarman online interface...
Also interesting is the version number. Mine says it is Ver:4.01.9.d1!
  • Most inverters have a JS file, try accessing http://<your omnik ip address>/js/status.js in your browser. (Not working for you)
  • Some inverters use a JSON status file to output the values. Check if your inverter outputs JSON data by navigating to: http://<your omnik ip address>/status.json?CMD=inv_query.
  • A few inverters don't have JS or JSON but output the values directly in a HTML files. Check if your inverter supports the following URL: http://<your omnik ip address>/status.html. Note that this will work for almost all inverters, but you need to check the HTML source for a <script> tag that contains the relevant webData.
Did any of these work for you?
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
manjh
Posts: 708
Joined: Saturday 27 February 2016 12:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Re: Python Plugin: Omnik Inverter local webinterface

Post by manjh »

sincze wrote: Monday 11 September 2023 21:08
manjh wrote: Wednesday 06 September 2023 14:33 looks more like the Solarman online interface...
Also interesting is the version number. Mine says it is Ver:4.01.9.d1!
  • Most inverters have a JS file, try accessing http://<your omnik ip address>/js/status.js in your browser. (Not working for you)
  • Some inverters use a JSON status file to output the values. Check if your inverter outputs JSON data by navigating to: http://<your omnik ip address>/status.json?CMD=inv_query.
  • A few inverters don't have JS or JSON but output the values directly in a HTML files. Check if your inverter supports the following URL: http://<your omnik ip address>/status.html. Note that this will work for almost all inverters, but you need to check the HTML source for a <script> tag that contains the relevant webData.
Did any of these work for you?
All three come back with "404 - file not found" ...
In the mean time I have removed all traces of installed Omnik related plugins and programs, and started fresh with the python program that has worked for me before, but stopped working suddenly early august.
After installing, Inverter-Data-Logger works OK and gives me the values. So there must be a way to pull info, somehow... :o
Hans
User avatar
sincze
Posts: 1299
Joined: Monday 02 June 2014 22:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands / Breda Area
Contact:

Re: Python Plugin: Omnik Inverter local webinterface

Post by sincze »

manjh wrote: Tuesday 12 September 2023 7:57
sincze wrote: Monday 11 September 2023 21:08
manjh wrote: Wednesday 06 September 2023 14:33 looks more like the Solarman online interface...
Also interesting is the version number. Mine says it is Ver:4.01.9.d1!
  • Most inverters have a JS file, try accessing http://<your omnik ip address>/js/status.js in your browser. (Not working for you)
  • Some inverters use a JSON status file to output the values. Check if your inverter outputs JSON data by navigating to: http://<your omnik ip address>/status.json?CMD=inv_query.
  • A few inverters don't have JS or JSON but output the values directly in a HTML files. Check if your inverter supports the following URL: http://<your omnik ip address>/status.html. Note that this will work for almost all inverters, but you need to check the HTML source for a <script> tag that contains the relevant webData.
Did any of these work for you?
All three come back with "404 - file not found" ...
In the mean time I have removed all traces of installed Omnik related plugins and programs, and started fresh with the python program that has worked for me before, but stopped working suddenly early august.
After installing, Inverter-Data-Logger works OK and gives me the values. So there must be a way to pull info, somehow... :o
Tnx. for testing.
Yes I still think it should work with the magic packet method.

I found this one: https://github.com/klaasnicolaas/python-omnikinverter
Also noticed this one: https://github.com/sincze/solarman-mqtt
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest