Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions examples-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
]
Original file line number Diff line number Diff line change
@@ -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 = {
Expand Down
Original file line number Diff line number Diff line change
@@ -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 = {
Expand All @@ -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,
};
Expand Down