aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2021-08-06 18:36:55 +0200
committerlonkaars <loek@pipeframe.xyz>2021-08-06 18:36:55 +0200
commit27fa77cd537d5999f45bd1615af7841f2e5a0c80 (patch)
tree8178b2961f2450787f67da9af69f4a883d677ac4
parent6880dfb6b5949ba59089754c4ed84df50f291ee1 (diff)
npm publish?
-rw-r--r--install.sh7
-rw-r--r--package.json3
-rw-r--r--readme.md13
3 files changed, 20 insertions, 3 deletions
diff --git a/install.sh b/install.sh
new file mode 100644
index 0000000..a7923bc
--- /dev/null
+++ b/install.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+npm run build
+
+rm -rf venv
+npm run python
+sudo npm run perms
diff --git a/package.json b/package.json
index c64dea3..15e5404 100644
--- a/package.json
+++ b/package.json
@@ -18,7 +18,8 @@
"scripts": {
"build": "tsc",
"python": "python3 -m venv venv && venv/bin/pip3 install -r requirements.txt",
- "perms": "sudo setcap 'cap_net_raw,cap_net_admin+eip' venv/lib/python3.9/site-packages/bluepy/bluepy-helper"
+ "perms": "sudo setcap 'cap_net_raw,cap_net_admin+eip' venv/lib/python3.9/site-packages/bluepy/bluepy-helper",
+ "postinstall": "sh ./install.sh"
},
"dependencies": {
"@abandonware/noble": "^1.9.2-14",
diff --git a/readme.md b/readme.md
index 674ce50..ddfc71e 100644
--- a/readme.md
+++ b/readme.md
@@ -1,9 +1,18 @@
# homebridge-beken
-- a simple homebridge plugin that allows the control of a bulb that goes by many names:
+> NOTE: requires python3
+>
+> This plugin uses child_process to spawn a python script that does the actual
+> communication with the bulb using the bluepy library. Bluepy uses a binary
+> called bluepy-helper which should be run as root or given permission to
+> directly talk to the bluetooth stack.
+
+- a simple homebridge plugin that allows the control of a bulb that goes by
+ many names:
- Shada Led's light
- iLedBulb
- Beken LED
-- [here's](https://wiki.fhem.de/wiki/BEKEN_iLedBlub) the bluetooth protocol definition.
+- [here's](https://wiki.fhem.de/wiki/BEKEN_iLedBlub) the bluetooth protocol
+ definition.
- sort of stable