From a3b002e45f605cda9a39912243c81ca9f005a74f Mon Sep 17 00:00:00 2001 From: javalikescript Date: Fri, 27 Dec 2024 15:54:09 +0100 Subject: [PATCH] Update readme --- README.md | 27 ++++------------------ extension.md | 23 ------------------- extensions.md | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 66 insertions(+), 46 deletions(-) delete mode 100644 extension.md create mode 100644 extensions.md diff --git a/README.md b/README.md index 74755a9..d01a645 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ The lha application allows to * record and display historical device values such as temperature * interact between incompatible protocols such as between _ZigBee_ and _Z-Wave_ * compose advanced automations using [Blockly](https://developers.google.com/blockly/) scripts +* design web views using [HTML](https://html.spec.whatwg.org/) and [Vue.js](https://v2.vuejs.org/) * create your own [Lua](https://www.lua.org/) extensions The lha engine manages the extensions including scripts, the things, the scheduler and a web server. @@ -21,29 +22,9 @@ The application is small, around 5MB, and does not need any dependency. ## Extensions -Available extensions are: -* [ConBee II](https://phoscon.de/en/conbee), Dresden elektronik ConBee REST API -The recommended tool is [deCONZ](https://github.com/deconz-community/deconz-docker) using docker -* [Philips Hue V2](https://www.philips-hue.com/), Hue Bridge REST API -The recommended tool is the Hue Bridge -* [Z-Wave JS WS](https://github.com/zwave-js), Z-Wave JS API -The recommended tool is [Z-Wave JS UI](https://github.com/zwave-js/zwave-js-ui) using docker -* [MQTT](https://mqtt.org/) Broker, provides a light message broker -* Generic -Create virtual things, usefull for scripting -* Web Chart -Display thing property values in a time chart -* Web Dashboard -Setup tiles with relevant thing properties -* Web Scripts -Automatically trigger thing modifications -* Share server folders to download and upload files -* Users Management, adds user and permissions -* HTTPS server, provides lha on a secure server -* Self monitoring, based on Lua and [libuv](https://github.com/luvit/luv) -* Ping, Test the reachability of a host on the network - -You need to include your devices using the dedicated tool such as deCONZ, Hue App or Z-Wave JS UI Control Panel. +lha comes with a bunch of core extensions and allows to add new ones. + +See details of [extensions](extensions.md) ## Devices diff --git a/extension.md b/extension.md deleted file mode 100644 index a124f6f..0000000 --- a/extension.md +++ /dev/null @@ -1,23 +0,0 @@ - -An extension consists in a folder containing a manifest file and a Lua script. - -The manifest is loaded from the file *manifest.json* and consists in the extension name and description. - -```json -{ - "name": "Serial", - "description": "Serial RF and sensors", - "version": "1.0" -} -``` - -The manifest could define a JSON schema using the *schema* property. The schema described the extension configuration. - -The script is loaded from the file *init.lua* or the file name defined in the manifest *script* property. - -The script receives the extension as a parameter. - -```lua -local extension = ... -``` - diff --git a/extensions.md b/extensions.md new file mode 100644 index 0000000..1abd0ca --- /dev/null +++ b/extensions.md @@ -0,0 +1,62 @@ + +The lha engine is meant to be enhanced by extensions. + +The `core` extensions are included with lha, `other` extensions could be added in the work `extensions` folder. +The `script` extensions are user defined and located in the work `scripts` folder. + +## Core Extensions + +Available core extensions are: +* [ConBee II](https://phoscon.de/en/conbee), Dresden elektronik ConBee REST API +The recommended tool is [deCONZ](https://github.com/deconz-community/deconz-docker) using docker +* [Philips Hue V2](https://www.philips-hue.com/), Hue Bridge REST API +The recommended tool is the Hue Bridge +* [Z-Wave JS WS](https://github.com/zwave-js), Z-Wave JS API +The recommended tool is [Z-Wave JS UI](https://github.com/zwave-js/zwave-js-ui) using docker +* [MQTT](https://mqtt.org/) Broker, provides a light message broker +* Generic +Create virtual things, usefull for scripting +* Web Chart +Display thing property values in a time chart +* Web Dashboard +Setup tiles with relevant thing properties +* Web Scripts +Automatically trigger thing modifications or show custom data +* Share server folders to download and upload files +* Users Management, adds user and permissions +* HTTPS server, provides lha on a secure server +* Self monitoring, based on Lua and [libuv](https://github.com/luvit/luv) +* Ping, Test the reachability of a host on the network + +You need to include your devices using the dedicated tool such as deCONZ, Hue App or Z-Wave JS UI Control Panel. + +## Scripts Extensions + +There are 3 types of scripts, `blocks`, `view` and `lua` each having a dedicated editor. + +A blocks extension is a server side extension composed with basic blocks to react to thing property value modifications. +A view extension is a front-end extension composed with HTML to show thing property values. + +## Lua Extensions + +An extension consists in a folder containing a manifest file and a Lua script. + +The manifest is loaded from the file *manifest.json* and consists in the extension name and description. + +```json +{ + "name": "Serial", + "description": "Serial RF and sensors", + "version": "1.0" +} +``` + +The manifest could define a JSON schema using the *schema* property. The schema described the extension configuration. + +The script is loaded from the file *init.lua* or the file name defined in the manifest *script* property. + +The script receives the extension as a parameter. + +```lua +local extension = ... +```