fossasia / susi_linux

Hardware for SUSI AI https://susi.ai
Apache License 2.0
1.61k stars 148 forks source link

Add the device to the SUSI Server #523

Open atm1504 opened 5 years ago

atm1504 commented 5 years ago

Is your feature request related to a problem? Please describe.

Setup some endpoints in the installer that will ask for the information from the android app about the name of the room, location (latitude, longitude), macid, access_token, speaker name. The installer should accept this information from the Android app and make a request to the susi server to add the device. The device should be added to the server only after the password is verified. Though it can accept the datas any time during the setup.

Describe the solution you'd like

After wifi is successfully configured in the susi speaker, it now should accept the above mention parameters before asking for the password. After this password is should be asked. Once the password is verified it should now make the request to the server to add it.

Endpoints of addNewDevice api:

https://api.susi.ai/aaa/addNewDevice.json?access_token=<access-token>&macid=<mac-id>&name=<device-name>&room=home&latitude=12.1&longitude=23.3

Reference Issue : https://github.com/fossasia/susi_android/issues/2290