Skip to content

Conversation

matmai
Copy link
Contributor

@matmai matmai commented May 14, 2025

Add initial support for

fix #16408, fix #16409

Signed-off-by: Matthias Maier <code@telebim.de>
@matmai matmai requested a review from markus7017 as a code owner May 14, 2025 20:34
matmai added 3 commits May 14, 2025 22:40
Signed-off-by: Matthias Maier <code@telebim.de>
Signed-off-by: Matthias Maier <code@telebim.de>
Signed-off-by: Matthias Maier <code@telebim.de>
@lolodomo
Copy link
Contributor

A review by @markus7017 would be appreciated.

@lsiepel
Copy link
Contributor

lsiepel commented May 16, 2025

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.

@lsiepel lsiepel added enhancement An enhancement or new feature for an existing add-on additional testing preferred The change works for the pull request author. A test from someone else is preferred though. labels May 16, 2025
@matmai
Copy link
Contributor Author

matmai commented May 18, 2025

Would be nice if you can create a jar that can be tested in the community forums or linked issue.

I am not experienced in creating JARs and would appreciate a code review by some deeper in the code, but here you are:
org.openhab.binding.shelly-5.0.0-proDimmer.zip

See below for updated jar!

@runa1967
Copy link

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

@lsiepel
Copy link
Contributor

lsiepel commented May 21, 2025

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

  1. Make sure you have openHAB 5.0.0 milestone 2 installed
  2. Uninstall the shelly binding (you will not loose any channel/items/links etc)
  3. Download the zip file from the post above and extract the JAR file.
  4. Drop the jar file in your openHAB addons folder.
  5. Wait shortly and check if your device is working as expected (discovery, getting data etc)
  6. Report back your experience.

@runa1967
Copy link

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

@lsiepel
Copy link
Contributor

lsiepel commented May 22, 2025

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.

@runa1967
Copy link

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

@matmai
Copy link
Contributor Author

matmai commented May 29, 2025

Signed-off-by: Matthias Maier <code@telebim.de>
@markus7017
Copy link
Contributor

markus7017 commented May 29, 2025

Additions look ok, I need to verify in detail.
However it needs some more logic for the Pro Dimmer 2PM to reflect both meters
The new devices should also be added to the unit tests

@markus7017
Copy link
Contributor

This one should be merged first: #18686

@markus7017
Copy link
Contributor

markus7017 commented May 29, 2025

@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 markus7017 added the work in progress A PR that is not yet ready to be merged label May 29, 2025
@matmai
Copy link
Contributor Author

matmai commented May 30, 2025

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.

@markus7017
Copy link
Contributor

@markus7017
Copy link
Contributor

@matmai did you tried my last build?

@matmai
Copy link
Contributor Author

matmai commented Jun 10, 2025

@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)

@markus7017
Copy link
Contributor

markus7017 commented Jun 10, 2025

@matmai I requested testing of a new build here #16409
When this is done, I create a new PR

Adding Dimmer Gen3 is the easy of Prop1PM/2PM are working

@jlaur
Copy link
Contributor

jlaur commented Jul 13, 2025

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.

@wborn wborn requested a review from Copilot July 26, 2025 12:42
Copy link

@Copilot Copilot AI left a 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"/>
Copy link

Copilot AI Jul 26, 2025

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'.

Suggested change
<channel-group id="relay" typeId="dimmerChannel"/>
<channel-group id="dimmer" typeId="dimmerChannel"/>

Copilot uses AI. Check for mistakes.

Comment on lines +453 to +459
<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">
Copy link

Copilot AI Jul 26, 2025

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.

Suggested change
<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.

Comment on lines +453 to +461
<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>
Copy link

Copilot AI Jul 26, 2025

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.

Suggested change
<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.

@lsiepel
Copy link
Contributor

lsiepel commented Aug 13, 2025

@matmai are you able to proceed with this pr?

@lsiepel lsiepel added the awaiting feedback Awaiting feedback from the pull request author label Aug 13, 2025
@markus7017
Copy link
Contributor

PR has been replaced by #19226

@markus7017 markus7017 closed this Aug 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

additional testing preferred The change works for the pull request author. A test from someone else is preferred though. awaiting feedback Awaiting feedback from the pull request author enhancement An enhancement or new feature for an existing add-on work in progress A PR that is not yet ready to be merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[shelly] Support for Shelly Pro Dimmer 2PM [shelly] Support for Shelly Pro Dimmer 1PM

6 participants