code: def device_action(device_id, action_id):
      
      success = False
      if device_id in devices:
          input_cmd = getattr(devices[device_id], action_id, None)
          if callable(input_cmd):
              input_cmd()
              success = True
      return jsonify(success=success)
docs: Initiate device action via HTTP GET.