From b5a37b407b4892cfabd272f3590d14e513c79e47 Mon Sep 17 00:00:00 2001 From: Radoslav Sapundzhiev Date: Mon, 23 Feb 2026 11:05:31 +0200 Subject: [PATCH] Fix headers of LoRa send/recieve dw state https://shellyusa.atlassian.net/browse/FW-1200 --- examples-manifest.json | 12 ++++++++++++ ...iever.js => lora-wired-dw-reciever.shelly.js} | 8 ++++++-- ...-sender.js => lora-wired-dw-sender.shelly.js} | 16 ++++++++++------ 3 files changed, 28 insertions(+), 8 deletions(-) rename lora/lora-wired-dw-state/{lora-wired-dw-reciever.js => lora-wired-dw-reciever.shelly.js} (68%) rename lora/lora-wired-dw-state/{lora-wired-dw-sender.js => lora-wired-dw-sender.shelly.js} (73%) diff --git a/examples-manifest.json b/examples-manifest.json index bbdd40c..aa86378 100644 --- a/examples-manifest.json +++ b/examples-manifest.json @@ -507,5 +507,17 @@ "fname": "weather-env/turn-on-weather.shelly.js", "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." + }, + { + "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, };