-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[shelly] Add initial support for Shelly Pro Dimmer #18687
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Matthias Maier <code@telebim.de>
Signed-off-by: Matthias Maier <code@telebim.de>
Signed-off-by: Matthias Maier <code@telebim.de>
Signed-off-by: Matthias Maier <code@telebim.de>
A review by @markus7017 would be appreciated. |
Would be nice if you can create a jar that can be tested in the community forums or linked issue. There seem to be multiple users that can test this change. |
I am not experienced in creating JARs and would appreciate a code review by some deeper in the code, but here you are: See below for updated jar! |
Hi Everbody, I'm not familar how to get the Code's for testing in this community but I'm looking desperately for a solution for SHELLY PRO Dimmer Devices and SHELLY PRO RGBWW devices. So If someone could help me in getting the codes and also how to bring it to openhab I'd apreciate best regards Runa |
|
Hello Isiepel, thanlks for Your hints. I'm running OH4.2.3 on a DS220+ Diskstation in a Docker. OH5 seems to need a 64 bit structure which my diskstation does not have. Is it still possible to install OH5 on DS220+ or do you have an other solution to use the binding for Shelly pro dimmer |
I'm not familiair with the Diskstation, but AFAICT openHAB 5 requires 64 bit and java 21. You could download it and do a testurn on your pc or laptop. |
Hello Isiepel, Si far i was able to install the 5.0.0 M2 on my siskstation and Idid all the setup for OH 5.0. unfortunately i dont know how to find the two zip file you mentioned at point 3 of your list. please be patient as I'm a beginner :-) Second thing is that the config of my OH 4.2.3. is not available at the new container. Do have a hint how to transfer the config into the new container ? greeting Runa |
Signed-off-by: Matthias Maier <code@telebim.de>
Updated jar (commit 74651e0): |
Additions look ok, I need to verify in detail. |
This one should be merged first: #18686 |
@matmai I was already working on Pro Dimmer 1PM/2PM integration before this PR and had a look to the changes. There is a good bunch of logic missing in your PR. How should be proceed? |
@markus7017 I already expected that it is not enough 😔 Since I do not have this device to test and the experience like you, you could take over my branch or open a new PR in favour of this one. |
@matmai did you tried my last build? |
@markus7017 I could install it but since I do not own a Pro Dimmer I could not test much more. (Dimmer Gen3 from my PR is not recognized by your build as expected) |
I don't know what the status of this PR is, but we can restart it when you are ready, and include it in 5.1. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds initial support for two new Shelly devices: Shelly Pro Dimmer 1PM and Shelly Pro Dimmer 2PM. The implementation follows the existing patterns for other Shelly Pro series devices.
Key changes:
- Added device type constants and thing type mappings for both dimmer models
- Created XML configuration and channel definitions for the new devices
- Extended device profile logic to recognize these as dimmer devices
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
ShellyThingCreator.java | Added device type constants and thing type mappings for the new Pro Dimmer models |
ShellyDeviceProfile.java | Extended dimmer detection logic to include the new Pro Dimmer devices |
ShellyBindingConstants.java | Added the new thing types to the supported devices collection |
shellyGen2_relay.xml | Defined XML configurations and channel groups for both Pro Dimmer models |
shelly.properties & shelly_de.properties | Added localized descriptions for the new device types |
README.md | Updated documentation to include the new Pro Dimmer models |
ShellyThingCreatorTest.java & ShellyDeviceProfileTest.java | Added test cases for the new device types |
<description>@text/thing-type.shelly.shellyprodimmer1pm.description</description> | ||
<semantic-equipment-tag>ControlDevice</semantic-equipment-tag> | ||
<channel-groups> | ||
<channel-group id="relay" typeId="dimmerChannel"/> |
Copilot
AI
Jul 26, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The Pro Dimmer 1PM uses 'relay' as the channel group ID but references 'dimmerChannel' type. For consistency with other single-channel dimmers and to avoid confusion, consider using 'dimmer' as the channel group ID instead of 'relay'.
<channel-group id="relay" typeId="dimmerChannel"/> | |
<channel-group id="dimmer" typeId="dimmerChannel"/> |
Copilot uses AI. Check for mistakes.
<channel-group id="relay1" typeId="relayChannel"> | ||
<label>@text/channel-group-type.shelly.relayChannel1.label</label> | ||
</channel-group> | ||
<channel-group id="meter1" typeId="meter"> | ||
<label>@text/channel-group-type.shelly.meter1.label</label> | ||
</channel-group> | ||
<channel-group id="relay2" typeId="relayChannel"> |
Copilot
AI
Jul 26, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Pro Dimmer 2PM uses 'relayChannel' type for what should be dimmer functionality. This is inconsistent with the 1PM model which correctly uses 'dimmerChannel'. Consider using 'dimmerChannel' type for consistency with dimmer devices.
<channel-group id="relay1" typeId="relayChannel"> | |
<label>@text/channel-group-type.shelly.relayChannel1.label</label> | |
</channel-group> | |
<channel-group id="meter1" typeId="meter"> | |
<label>@text/channel-group-type.shelly.meter1.label</label> | |
</channel-group> | |
<channel-group id="relay2" typeId="relayChannel"> | |
<channel-group id="relay1" typeId="dimmerChannel"> | |
<label>@text/channel-group-type.shelly.relayChannel1.label</label> | |
</channel-group> | |
<channel-group id="meter1" typeId="meter"> | |
<label>@text/channel-group-type.shelly.meter1.label</label> | |
</channel-group> | |
<channel-group id="relay2" typeId="dimmerChannel"> |
Copilot uses AI. Check for mistakes.
<channel-group id="relay1" typeId="relayChannel"> | ||
<label>@text/channel-group-type.shelly.relayChannel1.label</label> | ||
</channel-group> | ||
<channel-group id="meter1" typeId="meter"> | ||
<label>@text/channel-group-type.shelly.meter1.label</label> | ||
</channel-group> | ||
<channel-group id="relay2" typeId="relayChannel"> | ||
<label>@text/channel-group-type.shelly.relayChannel2.label</label> | ||
</channel-group> |
Copilot
AI
Jul 26, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Pro Dimmer 2PM uses 'relayChannel' type for what should be dimmer functionality. This is inconsistent with the 1PM model which correctly uses 'dimmerChannel'. Consider using 'dimmerChannel' type for consistency with dimmer devices.
<channel-group id="relay1" typeId="relayChannel"> | |
<label>@text/channel-group-type.shelly.relayChannel1.label</label> | |
</channel-group> | |
<channel-group id="meter1" typeId="meter"> | |
<label>@text/channel-group-type.shelly.meter1.label</label> | |
</channel-group> | |
<channel-group id="relay2" typeId="relayChannel"> | |
<label>@text/channel-group-type.shelly.relayChannel2.label</label> | |
</channel-group> | |
<channel-group id="relay1" typeId="dimmerChannel"> | |
<label>@text/channel-group-type.shelly.relayChannel1.label</label> | |
</channel-group> | |
<channel-group id="meter1" typeId="meter"> | |
<label>@text/channel-group-type.shelly.meter1.label</label> | |
</channel-group> | |
<channel-group id="relay2" typeId="dimmerChannel"> | |
<label>@text/channel-group-type.shelly.relayChannel2.label</label> | |
</channel> |
Copilot uses AI. Check for mistakes.
@matmai are you able to proceed with this pr? |
PR has been replaced by #19226 |
Add initial support for
fix #16408, fix #16409