sincze / Domoticz-Omnik-Local-Web-Plugin

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

Error plugin.py #2

Closed JanStalenburg closed 4 years ago

JanStalenburg commented 4 years ago

Hi,

I installed the plugin but see the error messages from lines 209, 101 and 291. The inverter is reachable because I get data with the test http://xxx.xxx.x.xxx/js/status.js

2019-11-29 16:56:36.410 Status: (Omnik Zonnepanelen) Entering work loop. 2019-11-29 16:56:36.410 Status: (Omnik Zonnepanelen) Initialized version 1.0.1, author 'sincze' 2019-11-29 16:56:36.703 Status: MQTT: Connecting to localhost:1883 2019-11-29 16:56:36.904 Status: MQTT: connected to: localhost:1883 2019-11-29 16:56:37.105 Status: MQTT: Subscribed 2019-11-29 16:56:41.031 Status: (Router) Using generic brctl command on router 192.168.0.1. Will respond slower and on some routers a little less reliable to absence 2019-11-29 16:56:41.041 Error: (Omnik Zonnepanelen) 'onStart' failed 'KeyError'. 2019-11-29 16:56:41.041 Error: (Omnik Zonnepanelen) ----> Line 209 in '/home/pi/domoticz/plugins/Domoticz-Omnik-Local-Web-Plugin/plugin.py' 2019-11-29 16:56:41.041 Error: (Omnik Zonnepanelen) ----> Line 101 in '/home/pi/domoticz/plugins/Domoticz-Omnik-Local-Web-Plugin/plugin.py' 2019-11-29 16:56:41.041 Error: (Omnik Zonnepanelen) ----> Line 291 in '/home/pi/domoticz/plugins/Domoticz-Omnik-Local-Web-Plugin/plugin.py' 2019-11-29 16:56:45.970 Status: P1 Smart Meter: Meter is pre DSMR 4.0 and does not send a CRC checksum - using DSMR 2.2 compatibility

I also won't get the new devices in the devices tab.

Do I something wrong or I miss something. I hope you can fix it for me.

Kind regards, Jan

sincze commented 4 years ago

Thanks for message. Without a full debug log of what is happening I am unable to determine what goes wrong.

Please enable full debug. I guess the error is in: strData = re.search(r'(?<=webData=").*?(?=";)', strData).group(0)

And maybe you can share the firmware of the inverter? It is developed on: NL1-V1.0-0118-4 / V2.0-0028. Maybe the data the plugin is looking for could be formed differently in other firmwares.

Have a look at: http://inverter-ip/js/status.js to figure out in what group the data is located. In my case:

var webData="NLDN2017****,NL1-V1.0-0118-4,V2.0-0028,omnik4000tl ,4000,584,345,33734,,4,";

The function searches for that string and extracts data.

JanStalenburg commented 4 years ago

I use Domoticz beta version 4.11539 on a Raspberry PI 4+ with the latest versions.

The converters firmware is: main NL1-V1.0-0061-4 slave: V2.0-0024 Inverter model: omnik3000tl

When I activate the plugin I see in the Domoticz log: Nov 30 13:01:21 raspberrypi domoticz[385]: 2019-11-30 13:01:21.182 Status: (Omnik Zonnepanelen) Started. Nov 30 13:01:21 raspberrypi domoticz[385]: 2019-11-30 13:01:21.295 Status: (Omnik Zonnepanelen) Entering work loop. Nov 30 13:01:21 raspberrypi domoticz[385]: 2019-11-30 13:01:21.296 Status: (Omnik Zonnepanelen) Initialized version 1.0.1, author 'sincze' Nov 30 13:01:21 raspberrypi domoticz[385]: 2019-11-30 13:01:21.297 (Omnik Zonnepanelen) Debug logging mask set to: PYTHON PLUGIN QUEUE IMAGE DEVICE CONNECTION MESSAGE Nov 30 13:01:21 raspberrypi domoticz[385]: 2019-11-30 13:01:21.297 (Omnik Zonnepanelen) 'HardwareID':'25' Nov 30 13:01:21 raspberrypi domoticz[385]: 2019-11-30 13:01:21.297 (Omnik Zonnepanelen) 'HomeFolder':'/home/pi/domoticz/plugins/Domoticz-Omnik-Local-Web-Plugin/' Nov 30 13:01:21 raspberrypi domoticz[385]: 2019-11-30 13:01:21.297 (Omnik Zonnepanelen) 'StartupFolder':'/home/pi/domoticz/' Nov 30 13:01:21 raspberrypi domoticz[385]: 2019-11-30 13:01:21.297 (Omnik Zonnepanelen) 'UserDataFolder':'/home/pi/domoticz/' Nov 30 13:01:21 raspberrypi domoticz[385]: 2019-11-30 13:01:21.297 (Omnik Zonnepanelen) 'Database':'/home/pi/domoticz/domoticz.db' Nov 30 13:01:21 raspberrypi domoticz[385]: 2019-11-30 13:01:21.297 (Omnik Zonnepanelen) 'Language':'nl' Nov 30 13:01:21 raspberrypi domoticz[385]: 2019-11-30 13:01:21.297 (Omnik Zonnepanelen) 'Version':'1.0.1' Nov 30 13:01:21 raspberrypi domoticz[385]: 2019-11-30 13:01:21.297 (Omnik Zonnepanelen) 'Author':'sincze' Nov 30 13:01:21 raspberrypi domoticz[385]: 2019-11-30 13:01:21.297 (Omnik Zonnepanelen) 'Name':'Omnik Zonnepanelen' Nov 30 13:01:21 raspberrypi domoticz[385]: 2019-11-30 13:01:21.297 (Omnik Zonnepanelen) 'Address':'192.168.0.3' Nov 30 13:01:21 raspberrypi domoticz[385]: 2019-11-30 13:01:21.297 (Omnik Zonnepanelen) 'Port':'0' Nov 30 13:01:21 raspberrypi domoticz[385]: 2019-11-30 13:01:21.297 (Omnik Zonnepanelen) 'Username':'xxxxxxxxx' Nov 30 13:01:21 raspberrypi domoticz[385]: 2019-11-30 13:01:21.297 (Omnik Zonnepanelen) 'Password':'xxxxxxxxx' Nov 30 13:01:21 raspberrypi domoticz[385]: 2019-11-30 13:01:21.297 (Omnik Zonnepanelen) 'Key':'OmnikLocalWeb' Nov 30 13:01:21 raspberrypi domoticz[385]: 2019-11-30 13:01:21.297 (Omnik Zonnepanelen) 'Mode1':'80' Nov 30 13:01:21 raspberrypi domoticz[385]: 2019-11-30 13:01:21.297 (Omnik Zonnepanelen) 'Mode2':'1' Nov 30 13:01:21 raspberrypi domoticz[385]: 2019-11-30 13:01:21.297 (Omnik Zonnepanelen) 'Mode6':'-1' Nov 30 13:01:21 raspberrypi domoticz[385]: 2019-11-30 13:01:21.297 (Omnik Zonnepanelen) 'DomoticzVersion':'4.11539' Nov 30 13:01:21 raspberrypi domoticz[385]: 2019-11-30 13:01:21.297 (Omnik Zonnepanelen) 'DomoticzHash':'6c6c27a56' Nov 30 13:01:21 raspberrypi domoticz[385]: 2019-11-30 13:01:21.297 (Omnik Zonnepanelen) 'DomoticzBuildTime':'2019-11-29 09:53:24' Nov 30 13:01:21 raspberrypi domoticz[385]: 2019-11-30 13:01:21.297 (Omnik Zonnepanelen) Device count: 0 Nov 30 13:01:21 raspberrypi domoticz[385]: 2019-11-30 13:01:21.298 (Omnik Zonnepanelen) Creating images from file '/home/pi/domoticz/plugins/Domoticz-Omnik-Local-Web-Plugin/Omnik.zip'. Nov 30 13:01:21 raspberrypi domoticz[385]: 2019-11-30 13:01:21.301 #033[1;31mError: (Omnik Zonnepanelen) 'onStart' failed 'KeyError'.#033[0;0m Nov 30 13:01:21 raspberrypi domoticz[385]: 2019-11-30 13:01:21.301 #033[1;31mError: (Omnik Zonnepanelen) ----> Line 209 in '/home/pi/domoticz/plugins/Domoticz-Omnik-Local-Web-Plugin/plugin.py'#033[0;0m Nov 30 13:01:21 raspberrypi domoticz[385]: 2019-11-30 13:01:21.301 #033[1;31mError: (Omnik Zonnepanelen) ----> Line 101 in '/home/pi/domoticz/plugins/Domoticz-Omnik-Local-Web-Plugin/plugin.py'#033[0;0m Nov 30 13:01:21 raspberrypi domoticz[385]: 2019-11-30 13:01:21.301 #033[1;31mError: (Omnik Zonnepanelen) ----> Line 291 in '/home/pi/domoticz/plugins/Domoticz-Omnik-Local-Web-Plugin/plugin.py'#033[0;0m

The output of http://inverter-ip/js/status.js is: var version="H4.01.36Y1.0.05W1.0.04";var m2mMid="604778026";var wlanMac="AC:CF:23:12:03:F8";var m2mRssi="81%";var wanIp="192.168.0.3";var nmac="ACCF231203FB";var fephy="off";var webData="NLDN3020137R5131,NL1-V1.0-0061-4,V2.0-0024,omnik3000tl ,3000,1063,155,145677,,0,";function initPageText(){var A=window.parent.reList("status");fileText("st1",A["t1"]);fileText("st2",A["t2"]);fileText("st3",A["t3"]);for(var B=1;B<=27;B++){if(B!=14){fileText("tx"+B,A[B])}}init_main_page();initStatus();changeFont();childgetH()}function upfold(A){if(document.getElementById("up"+A+"div").style.display=="none"){show("up"+A+"div");document.getElementById("up"+A).src="image/up.png"}else{hide("up_"+A+"div");document.getElementById("up"+A).src="image/down.png"}if(A==3){if(document.getElementById("ser_status").src==""){document.getElementById("ser_status").src="server_status.html"}}}function init_main_page(){var E=document.form_cover_setting;cfg2Form(E);var C;var D;var B;var A;B=window.parent.reTip("1");A=window.parent.reTip("2");document.getElementById("cover_ver").innerHTML=version;document.getElementById("cover_mid").innerHTML=m2mMid;if(E.wifi_on.value=="disable"){document.getElementById("cover_ap_status").innerHTML=A;document.getElementById("cover_ap_mac").innerHTML="";document.getElementById("cover_ap_ssid").innerHTML="";document.getElementById("cover_ap_ip").innerHTML="";document.getElementById("cover_sta_status").innerHTML=A;document.getElementById("cover_sta_rssi").innerHTML="";document.getElementById("cover_sta_ip").innerHTML="";document.getElementById("cover_sta_mac").innerHTML="";document.getElementById("cover_sta_ssid").innerHTML=""}else{if(E.sta_enable.value=="1"){document.getElementById("cover_ap_status").innerHTML=B;document.getElementById("cover_ap_mac").innerHTML=wlanMac;document.getElementById("cover_ap_ssid").innerHTML=E.ap_ssid.value;document.getElementById("cover_ap_ip").innerHTML=E.lan_ip.value;document.getElementById("cover_sta_status").innerHTML=B;document.getElementById("cover_sta_rssi").innerHTML=m2mRssi;document.getElementById("cover_sta_ip").innerHTML=wanIp;C=wlanMac.substring(0,16);D="0x"+wlanMac.charAt(16);D=D1+1;D=D.toString(16);D=D.toUpperCase();C=C+D;document.getElementById("cover_sta_mac").innerHTML=C;document.getElementById("cover_sta_ssid").innerHTML=E.sta_ssid.value}else{document.getElementById("cover_ap_status").innerHTML=B;document.getElementById("cover_ap_mac").innerHTML=wlanMac;document.getElementById("cover_ap_ssid").innerHTML=E.ap_ssid.value;document.getElementById("cover_ap_ip").innerHTML=E.lan_ip.value;document.getElementById("cover_sta_status").innerHTML=A;document.getElementById("cover_sta_rssi").innerHTML="";document.getElementById("cover_sta_ip").innerHTML="";document.getElementById("cover_sta_mac").innerHTML="";document.getElementById("cover_sta_ssid").innerHTML=""}}}function init_webdata_form(){var E=webData;var B="";var A,C,D;A=E.length;C=0;D=0;while(C<A){if(E.charAt(C)==","){C+=1;D+=1;web_data_show(D,B);B=""}else{B=B+E.charAt(C);C+=1}}}function web_data_show(D,A){var C=new Array("webdata_sn","webdata_msvn","webdata_ssvn","webdata_pv_type","webdata_rate_p","webdata_now_p","webdata_today_e","webdata_total_e","webdata_alarm","webdata_utime");if(D>10||D<=0){return}var B=document.getElementById(C[D-1]);if(A==""&&B!=null){B.innerHTML="---";return}if(B!=null){if(D==5){B.innerHTML=A+" W"}else{if(D==6){B.innerHTML=A+" W"}else{if(D==7){sv=A1/100;B.innerHTML=sv.toString()+" kWh"}else{if(D==8){sv=A*1/10;B.innerHTML=sv.toString()+" kWh"}else{if(D==10){if(document.getElementById("webdata_sn").innerHTML=="---"){B.innerHTML="---"}else{B.innerHTML=A+window.parent.reTip("5")}}else{B.innerHTML=A}}}}}}else{alert(C[D])}};

In the Domoticz log I see: 2019-11-30 12:20:34.621 (Omnik Zonnepanelen) 22 63 6f 76 65 72 5f 73 74 61 5f 73 73 69 64 22 29 2e 69 6e "cover_sta_ssid").in 2019-11-30 12:20:34.621 (Omnik Zonnepanelen) 6e 65 72 48 54 4d 4c 3d 45 2e 73 74 61 5f 73 73 69 64 2e 76 nerHTML=E.sta_ssid.v 2019-11-30 12:20:34.621 (Omnik Zonnepanelen) 61 6c 75 65 7d 65 6c 73 65 7b 64 6f 63 75 6d 65 6e 74 2e 67 alue}else{document.g 2019-11-30 12:20:34.621 (Omnik Zonnepanelen) 65 74 45 6c 65 6d 65 6e 74 42 79 49 64 28 22 63 6f 76 65 72 etElementById("cover 2019-11-30 12:20:34.621 (Omnik Zonnepanelen) 5f 61 70 5f 73 74 61 74 75 73 22 29 2e 69 6e 6e 65 72 48 54 _ap_status").innerHT 2019-11-30 12:20:34.621 (Omnik Zonnepanelen) 4d 4c 3d 42 3b 64 6f 63 75 6d 65 6e 74 2e 67 65 74 45 6c 65 ML=B;document.getEle 2019-11-30 12:20:34.622 (Omnik Zonnepanelen) 6d 65 6e 74 42 79 49 64 28 22 63 6f 76 65 72 5f 61 70 5f 6d mentById("cover_ap_m 2019-11-30 12:20:34.622 (Omnik Zonnepanelen) 61 63 22 29 2e 69 6e 6e 65 72 48 54 4d 4c 3d 77 6c 61 6e 4d ac").innerHTML=wlanM 2019-11-30 12:20:34.622 (Omnik Zonnepanelen) 61 63 3b 64 6f 63 75 6d 65 6e 74 2e 67 65 74 45 6c 65 6d 65 ac;document.getEleme 2019-11-30 12:20:34.622 (Omnik Zonnepanelen) 6e 74 42 79 49 64 28 22 63 6f 76 65 72 5f 61 70 5f 73 73 69 ntById("cover_ap_ssi 2019-11-30 12:20:34.622 (Omnik Zonnepanelen) 64 22 29 2e 69 6e 6e 65 72 48 54 4d 4c 3d 45 2e 61 70 5f 73 d").innerHTML=E.ap_s 2019-11-30 12:20:34.622 (Omnik Zonnepanelen) 73 69 64 2e 76 61 6c 75 65 3b 64 6f 63 75 6d 65 6e 74 2e 67 sid.value;document.g 2019-11-30 12:20:34.622 (Omnik Zonnepanelen) 65 74 45 6c 65 6d 65 6e 74 42 79 49 64 28 22 63 6f 76 65 72 etElementById("cover 2019-11-30 12:20:34.622 (Omnik Zonnepanelen) 5f 61 70 5f 69 70 22 29 2e 69 6e 6e 65 72 48 54 4d 4c 3d 45 _ap_ip").innerHTML=E 2019-11-30 12:20:34.622 (Omnik Zonnepanelen) 2e 6c 61 6e 5f 69 70 2e 76 61 6c 75 65 3b 64 6f 63 75 6d 65 .lan_ip.value;docume 2019-11-30 12:20:34.622 (Omnik Zonnepanelen) 6e 74 2e 67 65 74 45 6c 65 6d 65 6e 74 42 79 49 64 28 22 63 nt.getElementById("c 2019-11-30 12:20:34.622 (Omnik Zonnepanelen) 6f 76 65 72 5f 73 74 61 5f 73 74 61 74 75 73 22 29 2e 69 6e over_sta_status").in 2019-11-30 12:20:34.622 (Omnik Zonnepanelen) 6e 65 72 48 54 4d 4c 3d 41 3b 64 6f 63 75 6d 65 6e 74 2e 67 nerHTML=A;document.g 2019-11-30 12:20:34.622 (Omnik Zonnepanelen) 65 74 45 6c 65 6d 65 6e 74 42 79 49 64 28 22 63 6f 76 65 72 etElementById("cover 2019-11-30 12:20:34.622 (Omnik Zonnepanelen) 5f 73 74 61 5f 72 73 73 69 22 29 2e 69 6e 6e 65 72 48 54 4d _sta_rssi").innerHTM 2019-11-30 12:20:34.622 (Omnik Zonnepanelen) 4c 3d 22 22 3b 64 6f 63 75 6d 65 6e 74 2e 67 65 74 45 6c 65 L="";document.getEle 2019-11-30 12:20:34.622 (Omnik Zonnepanelen) 6d 65 6e 74 42 79 49 64 28 22 63 6f 76 65 72 5f 73 74 61 5f mentById("coversta 2019-11-30 12:20:34.622 (Omnik Zonnepanelen) 69 70 22 29 2e 69 6e 6e 65 72 48 54 4d 4c 3d 22 22 3b 64 6f ip").innerHTML="";do 2019-11-30 12:20:34.622 (Omnik Zonnepanelen) 63 75 6d 65 6e 74 2e 67 65 74 45 6c 65 6d 65 6e 74 42 79 49 cument.getElementByI 2019-11-30 12:20:34.622 (Omnik Zonnepanelen) 64 28 22 63 6f 76 65 72 5f 73 74 61 5f 6d 61 63 22 29 2e 69 d("cover_sta_mac").i 2019-11-30 12:20:34.622 (Omnik Zonnepanelen) 6e 6e 65 72 48 54 4d 4c 3d 22 22 3b 64 6f 63 75 6d 65 6e 74 nnerHTML="";document 2019-11-30 12:20:34.622 (Omnik Zonnepanelen) 2e 67 65 74 45 6c 65 6d 65 6e 74 42 79 49 64 28 22 63 6f 76 .getElementById("cov 2019-11-30 12:20:34.622 (Omnik Zonnepanelen) 65 72 5f 73 74 61 5f .. .. .. .. .. .. .. .. .. .. .. .. .. ersta 2019-11-30 12:20:34.623 (Omnik Zonnepanelen) Processing 'ReadEvent' message 2019-11-30 12:20:34.623 (Omnik Zonnepanelen) Received 876 bytes of data 2019-11-30 12:20:34.623 (Omnik Zonnepanelen) 73 73 69 64 22 29 2e 69 6e 6e 65 72 48 54 4d 4c 3d 22 22 7d ssid").innerHTML=""} 2019-11-30 12:20:34.623 (Omnik Zonnepanelen) 7d 7d 66 75 6e 63 74 69 6f 6e 20 69 6e 69 74 5f 77 65 62 64 }}function.init_webd 2019-11-30 12:20:34.623 (Omnik Zonnepanelen) 61 74 61 5f 66 6f 72 6d 28 29 7b 76 61 72 20 45 3d 77 65 62 ata_form(){var.E=web 2019-11-30 12:20:34.623 (Omnik Zonnepanelen) 44 61 74 61 3b 76 61 72 20 42 3d 22 22 3b 76 61 72 20 41 2c Data;var.B="";var.A, 2019-11-30 12:20:34.623 (Omnik Zonnepanelen) 43 2c 44 3b 41 3d 45 2e 6c 65 6e 67 74 68 3b 43 3d 30 3b 44 C,D;A=E.length;C=0;D 2019-11-30 12:20:34.623 (Omnik Zonnepanelen) 3d 30 3b 77 68 69 6c 65 28 43 3c 41 29 7b 69 66 28 45 2e 63 =0;while(C<A){if(E.c 2019-11-30 12:20:34.623 (Omnik Zonnepanelen) 68 61 72 41 74 28 43 29 3d 3d 22 2c 22 29 7b 43 2b 3d 31 3b harAt(C)==","){C+=1; 2019-11-30 12:20:34.623 (Omnik Zonnepanelen) 44 2b 3d 31 3b 77 65 62 5f 64 61 74 61 5f 73 68 6f 77 28 44 D+=1;web_data_show(D 2019-11-30 12:20:34.623 (Omnik Zonnepanelen) 2c 42 29 3b 42 3d 22 22 7d 65 6c 73 65 7b 42 3d 42 2b 45 2e ,B);B=""}else{B=B+E. 2019-11-30 12:20:34.623 (Omnik Zonnepanelen) 63 68 61 72 41 74 28 43 29 3b 43 2b 3d 31 7d 7d 7d 66 75 6e charAt(C);C+=1}}}fun 2019-11-30 12:20:34.623 (Omnik Zonnepanelen) 63 74 69 6f 6e 20 77 65 62 5f 64 61 74 61 5f 73 68 6f 77 28 ction.web_data_show( 2019-11-30 12:20:34.623 (Omnik Zonnepanelen) 44 2c 41 29 7b 76 61 72 20 43 3d 6e 65 77 20 41 72 72 61 79 D,A){var.C=new.Array 2019-11-30 12:20:34.623 (Omnik Zonnepanelen) 28 22 77 65 62 64 61 74 61 5f 73 6e 22 2c 22 77 65 62 64 61 ("webdata_sn","webda 2019-11-30 12:20:34.623 (Omnik Zonnepanelen) 74 61 5f 6d 73 76 6e 22 2c 22 77 65 62 64 61 74 61 5f 73 73 ta_msvn","webdata_ss 2019-11-30 12:20:34.623 (Omnik Zonnepanelen) 76 6e 22 2c 22 77 65 62 64 61 74 61 5f 70 76 5f 74 79 70 65 vn","webdata_pv_type 2019-11-30 12:20:34.623 (Omnik Zonnepanelen) 22 2c 22 77 65 62 64 61 74 61 5f 72 61 74 65 5f 70 22 2c 22 ","webdata_rate_p"," 2019-11-30 12:20:34.623 (Omnik Zonnepanelen) 77 65 62 64 61 74 61 5f 6e 6f 77 5f 70 22 2c 22 77 65 62 64 webdata_now_p","webd 2019-11-30 12:20:34.623 (Omnik Zonnepanelen) 61 74 61 5f 74 6f 64 61 79 5f 65 22 2c 22 77 65 62 64 61 74 ata_today_e","webdat 2019-11-30 12:20:34.623 (Omnik Zonnepanelen) 61 5f 74 6f 74 61 6c 5f 65 22 2c 22 77 65 62 64 61 74 61 5f a_totale","webdata 2019-11-30 12:20:34.624 (Omnik Zonnepanelen) 61 6c 61 72 6d 22 2c 22 77 65 62 64 61 74 61 5f 75 74 69 6d alarm","webdata_utim 2019-11-30 12:20:34.624 (Omnik Zonnepanelen) 65 22 29 3b 69 66 28 44 3e 31 30 7c 7c 44 3c 3d 30 29 7b 72 e");if(D>10||D<=0){r 2019-11-30 12:20:34.624 (Omnik Zonnepanelen) 65 74 75 72 6e 7d 76 61 72 20 42 3d 64 6f 63 75 6d 65 6e 74 eturn}var.B=document 2019-11-30 12:20:34.624 (Omnik Zonnepanelen) 2e 67 65 74 45 6c 65 6d 65 6e 74 42 79 49 64 28 43 5b 44 2d .getElementById(C[D- 2019-11-30 12:20:34.624 (Omnik Zonnepanelen) 31 5d 29 3b 69 66 28 41 3d 3d 22 22 26 26 42 21 3d 6e 75 6c 1]);if(A==""&&B!=nul 2019-11-30 12:20:34.624 (Omnik Zonnepanelen) 6c 29 7b 42 2e 69 6e 6e 65 72 48 54 4d 4c 3d 22 2d 2d 2d 22 l){B.innerHTML="---" 2019-11-30 12:20:34.624 (Omnik Zonnepanelen) 3b 72 65 74 75 72 6e 7d 69 66 28 42 21 3d 6e 75 6c 6c 29 7b ;return}if(B!=null){ 2019-11-30 12:20:34.624 (Omnik Zonnepanelen) 69 66 28 44 3d 3d 35 29 7b 42 2e 69 6e 6e 65 72 48 54 4d 4c if(D==5){B.innerHTML 2019-11-30 12:20:34.624 (Omnik Zonnepanelen) 3d 41 2b 22 20 57 22 7d 65 6c 73 65 7b 69 66 28 44 3d 3d 36 =A+".W"}else{if(D==6 2019-11-30 12:20:34.624 (Omnik Zonnepanelen) 29 7b 42 2e 69 6e 6e 65 72 48 54 4d 4c 3d 41 2b 22 20 57 22 ){B.innerHTML=A+".W" 2019-11-30 12:20:34.624 (Omnik Zonnepanelen) 7d 65 6c 73 65 7b 69 66 28 44 3d 3d 37 29 7b 73 76 3d 41 2a }else{if(D==7){sv=A 2019-11-30 12:20:34.624 (Omnik Zonnepanelen) 31 2f 31 30 30 3b 42 2e 69 6e 6e 65 72 48 54 4d 4c 3d 73 76 1/100;B.innerHTML=sv 2019-11-30 12:20:34.624 (Omnik Zonnepanelen) 2e 74 6f 53 74 72 69 6e 67 28 29 2b 22 20 6b 57 68 22 7d 65 .toString()+".kWh"}e 2019-11-30 12:20:34.624 (Omnik Zonnepanelen) 6c 73 65 7b 69 66 28 44 3d 3d 38 29 7b 73 76 3d 41 2a 31 2f lse{if(D==8){sv=A1/ 2019-11-30 12:20:34.624 (Omnik Zonnepanelen) 31 30 3b 42 2e 69 6e 6e 65 72 48 54 4d 4c 3d 73 76 2e 74 6f 10;B.innerHTML=sv.to 2019-11-30 12:20:34.624 (Omnik Zonnepanelen) 53 74 72 69 6e 67 28 29 2b 22 20 6b 57 68 22 7d 65 6c 73 65 String()+".kWh"}else 2019-11-30 12:20:34.624 (Omnik Zonnepanelen) 7b 69 66 28 44 3d 3d 31 30 29 7b 69 66 28 64 6f 63 75 6d 65 {if(D==10){if(docume 2019-11-30 12:20:34.624 (Omnik Zonnepanelen) 6e 74 2e 67 65 74 45 6c 65 6d 65 6e 74 42 79 49 64 28 22 77 nt.getElementById("w 2019-11-30 12:20:34.624 (Omnik Zonnepanelen) 65 62 64 61 74 61 5f 73 6e 22 29 2e 69 6e 6e 65 72 48 54 4d ebdata_sn").innerHTM 2019-11-30 12:20:34.624 (Omnik Zonnepanelen) 4c 3d 3d 22 2d 2d 2d 22 29 7b 42 2e 69 6e 6e 65 72 48 54 4d L=="---"){B.innerHTM 2019-11-30 12:20:34.624 (Omnik Zonnepanelen) 4c 3d 22 2d 2d 2d 22 7d 65 6c 73 65 7b 42 2e 69 6e 6e 65 72 L="---"}else{B.inner 2019-11-30 12:20:34.624 (Omnik Zonnepanelen) 48 54 4d 4c 3d 41 2b 77 69 6e 64 6f 77 2e 70 61 72 65 6e 74 HTML=A+window.parent 2019-11-30 12:20:34.625 (Omnik Zonnepanelen) 2e 72 65 54 69 70 28 22 35 22 29 7d 7d 65 6c 73 65 7b 42 2e .reTip("5")}}else{B. 2019-11-30 12:20:34.625 (Omnik Zonnepanelen) 69 6e 6e 65 72 48 54 4d 4c 3d 41 7d 7d 7d 7d 7d 7d 65 6c 73 innerHTML=A}}}}}}els 2019-11-30 12:20:34.625 (Omnik Zonnepanelen) 65 7b 61 6c 65 72 74 28 43 5b 44 5d 29 7d 7d 3b .. .. .. .. e{alert(C[D])}}; 2019-11-30 12:20:34.625 (Omnik Zonnepanelen) Processing 'DisconnectedEvent' message 2019-11-30 12:20:34.626 (Omnik Zonnepanelen) Pushing 'onMessageCallback' on to queue 2019-11-30 12:20:34.626 (Omnik Zonnepanelen) Disconnect event received for '192.168.0.3:80'. 2019-11-30 12:20:34.626 (Omnik Zonnepanelen) Pushing 'onDisconnectCallback' on to queue 2019-11-30 12:20:34.626 (Omnik Zonnepanelen) Processing 'onMessageCallback' message 2019-11-30 12:20:34.626 (Omnik Zonnepanelen) Calling message handler 'onMessage'. 2019-11-30 12:20:34.626 (Omnik Zonnepanelen) HTTP Details (3): 2019-11-30 12:20:34.626 (Omnik Zonnepanelen) --->'Status':'200' 2019-11-30 12:20:34.626 (Omnik Zonnepanelen) --->'Headers (7): 2019-11-30 12:20:34.626 (Omnik Zonnepanelen) ------->'Server':'Ralink HTTPD' 2019-11-30 12:20:34.626 (Omnik Zonnepanelen) ------->'Date':'Thu, 01 Jan 1970 04:00:54 GMT' 2019-11-30 12:20:34.626 (Omnik Zonnepanelen) ------->'Pragma':'no-cache' 2019-11-30 12:20:34.627 (Omnik Zonnepanelen) ------->'Cache-Control':'no-cache' 2019-11-30 12:20:34.627 (Omnik Zonnepanelen) ------->'Content-Type':'application/x-javascript' 2019-11-30 12:20:34.627 (Omnik Zonnepanelen) ------->'Last-Modified':'Fri, 19 Apr 2013 17:08:14 GMT' 2019-11-30 12:20:34.627 (Omnik Zonnepanelen) ------->'Connection':'close' 2019-11-30 12:20:34.627 (Omnik Zonnepanelen) --->'Data':'b'var version="H4.01.36Y1.0.05W1.0.04";var m2mMid="604778026";var wlanMac="AC:CF:23:12:03:F8";var m2mRssi="81%";var wanIp="192.168.0.3";var nmac="ACCF231203FB";var fephy="off";var webData="NLDN3020137R5131,NL1-V1.0-0061-4,V2.0-0024,omnik3000tl ,3000,1062,146,145676,,0,";function initPageText(){var A=window.parent.reList("status");fileText("st1",A["t1"]);fileText("st2",A["t2"]);fileText("st3",A["t3"]);for(var B=1;B<=27;B++){if(B!=14){fileText("tx"+B,A[B])}}init_main_page();initStatus();changeFont();childgetH()}function upfold(A){if(document.getElementById("up"+A+"div").style.display=="none"){show("up"+A+"div");document.getElementById("up"+A).src="image/up.png"}else{hide("up_"+A+"div");document.getElementById("up"+A).src="image/down.png"}if(A==3){if(document.getElementById("ser_status").src==""){document.getElementById("ser_status").src="server_status.html"}}}function init_main_page(){var E=document.form_cover_setting;cfg2Form(E);var C;var D;var B;var A;B=window.parent.reTip("1");A=window.parent.reTip("2");document.getElementById("cover_ver").innerHTML=version;document.getElementById("cover_mid").innerHTML=m2mMid;if(E.wifi_on.value=="disable"){document.getElementById("cover_ap_status").innerHTML=A;document.getElementById("cover_ap_mac").innerHTML="";document.getElementById("cover_ap_ssid").innerHTML="";document.getElementById("cover_ap_ip").innerHTML="";document.getElementById("cover_sta_status").innerHTML=A;document.getElementById("cover_sta_rssi").innerHTML="";document.getElementById("cover_sta_ip").innerHTML="";document.getElementById("cover_sta_mac").innerHTML="";document.getElementById("cover_sta_ssid").innerHTML=""}else{if(E.sta_enable.value=="1"){document.getElementById("cover_ap_status").innerHTML=B;document.getElementById("cover_ap_mac").innerHTML=wlanMac;document.getElementById("cover_ap_ssid").innerHTML=E.ap_ssid.value;document.getElementById("cover_ap_ip").innerHTML=E.lan_ip.value;document.getElementById("cover_sta_status").innerHTML=B;document.getElementById("cover_sta_rssi").innerHTML=m2mRssi;document.getElementById("cover_sta_ip").innerHTML=wanIp;C=wlanMac.substring(0,16);D="0x"+wlanMac.charAt(16);D=D1+1;D=D.toString(16);D=D.toUpperCase();C=C+D;document.getElementById("cover_sta_mac").innerHTML=C;document.getElementById("cover_sta_ssid").innerHTML=E.sta_ssid.value}else{document.getElementById("cover_ap_status").innerHTML=B;document.getElementById("cover_ap_mac").innerHTML=wlanMac;document.getElementById("cover_ap_ssid").innerHTML=E.ap_ssid.value;document.getElementById("cover_ap_ip").innerHTML=E.lan_ip.value;document.getElementById("cover_sta_status").innerHTML=A;document.getElementById("cover_sta_rssi").innerHTML="";document.getElementById("cover_sta_ip").innerHTML="";document.getElementById("cover_sta_mac").innerHTML="";document.getElementById("cover_sta_ssid").innerHTML=""}}}function init_webdata_form(){var E=webData;var B="";var A,C,D;A=E.length;C=0;D=0;while(C<A){if(E.charAt(C)==","){C+=1;D+=1;web_data_show(D,B);B=""}else{B=B+E.charAt(C);C+=1}}}function web_data_show(D,A){var C=new Array("webdata_sn","webdata_msvn","webdata_ssvn","webdata_pv_type","webdata_rate_p","webdata_now_p","webdata_today_e","webdata_total_e","webdata_alarm","webdata_utime");if(D>10||D<=0){return}var B=document.getElementById(C[D-1]);if(A==""&&B!=null){B.innerHTML="---";return}if(B!=null){if(D==5){B.innerHTML=A+" W"}else{if(D==6){B.innerHTML=A+" W"}else{if(D==7){sv=A1/100;B.innerHTML=sv.toString()+" kWh"}else{if(D==8){sv=A*1/10;B.innerHTML=sv.toString()+" kWh"}else{if(D==10){if(document.getElementById("webdata_sn").innerHTML=="---"){B.innerHTML="---"}else{B.innerHTML=A+window.parent.reTip("5")}}else{B.innerHTML=A}}}}}}else{alert(C[D])}};'' 2019-11-30 12:20:34.628 (Omnik Zonnepanelen) Received RAW Inverter Data: ['NLDN3020137R5131', 'NL1-V1.0-0061-4', 'V2.0-0024', 'omnik3000tl ', '3000', '1062', '146', '145676', '', '0', ''] 2019-11-30 12:20:34.628 (Omnik Zonnepanelen) Received Data: Current Power: 1062.0 W 2019-11-30 12:20:34.628 (Omnik Zonnepanelen) Received Data: Daily Power: 1.46 kWh 2019-11-30 12:20:34.628 (Omnik Zonnepanelen) Received Data: Total Power: 14567.6 kWh 2019-11-30 12:20:34.628 (Omnik Zonnepanelen) Received Data: String for the sensor is: 1062.0;14567600.0 ! 2019-11-30 12:20:34.628 (Omnik Zonnepanelen) Processing 'onDisconnectCallback' message 2019-11-30 12:20:34.628 (Omnik Zonnepanelen) Calling message handler 'onDisconnect'. 2019-11-30 12:20:34.628 (Omnik Zonnepanelen) onDisconnect called for connection to: 192.168.0.3:80 2019-11-30 12:20:35.242 (Slimme Meter) P1 Smart Meter (Slimme meter) 2019-11-30 12:20:40.991 (Router) Polling presense data from 192.168.0.1 2019-11-30 12:20:40.991 (Router) Using password instead of ssh public key authentication for 192.168.0.1 (less secure!) 2019-11-30 12:20:40.991 (Router) Fetching data from 192.168.0.1 using: sshpass -p secret ssh -o StrictHostKeyChecking=no -o ConnectTimeout=3 -p22 root@192.168.0.1 export PATH=/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:$PATH;brctl showmacs br0 | grep '..:..:..:..:..:..' | awk '{print $ 2}';exit 2019-11-30 12:20:42.616 (Router) ssh command on 192.168.0.1 returned:b'00:06:eb:bc:84:0e\n00:1a:22:05:41:ba\n00:c8:07:9b:7d:6f\n20:da:22:7b:03:7e\n2c:f4:32:a5:07:24\n34:14:5f:35:d8:f5\n34:ea:34:e7:dc:7a\n40:16:7e:a9:9f:cb\n40:d3:ae:98:ea:8e\n70:4f:57:9e:88:1f\n70:4f:57:9e:88:22\n76:4f:57:9e:88:1f\n84:0d:8e:75:4d:17\n9c:43:1e:d0:b7:a9\nac:cf:23:12:03:f9\nb8:27:eb:dc:ba:b8\nd4:ab:82:5b:ca:3b\nd8:f1:5b:c7:33:f8\ndc:a6:32:2c:82:9b\n' 2019-11-30 12:20:42.616 (Router) SSH command on 192.168.0.1 took 625 milliseconds. 2019-11-30 12:20:42.617 (Router) Found these devices connected:['00:06:EB:BC:84:0E', '00:1A:22:05:41:BA', '00:C8:07:9B:7D:6F', '20:DA:22:7B:03:7E', '2C:F4:32:A5:07:24', '34:14:5F:35:D8:F5', '34:EA:34:E7:DC:7A', '40:16:7E:A9:9F:CB', '40:D3:AE:98:EA:8E', '70:4F:57:9E:88:1F', '70:4F:57:9E:88:22', '76:4F:57:9E:88:1F', '84:0D:8E:75:4D:17', '9C:43:1E:D0:B7:A9', 'AC:CF:23:12:03:F9', 'B8:27:EB:DC:BA:B8', 'D4:AB:82:5B:CA:3B', 'D8:F1:5B:C7:33:F8', 'DC:A6:32:2C:82:9B'] 2019-11-30 12:20:42.617 (Router) Considered absent: Joost 2019-11-30 12:20:42.617 (Router) Considered absent: TVwoonkamer 2019-11-30 12:20:42.617 (Router) Considered absent: PCJeroen 2019-11-30 12:20:42.617 (Router) Considered absent: LaptopJanWifi 2019-11-30 12:20:42.618 (Router) Considered absent: LaptopJanEthernet 2019-11-30 12:20:42.618 (Router) Considered absent: LaptopJeroenWiFi 2019-11-30 12:20:42.618 (Router) Considered absent: LaptopJeroenethernet 2019-11-30 12:20:42.618 (Router) Considered absent: SamsungTVSlaapkamer 2019-11-30 12:20:42.618 (Router) Considered absent: EpsonPrinterFX360FW 2019-11-30 12:20:42.618 (Router) Considered absent: KoBoe-Reader 2019-11-30 12:20:42.618 (Router) Considered absent: RaspberryJeroen 2019-11-30 12:20:42.618 (Router) Considered absent: LaptopJoost 2019-11-30 12:20:42.618 (Router) Entire poll took 4% of the poll interval time (628 milliseconds) 2019-11-30 12:20:43.268 Error: (Buienradar) 'onHeartbeat' failed 'AttributeError':''BasePlugin' object has no attribute 'Error''. 2019-11-30 12:20:43.268 Error: (Buienradar) ----> Line 168 in '/home/pi/domoticz/plugins/domoticz-buienradar/plugin.py' 2019-11-30 12:20:43.268 Error: (Buienradar) ----> Line 145 in '/home/pi/domoticz/plugins/domoticz-buienradar/plugin.py' 2019-11-30 12:20:45.232 (Slimme Meter) P1 Smart Meter (Slimme meter) 2019-11-30 12:20:45.620 (Omnik Zonnepanelen) Pushing 'onHeartbeatCallback' on to queue 2019-11-30 12:20:45.622 (Omnik Zonnepanelen) Processing 'onHeartbeatCallback' message 2019-11-30 12:20:45.622 (Omnik Zonnepanelen) Calling message handler 'onHeartbeat'. 2019-11-30 12:20:45.622 (Omnik Zonnepanelen) onHeartbeat called, run again in 5 heartbeats.

stingone commented 3 years ago

Hi,

I installed the plugin but see the error messages from lines 209, 101 and 291. The inverter is reachable because I get data with the test http://xxx.xxx.x.xxx/js/status.js

2019-11-29 16:56:36.410 Status: (Omnik Zonnepanelen) Entering work loop. 2019-11-29 16:56:36.410 Status: (Omnik Zonnepanelen) Initialized version 1.0.1, author 'sincze' 2019-11-29 16:56:36.703 Status: MQTT: Connecting to localhost:1883 2019-11-29 16:56:36.904 Status: MQTT: connected to: localhost:1883 2019-11-29 16:56:37.105 Status: MQTT: Subscribed 2019-11-29 16:56:41.031 Status: (Router) Using generic brctl command on router 192.168.0.1. Will respond slower and on some routers a little less reliable to absence 2019-11-29 16:56:41.041 Error: (Omnik Zonnepanelen) 'onStart' failed 'KeyError'. 2019-11-29 16:56:41.041 Error: (Omnik Zonnepanelen) ----> Line 209 in '/home/pi/domoticz/plugins/Domoticz-Omnik-Local-Web-Plugin/plugin.py' 2019-11-29 16:56:41.041 Error: (Omnik Zonnepanelen) ----> Line 101 in '/home/pi/domoticz/plugins/Domoticz-Omnik-Local-Web-Plugin/plugin.py' 2019-11-29 16:56:41.041 Error: (Omnik Zonnepanelen) ----> Line 291 in '/home/pi/domoticz/plugins/Domoticz-Omnik-Local-Web-Plugin/plugin.py' 2019-11-29 16:56:45.970 Status: P1 Smart Meter: Meter is pre DSMR 4.0 and does not send a CRC checksum - using DSMR 2.2 compatibility

I also won't get the new devices in the devices tab.

Do I something wrong or I miss something. I hope you can fix it for me.

Kind regards, Jan

ever solved this? i got the same error

sincze commented 3 years ago

please share the outcome of for http://xxx.xxx.x.xxx/js/status.js so we can have a look. As the log does not say that much. Plugin runs with my own setup so the variable here would be the outcome of status.js. ;-)

On Tue, Feb 9, 2021 at 9:59 PM stingone notifications@github.com wrote:

Hi,

I installed the plugin but see the error messages from lines 209, 101 and 291. The inverter is reachable because I get data with the test http://xxx.xxx.x.xxx/js/status.js

2019-11-29 16:56:36.410 Status: (Omnik Zonnepanelen) Entering work loop. 2019-11-29 16:56:36.410 Status: (Omnik Zonnepanelen) Initialized version 1.0.1, author 'sincze' 2019-11-29 16:56:36.703 Status: MQTT: Connecting to localhost:1883 2019-11-29 16:56:36.904 Status: MQTT: connected to: localhost:1883 2019-11-29 16:56:37.105 Status: MQTT: Subscribed 2019-11-29 16:56:41.031 Status: (Router) Using generic brctl command on router 192.168.0.1. Will respond slower and on some routers a little less reliable to absence 2019-11-29 16:56:41.041 Error: (Omnik Zonnepanelen) 'onStart' failed 'KeyError'. 2019-11-29 16:56:41.041 Error: (Omnik Zonnepanelen) ----> Line 209 in '/home/pi/domoticz/plugins/Domoticz-Omnik-Local-Web-Plugin/plugin.py' 2019-11-29 16:56:41.041 Error: (Omnik Zonnepanelen) ----> Line 101 in '/home/pi/domoticz/plugins/Domoticz-Omnik-Local-Web-Plugin/plugin.py' 2019-11-29 16:56:41.041 Error: (Omnik Zonnepanelen) ----> Line 291 in '/home/pi/domoticz/plugins/Domoticz-Omnik-Local-Web-Plugin/plugin.py' 2019-11-29 16:56:45.970 Status: P1 Smart Meter: Meter is pre DSMR 4.0 and does not send a CRC checksum - using DSMR 2.2 compatibility

I also won't get the new devices in the devices tab.

Do I something wrong or I miss something. I hope you can fix it for me.

Kind regards, Jan

ever solved this? i got the same error

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/sincze/Domoticz-Omnik-Local-Web-Plugin/issues/2#issuecomment-776240155, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABMCHTNQJNQQRJLGIFMBFVLS6GOZJANCNFSM4JTBKQ7Q .