Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

iobroker.shelly

Package Overview
Dependencies
Maintainers
1
Versions
107
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

iobroker.shelly - npm Package Compare versions

Comparing version 0.2.4 to 0.2.5

6

io-package.json
{
"common": {
"name": "shelly",
"version": "0.2.4",
"version": "0.2.5",
"news": {
"0.2.5": {
"en": "Hostname instead of ip address will be shown",
"de": "Anzeige Hostname statt IP-Adresse"
},
"0.2.4": {

@@ -7,0 +11,0 @@ "en": "Channel name can be overwrite with own name",

2

package.json
{
"name": "iobroker.shelly",
"version": "0.2.4",
"version": "0.2.5",
"description": "Shelly",

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

@@ -40,4 +40,7 @@ ![Logo](admin/shelly.png)

### 0.2.5 (13.10.2018)
* Hostname instead of ip address will be shown
### 0.2.4 (10.10.2018)
* Channel name can be overwrite with own name
* Channel name can be overwrite with own name

@@ -44,0 +47,0 @@ ### 0.2.3 (01.10.2018)

@@ -9,2 +9,3 @@ /* jshint -W097 */

// you have to require the utils module and call adapter function
const dns = require('dns');
const utils = require(__dirname + '/lib/utils'); // Get common adapter utils

@@ -330,3 +331,10 @@ const adapter = new utils.Adapter('shelly');

// call once at start
controlFunction(value || 0);
let sen = getSensorIoBrokerIDs(deviceId, s.I);
adapter.getState(sen.id, function(err, state) {
if (!err && state) {
controlFunction(state.val);
} else {
controlFunction(value || 0);
}
});
}

@@ -459,3 +467,3 @@ if (b && b.D.startsWith('Shutter') && s.T === 'ShutterUp') {

}
}, value, controlFunction);
}, ['name'], value, controlFunction);
}

@@ -487,14 +495,19 @@ }

}, true);
adapter.log.debug('Create state object for ' + deviceId + '.hostname' + ' if not exist');
objectHelper.setOrUpdateObject(deviceId + '.hostname', {
type: 'state',
common: {
name: 'Device hostname',
type: 'string',
role: 'info.ip',
read: true,
write: false
}
}, ip);
// get hostname for ip adresss
dns.reverse(ip, function(err, hostnames) {
let hostname = (!err && hostnames.length > 0) ? hostnames[0] : ip;
adapter.log.debug('Create state object for ' + deviceId + '.hostname' + ' if not exist');
objectHelper.setOrUpdateObject(deviceId + '.hostname', {
type: 'state',
common: {
name: 'Device hostname',
type: 'string',
role: 'info.ip',
read: true,
write: false
}
}, hostname);
});
if (description) {

@@ -501,0 +514,0 @@ let blk = description.blk || [];

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