Socket
Socket
Sign inDemoInstall

node-red-contrib-samsung-airconditioner

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-red-contrib-samsung-airconditioner - npm Package Compare versions

Comparing version 0.0.3 to 0.1.0

23

index.js

@@ -265,2 +265,24 @@ "use strict";

}
function pollStatus(n) {
RED.nodes.createNode(this, n);
const node = this;
const conf = RED.nodes.getNode(n.device);
node.on('input', (msg) => {
if (!airConditioners[conf.mac]) {
msg.payload = {
error: 'Device not found',
};
msg.status = 404;
return node.send(msg);
}
else {
airConditioners[conf.mac].status();
msg.payload = {
status: 'OK',
};
msg.status = 200;
}
node.send(msg);
});
}
console.log('Starting samsungac-node...');

@@ -271,4 +293,5 @@ RED.nodes.registerType('samsungac-authorize', getToken);

RED.nodes.registerType('samsungac-change-state', changeState);
RED.nodes.registerType('samsungac-status-poll', pollStatus);
// RED.nodes.registerType('samsungac-login', login);
};
//# sourceMappingURL=index.js.map

2

package.json
{
"name": "node-red-contrib-samsung-airconditioner",
"version": "0.0.3",
"version": "0.1.0",
"description": "Samsung SMART Airconditioner Node-RED control module",

@@ -5,0 +5,0 @@ "main": "dist/",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc