Request a list of available Wifi networks from the board. A response is sent via AVAILABLE_NETWORKS
. In addition, DEVICE_DATA
is sent for convenience.
Payload:
{}
Connect to a Wifi network. Pass the SSID and password in the payload. If successfull, a response is sent via CONNECTION_SUCCESS
. If unsuccessful, a response is sent via CONNECTION_FAILURE
.
Payload:
{
"ssid": "My wifi",
"password": "mypassword"
}
Set the lampId
in the hardware configuration. The app will send this once the setup process is complete and the
lamp has been added to the database. The lampId
comes from the MongoDB _id field, it is not the same as the deviceId
.
Payload:
{
"lampId": "xxxxxxxxxxxxxxxxxxxxxxxx"
}
Sends info about the board.
Payload:
{
"deviceId": "abcd1234",
}
Sends a list of available Wifi networks.
Payload:
{
"networks": [
{
"ssid": "My wifi",
"strength": 0.9
},
{
"ssid": "My other wifi",
"strength": 0.5
}
]
}
The board has successfully connected to Wifi.
Payload:
{
"ssid": "My wifi",
"ip": "192.168.1.1",
"strength": 0.9
}
The board failed to connect to Wifi.
Payload:
{}
A generic error handler to send an error message back to the app. These will be toasted to the user
Payload:
{
"message": "Something went wrong"
}