homebridge-syntex-webhooks
Advanced tools
Comparing version 2.3.7-b4 to 2.3.7-b40
{ | ||
"name": "homebridge-syntex-webhooks", | ||
"version": "2.3.7-b4", | ||
"version": "2.3.7-b40", | ||
"description": "A webhook plugin for HTTP devices", | ||
@@ -16,3 +16,3 @@ "main": "index.js", | ||
"color-convert": "^1.5.0", | ||
"homebridge-syntex-dynamic-platform": "1.0.7-b63", | ||
"homebridge-syntex-dynamic-platform": "1.0.8-b4", | ||
"json-fs-store": "^1.0.1" | ||
@@ -19,0 +19,0 @@ }, |
182
README.md
@@ -1,2 +0,2 @@ | ||
# Homebridge SynTex Webhooks | ||
# Homebridge SynTex WebHooks | ||
[![NPM Recommended Version](https://img.shields.io/npm/v/homebridge-syntex-webhooks?label=release&color=brightgree&style=for-the-badge)](https://www.npmjs.com/package/homebridge-syntex-webhooks) | ||
@@ -20,3 +20,3 @@ [![NPM Beta Version](https://img.shields.io/npm/v/homebridge-syntex-webhooks/beta?color=orange&label=beta&style=for-the-badge)](https://www.npmjs.com/package/homebridge-syntex-webhooks) | ||
## Troubleshooting | ||
#### [![GitHub Issues](https://img.shields.io/github/issues-raw/SynTexDZN/homebridge-syntex?logo=github&style=for-the-badge)](https://github.com/SynTexDZN/homebridge-syntex/issues) | ||
#### [![GitHub Issues](https://img.shields.io/github/issues-raw/SynTexDZN/homebridge-syntex-webhooks?logo=github&style=for-the-badge)](https://github.com/SynTexDZN/homebridge-syntex-webhooks/issues) | ||
- `Report` us your `Issues` | ||
@@ -40,4 +40,4 @@ - `Join` our `Discord Server` | ||
- `sudo mkdir -p /var/homebridge/SynTex/` *( create the directory )* | ||
- `sudo chmod -R 777 /var/homebridge/SynTex/` *( permissions for many processes )* | ||
- `sudo chown -R homebridge /var/homebridge/SynTex/` *( permissions only for homebridge )* | ||
- `sudo chmod 777 -R homebridge /var/homebridge/SynTex/` *( permissions for many processes )* | ||
@@ -212,15 +212,14 @@ ```json | ||
### Accessory Config | ||
- Every device needs these parameters: `id`, `name` and `services` *( required )* | ||
- Every accessory needs these parameters: `id`, `name` and `services` *( required )* | ||
- `id` has to be either a `real mac address` or another `random unique text` *( no duplicates! )* | ||
- `name` could be anything. | ||
- `services` see service config below. | ||
- `services` The services of your accessory.<br><br> | ||
- `name` could be anything. | ||
- `type` Define the service type *( `airquality`, `blind`, `contact`, `dimmer`, `humidity`, `leak`, `led`, `light`, `motion`, `occupancy`, `outlet`, `rain`, `relais`, `rgb`, `smoke`, `statelessswitch`, `switch`, `temperature` )* | ||
- For Boolean Devices you can add `requests` *( trigger can be: on, off, color )* | ||
- For RGB Lights you can add `spectrum` attribute *( to convert to the right output format: RGB / HSL )* | ||
- For Stateless Switches you have to add `buttons` attribute.<br><br> | ||
- `pingURL` check the device connection. | ||
### Service Config | ||
- `type` should be one of these: `airquality`, `blind`, `contact`, `dimmer`, `humidity`, `leak`, `led`, `light`, `motion`, `occupancy`, `outlet`, `rain`, `relais`, `rgb`, `smoke`, `statelessswitch`, `switch`, `temperature` | ||
- For Boolean Devices you can add `requests` *( trigger can be: on, off, color )* | ||
- For RGB Lights you can add `spectrum` attribute *( to convert to the right output format: RGB / HSL )* | ||
- For Stateless Switches you have to add `buttons` attribute. | ||
--- | ||
@@ -237,6 +236,6 @@ | ||
## Update HTTP Devices | ||
## Update WebHooks Device | ||
1. Open `http://` **Bridge IP** `/devices?id=` **Device ID** `&value=` **New Value** | ||
2. Insert the `Bridge IP` and `Device ID` | ||
3. For the `New Value` you can type these patterns: | ||
3. For the `New Value` you can type this pattern: | ||
- For boolean devices: `true` / `false` *( contact, leak, motion, occupancy, outlet, rain, smoke, switch )* | ||
@@ -252,7 +251,7 @@ - For numeric devices: `10` / `12.4` *( airquality, blind, humidity, light, temperature )* | ||
**Example:** `http://homebridge.local:1710/devices?id=multi2&type=light&counter=0&value=20.5`\ | ||
*( Updates the value of `Third` from the Example Config to `20.5 LUX` )* | ||
**Example:** `http://homebridge.local:1710/devices?id=ABCDEF1234567890&type=light&counter=0&value=20.5`\ | ||
*( Updates the value of `ABCDEF1234567890` to `20.5 LUX` for example )* | ||
## Read HTTP Device Values | ||
## Read WebHooks Device | ||
1. Open `http://` **Bridge IP** `/devices?id=` **Device ID** | ||
@@ -264,7 +263,7 @@ 2. Insert the `Bridge IP` and `Device ID` | ||
**Example:** `http://homebridge.local:1710/devices?id=multi1&type=switch&counter=1`\ | ||
*( Reads the value of `Second` from the Example Config )* | ||
**Example:** `http://homebridge.local:1714/devices?id=ABCDEF1234567890`\ | ||
*( Reads the state of `ABCDEF1234567890` for example )* | ||
## Remove HTTP Device | ||
## Remove WebHooks Device | ||
1. Open `http://` **Bridge IP** `/devices?id=` **Device ID** `&remove=CONFIRM` | ||
@@ -294,22 +293,57 @@ 2. Insert the `Bridge IP` and `Device ID` | ||
"active": true, | ||
"trigger": [ | ||
{ | ||
"id": "multi2", | ||
"name": "Multi Device", | ||
"letters": "F0", | ||
"plugin": "SynTexWebHooks", | ||
"operation": "<", | ||
"value": "1000" | ||
} | ||
], | ||
"condition": [ | ||
{ | ||
"id": "multi1", | ||
"name": "Multi Switch", | ||
"letters": "41", | ||
"plugin": "SynTexWebHooks", | ||
"operation": "=", | ||
"value": "false" | ||
} | ||
], | ||
"trigger": { | ||
"logic": "AND", | ||
"groups": [ | ||
{ | ||
"logic": "OR", | ||
"blocks": [ | ||
{ | ||
"id": "multi2", | ||
"name": "Multi Device", | ||
"letters": "F0", | ||
"plugin": "SynTexWebHooks", | ||
"operation": "<", | ||
"state": { | ||
"value": 1000 | ||
} | ||
}, | ||
{ | ||
"operation": "=", | ||
"time": "16:00", | ||
"options": { | ||
"stateLock": true | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"logic": "AND", | ||
"blocks": [ | ||
{ | ||
"id": "multi1", | ||
"name": "Multi Switch", | ||
"letters": "41", | ||
"plugin": "SynTexWebHooks", | ||
"operation": "=", | ||
"state": { | ||
"value": false | ||
}, | ||
"options": { | ||
"stateLock": true | ||
} | ||
}, | ||
{ | ||
"operation": "=", | ||
"days": [ | ||
1, | ||
2, | ||
3, | ||
4, | ||
5 | ||
] | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
"result": [ | ||
@@ -322,9 +356,29 @@ { | ||
"operation": "=", | ||
"value": "true", | ||
"hue": "218", | ||
"saturation": "100", | ||
"brightness": "100" | ||
"state": { | ||
"value": true, | ||
"hue": 218, | ||
"saturation": 100, | ||
"brightness": 100 | ||
} | ||
}, | ||
{ | ||
"url": "http://192.168.1.100:1710/devices?id=58757402d8bfc108d0dc&value=true&brightness=100" | ||
"id": "extern1", | ||
"name": "Extern Accessory", | ||
"letters": "40", | ||
"bridge": "192.168.1.100", | ||
"plugin": "SynTexWebHooks", | ||
"operation": "=", | ||
"state": { | ||
"value": false | ||
}, | ||
"options": { | ||
"stateLock": false | ||
} | ||
}, | ||
{ | ||
"operation": "=", | ||
"delay": 1000 | ||
}, | ||
{ | ||
"url": "http://192.168.1.100:1710/devices?id=ABCDEF1234567890&value=true&brightness=100" | ||
} | ||
@@ -338,14 +392,42 @@ ] | ||
### Required Parameters | ||
- `id` A unique ID of your automation. | ||
- `name` The name of the automation. | ||
- `active` Enable / disable a single automation. | ||
- `trigger` What triggers the automation?<br><br> | ||
- `logic` Define a logical operation for your groups *( `AND`, `OR` )* | ||
- `groups` Logical layer one<br><br> | ||
- `logic` Define a logical operation for your blocks *( `AND`, `OR` )* | ||
- `blocks` Logical layer two<br><br> | ||
- `result` What happens when running an automation? | ||
- `options` General automation options<br><br> | ||
- `timeLock` Set a timeout to prevent to many executions *( in milliseconds )* | ||
### Block Configuration | ||
#### Service Block ( Trigger, Result ) | ||
- `id` is the same like in your config file *( or in your log )* | ||
- `name` The name of the accessory. | ||
- `letters` See letter configuration below. | ||
- `bridge` IP of your other bridge *( optional )* | ||
- `plugin` Use the platform name of the plugin *( optional, see supported plugins below )* | ||
- `operation` Use the logical operands *( `>`, `<`, `=` )* | ||
- `value` The state value of your accessory. | ||
- `state` The state of your accessory.<br><br> | ||
- `value` is used for the main characteristic. | ||
- `brightness` can be used for dimmable / RGB lights. | ||
- `hue` can be used for RGB lights. | ||
- `saturation` can be used for RGB lights. | ||
### Optional Parameters | ||
- `plugin` Use the platform name of the plugin *( see supported plugins below )* | ||
- `brightness` can be used for dimmable / RGB lights. | ||
- `hue` can be used for RGB lights. | ||
- `saturation` can be used for RGB lights. | ||
#### Time Block ( Trigger ) | ||
- `operation` Use the logical operands *( `>`, `<`, `=` )* | ||
- `time` Define a time point *( e.g. `16:00` )* | ||
#### Weekday Block ( Trigger ) | ||
- `operation` Use the logical operands *( `=` )* | ||
- `days` Set the weekdays *( from `0` to `6` )* | ||
#### Delay Block ( Result ) | ||
- `delay` Set a timeout *( in milliseconds )* | ||
#### URL Block ( Result ) | ||
- `url` Fetch an URL. | ||
### Letter Configuration | ||
@@ -352,0 +434,0 @@ The letters are split into two parts *( characters )* |
@@ -19,3 +19,3 @@ const { AirQualityService } = require('homebridge-syntex-dynamic-platform'); | ||
this.AutomationSystem.LogikEngine.runAutomation(this.id, this.letters, state); | ||
this.AutomationSystem.LogikEngine.runAutomation(this, state); | ||
}; | ||
@@ -22,0 +22,0 @@ } |
@@ -38,3 +38,3 @@ const { BlindService } = require('homebridge-syntex-dynamic-platform'); | ||
this.AutomationSystem.LogikEngine.runAutomation(this.id, this.letters, { value }); | ||
this.AutomationSystem.LogikEngine.runAutomation(this, { value }); | ||
} | ||
@@ -41,0 +41,0 @@ else |
@@ -127,3 +127,3 @@ const { ColoredBulbService } = require('homebridge-syntex-dynamic-platform'); | ||
this.AutomationSystem.LogikEngine.runAutomation(this.id, this.letters, { value : this.value, hue : this.hue, saturation : this.saturation, brightness : this.brightness }); | ||
this.AutomationSystem.LogikEngine.runAutomation(this, { value : this.value, hue : this.hue, saturation : this.saturation, brightness : this.brightness }); | ||
@@ -130,0 +130,0 @@ if(callback != null) |
@@ -23,3 +23,3 @@ const { ContactService } = require('homebridge-syntex-dynamic-platform'); | ||
this.AutomationSystem.LogikEngine.runAutomation(this.id, this.letters, state); | ||
this.AutomationSystem.LogikEngine.runAutomation(this, state); | ||
}); | ||
@@ -26,0 +26,0 @@ }; |
@@ -79,3 +79,3 @@ const { DimmedBulbService } = require('homebridge-syntex-dynamic-platform'); | ||
this.AutomationSystem.LogikEngine.runAutomation(this.id, this.letters, { value : this.value, brightness : this.brightness }); | ||
this.AutomationSystem.LogikEngine.runAutomation(this, { value : this.value, brightness : this.brightness }); | ||
@@ -82,0 +82,0 @@ if(callback != null) |
@@ -19,3 +19,3 @@ const { HumidityService } = require('homebridge-syntex-dynamic-platform'); | ||
this.AutomationSystem.LogikEngine.runAutomation(this.id, this.letters, state); | ||
this.AutomationSystem.LogikEngine.runAutomation(this, state); | ||
}; | ||
@@ -22,0 +22,0 @@ } |
@@ -23,3 +23,3 @@ const { LeakService } = require('homebridge-syntex-dynamic-platform'); | ||
this.AutomationSystem.LogikEngine.runAutomation(this.id, this.letters, state); | ||
this.AutomationSystem.LogikEngine.runAutomation(this, state); | ||
}); | ||
@@ -26,0 +26,0 @@ }; |
@@ -19,3 +19,3 @@ const { LightService } = require('homebridge-syntex-dynamic-platform'); | ||
this.AutomationSystem.LogikEngine.runAutomation(this.id, this.letters, state); | ||
this.AutomationSystem.LogikEngine.runAutomation(this, state); | ||
}; | ||
@@ -22,0 +22,0 @@ } |
@@ -36,3 +36,3 @@ const { LightBulbService } = require('homebridge-syntex-dynamic-platform'); | ||
this.AutomationSystem.LogikEngine.runAutomation(this.id, this.letters, { value }); | ||
this.AutomationSystem.LogikEngine.runAutomation(this, { value }); | ||
} | ||
@@ -39,0 +39,0 @@ else |
@@ -23,3 +23,3 @@ const { MotionService } = require('homebridge-syntex-dynamic-platform'); | ||
this.AutomationSystem.LogikEngine.runAutomation(this.id, this.letters, state); | ||
this.AutomationSystem.LogikEngine.runAutomation(this, state); | ||
}); | ||
@@ -26,0 +26,0 @@ }; |
@@ -23,3 +23,3 @@ const { OccupancyService } = require('homebridge-syntex-dynamic-platform'); | ||
this.AutomationSystem.LogikEngine.runAutomation(this.id, this.letters, state); | ||
this.AutomationSystem.LogikEngine.runAutomation(this, state); | ||
}); | ||
@@ -26,0 +26,0 @@ }; |
@@ -36,3 +36,3 @@ const { OutletService } = require('homebridge-syntex-dynamic-platform'); | ||
this.AutomationSystem.LogikEngine.runAutomation(this.id, this.letters, { value }); | ||
this.AutomationSystem.LogikEngine.runAutomation(this, { value }); | ||
} | ||
@@ -39,0 +39,0 @@ else |
@@ -23,3 +23,3 @@ const { SmokeService } = require('homebridge-syntex-dynamic-platform'); | ||
this.AutomationSystem.LogikEngine.runAutomation(this.id, this.letters, state); | ||
this.AutomationSystem.LogikEngine.runAutomation(this, state); | ||
}); | ||
@@ -26,0 +26,0 @@ }; |
@@ -36,3 +36,3 @@ const { SwitchService } = require('homebridge-syntex-dynamic-platform'); | ||
this.AutomationSystem.LogikEngine.runAutomation(this.id, this.letters, { value }); | ||
this.AutomationSystem.LogikEngine.runAutomation(this, { value }); | ||
} | ||
@@ -39,0 +39,0 @@ else |
@@ -19,3 +19,3 @@ const { TemperatureService } = require('homebridge-syntex-dynamic-platform'); | ||
this.AutomationSystem.LogikEngine.runAutomation(this.id, this.letters, state); | ||
this.AutomationSystem.LogikEngine.runAutomation(this, state); | ||
}; | ||
@@ -22,0 +22,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
56483
475
+ Addedhomebridge-syntex-dynamic-platform@1.0.8-b4(transitive)
+ Addedsyntex-automation@1.2.0(transitive)
+ Addedsyntex-filesystem@1.0.2(transitive)
+ Addedsyntex-logger@1.0.8(transitive)
+ Addedsyntex-webserver@1.1.0(transitive)
- Removedhomebridge-syntex-dynamic-platform@1.0.7-b63(transitive)
- Removedsyntex-automation@1.1.0-b11(transitive)
- Removedsyntex-filesystem@1.0.2-b7(transitive)
- Removedsyntex-logger@1.0.8-b21(transitive)
- Removedsyntex-webserver@1.1.0-b13(transitive)