Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

Commit

Permalink
Merge pull request #26 from j0bro/feature/events
Browse files Browse the repository at this point in the history
Add support for real time events
  • Loading branch information
j0bro authored Feb 6, 2020
2 parents a3f659a + 7127f35 commit f675433
Show file tree
Hide file tree
Showing 51 changed files with 4,118 additions and 1,425 deletions.
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
indent_style = space
indent_size = 2
trim_trailing_whitespace = true
36 changes: 1 addition & 35 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,37 +1,3 @@
{
"env": {
"es6": true,
"node": true
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": 2017
},
"rules": {
"indent": [
"error",
4,
{
"SwitchCase": 1
}
],
"linebreak-style": [
"error",
"unix"
],
"quotes": [
"error",
"single"
],
"semi": [
"error",
"always"
],
"no-unused-vars": [
"warn"
],
"no-console": [
"off"
]
}
"extends": "athom"
}
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
env.json
.vscode/*
.vscode/*
node_modules
.editorconfig
5 changes: 5 additions & 0 deletions .homeychangelog.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"1.1.0": {
"en": "Added support for events, including motion detection."
}
}
70 changes: 70 additions & 0 deletions .homeycompose/app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
"id": "com.ubnt.unifivideo",
"sdk": 2,
"name": {
"en": "UniFi Video"
},
"description": {
"en": "Control Ubiquiti UniFi Video devices with Homey.",
"nl": "Bedien Ubiquiti UniFi Video apparaten met Homey."
},
"tags": {
"en": [
"ubiquiti",
"unifi",
"video",
"security",
"camera",
"snapshot",
"recording"
],
"nl": [
"ubiquiti",
"unifi",
"video",
"beveiligingscamera",
"camera",
"momentopname",
"opname"
]
},
"images": {
"large": "assets/images/large.png",
"small": "assets/images/small.png"
},
"category": [
"appliances",
"security",
"video"
],
"version": "1.1.0",
"compatibility": ">=1.5.0",
"author": {
"name": "Jeroen Brosens",
"email": "j.brosens+unifivideo@gmail.com"
},
"contributors": {
"developers": [
{
"name": "Jeroen Brosens",
"email": "j.brosens+unifivideo@gmail.com"
},
{
"name": "Stèphan Eizinga",
"email": "stephan@monkeysoft.nl"
}
]
},
"contributing": {
"donate": {
"paypal": {
"username": "jeroenbrosens"
}
}
},
"bugs": {
"url": "https://github.com/j0bro/com.ubnt.unifivideo/issues"
},
"source": "https://github.com/j0bro/com.ubnt.unifivideo",
"support": "mailto:j.brosens+unifivideo@gmail.com"
}
11 changes: 11 additions & 0 deletions .homeycompose/capabilities/camera_recording_status.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"type": "string",
"title": {
"en": "Recording status",
"nl": "Opnamestatus"
},
"getable": true,
"setable": false,
"uiComponent": "sensor",
"icon": "/assets/recording.svg"
}
14 changes: 14 additions & 0 deletions .homeycompose/capabilities/nvr_cpu_load.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"type": "number",
"units": {
"en": "%"
},
"title": {
"en": "System load",
"nl": "Systeembelasting"
},
"getable": true,
"setable": false,
"uiComponent": "sensor",
"icon": "/assets/cpu.svg"
}
14 changes: 14 additions & 0 deletions .homeycompose/capabilities/nvr_disk_used.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"type": "number",
"units": {
"en": "%"
},
"title": {
"en": "Disk used",
"nl": "Schijfgebruik"
},
"getable": true,
"setable": false,
"uiComponent": "sensor",
"icon": "/assets/usage.svg"
}
11 changes: 11 additions & 0 deletions .homeycompose/capabilities/nvr_health_phrase.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"type": "string",
"title": {
"en": "Status phrase",
"nl": "Statusomschrijving"
},
"getable": true,
"setable": false,
"uiComponent": "sensor",
"icon": "/assets/bubble.svg"
}
11 changes: 11 additions & 0 deletions .homeycompose/capabilities/nvr_health_status.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"type": "string",
"title": {
"en": "Status",
"nl": "Status"
},
"getable": true,
"setable": false,
"uiComponent": "sensor",
"icon": "/assets/traffic.svg"
}
41 changes: 41 additions & 0 deletions .homeycompose/flow/actions/ufv_set_recording_mode.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"id": "ufv_set_recording_mode",
"title": {
"en": "Set recording mode",
"nl": "Stel opnamemodus in"
},
"args": [
{
"name": "device",
"type": "device",
"filter": "driver_id=camera"
},
{
"name": "recording_mode",
"type": "dropdown",
"values": [
{
"id": "none",
"label": {
"en": "Don't record",
"nl": "Niet opnemen"
}
},
{
"id": "always",
"label": {
"en": "Always record",
"nl": "Altijd opnemen"
}
},
{
"id": "motion",
"label": {
"en": "Record only motion",
"nl": "Alleen beweging opnemen"
}
}
]
}
]
}
24 changes: 24 additions & 0 deletions .homeycompose/flow/actions/ufv_take_snapshot.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"id": "ufv_take_snapshot",
"title": {
"en": "Take a snapshot",
"nl": "Maak een momentopname"
},
"args": [
{
"name": "device",
"type": "device",
"filter": "driver_id=camera"
},
{
"name": "width",
"type": "number",
"min": 0,
"max": 1920,
"placeholder": {
"en": "Width in pixels",
"nl": "Breedte in pixels"
}
}
]
}
29 changes: 29 additions & 0 deletions .homeycompose/flow/triggers/ufv_snapshot_created.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"id": "ufv_snapshot_created",
"title": {
"en": "A snapshot was created",
"nl": "Er is een snapshot gemaakt"
},
"tokens": [
{
"name": "ufv_snapshot_token",
"type": "image",
"title": {
"en": "Snapshot",
"nl": "Momentopname"
}
},
{
"name": "ufv_snapshot_camera",
"type": "string",
"title": {
"en": "Camera",
"nl": "Camera"
},
"example": {
"en": "Front door",
"nl": "Voordeur"
}
}
]
}
5 changes: 5 additions & 0 deletions .homeyplugins.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[
{
"id": "compose"
}
]
Loading

0 comments on commit f675433

Please sign in to comment.