Skip to content

Commit 400cf14

Browse files
authored
Merge pull request #74 from ShellyUSA/DanielWinks
Daniel winks
2 parents 72dba3c + 2a7d5d8 commit 400cf14

File tree

4 files changed

+58
-4
lines changed

4 files changed

+58
-4
lines changed

PackageManifests/ShellyWebhookDrivers/packageManifest.json

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"packageName": "Shelly Webhook/Websocket Drivers",
33
"author": "ShellyUSA, Daniel Winks",
4-
"version": "2.13.0",
5-
"releaseNotes": "2.13.0 Add Shelly Pro 3EM400 Support/r/n2.12.0 Add Shelly Pro EM support/r/n2.11.0 Add support for Shelly 1, Shelly RGBW (Gen1), Shelly RGBW White Mode (Gen1), Shelly Plus Wall Dimmer, Shelly Pro 1PM, Pro 2, Pro Dimmer 1PM, Pro Dimmer 2PM",
4+
"version": "2.14.0",
5+
"releaseNotes": "2.14.0 Add Shelly EM, Shelly 3EM/r/n2.13.0 Add Shelly Pro 3EM400 Support/r/n2.12.0 Add Shelly Pro EM support/r/n2.11.0 Add support for Shelly 1, Shelly RGBW (Gen1), Shelly RGBW White Mode (Gen1), Shelly Plus Wall Dimmer, Shelly Pro 1PM, Pro 2, Pro Dimmer 1PM, Pro Dimmer 2PM",
66
"minimumHEVersion": "2.3.7.114",
77
"dateReleased": "2024-02-10",
88
"licenseFile": "https://raw.githubusercontent.com/ShellyUSA/Hubitat-Drivers/master/LICENSE",
@@ -169,6 +169,13 @@
169169
"location": "https://raw.githubusercontent.com/ShellyUSA/Hubitat-Drivers/master/WebhookWebsocket/Shelly2.5.groovy",
170170
"required": false
171171
},
172+
{
173+
"id": "62ee7ce0-bb10-4800-a504-234a7bc66eec",
174+
"name": "Shelly 3EM",
175+
"namespace": "ShellyUSA",
176+
"location": "https://raw.githubusercontent.com/ShellyUSA/Hubitat-Drivers/master/WebhookWebsocket/Shelly3EM.groovy",
177+
"required": false
178+
},
172179
{
173180
"id": "4900ccee-fbb9-4df7-bd3a-2a479335ba79",
174181
"name": "Shelly Blu Gateway",
@@ -204,6 +211,13 @@
204211
"location": "https://raw.githubusercontent.com/ShellyUSA/Hubitat-Drivers/master/WebhookWebsocket/ShellyDuoWWCW.groovy",
205212
"required": false
206213
},
214+
{
215+
"id": "9e02af5d-ab78-401c-9a57-99ecd78c0b81",
216+
"name": "Shelly EM",
217+
"namespace": "ShellyUSA",
218+
"location": "https://raw.githubusercontent.com/ShellyUSA/Hubitat-Drivers/master/WebhookWebsocket/ShellyEM.groovy",
219+
"required": false
220+
},
207221
{
208222
"id": "2b2d10f3-c078-406f-aacf-936936d41a1d",
209223
"name": "Shelly Flood",

ShellyDriverLibrary/ShellyUSA.ShellyUSA_Driver_Library.groovy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ void getPreferencesFromShellyDevice() {
463463
setDeviceDataValue('frequencyId', "${id}")
464464
}
465465

466-
if(em1s?.size() > 0 && hasNoChildrenNeeded() == false) {
466+
if(em1s?.size() > 0) {
467467
em1s.each{ em1 ->
468468
Integer id = em1.tokenize(':')[1] as Integer
469469
logTrace("EM1 ID: ${id}")
@@ -476,7 +476,7 @@ void getPreferencesFromShellyDevice() {
476476
}
477477
}
478478

479-
if(ems?.size() > 0 && hasNoChildrenNeeded() == false) {
479+
if(ems?.size() > 0) {
480480
ems.each{ em ->
481481
Integer id = em.tokenize(':')[1] as Integer
482482
logTrace("EM ID: ${id}")

WebhookWebsocket/Shelly3EM.groovy

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#include ShellyUSA.ShellyUSA_Driver_Library
2+
3+
metadata {
4+
definition (name: 'Shelly 3EM', namespace: 'ShellyUSA', author: 'Daniel Winks', singleThreaded: false, importUrl: '') {
5+
capability 'Initialize'
6+
capability 'Configuration'
7+
capability 'Refresh'
8+
capability 'CurrentMeter' //amperage - NUMBER, unit:A
9+
capability 'PowerMeter' //power - NUMBER, unit:W
10+
capability 'VoltageMeasurement' //voltage - NUMBER, unit:V //frequency - NUMBER, unit:Hz
11+
capability 'EnergyMeter' //energy - NUMBER, unit:kWh
12+
attribute 'returnedEnergy', 'number' //unit:kWh
13+
attribute 'apparentPower', 'number'
14+
command 'resetEnergyMonitors'
15+
}
16+
}
17+
18+
@Field static Boolean WS = true
19+
@Field static Boolean DEVICEISBLUGATEWAY = true

WebhookWebsocket/ShellyEM.groovy

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#include ShellyUSA.ShellyUSA_Driver_Library
2+
3+
metadata {
4+
definition (name: 'Shelly EM', namespace: 'ShellyUSA', author: 'Daniel Winks', singleThreaded: false, importUrl: '') {
5+
capability 'Initialize'
6+
capability 'Configuration'
7+
capability 'Refresh'
8+
capability 'CurrentMeter' //amperage - NUMBER, unit:A
9+
capability 'PowerMeter' //power - NUMBER, unit:W
10+
capability 'VoltageMeasurement' //voltage - NUMBER, unit:V //frequency - NUMBER, unit:Hz
11+
capability 'EnergyMeter' //energy - NUMBER, unit:kWh
12+
capability 'Switch'
13+
attribute 'returnedEnergy', 'number' //unit:kWh
14+
attribute 'apparentPower', 'number'
15+
command 'resetEnergyMonitors'
16+
}
17+
}
18+
19+
@Field static Boolean WS = true
20+
@Field static Boolean DEVICEISBLUGATEWAY = true
21+
@Field static Boolean NOCHILDREN = true

0 commit comments

Comments
 (0)