
Security News
Socket Releases Free Certified Patches for Critical vm2 Sandbox Escape
A critical vm2 sandbox escape can allow untrusted JavaScript to break isolation and execute commands on the host Node.js process.
panasonic-comfort-cloud-api
Advanced tools
Client for Panasonic Comfort Cloud API to control air conditioners
Client for Panasonic Comfort Cloud API to control air conditioners.
Using npm:
$ npm install panasonic-comfort-cloud-api
import { ComfortCloud } from 'panasonic-comfort-cloud-api';
const client = new ComfortCloud('username', 'password');
const token = await client.login();
console.log(token);
const groups = await client.getGroups();
console.log(groups);
const deviceId = groups[0].deviceList[0].deviceGuid;
const device = await client.getDevice(deviceId);
console.log(device);
// Set single parameters based on device ID without knowing the device parameters.
const par: DeviceParameters = { temperatureSet: 21.5 };
const parRes = await client.setParameters(deviceId, par);
console.log(parRes);
// Set parameters from device. First get device, then manipulate the values.
device.parameters.temperatureSet = 22;
device.parameters.ecoMode = EcoMode.Quiet;
const parDev = await client.setDevice(device);
console.log(parDev);
// Use enums for correct values.
const par: DeviceParameters = {
operate: Power.On,
operationMode: OperationMode.Auto,
ecoMode: EcoMode.Auto,
temperatureSet: 22,
airSwingUD: AirSwingUD.Mid,
airSwingLR: AirSwingLR.Mid,
fanAutoMode: FanAutoMode.AirSwingAuto,
fanSpeed: FanSpeed.Auto
};
const parRes = await client.setParameters(deviceId, par);
import { ComfortCloud, DeviceParameters, AirSwingLR, AirSwingUD, EcoMode, FanAutoMode, FanSpeed, OperationMode, Power } from 'panasonic-comfort-cloud-api';
import { exit } from 'process';
import * as dotenv from 'dotenv';
dotenv.config();
const runner = new Promise<any>(async (resolve, reject) => {
const client = new ComfortCloud(process.env.USERNAME as string, process.env.PASSWORD as string);
const token = await client.login();
console.log(token);
const groups = await client.getGroups();
console.log(groups);
const deviceId = groups[0].deviceList[0].deviceGuid;
const device = await client.getDevice(deviceId);
console.log(device);
const deviceNow = await client.getDeviceNow(deviceId);
console.log(deviceNow);
const par: DeviceParameters = {
operate: Power.On,
operationMode: OperationMode.Auto,
ecoMode: EcoMode.Auto,
temperatureSet: 22,
airSwingUD: AirSwingUD.Mid,
airSwingLR: AirSwingLR.Mid,
fanAutoMode: FanAutoMode.AirSwingAuto,
fanSpeed: FanSpeed.Auto
};
const parRes = await client.setParameters(deviceId, par);
console.log(parRes);
device.parameters.temperatureSet = 22;
device.parameters.ecoMode = EcoMode.Quiet;
const parDev = await client.setDevice(device);
console.log(parDev);
resolve('OK');
});
runner.then(x => {
console.log(x);
exit();
}).catch(x => {
console.error(x);
exit();
});
FAQs
Client for Panasonic Comfort Cloud API to control air conditioners
The npm package panasonic-comfort-cloud-api receives a total of 37 weekly downloads. As such, panasonic-comfort-cloud-api popularity was classified as not popular.
We found that panasonic-comfort-cloud-api 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
A critical vm2 sandbox escape can allow untrusted JavaScript to break isolation and execute commands on the host Node.js process.

Research
Five malicious NuGet packages impersonate Chinese .NET libraries to deploy a stealer targeting browser credentials, crypto wallets, SSH keys, and local files.

Security News
pnpm 11 turns on a 1-day Minimum Release Age and blocks exotic subdeps by default, adding safeguards against fast-moving supply chain attacks.