trixing / kaco-http

Kaco Blueplanet NX3 M2 HTTP Protocol
MIT License
4 stars 0 forks source link

Read Smartmeter #1

Open andy5macht opened 9 months ago

andy5macht commented 9 months ago

Hello, many many thanks for this very useful information you found and spread!!! Ihis is not an "issue" but a question if you are able to add the http request for reading the smartmeter value? There is the option to connect a SM (SDM630) via Modbus to the Kaco Inverter. On Kaco NX Setup App you can see the value of the SM. So i think this should be possible to read it via HTTP request.

Would be nice if you can have a look!

Thanks again!

Andreas

andy5macht commented 9 months ago

OK that was easy: we have to use device=3 instead of device=2. so i used: http://IP:8484/getdevdata.cgi?device=3&sn=SN

and got: {"flg":0,"tim":"","pac":-2096,"itd":290,"otd":70,"iet":133,"oet":6630,"mod":1,"enb":1}

mapietru commented 5 months ago

Hello,

I have some questions, as it seems my Kaco is not replying as expected:

curl http://IP:8484/getdev.cgi -> returns:

{"psn":"B3278A29XXX","key":"ST5NNRKRRLXXXXX","typ":5,"nam":"Wi-Fi Stick","mod":"B32078-10","muf":"KACO","brd":"KACO","hw":"M11","sw":"21618-006R","wsw":"ESP32-WROOM-32U","tim":"2024-06-15 11:13:46","pdk":"","ser":"","protocol":"V1.0","host":"cn-shanghai","port":1883,"status":0}

curl http://IP:8484/getdev.cgi?device=2 -> returns:

{"inv":[{"isn":"5.0NX312123456","add":3,"safety":70,"rate":5000,"msw":"V610-03043-04 ","ssw":"V610-60009-00 ","tsw":"V610-11009-02 ","pac":443,"etd":30,"eto":38606,"err":0,"cmv":"V2.1.1AV2.00","mty":51,"psb_eb":1}],"num":1}

curl http://IP:8484/getdevdata.cgi -> returns: request not found, 404 curl http://IP:8484/getdevdata.cgi?device=2 -> returns: device not found curl http://IP:8484/getdevdata.cgi?device=2&sn=5.0NX312123456 -> returns: device not found

There is no smartmeter connected to the Kaco, but

curl http://IP:8484/getdevdata.cgi?device=3 -> returns: {"flg":0,"tim":"","pac":0,"itd":0,"otd":0,"iet":0,"oet":0,"mod":0,"enb":0} -> as expected

Any idee what could be changed to enable this?

Br Markus

trixing commented 5 months ago

@mapietru can you try a view different numbers for device? like device=1 or device=0 ?

Otherwise, the way to reverse engineer this would be to set up a proxy (e.g. nginx) in your local network to log the requests between the mobile app (kaco nx setup) and the inverter.

trixing commented 5 months ago

(also, I think the inverter needs to be on, ie. sunlight shining, for this to work)