Skip to content

Commit

Permalink
[shelly] Support for Plus Dimmer 10v (openhab#15950)
Browse files Browse the repository at this point in the history
* Implements openhab#15949: Plus Dimmer 10v added
* category DimmableLight does not exist; README updated

---------

Signed-off-by: Markus Michels <[email protected]>
  • Loading branch information
markus7017 authored Nov 25, 2023
1 parent 5177cf1 commit a4da986
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 5 deletions.
27 changes: 27 additions & 0 deletions bundles/org.openhab.binding.shelly/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1178,6 +1178,33 @@ Refer to [Smartify Roller Shutters with openHAB and Shelly](doc/UseCaseSmartRoll
| | totalKWH | Number | yes | Total energy consumption in kwh since the device powered up (resets on restart) |
| | lastUpdate | DateTime | yes | Timestamp of the last measurement |

### Shelly Plus Dimmer 10v (thing-type: shellyplus10v)

| Group | Channel | Type | read-only | Description |
| ----- | ------------ | -------- | --------- | --------------------------------------------------------------------------------- |
| relay | brightness | Dimmer | r/w | Currently selected brightness. |
| | outputName | String | yes | Logical name of this relay output as configured in the Shelly App |
| | input1 | Switch | yes | ON: Input/Button for input 1 is powered, see general notes on channels |
| | button1 | Trigger | yes | Event trigger, see section Button Events |
| | lastEvent1 | String | yes | Last event type (S/SS/SSS/L) for input 1 |
| | eventCount1 | Number | yes | Counter gets incremented every time the device issues a button event. |
| | input2 | Switch | yes | ON: Input/Button for channel 2 is powered, see general notes on channels |
| | button2 | Trigger | yes | Event trigger, see section Button Events |
| | lastEvent2 | String | yes | Last event type (S/SS/SSS/L) for input 2 |
| | eventCount2 | Number | yes | Counter gets incremented every time the device issues a button event. |
| | autoOn | Number | r/w | Relay #1: Sets a timer to turn the device ON after every OFF command; in seconds |
| | autoOff | Number | r/w | Relay #1: Sets a timer to turn the device OFF after every ON command; in seconds |
| | timerActive | Switch | yes | Relay #1: ON: An auto-on/off timer is active |
| meter | currentWatts | Number | yes | Current power consumption in Watts |
| | lastPower1 | Number | yes | Energy consumption for a round minute, 1 minute ago |
| | totalKWH | Number | yes | Total energy consumption in kwh since the device powered up (resets on restart) |
| | lastUpdate | DateTime | yes | Timestamp of the last measurement |

`Note: The Dimmer should be calibrated using the device Web UI or Shelly App.`

Using the Thing configuration option `brightnessAutoOn` you could decide if the light is turned on when a brightness > 0 is set.
`true`: Brightness will be set and device output is powered = light turns on with the new brightness
`false`: Brightness will be set, but output stays unchanged so light will not be switched on when it's currently off.

### Shelly Plus i4, i4DC (thing-types: shellyplusi4, shellyplusi4dc)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ public class ShellyThingCreator {
public static final String SHELLYDT_PLUSHT = "SNSN-0013A";
public static final String SHELLYDT_PLUSSMOKE = "SNSN-0031Z";
public static final String SHELLYDT_PLUSDIMMERUS = "SNDM-0013US";
public static final String SHELLYDT_PLUSDIMMER10V = "SNGW-0A11WW010";
public static final String SHELLYDT_PLUSWALLDISPLAY = "SAWD-0A1XX10EU1";

// Shelly Pro Series
Expand Down Expand Up @@ -168,6 +169,7 @@ public class ShellyThingCreator {
public static final String THING_TYPE_SHELLYPLUSPLUGS_STR = "shellyplusplug";
public static final String THING_TYPE_SHELLYPLUSPLUGUS_STR = "shellyplusplugus";
public static final String THING_TYPE_SHELLYPLUSDIMMERUS_STR = "shellypluswdus";
public static final String THING_TYPE_SHELLYPLUSDIMMER10V_STR = "shellyplus10v";

// Shelly Wall Display
public static final String THING_TYPE_SHELLYPLUSWALLDISPLAY_STR = "shellywalldisplay";
Expand Down Expand Up @@ -276,6 +278,10 @@ public class ShellyThingCreator {
THING_TYPE_SHELLYPLUSPLUGUS_STR);
public static final ThingTypeUID THING_TYPE_SHELLYPLUSDIMMERUS = new ThingTypeUID(BINDING_ID,
THING_TYPE_SHELLYPLUSDIMMERUS_STR);
public static final ThingTypeUID THING_TYPE_SHELLYPLUSDIMMER10V = new ThingTypeUID(BINDING_ID,
THING_TYPE_SHELLYPLUSDIMMER10V_STR);

// Shelly Wall Display
public static final ThingTypeUID THING_TYPE_SHELLYPLUSWALLDISPLAY = new ThingTypeUID(BINDING_ID,
THING_TYPE_SHELLYPLUSWALLDISPLAY_STR);

Expand Down Expand Up @@ -356,6 +362,7 @@ public class ShellyThingCreator {
THING_TYPE_MAPPING.put(SHELLYDT_PLUSHT, THING_TYPE_SHELLYPLUSHT_STR);
THING_TYPE_MAPPING.put(SHELLYDT_PLUSSMOKE, THING_TYPE_SHELLYPLUSSMOKE_STR);
THING_TYPE_MAPPING.put(SHELLYDT_PLUSDIMMERUS, THING_TYPE_SHELLYPLUSDIMMERUS_STR);
THING_TYPE_MAPPING.put(SHELLYDT_PLUSDIMMER10V, THING_TYPE_SHELLYPLUSDIMMER10V_STR);

// Plus Mini Series
THING_TYPE_MAPPING.put(SHELLYDT_MINI1, THING_TYPE_SHELLYMINI1_STR);
Expand Down Expand Up @@ -435,6 +442,8 @@ public class ShellyThingCreator {
THING_TYPE_MAPPING.put(THING_TYPE_SHELLYPLUSHT_STR, THING_TYPE_SHELLYPLUSHT_STR);
THING_TYPE_MAPPING.put(THING_TYPE_SHELLYPLUSSMOKE_STR, THING_TYPE_SHELLYPLUSSMOKE_STR);
THING_TYPE_MAPPING.put(THING_TYPE_SHELLYPLUSDIMMERUS_STR, THING_TYPE_SHELLYPLUSDIMMERUS_STR);
THING_TYPE_MAPPING.put(THING_TYPE_SHELLYPLUSDIMMER10V_STR, THING_TYPE_SHELLYPLUSDIMMER10V_STR);

THING_TYPE_MAPPING.put(THING_TYPE_SHELLYPLUSWALLDISPLAY_STR, THING_TYPE_SHELLYPLUSWALLDISPLAY_STR);

THING_TYPE_MAPPING.put(THING_TYPE_SHELLYMINI1_STR, THING_TYPE_SHELLYMINI1_STR);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ thing-type.shelly.shellyplusi4dc.description = Shelly Plus i4DC - 4xDC Input Dev
thing-type.shelly.shellyplusht.description = Shelly Plus HT - Humidity and Temperature sensor with display
thing-type.shelly.shellyplussmoke.description = Shelly Plus Smoke - Smoke Detector with Alarm
thing-type.shelly.shellypluswdus.description = Shelly Wall Dimmer US Device
thing-type.shelly.shellyplus10v.description = Shelly Plus Dimmer 10V

# Wall displays
thing-type.shelly.shellywalldisplay.description = Shelly Wall Display with sensors and input/output
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@
<item-type>Dimmer</item-type>
<label>@text/channel-type.shelly.whiteBrightness.label</label>
<description>@text/channel-type.shelly.whiteBrightness.description</description>
<category>DimmableLight</category>
<category>Light</category>
<state min="0" max="100" step="1" readOnly="false"></state>
</channel-type>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,6 @@
<thing-type id="shellydimmer">
<label>Shelly Dimmer</label>
<description>@text/thing-type.shelly.shellydimmer.description</description>
<category>DimmableLight</category>
<channel-groups>
<channel-group id="relay" typeId="dimmerChannel"/>
<channel-group id="meter" typeId="meter"/>
Expand All @@ -269,7 +268,6 @@
<thing-type id="shellydimmer2">
<label>Shelly Dimmer 2</label>
<description>@text/thing-type.shelly.shellydimmer2.description</description>
<category>DimmableLight</category>
<channel-groups>
<channel-group id="relay" typeId="dimmerChannel"/>
<channel-group id="meter" typeId="meter"/>
Expand Down Expand Up @@ -469,7 +467,7 @@
<item-type>Dimmer</item-type>
<label>@text/channel-type.shelly.dimmerBrightness.label</label>
<description>@text/channel-type.shelly.dimmerBrightness.description</description>
<category>DimmableLight</category>
<category>Light</category>
</channel-type>

<channel-type id="meterWatts">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,19 @@
<thing-type id="shellypluswdus">
<label>Shelly Plus Dimmer US</label>
<description>@text/thing-type.shelly.shellypluswdus.description</description>
<category>DimmableLight</category>
<channel-groups>
<channel-group id="relay" typeId="dimmerChannel"/>
<channel-group id="meter" typeId="meter"/>
<channel-group id="device" typeId="deviceStatus"/>
</channel-groups>

<representation-property>serviceName</representation-property>
<config-description-ref uri="thing-type:shelly:dimmer-gen2"/>
</thing-type>

<thing-type id="shellyplus10v">
<label>Shelly Plus Dimmer 10V</label>
<description>@text/thing-type.shelly.shellyplus10v.description</description>
<channel-groups>
<channel-group id="relay" typeId="dimmerChannel"/>
<channel-group id="meter" typeId="meter"/>
Expand Down

0 comments on commit a4da986

Please sign in to comment.