diff --git a/examples-manifest.json b/examples-manifest.json index 985f19d..0359cd1 100644 --- a/examples-manifest.json +++ b/examples-manifest.json @@ -2134,5 +2134,17 @@ "title": "turn-on-weather.shelly.js", "description": "Turn on when temperature is below CONFIG.tempBelowTurnOn.\n\nTurn off when temperature is above CONFIG.tempAboveTurnOff.\n\nFor getting an API-KEY from Accuweather follow the instructions on their site for registering a new application, copy\nthe key and paste it here.", "tags": ["weather", "sensors", "temperature", "accuweather"] + }, + { + "fname": "lora/lora-wired-dw-state/lora-wired-dw-sender.shelly.js", + "title": "Detect and send Door/Window state over LoRa", + "description": "Example script with status handler that listens for DW sensor status changes - state: true/false\n\nconnected to one of the inptuts of I4DC Gen4.", + "doc": "lora/lora-wired-dw-state/README.md" + }, + { + "fname": "lora/lora-wired-dw-state/lora-wired-dw-reciever.shelly.js", + "title": "Recieve and display Door/Window state over LoRa", + "description": "Example script with event handler that listens for lora messages with 'user' payload type\n\nIf doorWindowComponent is in the recieved data - show the result in virtual boolean component.", + "doc": "lora/lora-wired-dw-state/README.md" } ] diff --git a/lora/lora-wired-dw-state/lora-wired-dw-reciever.js b/lora/lora-wired-dw-state/lora-wired-dw-reciever.shelly.js similarity index 68% rename from lora/lora-wired-dw-state/lora-wired-dw-reciever.js rename to lora/lora-wired-dw-state/lora-wired-dw-reciever.shelly.js index fb47207..6ba808a 100644 --- a/lora/lora-wired-dw-state/lora-wired-dw-reciever.js +++ b/lora/lora-wired-dw-state/lora-wired-dw-reciever.shelly.js @@ -1,6 +1,10 @@ /** - * Script with event handler that listens for lora messages with "user" payload type - * If doorWindowComponent is in the recieved data - show the result in virtual boolean component + * @title Recieve and display Door/Window state over LoRa + * @description Example script with event handler that listens for lora messages with "user" payload type + * If doorWindowComponent is in the recieved data - show the result in virtual boolean component + * Check README.md before use. (Requires firmware version: 2.1.1 or newer and LoRa Add-on hardware installed) + * @status production + * @link https://github.com/ALLTERCO/shelly-script-examples/blob/main/lora/lora-wired-dw-state/lora-wired-dw-reciever.shelly.js */ const CONFIG = { diff --git a/lora/lora-wired-dw-state/lora-wired-dw-sender.js b/lora/lora-wired-dw-state/lora-wired-dw-sender.shelly.js similarity index 73% rename from lora/lora-wired-dw-state/lora-wired-dw-sender.js rename to lora/lora-wired-dw-state/lora-wired-dw-sender.shelly.js index 89a84b1..ccd5315 100644 --- a/lora/lora-wired-dw-state/lora-wired-dw-sender.js +++ b/lora/lora-wired-dw-state/lora-wired-dw-sender.shelly.js @@ -1,9 +1,13 @@ /** - * Script with status handler that listens for DW sensor status changes - state: true/false - * connected to one of the inptuts of I4DC Gen4 - * 1. Using the command "openssl rand -base64 16" generate AES 128 bits base64 key - * 2. Put previously generated key to at least one of the keys of the sender and the reciever - * 3. At least one of the keys in the receiver should be the same as tx_key of the sender + * @title Detect and send Door/Window state over LoRa + * @description Example script with status handler that listens for DW sensor status changes - state: true/false + * connected to one of the inptuts of I4DC Gen4. + * 1. Using the command "openssl rand -base64 16" generate AES 128 bits base64 key + * 2. Put previously generated key to at least one of the keys of the sender and the reciever + * 3. At least one of the keys in the receiver should be the same as tx_key of the sender + * Check README.md before use. (Requires firmware version: 2.1.1 or newer and LoRa Add-on hardware installed) + * @status production + * @link https://github.com/ALLTERCO/shelly-script-examples/blob/main/lora/lora-wired-dw-state/lora-wired-dw-sender.shelly.js */ const CONFIG = { @@ -19,7 +23,7 @@ const CONFIG = { //Enable/disable status handler (send on state change) useStatusHandler: true, //Enable/disable timer (send periodically) - useTimer: true, + useTimer: false, //Timer interval in milliseconds interval: 3000, };