<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_device():
 """ Add a device via HTTP POST. POST JSON in the following format :: { "device_id": "<your_device_id>", "host": "<address>:<port>", "adbkey": "<path to the adbkey file>" } """

    req = request.get_json()
    success = False
    if 'device_id' in req and 'host' in req:
        success = add(req['device_id'], req['host'], req.get('adbkey', ''), req.get('adb_server_ip', ''), req.get('adb_server_port', 5037))
    return jsonify(success=success)