import { createAIPMConnector, seekAIPM, AIPM } from "./index.ts";
const aipm: AIPM[] = await seekAIPM("192.168.1.255");
const aipmIndex: string[] = aipm.map((e) => e.alias);
for (let i = 0; i < aipm.length; i++) {
aipm[i].connector = await createAIPMConnector({
ip: aipm[i].ip,
mac: aipm[i].mac,
});
}
aipm[aipmIndex.indexOf("ALIAS")].connector?.on();
- ✅ Seek PM Devices
- ✅ Switch on-off
- ✅ Get voltage, current, frequency, power-factor, consumtion, accumulate, price, co2 info
제가 했을땐 잘 됐는데 다른 환경에선 테스트 안해봤습니다 ..,
이 레포 참조했어요