KoljaWindeler / kaco

custom integration for kaco solar inverter
15 stars 8 forks source link

Index Out of Range #1

Closed mabildg30 closed 2 years ago

mabildg30 commented 3 years ago

Logger: custom_components.kaco.sensor Source: custom_components/kaco/sensor.py:118 Integration: kaco (documentation, issues) First occurred: 12:00:20 AM (1398 occurrences) Last logged: 8:28:04 AM

Traceback (most recent call last): File "/config/custom_components/kaco/sensor.py", line 164, in get_data kwh = float(ds.split(';')[4]) IndexError: list index out of range

KoljaWindeler commented 3 years ago

how does your "http://"+self._url+"/"+datetime.date.today().strftime('%Y%m%d')+".csv" look like?

KoljaWindeler commented 3 years ago

so the output of http://192.168.2.123/20210201.csv <-- replace the IP with your kaco IP

mabildg30 commented 3 years ago

Inverter type;Serial number;RS485 address;IP address;Yield[kWh] Powador 10.0 TL3;10.0TL01285224;1;192.168.191.202;0.00 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] 08:25:30;205.1;0.00;1;203.0;0.05;10;215.6;0.00;214.4;0.00;202.2;0.00;12;0;4.6 08:30:31;201.7;0.01;2;201.8;0.04;8;222.1;0.00;224.3;0.00;213.2;0.00;11;0;6.8 08:35:32;202.9;0.01;3;207.7;0.04;8;222.1;0.00;225.3;0.00;214.9;0.00;11;0;7.4 08:40:33;275.3;0.00;2;310.3;0.03;9;225.0;0.00;226.5;0.00;215.6;0.00;11;0;7.7 08:45:34;340.2;0.00;2;352.0;0.02;9;225.7;0.00;227.7;0.00;213.5;0.00;11;0;8.1 08:50:35;362.2;0.00;1;377.3;0.02;9;223.1;0.00;228.9;0.00;213.6;0.00;10;0;8.2 08:55:36;316.4;0.00;1;329.8;0.02;7;224.5;0.00;229.0;0.00;213.5;0.00;8;0;8.5 09:00:37;339.7;0.01;4;331.7;0.03;12;225.0;0.15;227.5;0.14;215.3;0.15;16;4;8.9 09:05:38;443.0;0.00;4;477.6;0.03;17;224.2;0.36;227.1;0.33;213.2;0.34;21;12;9.4

Den man. 1. feb. 2021 kl. 08.59 skrev Kolja Windeler < notifications@github.com>:

so the output of http://192.168.2.123/20210201.csv <-- replace the IP with your kaco IP

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/KoljaWindeler/kaco/issues/1#issuecomment-770653135, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASJCIIS6BLDAZDTG5HROLPLS4ZNNPANCNFSM4W4J5KPQ .

KoljaWindeler commented 3 years ago

hmm looks fine .. is it still not working?

mabildg30 commented 3 years ago

Sorry. No. All other values are fine. It is only KWH that is not working

Den man. 1. feb. 2021 kl. 09.16 skrev Kolja Windeler < notifications@github.com>:

hmm looks fine .. is it still not working?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/KoljaWindeler/kaco/issues/1#issuecomment-770663310, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASJCIITNXYDTA76GU4CLZ4DS4ZPNNANCNFSM4W4J5KPQ .

KoljaWindeler commented 3 years ago

hmm I'm currently not close to my setup and can't access the data that I'm getting .. I'm sorry but I can't help right now, but will get back to you in approximately a month

mabildg30 commented 3 years ago

No worries. I have current production..

Den man. 1. feb. 2021 kl. 09.27 skrev Kolja Windeler < notifications@github.com>:

hmm I'm currently not close to my setup and can't access the data that I'm getting .. I'm sorry but I can't help right now, but will get back to you in approximately a month

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/KoljaWindeler/kaco/issues/1#issuecomment-770670639, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASJCIIRUKGX7DSWV2KPO6VTS4ZQYZANCNFSM4W4J5KPQ .

Spitfire69 commented 3 years ago

Had a similar issue on the same row when float didn’t manage to convert when string included a comma ie 10,52...it needs to be 10.52 hence a change to

kwh = float(ds.split(';')[4].replace(',','.'))

was needed on my Kaco Blueplanet 9.0

mabildg30 commented 3 years ago

Hi All Have been going through som debugging and now I have data. The issue was that the HTTP timeout was to short. After I have increased the timeout for the day-request, it works. for some reason the Powerdor is extremly slow to return these data.

KoljaWindeler commented 3 years ago

Great, Could you create a pull request?

Spitfire69 commented 3 years ago

I had to increase the timeout to but the error you got I think depends on that the day info .csv is not available. I installed this component yesterday and saw that exactly at midnight I also got this error...750 of them until this morning when the sun got up and new .csv data was created.

Improvment would also be to just run update during when the sun is up and some extra due to backlight...

KoljaWindeler commented 3 years ago

I had to replace my hardware and got a sma now ... So won't continue this. Sorry guys.

Spitfire69 commented 3 years ago

Ouch, bad but I understand. I will try to get it working for my setup and hopefully it can be merged later. 99% is already there so it’s just fixing the last issues...