KACO Powador web server

others protocols
andy
Posts: 45
Joined: Wed May 04, 2016 10:25 am
Location: Ukraine
Contact:

KACO Powador web server

Post by andy » Tue Jun 06, 2017 9:38 pm

1st - sorry for my bad english.
KACO Powador power inverter
built webserver
4 kinds of output
1 - IP:port/realtime.csv

Code: Select all

1496792037;0;0;0;0;0;0;0;0;0;0;0;0;2
2 - IP:port/YYYYMMDD.csv

Code: Select all

Inverter type;Serial number;RS485 address;IP address;Yield[kWh]
Powador 18.0 TL3;18.0TL******;1;192.168.*.*;9.29
Time;Udc1[V];Idc1[A];Pdc1[W];Udc2[V];Idc2[A];Pdc2[W];Uac1[V];Iac1[A];Uac2[V];Iac2[A];Uac3[V];Iac3[A];Pdc[W];Pac[W];Tsys[°C] 
14:42:01;959.0;0.79;763;965.1;0.80;777;238.7;2.16;229.4;2.15;232.1;2.16;1541;1461;32.2
14:43:00;808.5;2.11;1707;808.3;2.09;1692;238.7;4.67;230.2;4.84;232.9;4.78;3402;3347;32.3
14:44:01;792.6;2.12;1681;793.5;2.07;1646;238.4;4.56;230.5;4.72;232.7;4.67;3330;3266;32.3
14:45:01;792.5;2.13;1688;794.2;2.08;1653;237.6;4.60;230.6;4.74;233.3;4.69;3342;3285;32.4
14:46:01;792.5;2.24;1775;793.3;2.19;1743;237.8;4.86;231.4;5.00;232.5;4.97;3522;3472;32.5
14:47:01;791.6;2.39;1894;793.2;2.34;1856;237.8;5.18;230.9;5.34;233.7;5.27;3752;3703;32.6
14:48:01;791.1;2.47;1955;793.0;2.42;1921;237.5;5.36;230.4;5.52;235.0;5.42;3878;3823;32.7
14:49:01;792.6;2.54;2019;793.9;2.49;1981;237.9;5.52;230.3;5.70;234.9;5.59;4004;3944;32.8
14:50:01;792.2;2.65;2105;793.9;2.61;2073;239.6;5.74;229.8;5.99;234.5;5.87;4182;4132;32.9
14:51:01;792.4;2.71;2154;794.4;2.66;2116;238.7;5.89;230.9;6.09;234.8;5.99;4274;4223;33.0
14:52:01;792.3;2.67;2118;794.7;2.61;2076;238.3;5.76;230.4;5.96;235.5;5.83;4198;4122;33.1
14:53:01;792.2;2.71;2149;793.8;2.65;2107;237.1;5.91;229.8;6.10;237.3;5.90;4259;4208;33.2
14:54:01;791.7;2.90;2297;793.3;2.84;2256;238.1;6.29;229.5;6.52;237.2;6.31;4556;4496;33.3
14:55:01;791.9;3.12;2474;793.7;3.06;2431;238.9;6.76;230.2;7.01;236.7;6.82;4908;4849;33.4 
3 - IP:port/YYYYMM.csv

Code: Select all

Inverter type;Serial number;RS485 address;IP address;Yield[kWh]
Powador 18.0 TL3;18.0TL*****;1;192.168.*.*;38.27 
Date;E[Wh] 
01/06/2017;9291 
02/06/2017;6559 
03/06/2017;0 
04/06/2017;0 
05/06/2017;833 
06/06/2017;21596
4 IP:port/YYYY.csv

Code: Select all

Inverter type;Serial number;RS485 address;IP address;Yield[kWh] 
 Powador 18.0 TL3;18.0TL***;1;192.168.*.*;0.00 
 Date;E[Wh] 
 04/2017;0 
 05/2017;0 


im noob in php (little python maybe)
please help me write parser
Last edited by andy on Sun Jun 18, 2017 6:31 pm, edited 1 time in total.

jeanmarc
Posts: 1764
Joined: Thu Aug 29, 2013 7:16 am

Re: KACO Powador

Post by jeanmarc » Wed Jun 07, 2017 4:16 pm

Hi Andy,
Sure, i'am always ok to help ;)
What are the values meaning in realtime.csv ?
I also need the total counter with a Wh precision :roll:

andy
Posts: 45
Joined: Wed May 04, 2016 10:25 am
Location: Ukraine
Contact:

Re: KACO Powador

Post by andy » Thu Jun 08, 2017 7:38 pm

jeanmarc big thanks!
I asked for more information from the dealer
It seems that in the 3rd version of the firmware the format has changed. As soon as I receive the information - I will immediately inform you in the topic

andy
Posts: 45
Joined: Wed May 04, 2016 10:25 am
Location: Ukraine
Contact:

Re: KACO Powador

Post by andy » Wed Jun 14, 2017 9:44 pm

info about TCP protocol

1) IP:port/meta.csv

Code: Select all

18.0TL0****;Powador 18.0 TL3;D8:80:39:E6:18:B5;192.168.5.105;1;3;2;15000.0;3;3;0;enUS;331;396;0A8B;51404;29BD;209;6F7B;206;0000;KACO;32
serial;name;mac-addr;ip-addr;?;3phase;2strings;power;?;?;?;languageName;???

2) IP:port/initlog.txt

Code: Select all

20170531;201705;2017;
dateOfFirstRecord;YYYYMM;YYYY

3) IP:port/pstaenUS.txt
STATUS codes in current language (status codes for realtime.csv)

4)IP:port/realtime.csv

Code: Select all

1497415565;29729;29924;9740;9350;9610;18;33;51;54;52;74;2453;4 
unixtime;DC1(V) * 65535 / 1600;DC2(V) * 65535 / 1600;AC1(V) * 65535 / 1600;AC2(V) * 65535 / 1600;AC3(V) * 65535 / 1600;DC1(A) * 65535 / 200;DC2(A) * 65535 / 200;AC1(A) * 65535 / 200;AC2(A) * 65535 / 200;AC3(A) * 65535 / 200; AC(W) * 65535 / 100000;temperature*100;STATUS

5) IP:port/YYYYMMDD.CSV

Code: Select all

Inverter type;Serial number;RS485 address;IP address;Yield[kWh]
Powador 18.0 TL3;18.0*****;1;192.168.5.105;21.59
Time;Udc1[V];Idc1[A];Pdc1[W];Udc2[V];Idc2[A];Pdc2[W];Uac1[V];Iac1[A];Uac2[V];Iac2[A];Uac3[V];Iac3[A];Pdc[W];Pac[W];Tsys[°C]
04:24:33;0.0;0.00;0;0.0;0.00;0;0.0;0.00;0.0;0.00;0.0;0.00;0;0;0.0
04:24:35;0.0;0.00;0;0.0;0.00;0;119.3;0.00;116.9;0.00;127.4;0.00;0;0;10.5
04:25:07;0.0;0.00;0;0.0;0.00;0;0.0;0.00;0.0;0.00;0.0;0.00;0;0;0.0
04:25:12;80.3;6.67;536;78.8;6.70;528;238.9;0.00;242.0;0.00;246.4;0.00;1064;0;21.2 
6) IP:port/YYYYMM.CSV

Code: Select all

Inverter type;Serial number;RS485 address;IP address;Yield[kWh] Powador 18.0 TL3;18.0TL*****;1;192.168.5.105;211.89 Date;E[Wh] 01/06/2017;9291 02/06/2017;6559 03/06/2017;0 04/06/2017;0 05/06/2017;833 06/06/2017;21596 07/06/2017;26449 08/06/2017;28942 09/06/2017;13038 10/06/2017;6961 11/06/2017;3232 12/06/2017;32153 13/06/2017;62846 
Total counter ONLY in kWh in file IP:port/YYYYMMDD.CSV (2nd line 5th digit)
BTW.
inverter store in memory ALL info by days from date (initlog.txt)
Last edited by andy on Thu Jun 15, 2017 10:37 pm, edited 2 times in total.

andy
Posts: 45
Joined: Wed May 04, 2016 10:25 am
Location: Ukraine
Contact:

Re: KACO Powador

Post by andy » Wed Jun 14, 2017 9:51 pm

http://rgho.st/7ZBTbTgbN
file realtime.csv - actual info from my inverter
http://rgho.st/6snMPx96F
file main.js - java parser from inverter
http://rgho.st/private/8SbkkwkSp/cdc108 ... f38d0c08d8
file pstaenUS.txt - status codes from inveter (en language)

jeanmarc
Posts: 1764
Joined: Thu Aug 29, 2013 7:16 am

Re: KACO Powador

Post by jeanmarc » Thu Jun 15, 2017 6:24 am

andy wrote:
Wed Jun 14, 2017 9:44 pm
Total counter ONLY in kWh in file IP:port/YYYYMMDD.CSV (2nd line 5th digit)
Ok but i need a Wh precision, 21.59kWh to 21.590kWh. Is that possible ?.

andy
Posts: 45
Joined: Wed May 04, 2016 10:25 am
Location: Ukraine
Contact:

Re: KACO Powador

Post by andy » Thu Jun 15, 2017 9:52 pm

in csv file by date power in kwh precision x.xx = xxx0 wh (21.59rwh~21590wh)
power in wh precision may get from file
YYYYMM.scv

Code: Select all

Inverter type;Serial number;RS485 address;IP address;Yield[kWh] Powador 18.0 TL3;18.0TL*****;1;192.168.5.105;274.17 Date;E[Wh] 01/06/2017;9291 02/06/2017;6559 03/06/2017;0 04/06/2017;0 05/06/2017;833 06/06/2017;21596 07/06/2017;26449 08/06/2017;28942 09/06/2017;13038 10/06/2017;6961 11/06/2017;3232 12/06/2017;32153 13/06/2017;62846 14/06/2017;62280 
if i request file 201706.csv i may get wh precision in 06month by day (today from 01 to 14, tomorrow from 01 to 15th)

jeanmarc
Posts: 1764
Joined: Thu Aug 29, 2013 7:16 am

Re: KACO Powador

Post by jeanmarc » Fri Jun 16, 2017 7:36 am

Thanks for the info and for the access.
Sadly it dosen't help me much, the kWh value in YYYYMM.scv is lagging from one day.

I really need live Wh, since all is based on that in 123s. For the rest, it would be easy to import other data.

andy
Posts: 45
Joined: Wed May 04, 2016 10:25 am
Location: Ukraine
Contact:

Re: KACO Powador

Post by andy » Fri Jun 16, 2017 8:19 am

thanks jeanmarc for answers

maybe use approximate kwh value from file yyyymmdd.csv?
And the exact value for the day is loaded at the beginning of the next day

zb. Every hour download file yyyymmdd.csv
And fill in all the values
And the value of wh use approximate
As a result, we will have all the values (U, A, I, W) every minute
and wh approximate cumulative value every hour

I can get the value when the inverter is connected through 485. However in my case I can not install any additional equipment near the inverter. Therefore, the inverter can be polled ONLY via the built-in WEB server. Maybe in a month I'll install another inverter where I can connect through 485. However, I want to poll the inverter BOTH ways.

In any case, I will write an application to poll the inverter and parsing for use with 123.

Big thanks for any help.

jeanmarc
Posts: 1764
Joined: Thu Aug 29, 2013 7:16 am

Re: KACO Powador

Post by jeanmarc » Fri Jun 16, 2017 5:26 pm

Here's a mockup, i'am not sure how you can get the total counter and guess what happen in 5 min lap ;)
Mind that the counter must always increase.

You can try simply php kaco.php

Code: Select all

<?php
if (!defined('checkaccess')) {
    //    die('Direct access not permitted');
}
// For KACO Powador
$CMD_RETURN = ''; // Always initialize

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://localhost/realtime.csv');
curl_setopt($ch, CURLOPT_TIMEOUT, 5);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$CMD_RETURN = strip_tags(curl_exec($ch));
curl_close($ch);

$dataarray = preg_split('/;/', $CMD_RETURN);

print_r($dataarray);

if (isset($dataarray[13])) {
    // Grid values
    $G1V = (float) ($dataarray[3] / (1600 * 65535));
    $G1A = (float) ($dataarray[8] / (200 * 65535));
    $G1P = (float) ($dataarray[11] / (100000 * 65535));
    $G2V = (float) ($dataarray[4] / (1600 * 65535));
    $G2A = (float) ($dataarray[9] / (200 * 65535));
    $G2P = null;
    $G3V = (float) ($dataarray[5] / (1600 * 65535));
    $G3A = (float) ($dataarray[10] / (200 * 65535));
    $G3P = null;
    $FRQ = null;
    
    // Strings
    $I1V = (float) ($dataarray[1] / (1600 * 65535));
    $I1A = (float) ($dataarray[6] / (200 * 65535));
    $I1P = null;
    
    $I2V = (float) ($dataarray[2] / (1600 * 65535));
    $I2A = (float) ($dataarray[7] / (200 * 65535));
    $I2P = (float) ($dataarray[6] / (200 * 65535));
    
    $I3V = null;
    $I3A = null;
    $I3P = null;
    $I4V = null;
    $I4A = null;
    $I4P = null;
    
    // Inverter
    //$EFF = round(($G1P / $I1P) * 100, 1);
    $EFF  = null;
    $INVT = $G3A = (float) ($dataarray[12] / 100);
    $BOOT = null;
    
    //Getting KWHT in Wh, the value should always increase !
    $today = date("Ymd");
    
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, "http://localhost/$today.csv");
    curl_setopt($ch, CURLOPT_TIMEOUT, 5);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    $CMD_RETURN = strip_tags(curl_exec($ch));
    curl_close($ch);
    
    $KWHT = null;
    
    $RET = 'OK';
} else {
    $RET = 'NOK';
}

echo "
G1V: $G1V V
G1A: $G1A A
G1P: $G1P W
G2V: $G2V 
G2A: $G2A 
G2P: $G2P 
G3V: $G3V 
G3A: $G3V 
G3P: $G3P 

FRQ: $FRQ 
I1V: $I1V 
I1A: $I1A 
I1P: $I1P 
I2V: $I2V 
I2A: $I2A 
I2P: $I2P 

EFF: $EFF 
INVT: $INVT 

KWT: $KWHT Wh";
?>

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest