New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

thing-it-device-enocean-ip

Package Overview
Dependencies
Maintainers
3
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

thing-it-device-enocean-ip - npm Package Compare versions

Comparing version 0.2.11 to 0.2.12

29

default-units/heatingSystem.js

@@ -46,2 +46,5 @@ module.exports = {

id: 'set'
}, {
label: 'Valve Closed',
id: 'valveClosed'
}],

@@ -179,6 +182,2 @@ state: [{

}
if (body.state.functions[n].key === "temperatureSetpoint") {
this.state.setpoint = setpointConversion(body.state.functions[n].value, this.configuration.temperatureBasePoint, this.configuration.setPointScale);
//console.log(this.state.setpoint);
}
}

@@ -200,5 +199,2 @@ tempDiff = this.state.temperature - this.state.setpoint;

this.publishStateChange();
if(!this.state.window) {
this.setTemperature(this.state.setpoint, this.state.temperature);
}
console.log(this.state);

@@ -295,5 +291,5 @@ }.bind(this), function (err){

}
if(!this.state.window) {
this.setTemperature(this.state.setpoint, this.state.temperature);
}
// if(!this.state.window) {
// this.setTemperature(this.state.setpoint, this.state.temperature);
// }
this.publishStateChange();

@@ -336,2 +332,3 @@ }

this.state = updatedState;
this.publishStateChange();
this.publishEvent('set', {});

@@ -355,2 +352,3 @@ };

HeatingSystem.prototype.setTemperature = function (setPointTemperature, currentTemperature) {
if(setPointTemperature === undefined || currentTemperature === undefined) return;
let deltaTemperature = currentTemperature - setPointTemperature;

@@ -371,2 +369,3 @@ let functions = [];

this.device.adapter.setDeviceState(this.configuration.micropeltDeviceId,[{"key": "valve", "value": 0}])
this.publishEvent('valveClosed', {});
}

@@ -381,3 +380,3 @@

this.state.setpoint = state.setpoint;
if(!this.state.window) {
if(!this.state.window || state.window === false) {
this.setTemperature(this.state.setpoint, this.state.temperature);

@@ -390,6 +389,6 @@ }

this.closeValve();
// }
// else{
// this.setTemperature(this.state.setpoint, this.state.temperature);
}
else{
this.setTemperature(this.state.setpoint, this.state.temperature);
}
}

@@ -480,2 +479,2 @@ }

return string.charAt(0).toUpperCase() + string.slice(1);
}
}
{
"name": "thing-it-device-enocean-ip",
"version": "0.2.11",
"version": "0.2.12",
"description": "[thing-it-node] Device Plugin for EnOcean IP products.",

@@ -32,2 +32,2 @@ "authors": "Marc Gille",

}
}
}
const moment = require('moment')
const express = require('express')
var bodyParser = require('body-parser');
const app = express()
app.use(bodyParser.json());

@@ -47,2 +49,17 @@ // 0180CAB7 Vorfuehrung-RWM F6-05-02

};
const thermokon = {
configuration: {deviceId: '5'},
state: { state: {functions: [{key: 'temperature', value: 22}, {key: 'setpoint', value: 22}]} },
}
const micropelt = {
configuration: {},
state: { valve: 1, batteryLow: false, actuatorObstructed: false},
setState(functions) {
console.log('Set setpoint to', functions[1].value);
thermokon.state.state.functions[1].value = functions[1].value;
writeState(thermokon, functions);
}
}
const temperatureSensor = {configuration: {deviceId: '4'}, state: {temperature: 20}};

@@ -53,3 +70,5 @@ const devices = {

'05065B85': motionSensor,
'4': temperatureSensor
'4': temperatureSensor,
'5': thermokon,
'6': micropelt
};

@@ -86,7 +105,7 @@

app.put('/devices/:device/state', (req, res) => {
if (!devices[req.params.deviceId]) {
res.status(500).send('Device [' + req.params.deviceId + '] does not exist.');
if (!devices[req.params.device]) {
res.status(500).send('Device [' + req.params.device + '] does not exist.');
}
devices[req.params.deviceId].setState(req.body);
devices[req.params.device].setState(req.body.state.functions);
});

@@ -93,0 +112,0 @@

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