Socket
Socket
Sign inDemoInstall

iobroker.wifilight

Package Overview
Dependencies
Maintainers
1
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

iobroker.wifilight - npm Package Compare versions

Comparing version 0.0.25 to 0.0.26

2

io-package.json
{
"common": {
"name": "wifilight",
"version": "0.0.25",
"version": "0.0.26",
"title": "WiFi Light",

@@ -6,0 +6,0 @@ "desc": {

{
"name": "iobroker.wifilight",
"version": "0.0.25",
"version": "0.0.26",
"description": "WiFi Light Adapter",

@@ -5,0 +5,0 @@ "author": {

@@ -136,3 +136,3 @@ "use strict";

var device = wifi[deviceName];
if (device == undefined) return;
if (device == undefined || !device.isOnline) return;
if (device.cmds.decodeResponse) devices.invalidate(id);

@@ -149,3 +149,3 @@ device.onStateChange(channelName, stateName, state.val);

if (!config) return this;
this.USE_SOCKET_ONCE = false; //true;
//this.USE_SOCKET_ONCE = false; //true;
this.config = config;

@@ -194,3 +194,3 @@ this.isOnline = false;

}
var _g = this.cmds.g || 1;
wifi[this.dev.getFullId()] = this;
for (var j in usedStateNames) {

@@ -200,3 +200,3 @@ if (j == 'white' && this.cmds.rgbw == undefined) continue;

if ((j === 'progNo' || j==='disco') && this.cmds.programNames) st.common.states = this.cmds.programNames;
if (st.g & _g) {
if (st.g & this.cmds.g) {
this.dev.createNew(st.n, st);

@@ -326,2 +326,3 @@ }

function doIt() {
self.clearQueue();
if (++i >= cmds.length) i = 0;

@@ -331,3 +332,3 @@ var delay = Math.abs(cmds[i].x);

if (cmds[i].x < 0) return;
self.prgTimer.set(doIt, 1000 + delay * 100);
self.prgTimer.set(doIt, 10 + delay * 100);
}

@@ -356,3 +357,3 @@ if (cmds.length > 0) doIt();

if (this.USE_SOCKET_ONCE) {
wifi[this.dev.getFullId()] = this;
//wifi[this.dev.getFullId()] = this;
//this._write = this.cmds.udp ? this.writeUdp : this.writeOnce;

@@ -381,3 +382,3 @@ if (this.__proto__._write === WifiLight.prototype._write) {

var ts = debug ? '(' + parseInt((new Date().getTime() - self.ts) / 1000) + ' sec) ' : "";
self.log('onError: ' + ts + (error.code != undefined ? error.code : "") + error.message);
self.log('onError: ' + ts + (error.code != undefined ? error.code : "") + ' ' + error.message);
switch (error.errno) { //error.code

@@ -393,3 +394,3 @@ case 'ECONNRESET':

self.client.connect(self.config.port, self.config.ip, function() {
wifi[self.dev.getFullId()] = self;
//wifi[self.dev.getFullId()] = self;
self.log(self.config.ip + ' connected');

@@ -458,10 +459,3 @@ self.setOnline(true);

this.clearQueue();
if (this.client) {
this.client.destroy();
this.client = null;
}
if (this.updateTimer) {
clearTimeout(this.updateTimer);
this.updateTimer = null;
}
this.destroyClient();
if (this.writeTimeout) {

@@ -487,2 +481,3 @@ clearTimeout(this.writeTimeout);

WifiLight.prototype.setOnline = function (val) {
this.isOnline = val;
if ((this.cmds.g & usedStateNames.online.g) === 0) return;

@@ -492,3 +487,3 @@ this.dev.set(usedStateNames.online.n, val);

devices.update();
this.isOnline = val;
//this.isOnline = val;
};

@@ -838,12 +833,2 @@

// WifiLight.prototype.ct = function (channel, temp, transitionTime) {
// var co = ct2rgb(temp);
// var hsv = rgb2hsv(co);
// //hsv.v = this.get(channel, 'bri').val;
// var v = this.get(channel, 'bri').val;
// if (v) hsv.v = v;
// co = hsv2rgb(hsv);
// this.fade(channel, co, transitionTime);
// };
MiLight.prototype.pair = function pair() {

@@ -909,3 +894,2 @@ for (var i=0; i<3; i++) {

function main() {

@@ -912,0 +896,0 @@

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