Skip to content

Commit

Permalink
ver. 3.3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
NikDevx committed May 24, 2021
1 parent c125bb4 commit 815dc49
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"displayName": "Homebridge Philips Air",
"name": "homebridge-philips-air",
"version": "3.3.6",
"version": "3.3.7",
"description": "Homebridge Plugin for Philips Air Purifiers",
"main": "dist/index.js",
"repository": {
Expand Down
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ class PhilipsAirPlatform implements DynamicPlatformPlugin {
polling = 60;
}
setInterval(function() {
exec('python3 ' + pathTopyaircontrol + ' --ipaddr ' + purifier.config.ip + ' --protocol coap --status', (error, stdout, stderr) => {
exec('python3 ' + pathTopyaircontrol + ' --ipaddr ' + purifier.config.ip + ' --protocol ' + purifier.config.protocol + ' --status', (error, stdout, stderr) => {
if (error || stderr) {
console.log(timestamp('[DD.MM.YYYY, HH:mm:ss] ') + '\x1b[36m[Philips Air] \x1b[31m[' + purifier.config.name + '] Unable to get data for polling: Error: spawnSync python3 ETIMEDOUT.\x1b[0m');
console.log(timestamp('[DD.MM.YYYY, HH:mm:ss] ') + '\x1b[33mIf your have "Error: spawnSync python3 ETIMEDOUT" your need unplug the accessory from outlet for 10 seconds and plug again.\x1b[0m');
Expand Down Expand Up @@ -214,7 +214,7 @@ class PhilipsAirPlatform implements DynamicPlatformPlugin {
.updateCharacteristic(hap.Characteristic.RelativeHumidityHumidifierThreshold, speed_humidity);
if (water_level == 0) {
if (obj.func != 'P') {
exec('airctrl --ipaddr ' + purifier.config.ip + ' --protocol coap --func P', (error, stdout, stderr) => {
exec('airctrl --ipaddr ' + purifier.config.ip + ' --protocol ' + purifier.config.protocol + ' --func P', (error, stdout, stderr) => {
if (error || stderr) {
console.log(timestamp('[DD.MM.YYYY, HH:mm:ss] ') + '\x1b[36m[Philips Air] \x1b[31m[' + purifier.config.name + '] Unable to get data for polling: Error: spawnSync python3 ETIMEDOUT.\x1b[0m');
console.log(timestamp('[DD.MM.YYYY, HH:mm:ss] ') + '\x1b[33mIf your have "Error: spawnSync python3 ETIMEDOUT" your need unplug the accessory from outlet for 10 seconds and plug again.\x1b[0m');
Expand Down Expand Up @@ -403,7 +403,7 @@ class PhilipsAirPlatform implements DynamicPlatformPlugin {
}
if (water_level == 0) {
if (status.func != 'P') {
exec('airctrl --ipaddr ' + purifier.config.ip + ' --protocol coap --func P', (err, stdout, stderr) => {
exec('airctrl --ipaddr ' + purifier.config.ip + ' --protocol ' + purifier.config.protocol + ' --func P', (err, stdout, stderr) => {
if (err) {
return;
}
Expand Down

0 comments on commit 815dc49

Please sign in to comment.