Skip to content

[shelly] Add support for Gen4 devices - #18782

Merged
jlaur merged 19 commits into
openhab:mainfrom
markus7017:shelly_gen4-2
Jul 12, 2025
Merged

[shelly] Add support for Gen4 devices#18782
jlaur merged 19 commits into
openhab:mainfrom
markus7017:shelly_gen4-2

Conversation

@markus7017

@markus7017 markus7017 commented Jun 8, 2025

Copy link
Copy Markdown
Contributor
  • Adds support for Gen4 Devices: Plus 1/1PM, Mini 1/1PM/EM, Pro 2PM, Plus Power Strip 4
  • Some Gen4 devices are providing the measure frequency (new channel)
  • README updated/fixed

Closing

Waiting on #18902

@markus7017 markus7017 self-assigned this Jun 8, 2025
@markus7017 markus7017 added enhancement An enhancement or new feature for an existing add-on work in progress A PR that is not yet ready to be merged labels Jun 8, 2025
@markus7017 markus7017 linked an issue Jun 8, 2025 that may be closed by this pull request
@markus7017 markus7017 changed the title [shelly] Add support for Gen4 devices [shelly] Add support for Gen4 devices, work around for firmware 1.6.1 Jun 8, 2025
@markus7017 markus7017 removed the work in progress A PR that is not yet ready to be merged label Jun 8, 2025
@markus7017
markus7017 requested a review from jlaur June 8, 2025 16:56
@openhab-bot

Copy link
Copy Markdown
Collaborator

This pull request has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/shelly-binding/56862/4477

@jlaur

jlaur commented Jun 8, 2025

Copy link
Copy Markdown
Contributor

This PR includes the code from #18775. It should be merged first, and this PR should then be rebased.

@markus7017

Copy link
Copy Markdown
Contributor Author

I created a new PR ##18790, which should also be merged before this one. It separates the Plus 2PM fix and might also serve as back port to 4.3.x

After PR #18775 and #18790 are merged I do a rebase here.

@jlaur jlaur removed the awaiting other PR Depends on another PR label Jun 12, 2025
@markus7017 markus7017 added the awaiting other PR Depends on another PR label Jun 13, 2025
@markus7017

markus7017 commented Jun 13, 2025

Copy link
Copy Markdown
Contributor Author

@mstormi requested to carve-out the 1.6.1 work around and do a backport to 4.3.x, which I support

I'll create another PR soon

See #18797

@lsiepel

lsiepel commented Jul 3, 2025

Copy link
Copy Markdown
Contributor

Please fix conflicts

@lsiepel lsiepel removed the awaiting other PR Depends on another PR label Jul 3, 2025
@markus7017 markus7017 changed the title [shelly] Add support for Gen4 devices, work around for firmware 1.6.1 [shelly] Add support for Gen4 devices Jul 4, 2025
@markus7017

Copy link
Copy Markdown
Contributor Author

@jlaur I rebased, verified Pro 2+Pro 3 and it looks good.

@jlaur jlaur left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New comments added.

Comment thread bundles/org.openhab.binding.shelly/README.md Outdated
Comment thread bundles/org.openhab.binding.shelly/README.md Outdated
Signed-off-by: Markus Michels <markus7017@gmail.com>
@markus7017

Copy link
Copy Markdown
Contributor Author

@jlaur anything else?

@jlaur

jlaur commented Jul 12, 2025

Copy link
Copy Markdown
Contributor

Signed-off-by: Markus Michels <markus7017@gmail.com>
@markus7017

Copy link
Copy Markdown
Contributor Author

anything else?

Still this: https://github.com/openhab/openhab-addons/pull/18782/files#r2187012965

I have no clue how to do that. I tried rebase etc., but it still shows up as a change
Could you please give advise

@jlaur

jlaur commented Jul 12, 2025

Copy link
Copy Markdown
Contributor

I have no clue how to do that. I tried rebase etc., but it still shows up as a change
Could you please give advise

I don't know your fork and processes, so it's a bit hard for me to help. Your main branch does look strange to me though:
https://github.com/markus7017/openhab-addons/tree/main

image

Why is it 792 commits behind? Are you using this branch as your base branch?

@jlaur

jlaur commented Jul 12, 2025

Copy link
Copy Markdown
Contributor

Why is it 792 commits behind? Are you using this branch as your base branch?

If indeed this is your base branch for creating new PR branches, then you are severely out of sync, and you are not using current code. So my advise is to bring the main branch in your fork back in sync, like you see mine here:

image

And then rebase as previously explained.

I guess this might also explain why your PR's often tend to overwrite/revert code from other branches?

@jlaur

jlaur commented Jul 12, 2025

Copy link
Copy Markdown
Contributor

If indeed this is your base branch for creating new PR branches

You branch shelly_gen4-2 does look much closer to the upstream main branch though in the openhab/openhab-addons repository: main...markus7017:openhab-addons:shelly_gen4-2

I don't know how you manage this without having your fork's main branch as base (in between). But when looking at commits ahead of, you see some commits that are unrelated. So somehow you will need to get rid of them. Perhaps you can try an interactive rebase and simply drop them, but I don't know what will be the end result of that, given this (for me) strange setup.

The commit 200bb03 seems problematic, but it also contains other changes than those that should not be part of this PR.

@markus7017

Copy link
Copy Markdown
Contributor Author

ok, option b) I close this PR and open a new one just including the final changes

markus7017 added a commit to markus7017/openhab-addons that referenced this pull request Jul 12, 2025
Signed-off-by: Markus Michels <markus7017@gmail.com>
Signed-off-by: Markus Michels <markus7017@gmail.com>
@markus7017

markus7017 commented Jul 12, 2025

Copy link
Copy Markdown
Contributor Author

found it!! stupid,
one had a different comment, one was a duplicate

@jlaur jlaur left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise LGTM.

Comment thread bundles/org.openhab.binding.shelly/README.md Outdated
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>

@jlaur jlaur left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jlaur
jlaur merged commit 491ef7f into openhab:main Jul 12, 2025
1 of 2 checks passed
@jlaur jlaur added this to the 5.0 milestone Jul 12, 2025
phenix1990 pushed a commit to phenix1990/openhab-addons that referenced this pull request Jul 31, 2025
Signed-off-by: Markus Michels <markus7017@gmail.com>
psmedley pushed a commit to psmedley/openhab-addons that referenced this pull request Aug 6, 2025
Signed-off-by: Markus Michels <markus7017@gmail.com>
Signed-off-by: Paul Smedley <paul@smedley.id.au>
computergeek1507 pushed a commit to computergeek1507/openhab-addons that referenced this pull request Mar 16, 2026
Signed-off-by: Markus Michels <markus7017@gmail.com>
Signed-off-by: Scott Hanson <scooter_seh@yahoo.com>
markus7017 added a commit to markus7017/openhab-addons that referenced this pull request Jun 13, 2026
Signed-off-by: Markus Michels <markus7017@gmail.com>
@markus7017
markus7017 deleted the shelly_gen4-2 branch August 1, 2026 06:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement An enhancement or new feature for an existing add-on

Projects

None yet

4 participants