function sirenXml
sirenXml(request: SirenRequest): string

Builds the body of a siren request.

Examples

Start and stop manual play

import { assertStringIncludes } from "@std/assert";
import { sirenXml } from "@hertzg/reolink-api/protocol/siren";

assertStringIncludes(sirenXml({ channel: 0, on: true }), "<onOff>1</onOff>");
assertStringIncludes(sirenXml({ channel: 0, on: false }), "<onOff>0</onOff>");

Parameters

The channel and what to play.

Return Type

string

The request XML, ready to be encrypted.

Usage

import { sirenXml } from "protocol/siren.ts";