The firmware request commands, for Client.call.
Find a command by the id seen on the wire
Find a command by the id seen on the wire
import { assertEquals } from "@std/assert"; import { COMMANDS } from "@hertzg/reolink-api/protocol/commands"; const found = Object.values(COMMANDS).find((candidate) => candidate.id === 93); assertEquals(found?.name, "GET_LINK_TYPE");
List the commands only the doorbell registers
List the commands only the doorbell registers
import { assertEquals } from "@std/assert"; import { COMMANDS } from "@hertzg/reolink-api/protocol/commands"; const doorbellOnly = Object.values(COMMANDS).filter((candidate) => !candidate.firmware.includes("RLC-823A") ); assertEquals(doorbellOnly.some((candidate) => candidate.name === "DINGDONG_CTRL"), true);