hikvision_service 0.0.2 copy "hikvision_service: ^0.0.2" to clipboard
hikvision_service: ^0.0.2 copied to clipboard

A Dart library to interact with Hikvision devices via ISAPI protocol and register them to cloud services.

Hikvision Service #

A Dart library for interacting with Hikvision devices using the ISAPI protocol. This package allows you to fetch device information and register devices to a backend API.

Features #

  • Device Info: Fetch MAC address, Serial Number (Full & Short) from Hikvision devices via ISAPI (XML).
  • Authentication: Supports Digest Authentication required by Hikvision devices.
  • Registration: Helper methods to push device data to a cloud API (Tipsoi/CS3 compatible).

Getting started #

Add this to your package's pubspec.yaml file:

dependencies:
  hikvision_service: ^0.0.1

Usage #

import 'package:hikvision_service/hikvision_service.dart';

void main() async {
  final service = HikvisionService();

  try {
    // 1. Fetch Device Info
    final info = await service.getDeviceInfo('192.168.1.64', 'admin', 'password');
    print('MAC: ${info.macAddress}');
    print('Serial: ${info.shortSerialNumber}');

    // 2. Register (Optional)
    await service.createDeviceApi(
      identifier: info.shortSerialNumber,
      vendorId: info.fullSerialNumber, 
      macAddress: info.macAddress,
      hikSecurityCode: 'password',
      timezoneOffsetMinutes: 360,
    );
  } catch (e) {
    print('Error: $e');
  }
}
0
likes
145
points
152
downloads

Publisher

unverified uploader

Weekly Downloads

A Dart library to interact with Hikvision devices via ISAPI protocol and register them to cloud services.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

http, http_auth, xml

More

Packages that depend on hikvision_service