goecharger / go-eCharger-API-v2

New API specification for V3 and V4 go-eCharger
91 stars 20 forks source link

api v2: /api/status containing 600 lines of nearby WLAN networks #12

Closed sebnaf closed 2 years ago

sebnaf commented 3 years ago

Good day,

analyzing the JSON gathered from http://{{goeUrl}}/api/status, I do see over 600 lines (!) of nearby WLAN networks.

I'd love to to specify an array of values to be sent back only - we do not want to send and proceed not needed entries.

Thank you

chk2902 commented 3 years ago

I don't know why the API2 is there anyway...

but you can still use API1 and be happy - where's the advantage of API2? A bit more structured, maybe more precise values (we don't know yet here) but that's it.

sebnaf commented 3 years ago

I assume API v2 has been created to satisfy the go-e cloud services. Most of the versioned APIs have deprecated the v1/older versions sooner or later.

In this case I want to use slim and fast API response bodies.

This brings up another interesting topic: are my nearby WLANs sent back to the go-e cloud as well?

chk2902 commented 3 years ago

I would guess that's not correct - the go-e app uses WebSockets to communicate with the servers and the device. I have started WebSocket sniffing weeks ago but gave up - no documented authentication (and a very bad implementation if you need to use standard libraries due to thousands of iterations - absolute overkill and taking many seconds to calculate even on a fast smartphone). In principle this is much better (sends delta information as push messages), thus this would have been preferred by me, but then, they lack of documentation and reliably working wallboxes anyway.

Ah, IIRC they really send the API2 JSON to the server, yes.

sebnaf commented 3 years ago

I do not want to continue offtopic any further, thank you.

chk2902 commented 3 years ago

Well that's OK but you asked whether the Wifi information is sent to the server ("are my nearby WLANs sent back to the go-e cloud as well?") - and I did answer that as far as I remember, this is the case.

So please tell me why this is off-topic.

sebnaf commented 3 years ago

@chk2902 can you assure that the WLANs are not sent to go-e in any case or is this just an assumption doing some sniffing?

chk2902 commented 3 years ago

@sebnaf Just an assumption, yes. The communication between the wallbox and the go-e servers must be captured on the router, and I did not do this.

chk2902 commented 3 years ago

Your wish was fulfilled... https://github.com/goecharger/go-eCharger-API-v2 : you can set a filter of registers to read.

sebnaf commented 3 years ago

awesome.