Omnik-Data-Logger no longer working

Python and python framework

Moderator: leecollings

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

Omnik-Data-Logger no longer working

Post by manjh »

I have been using this logger for years, but it has stopped providing data since february (only noticed today).
Error is ConfigParser not found.
I found somewhere that this module has been renamed to configparser. That solves the original error, but now gives me new errors about print statements. Correcting leads from one error to the next.

First: does anyone have an idea about what caused this?
Second, and more important: how can I solve this?
I noticed that there is an alternative, using the local web UI of the inverter. But I think my inverter may be a bit too old (about 10 years), I cannot find any local UI that displays data about power generation. The only thing I can find is related to network settings.

Please advise...
Hans
manjh
Posts: 748
Joined: Saturday 27 February 2016 12:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Re: Omnik-Data-Logger no longer working

Post by manjh »

I found a workaround by using Inverter-Data-Logging... works good!
Hans
manjh
Posts: 748
Joined: Saturday 27 February 2016 12:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Re: Omnik-Data-Logger no longer working

Post by manjh »

Unfortunately, this method has worked for a while but now stopped again. No idea why.
Is there a "working" alternative, that can be based on an old Omnik inverter?
Hans
User avatar
waltervl
Posts: 5855
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Omnik-Data-Logger no longer working

Post by waltervl »

What does not work? What error did you get?
See also topic viewtopic.php?p=305303
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
manjh
Posts: 748
Joined: Saturday 27 February 2016 12:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Re: Omnik-Data-Logger no longer working

Post by manjh »

Can't see an error. It simply stopped sending data.
Solution in that other post seems strange. If the wifi unit does not connect to the inverter, how can i then still see valid data in the Solarman website?
Hans
manjh
Posts: 748
Joined: Saturday 27 February 2016 12:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Re: Omnik-Data-Logger no longer working

Post by manjh »

This afternoon I removed the whole lot and started fresh. Installed the plugin, but now ran into lots of python syntax errors. It seems the code has not been maintained since 2016...
Hans
User avatar
waltervl
Posts: 5855
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Omnik-Data-Logger no longer working

Post by waltervl »

Don't change anything that works. It does not seem to be that complex.
By the way, it is not a plugin but a python script that pushes data to domoticz.

Google the errors and you probably find the solution.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
manjh
Posts: 748
Joined: Saturday 27 February 2016 12:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Re: Omnik-Data-Logger no longer working

Post by manjh »

waltervl wrote: Wednesday 06 September 2023 18:27 Don't change anything that works. It does not seem to be that complex.
By the way, it is not a plugin but a python script that pushes data to domoticz.

Google the errors and you probably find the solution.
Exactly what I did, and solved several. But I'm stuck on a missing decode attribute...
Hans
User avatar
waltervl
Posts: 5855
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Omnik-Data-Logger no longer working

Post by waltervl »

What is the exact error you get? On what line in the code?
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
manjh
Posts: 748
Joined: Saturday 27 February 2016 12:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Re: Omnik-Data-Logger no longer working

Post by manjh »

waltervl wrote: Thursday 07 September 2023 11:35 What is the exact error you get? On what line in the code?

Code: Select all

python LiveStats.py
2023-09-07 12:18:32,780 DEBUG Importing output plugin ConsoleOutput
2023-09-07 12:18:32,792 INFO connecting to 10.0.0.198 port 8899
Traceback (most recent call last):
  File "/home/pi/Omnik-Data-Logger/LiveStats.py", line 17, in <module>
    omnik_exporter.run()
  File "/home/pi/Omnik-Data-Logger/OmnikExport.py", line 72, in run
    inverter_socket.sendall(OmnikExport.generate_string(wifi_serial))
  File "/home/pi/Omnik-Data-Logger/OmnikExport.py", line 159, in generate_string
    hex_list = [double_hex[i:i + 2].decode('hex') for i in
  File "/home/pi/Omnik-Data-Logger/OmnikExport.py", line 159, in <listcomp>
    hex_list = [double_hex[i:i + 2].decode('hex') for i in
AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'?

Hans
User avatar
waltervl
Posts: 5855
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Omnik-Data-Logger no longer working

Post by waltervl »

Ok I thought you were using the Inverter-Data-Logger script and not the Omnik-Data-Logger....

I think the Omnik-Data-Logger is a python2 script and not python3
There is a python3 version: https://github.com/clmcavaney/Omnik-Dat ... on3-change
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
manjh
Posts: 748
Joined: Saturday 27 February 2016 12:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Re: Omnik-Data-Logger no longer working

Post by manjh »

waltervl wrote: Thursday 07 September 2023 16:35 Ok I thought you were using the Inverter-Data-Logger script and not the Omnik-Data-Logger....

I think the Omnik-Data-Logger is a python2 script and not python3
There is a python3 version: https://github.com/clmcavaney/Omnik-Dat ... on3-change
I installed that, but am getting the same error starting with the invalid name "ConfigParser"...
Hans
User avatar
waltervl
Posts: 5855
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Omnik-Data-Logger no longer working

Post by waltervl »

And what with the inverter-data-logger? https://github.com/XtheOne/Inverter-Data-Logger
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
manjh
Posts: 748
Joined: Saturday 27 February 2016 12:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Re: Omnik-Data-Logger no longer working

Post by manjh »

waltervl wrote: Thursday 07 September 2023 22:35 And what with the inverter-data-logger? https://github.com/XtheOne/Inverter-Data-Logger
Thanks for the tip! I installed it, and it worked OK.
Had a little trouble setting up the crontab, but that is my own fault. I need to understand the difference between using sudo or not....\

As for the Omnik interface: it is now working again!

The bad news is why the previous setup suddenly stopped working. But I guess we'll never find out... ;)
Hans
User avatar
waltervl
Posts: 5855
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Omnik-Data-Logger no longer working

Post by waltervl »

manjh wrote: Monday 03 July 2023 12:30 I found a workaround by using Inverter-Data-Logging... works good!
This is what you said in June so perhaps the temperature in the Netherlands causes some brain damage :)
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
manjh
Posts: 748
Joined: Saturday 27 February 2016 12:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Re: Omnik-Data-Logger no longer working

Post by manjh »

waltervl wrote: Friday 08 September 2023 20:26
manjh wrote: Monday 03 July 2023 12:30 I found a workaround by using Inverter-Data-Logging... works good!
This is what you said in June so perhaps the temperature in the Netherlands causes some brain damage :)
You may be right there... :mrgreen:
Nevertheless, it stopped working early August. Re-installing fixed it. I'll keep an eye on this.
Hans
manjh
Posts: 748
Joined: Saturday 27 February 2016 12:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Re: Omnik-Data-Logger no longer working

Post by manjh »

It is still working like a charm.
I guess the installation of a newer version fixed the problem.
One question, though: I noticed new "mail" coming in to /var/mail and var/pi.
Nothing serious, looks like status info. At first there was a lot of debug lines, but after changing the lof level it decreased.
But still, over the day, it builds up to quite a large file.
What can I change to prevent this?
This is my current setting in config.cfg:

Code: Select all

[log]
# Log:Output
# Possible options: none,console,file (combinations are possible)
# Use none to disable logging
type = console

# Log:level
# Possible options: critical, error, warning, info, debug, notset
level = notset

# Log:filename
# Output file for file logger
filename = inverter-export.log
Hans
PieterS
Posts: 197
Joined: Wednesday 31 May 2017 16:06
Target OS: NAS (Synology & others)
Domoticz version: 2024.7
Location: NL
Contact:

Re: Omnik-Data-Logger no longer working

Post by PieterS »

What about changing:
type = none
Synology with Domoticz build (V2024.7) in Docker
User avatar
waltervl
Posts: 5855
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Omnik-Data-Logger no longer working

Post by waltervl »

You are one of the few using this I suppose.
Ask the author in the github repository to be sure or just try it out and see what happens....
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
PieterS
Posts: 197
Joined: Wednesday 31 May 2017 16:06
Target OS: NAS (Synology & others)
Domoticz version: 2024.7
Location: NL
Contact:

Re: Omnik-Data-Logger no longer working

Post by PieterS »

Yes, I am one of them.
Dont be scared! Just try and see what happens :lol:
Synology with Domoticz build (V2024.7) in Docker
Post Reply

Who is online

Users browsing this forum: Amazon [Bot] and 1 guest