Security News
The Risks of Misguided Research in Supply Chain Security
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
broadlink-core
Advanced tools
Connection library to Broadlink WiFi-connected switches and sensors
Low level connection library to Broadlink SP WiFi-connected switches.
Basically this one takes care of probing a single IP address and providing a way to send data to that device and receive the response. Payload encryption is taken care of inside the library. Not much else. This library is therefore actually only a basis for other libraries that provide actual logic for controlling the devices and also implements actual protocol payloads for different operations.
const broadlinkProbe = require('broadlink-core');
async function main() {
let dev = await broadlinkProbe('192.168.123.10', 2000);
if (dev.devClass !== 'sp3s') {
throw new Error('No energy meter in device');
}
let p = Buffer.from([8, 0, 254, 1, 5, 1, 0, 0, 0, 45, 0, 0, 0, 0, 0, 0]);
let r = await dev.call(0x6a, p, 1000);
// Energy reading is encoded to reply payload in most insane way imaginable.
}
I only own different SP2, SP3 and SC1 switches and can't test the other ones. However, on this level, the communications protocol is identical, so they would be easy to add, but since I don't have any, I really can't test any of those, so they are not included.
If this library bricks your device or burns your house, it's not my fault. You have been warned!
Timo J. Rinne tri@iki.fi
MIT
FAQs
Connection library to Broadlink WiFi-connected switches and sensors
The npm package broadlink-core receives a total of 9 weekly downloads. As such, broadlink-core popularity was classified as not popular.
We found that broadlink-core demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.