Socket
Socket
Sign inDemoInstall

homebridge-syntex-dynamic-platform

Package Overview
Dependencies
Maintainers
1
Versions
345
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

homebridge-syntex-dynamic-platform - npm Package Compare versions

Comparing version 1.0.8-b48 to 1.0.8-b49

117

main.js

@@ -138,72 +138,81 @@ const fs = require('fs'), path = require('path');

if(urlParams.remove != null)
if(service != null)
{
if(urlParams.type != null)
if(urlParams.remove != null)
{
response.end(urlParams.remove == 'CONFIRM' && await accessory.removeService(accessory, service) ? 'Success' : 'Error');
if(urlParams.type != null)
{
response.end(urlParams.remove == 'CONFIRM' && await accessory.removeService(accessory, service) ? 'Success' : 'Error');
}
else
{
response.end(urlParams.remove == 'CONFIRM' && await this.removeAccessory(accessory.homebridgeAccessory || accessory, urlParams.id) ? 'Success' : 'Error');
}
}
else
{
response.end(urlParams.remove == 'CONFIRM' && await this.removeAccessory(accessory.homebridgeAccessory || accessory, urlParams.id) ? 'Success' : 'Error');
}
}
else
{
if(service != null)
{
if(urlParams.value != null)
if(service != null)
{
let state = { value : urlParams.value };
if(urlParams.hue != null)
if(urlParams.value != null)
{
state.hue = urlParams.hue;
let state = { value : urlParams.value };
if(urlParams.hue != null)
{
state.hue = urlParams.hue;
}
if(urlParams.saturation != null)
{
state.saturation = urlParams.saturation;
}
if(urlParams.brightness != null)
{
state.brightness = urlParams.brightness;
}
if(urlParams.event != null)
{
state.event = urlParams.event;
}
state = this.updateAccessoryService(service, state);
response.end(state != null ? 'Success' : 'Error');
}
if(urlParams.saturation != null)
else
{
state.saturation = urlParams.saturation;
let state = null;
if(accessory.homebridgeAccessory != null
&& accessory.homebridgeAccessory.context != null
&& accessory.homebridgeAccessory.context.data != null)
{
if(urlParams.type == null && urlParams.counter == null)
{
state = accessory.homebridgeAccessory.context.data;
}
else if(service != null && service.letters != null)
{
state = accessory.homebridgeAccessory.context.data[service.letters];
}
}
response.end(state != null ? JSON.stringify(state) : 'Error');
}
if(urlParams.brightness != null)
{
state.brightness = urlParams.brightness;
}
if(urlParams.event != null)
{
state.event = urlParams.event;
}
state = this.updateAccessoryService(service, state);
response.end(state != null ? 'Success' : 'Error');
}
else
{
let state = null;
if(accessory.homebridgeAccessory != null
&& accessory.homebridgeAccessory.context != null
&& accessory.homebridgeAccessory.context.data != null)
{
if(urlParams.type == null && urlParams.counter == null)
{
state = accessory.homebridgeAccessory.context.data;
}
else if(service != null && service.letters != null)
{
state = accessory.homebridgeAccessory.context.data[service.letters];
}
}
response.end(state != null ? JSON.stringify(state) : 'Error');
response.end('Error');
this.logger.log('error', urlParams.id, (urlParams.type != null ? (this.TypeManager.typeToLetter(urlParams.type) || urlParams.type) : 'X') + (urlParams.counter || '0'), '%accessory_not_found[3]% ( ' + (urlParams.type != null ? (this.TypeManager.typeToLetter(urlParams.type) || urlParams.type) : 'X') + (urlParams.counter || '0') + ' )');
}
}
else
{
response.end('Error');
}
else
{
response.end('Error');
this.logger.log('error', urlParams.id, (urlParams.type != null ? (this.TypeManager.typeToLetter(urlParams.type) || urlParams.type) : 'X') + (urlParams.counter || '0'), '%accessory_not_found[3]% ( ' + (urlParams.type != null ? (this.TypeManager.typeToLetter(urlParams.type) || urlParams.type) : 'X') + (urlParams.counter || '0') + ' )');
}
this.logger.log('error', urlParams.id, '', '%accessory_not_found[2]%! ( ' + urlParams.id + ' )');
}

@@ -210,0 +219,0 @@ }

{
"name": "homebridge-syntex-dynamic-platform",
"version": "1.0.8-b48",
"version": "1.0.8-b49",
"description": "A Dynamic Platform Accessory",

@@ -5,0 +5,0 @@ "main": "main.js",

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