[shelly] Add support for Shelly Plug M Gen3#20632
Conversation
Signed-off-by: Martin Bartsch <kaenguruhs@gmx.net>
Signed-off-by: Martin Bartsch <kaenguruhs@gmx.net>
Signed-off-by: Martin Bartsch <kaenguruhs@gmx.net>
|
Updated the PR with missing UI definitions and adjusted the unit tests. New *.jar is here: org.openhab.binding.shelly-5.2.0-SNAPSHOT.zip |
There was a problem hiding this comment.
Pull request overview
Adds Shelly binding support for the Shelly Plug M Gen3 (model id S3PL-30110EU) by mapping it into the existing Gen2/Gen3 RPC “Plus Plug” thing type and ensuring discovery/identification recognizes the new service/model identifiers.
Changes:
- Add the new model id constant and map
S3PL-30110EUto a supported thing type. - Adjust discovery/type resolution to avoid misclassifying
shellyplugmg3-*as a Gen1 “shellyplug”. - Update tests and user-facing descriptions/docs to include the “M” variant.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| bundles/org.openhab.binding.shelly/src/main/java/org/openhab/binding/shelly/internal/ShellyDevices.java | Adds model id mapping for Plug M Gen3 and service-name mapping for shellyplugmg3. |
| bundles/org.openhab.binding.shelly/src/main/java/org/openhab/binding/shelly/internal/discovery/ShellyThingCreator.java | Ensures shellyplugmg3-* doesn’t get routed through the Gen1 plug name mapping. |
| bundles/org.openhab.binding.shelly/src/test/java/org/openhab/binding/shelly/internal/discovery/ShellyThingCreatorTest.java | Extends service-name and device-type mapping test cases for Plug M Gen3. |
| bundles/org.openhab.binding.shelly/src/test/java/org/openhab/binding/shelly/internal/api/ShellyDeviceProfileTest.java | Adds Plug M thing type to the generation/API determination test matrix. |
| bundles/org.openhab.binding.shelly/src/main/resources/OH-INF/thing/shellyGen2_relay.xml | Updates the shellyplusplug thing type description to include “M”. |
| bundles/org.openhab.binding.shelly/src/main/resources/OH-INF/i18n/shelly.properties | Updates the English i18n description for shellyplusplug. |
| bundles/org.openhab.binding.shelly/src/main/resources/OH-INF/i18n/shelly_de.properties | Updates the German i18n description for shellyplusplug. |
| bundles/org.openhab.binding.shelly/README.md | Adds the Plug M Gen3 model id to the supported device table. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Martin Bartsch <kaenguruhs@gmx.net>
lsiepel
left a comment
There was a problem hiding this comment.
Thanks LGTM
Waiting for @markus7017 to confirm
|
@kaenguruhs Looks good, could you please add the new device type to the unit tests (ShellyDeviceProfileTest, ShellyThingCreatorTest) |
|
Hi @markus7017, in ShellyThingCreatorTest.java I added the new plug:
In ShellyDeviceProfileTest I did not add the new plug M as I did not add a new THING_TYPE (just like the PLUSPLUGIT, which is not mentioned in there, too). What do you expect me to do? |
lsiepel
left a comment
There was a problem hiding this comment.
One final comment. Otherwise LGTM
Signed-off-by: Martin Bartsch <kaenguruhs@gmx.net>
Importance
provides a new addon / adds a new thing
Description
This PR adds support for the Shelly Plug M Gen3.
The device is identified by the model ID
S3PL-30110EU.Technical changes:
SHELLYDT_PLUSPLUGM_G3and mapping toShellyDevices.java.ShellyThingCreator.javato correctly handle Gen3 discovery for this model.shellyGen2_relay.xmldescription to include the "M" variant.README.mdto include "M" variant.Testing
Legal Process
Closes #20631.