From 5d73544e8f297e4199072ce7ca3707184e18bcda Mon Sep 17 00:00:00 2001 From: windkh Date: Sun, 7 Apr 2024 22:11:43 +0200 Subject: [PATCH] updated gen 3 types and doc fix #151 --- README.md | 6 +++--- shelly/99-shelly.js | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index e7096c0..a32469f 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ Generation 2 devices: - Shelly Wall Display Generation 3 devices: -- Shelly 1PM Mini +- Shelly 1 Mini, 1PM Mini, PM Mini - Shelly Plus H&T @@ -611,7 +611,7 @@ Note that the button is not always reachable as it falls to sleep. This is not t -# Shelly Node (Generation 2+) +# Shelly Node (Generation 2 and Generation 3) See also https://shelly-api-docs.shelly.cloud/gen2/ See also https://shelly-api-docs.shelly.cloud/gen2/Devices/ShellyPlus1PM The node can communicate with several shelly types. You must select the correct device type from the combobox when configuring the node. @@ -623,7 +623,7 @@ You must configure this network port, make sure that it is not already in use. I under that the shelly device can reach the node-red server (Leave this field empty if you run inside the same network segment). -## Relay (Plus 1, Plus 1 PM, Plus 2 PM, Plus UNI, Pro 1, Pro 1 PM, Pro 2, Pro 2 PM, Pro 4 PM, Plug US, 1PM Mini, Shelly Wall Display) +## Relay (Plus 1, Plus 1 PM, Plus 2 PM, Plus UNI, Pro 1, Pro 1 PM, Pro 2, Pro 2 PM, Pro 4 PM, Plug US, Mini, 1PM Mini, PM Mini, Shelly Wall Display) The node is able to turn on and turn off a shelly switch. It outputs the status after every interaction with the shelly device. Turning on is done by sending the following payload into the input. The relay number is optional and defaults to 0. diff --git a/shelly/99-shelly.js b/shelly/99-shelly.js index 8c2ffab..f1c0eb3 100644 --- a/shelly/99-shelly.js +++ b/shelly/99-shelly.js @@ -2253,8 +2253,10 @@ module.exports = function (RED) { return result; } + // this list also contains the shelly gen3 devices + // "S3PM-", "S3SW-", "S3SN-" let gen2DeviceTypes = new Map([ - ["Relay", ["SHSW-", "SNSW-", "SPSW-", "SNPL-", "SNPM-", , "S3SW-", "SNSN-", "SAWD-"]], + ["Relay", ["SHSW-", "SNSW-", "SPSW-", "SPSH-", "SNPL-", "SNPM-", "SNSN-", "SAWD-", "S3PM-", "S3SW-"]], ["Button", ["SNSN-"]], ["Sensor", ["SNSN-", "S3SN-"]], // Shelly Plus H&T / PLus Smoke only support Webhook, no scripting ["Measure", ["SPEM-"]],