addDetector method

Future<Map<String, dynamic>> addDetector(
  1. String deviceSerial,
  2. String detectorToAddSerial,
  3. String detectorType,
  4. String detectorCode,
)

Implementation

Future<Map<String, dynamic>> addDetector(
  String deviceSerial, // A1 Hub serial
  String detectorToAddSerial, // Serial of detector to add
  String
  detectorType, // e.g., "PIR", "FIRE" - see DetectorType enum or API docs
  String detectorCode, // Verification code, API says "must enter ABCDEF"
) async {
  return _client.post('/api/lapp/detector/add', {
    'deviceSerial': deviceSerial,
    'detectorSerial': detectorToAddSerial,
    'detectorType': detectorType,
    'detectorCode': detectorCode,
  });
}