i think 192.168.1.8 is the ip of device(esp32)… if my understanding is wrong please correct me… also i tried with different network… but the result is same…
the log at server back end is
C:\mos\mongoose-os-smart-light\backend>docker-compose up
Starting backend_dash_1 … done
Starting backend_api-server_1 … done
Starting backend_nginx_1 … done
Attaching to backend_api-server_1, backend_dash_1, backend_nginx_1
api-server_1 | Connecting to ws://dash:8001/api/v2/notify?access_token=6de9f99d839f1e981138d6ff …
dash_1 | 2020/10/04 17:21:37 dash.go:1844: Listening on 0.0.0.0:8001
api-server_1 | Starting API Server on port 8002
api-server_1 | Dash connected.
api-server_1 | Dash message: {“id”:“b3b0bb64e13081ac4d08be9c”,“name”:“created”,“data”:null,“at”:“2020-10-04T17:30:14.919514324Z”}
api-server_1 |
api-server_1 | PWA connected: ::ffff:172.18.0.4 , app: mos_app_k7gm7zibq
api-server_1 | DASH -> {“method”:“POST”,“headers”:{“Authorization”:“Bearer 6de9f99d839f1e981138d6ff”,“Content-Type”:“application/json; charset=utf-8”},“url”:“http://dash:8001/api/v2/user/add",“data”:{“name”:“mos_app_k7gm7zibq”,“pass”:"mos_app_k7gm7zibq”}}
api-server_1 | DASH -> {“method”:“GET”,“headers”:{“Authorization”:“Bearer 6de9f99d839f1e981138d6ff”,“Content-Type”:“application/json; charset=utf-8”},“url”:“http://dash:8001/api/v2/devices",“auth”:{“username”:“mos_app_k7gm7zibq”,“password”:"mos_app_k7gm7zibq”}}
dash_1 | 2020/10/04 17:34:18 dash.go:231: /api/v2/devices [[Basic bW9zX2FwcF9rN2dtN3ppYnE6bW9zX2FwcF9rN2dtN3ppYnE=]] : No user for [mos_app_k7gm7zibq:mos_app_k7gm7zibq]
api-server_1 | (node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): TypeError: Cannot read property ‘data’ of undefined
api-server_1 | DASH ERROR: Request failed with status code 401
api-server_1 | PWA connection closed: ::ffff:172.18.0.4
api-server_1 | PWA connected: ::ffff:172.18.0.4 , app: mos_app_k7gm7zibq
api-server_1 | DASH -> {“method”:“POST”,“headers”:{“Authorization”:“Bearer 6de9f99d839f1e981138d6ff”,“Content-Type”:“application/json; charset=utf-8”},“url”:“http://dash:8001/api/v2/user/add",“data”:{“name”:“mos_app_k7gm7zibq”,“pass”:"mos_app_k7gm7zibq”}}
api-server_1 | DASH -> {“method”:“GET”,“headers”:{“Authorization”:“Bearer 6de9f99d839f1e981138d6ff”,“Content-Type”:“application/json; charset=utf-8”},“url”:“http://dash:8001/api/v2/devices",“auth”:{“username”:“mos_app_k7gm7zibq”,“password”:"mos_app_k7gm7zibq”}}
api-server_1 | PWA connection closed: ::ffff:172.18.0.4
can you give me an example for the api calls which i have to try. im a beginner with mongoose.