From 0bc5e04a24933735471cb3b8e2d236f093cf975a Mon Sep 17 00:00:00 2001 From: Nick Moone <33722387+nickmoone@users.noreply.github.com> Date: Tue, 20 Feb 2024 22:47:10 +0100 Subject: [PATCH 1/3] Create shelly-plus-i4dc.ts. --- src/devices/shelly-plus-i4dc.ts | 47 +++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 src/devices/shelly-plus-i4dc.ts diff --git a/src/devices/shelly-plus-i4dc.ts b/src/devices/shelly-plus-i4dc.ts new file mode 100644 index 00000000..553a0844 --- /dev/null +++ b/src/devices/shelly-plus-i4dc.ts @@ -0,0 +1,47 @@ +import { component, Device } from './base'; +import { + BluetoothLowEnergy, + Cloud, + Input, + Mqtt, + OutboundWebSocket, + Script, + WiFi, +} from '../components'; + +export class ShellyPlusI4 extends Device { + static readonly model: string = 'SNSN-0D24X'; + static readonly modelName: string = 'Shelly Plus I4DC'; + + @component + readonly wifi = new WiFi(this); + + @component + readonly bluetoothLowEnergy = new BluetoothLowEnergy(this); + + @component + readonly cloud = new Cloud(this); + + @component + readonly mqtt = new Mqtt(this); + + @component + readonly outboundWebSocket = new OutboundWebSocket(this); + + @component + readonly input0 = new Input(this, 0); + + @component + readonly input1 = new Input(this, 1); + + @component + readonly input2 = new Input(this, 2); + + @component + readonly input3 = new Input(this, 3); + + @component + readonly script = new Script(this); +} + +Device.registerClass(ShellyPlusI4DC); From 6714cd04ed1677407e06a53376ac37401e1a9aed Mon Sep 17 00:00:00 2001 From: Nick Moone <33722387+nickmoone@users.noreply.github.com> Date: Tue, 20 Feb 2024 22:48:21 +0100 Subject: [PATCH 2/3] Add support for shelly-plus-i4dc. --- src/devices/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/devices/index.ts b/src/devices/index.ts index 68a2fa10..e48b9818 100644 --- a/src/devices/index.ts +++ b/src/devices/index.ts @@ -5,6 +5,7 @@ export * from './shelly-plus-1-pm'; export * from './shelly-plus-2-pm'; export * from './shelly-plus-ht'; export * from './shelly-plus-i4'; +export * from './shelly-plus-i4dc'; export * from './shelly-plus-plug-us'; export * from './shelly-pro-1'; export * from './shelly-pro-1-pm'; From 9476758170afecbf21269b5eed75abc2a74418c2 Mon Sep 17 00:00:00 2001 From: Nick Moone <33722387+nickmoone@users.noreply.github.com> Date: Wed, 21 Feb 2024 00:02:50 +0100 Subject: [PATCH 3/3] Fix wrong classname. --- src/devices/shelly-plus-i4dc.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/devices/shelly-plus-i4dc.ts b/src/devices/shelly-plus-i4dc.ts index 553a0844..b31de6c4 100644 --- a/src/devices/shelly-plus-i4dc.ts +++ b/src/devices/shelly-plus-i4dc.ts @@ -9,7 +9,7 @@ import { WiFi, } from '../components'; -export class ShellyPlusI4 extends Device { +export class ShellyPlusI4DC extends Device { static readonly model: string = 'SNSN-0D24X'; static readonly modelName: string = 'Shelly Plus I4DC';