sincze / Domoticz-Omnik-Local-Web-Plugin

Domoticz Python Plugin that can read data from the local inverter webinterface
5 stars 2 forks source link

Omnik local web-plugin crashes/hangs system #4

Closed ghost closed 1 year ago

ghost commented 4 years ago

I tried the other options to get data from solar panels, but since I have the new wifi module this options went nowhere. Getting the data direct from the Omnik transformer looks like the way to go. Installing the plugin was not a problem and also the devices are visibele. but then the trouble starts.

When enabling the hardware the log shows:

2020-01-05 15:55:13.265 Status: (solar panels) Started. 2020-01-05 15:55:13.429 Status: (solar panels) Entering work loop. 2020-01-05 15:55:13.429 Status: (solar panels) Initialized version 1.0.1, author 'sincze' 2020-01-05 15:55:13.550 Error: PluginSystem: Exception processing message

Then, every aprox 10 seconds the LOG shows the: And also other hardware that normally doesn't generate errors (Mill heater) starts generating this error.

2020-01-05 15:56:21.182 Error: Badkamer hardware (4) thread seems to have ended unexpectedly 2020-01-05 15:56:21.182 Error: solar panels hardware (8) thread seems to have ended unexpectedly 2020-01-05 15:56:35.185 Error: Badkamer hardware (4) thread seems to have ended unexpectedly 2020-01-05 15:56:35.185 Error: solar panels hardware (8) thread seems to have ended unexpectedly 2020-01-05 15:56:49.188 Error: Badkamer hardware (4) thread seems to have ended unexpectedly 2020-01-05 15:56:49.188 Error: solar panels hardware (8) thread seems to have ended unexpectedly

It looks like the script can't reach the Omniks Transformer since the device show no data. Also was it close to impossible to stop the problem, because Domoticz crashed every time i tried to disable or remove the hardware. I think I configured everything correct.

This is the infor from the Omnik Invertor:

var version= "H4.01.51MW.2.01W1.0.65(2018-02-271-D)"; var m2mMid = "641060337"; var wlanMac= "F0:FE:6B:D7:05:94"; var m2mRssi= "20%"; var wanIp= "192.168.2.7"; var nmac= "F0FE6BD70597"; var fephy= "off"; var yz_device_type="258"; var yz_device_num="1"; var init_inv_type="0"; var myDeviceArray=new Array(); myDeviceArray[0]="NLNN30201XXXXXXX,V5.04Build230,V4.13Build252,Omnik3000tl ,3000,113,63,17193,,2,";

This is my Domoticz setup: -Raspberry 3 model b+ rev 1.3 -Raspbian 10 (buster) -Domoticz Version: 4.10717 -Python Version: 3.7.3

any suggestion is welcome, possibly only a timer has to be adjusted, but my programming skills do not allow me to investigate this

sincze commented 4 years ago

mmmm interesting, clearly your 3000 inverter is a type 2 ;-) of the plugin. strData = re.search(r'(?<=myDeviceArray\[0\]=").*?(?=";)', strData).group(0)

as that search seem to match:

myDeviceArray[0]="NLNN302018AND132, V5.04Build230,V4.13Build252,Omnik3000tl,3000,113,63,17193,,2,";
myDeviceArray[0]="AANN3020,     V5.04Build230,V4.13Build253,Omnik3000tl,3000,1313,685,9429,,1,";

image

Did you switch the plugin type to MyDeviceArray ?

ghost commented 4 years ago

Thx, for the quick reply. Yes, I selected the array option. I compared the one from my invertor with the example and the layout seems to match. I checked what type of connection I got when manually logging in to the invertor, but that is HTTP. When I was going through the file I noticed that is uses port 443 for HTTPS an 80 for HTTP.

In the attempts to get the info via packet sniffing I noticed the invertor uses port 100XX (ten thousand somethings) to send out the packets to the Omnik site. Maybe that is something. However, it looks like there is an error directly when enabling the hardware. There after Domoticz crashes when I try to disable the hardware, but when I restart the service the hardware is disabled and everything works fine

ghost commented 4 years ago

I don't think i have version 252 and you have 253. The string seems to match the layout from the invertor page. With the strange thing that you have to know that you have to put a decimal in the total amount and mine was updated two minutes before I made the copy past (one for the screenshot) and has no errors. Just checked, and port 80 is good to connect to the invertor via HTTP, so no exotic port numbers are used image

sincze commented 1 year ago

Is this still an issue ???

sincze commented 1 year ago

no response