olssonm / google-wifi-api

Discovered API-endpoints for the Google Wifi Router and OnHub
MIT License
202 stars 15 forks source link

Obtain the current traffic through the device #10

Closed phrfpeixoto closed 4 years ago

phrfpeixoto commented 4 years ago

Hi,

I'm sorry if this it question is not supposed to be an issue here, but... Is it possible to obtain the current traffic going through the device's WAN port?

olssonm commented 4 years ago

You mean that you wish to sniff the network traffic through the router?

As far as I know there is nothing discovered regarding this, and is highly unlikely that a feature such as that is build in for the router I am afraid =/

phrfpeixoto commented 4 years ago

Sorry, I guess I expressed poorly. Not sniff it, just obtain the rates on which traffic is going through, like we see on the app.

olssonm commented 4 years ago

Oops, my bad – I'll reopen it!

Not what I know of, I doubt it but I'll check.

If anyone else has any info this they are also welcome of course =)

phrfpeixoto commented 4 years ago

I have a 3-puck set and the app on my phone. How can I contribute? I can try sniffing the phone connection, but I don't think it will be very effective...

On the app, the data flow is constant, so this likely comes from a websocket or some soft of stream.

On the other hand, the app also offers aggregated statistics, which are likely stored somewhere. This could be the device itself, but it's more likely to be on the cloud.

samascience commented 4 years ago

http://192.168.86.1/api/v1/connected-devices this seemed to be not working !! image

samascience commented 4 years ago

$ http --print hbHB http://192.168.86.1/api/v1/connected-devices 'Host:onhub.here' GET /api/v1/connected-devices HTTP/1.1 Accept: / Accept-Encoding: gzip, deflate Connection: keep-alive Host: onhub.here User-Agent: HTTPie/0.9.8

HTTP/1.1 401 Unauthorized Connection: Keep-Alive Content-Length: 5 Content-Type: application/json; charset=utf-8 Date: Tue, 19 May 2020 23:48:02 GMT

{}

phrfpeixoto commented 4 years ago

@samascience That seems unrelated to this issue. Please post on a more relevant issue, or submit a new one.