Ok. I need to check how that is done… Meanwhile i took te pump internals open and heres some pics if someone is interested… Wifi Module is esp-wroom-2uc. I tried to install Https sertificate but don’t really find anything useful information from fiddler while using the app. the address what it uses for communicating is http://usapi.gizwits.com/app/
Update:
I managed to get some data using fiddler. Here’s what i have found:
When controlling pump from app i see POST request made to https://usaepapp.gizwits.com/app/user/control_log with json data:
{
"appKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"data": {
"uid": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"productKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"mac": "XXXXXXXXXXX",
"did": "xxxxxxxxxxxxxxxxxxxxxxxxxx",
"command": {
"power": true
}
},
"type": "appId",
"version": "1.0"
}
When opening the app this is the first GET request that is made.
GET http://usapi.gizwits.com/app/users/terms?locate=en HTTP/1.1
Host: usapi.gizwits.com
Origin: http://localhost:9099
Accept-Encoding: gzip, deflate
Connection: keep-alive
X-Gizwits-User-token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Accept: */*
User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 14_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148
X-Gizwits-Application-Id: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Referer: http://localhost:9909/
Accept-Language: fi-fi
X-Gizwits-Application-Id is same as appKey on POST requests.
Tried to make manually same POST request via fiddler but device wont respond to it. All i get is this message. (this message also comes when i control pump from my phone).
HTTP/1.1 200
Access-Control-Allow-Credentials: true
Access-Control-Allow-Headers: X-Gizwits-Application-Id,Accept,Origin,No-Cache,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Version,Authorization
Access-Control-Allow-Methods: POST,GET,OPTIONS,DELETE,PUT
Access-Control-Allow-Origin: *
Access-Control-Max-Age: 3600
Content-Type: application/json;charset=UTF-8
Date: Tue, 05 Jan 2021 19:26:10 GMT
Server: nginx/1.16.1
Vary: Accept-Encoding
X-Application-Context: aep-service-composite:prod-us:8077
Content-Length: 87
Connection: keep-alive
{"code":"200","message":"本次请求成功!","data":null,"display":null,"error":false}
message here says that “This request was successfull”
When logging in to app this POST request is made. but this is one time only if you have logged out from the app.
POST https://usaepapp.gizwits.com/app/smart_home/users/privacy HTTP/1.1
Host: usaepapp.gizwits.com
Content-Type: application/json
Origin: http://localhost:9909
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Accept: */*
Version: 1.0
User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 14_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148
Referer: http://localhost:9909/
Content-Length: 147
Accept-Language: fi-fi
{"appKey":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","data":{"privacy":0,"country":"FI","email":"[email protected]"},"type":"appId","version":"1.0"}
Appkey here is same as X-Gizwits-Application-Id and appKey on earlier code.