Skip to content
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

Update to support mqtt based triggers #33

Closed
wants to merge 60 commits into from
Closed

Conversation

yarafie
Copy link

@yarafie yarafie commented Dec 21, 2024

  • Update to use MQTT based triggers.

Thank you for taking the time to work on a Pull Request. Your contribution is really appreciated! 🎉
Please don't delete any part of the template, since keeping the provided structure will help maintainers to review your work more rapidly.

Sections marked as * are required and need to be filled in.

Breaking change

This may break existing automations based on the older version for IKEA Tradfri E1743 if being used.
A redownload/update/resetup of the ikea_1743.yaml will probably be needed.

Proposed change*

Updated IKEA TRÅDFRI On/Off Switch & Dimmer (E1743) controller to additionally use mqtt triggers.
Original entity sensor.<DEVICE>_action triggers will still work if that is how your system is setup.

Added new controller for IKEA RODRET Dimmer (E2202).

Updated light, cover and media_player hooks to add support for IKEA RODRET Dimmer (E2202).

The new 2 controllers should now work with future releases of zigbee2mqtt 2.0.0 if and when triggers are refactored to use mqtt rather than the soon to be depecrated sensor.<DEVICE>_action.

Checklist*

  • [Y] I followed sections of the Contribution Guidelines relevant to changes I'm proposing.
  • [Y] I properly tested proposed changes on my system and confirm that they are working as expected.
  • [Y] I formatted files with Prettier using the command npm run format before submitting my Pull Request.

…qtt triggers.

The controller should now work with the upcomming release of zigbee2mqtt 2.0.0 as triggers were refactored to use mqtt rather than the depecrated sensor.<DEVICE>_action.
@LewisSpring
Copy link
Collaborator

LewisSpring commented Dec 22, 2024

Hiya!
Latest version of this commit looking really good, thanks :)!

Tested my E2001/E2002 and appears to be working perfectly so far!

Edit: That's alone and with the Light Hook 👍

@yarafie
Copy link
Author

yarafie commented Dec 22, 2024

Good to know my code actually works :)
Ive already worked on all IKEA Controllers and the sonoff one, they are ready to be tested.
Not sure how to make another pull request though.

I think my changes are pretty easy to follow. If yiu want do one of the phillips or xiomi and I can check it for you.

@LewisSpring
Copy link
Collaborator

If you need to make any changes, click here
image
then you can use the GitHub web editor (or git) to upload your changes.

You can keep committing to this same pull request by editing your fork/branch :)

I'll have a look at changing one now.

@LewisSpring
Copy link
Collaborator

For anyone else looking to commit: I would say you should access @yarafie 's repo as per my note above and commit a change to keep this within the same pull too.

Remove "reported to work with" as Rodret has been moved out to it's own blueprint now.
@yarafie
Copy link
Author

yarafie commented Dec 22, 2024

If you need to make any changes, click here image then you can use the GitHub web editor (or git) to upload your changes.

You can keep committing to this same pull request by editing your fork/branch :)

I'll have a look at changing one now.

Already updated my fork yesterday.

@LewisSpring
Copy link
Collaborator

If you need to make any changes, click here image then you can use the GitHub web editor (or git) to upload your changes.
You can keep committing to this same pull request by editing your fork/branch :)
I'll have a look at changing one now.

Already updated my fork yesterday.

Yep of course! Once all the needed changes are made and tested if possible (though as you have architected this as non-breaking I am not too worried) I will merge it all at once.

@yarafie
Copy link
Author

yarafie commented Dec 22, 2024

Looks like all my changes made it as part of the latest PR.
Ive done all the IKEA controllers and the 1 sonoff .
Phillips and xiomai controllers need to probably be done.

Check my code changes (use the ikea_e1743.yaml) as the base.
You can easily follow the changes ive done.
Try and do one of the phillips or xiomai and I can review it if you want.
Good to have at least someone else know.

@LewisSpring
Copy link
Collaborator

Looks like all my changes made it as part of the latest PR. Ive done all the IKEA controllers and the 1 sonoff . Phillips and xiomai controllers need to probably be done.

Check my code changes (use the ikea_e1743.yaml) as the base. You can easily follow the changes ive done. Try and do one of the phillips or xiomai and I can review it if you want. Good to have at least someone else know.

I had started looking at a Phillips controller this morning - I'll try get one done today.

@malgoe
Copy link

malgoe commented Jan 2, 2025

Hey @yarafie
The blueprint for E1744 has an indentation problem, one space too much on rows 220-250. I just edited it locally and other than that it works great for z2m v2.

Changed Versiom to 2025-01-01 Happy New Year
@yarafie
Copy link
Author

yarafie commented Jan 2, 2025

Hey @yarafie The blueprint for E1744 has an indentation problem, one space too much on rows 220-250. I just edited it locally and other than that it works great for z2m v2.

Thanks. Fixed it.

@LewisSpring
Copy link
Collaborator

Updated ikea_e1744.yaml version to tomorrows date to resolve merge conflict.

This also makes it clear that the fix from #29 is applied - I know it was there already :)

yarafie and others added 25 commits January 8, 2025 17:08
Prettier - Enforce code style
@yarafie
Copy link
Author

yarafie commented Jan 9, 2025

To all whom are using my fork.
In order to start fresh I'm going to delete my fork of lsismerio and refork from Original EPMatt in order for me to be able to create directly with the main Repo.
I will do this in about 2 hours from this comment.

@EPMatt
Copy link

EPMatt commented Jan 9, 2025

@yarafie @Nicolai- thanks for sorting out the issues with the already open fork, and for opening the PR on the original repo! :)

For anyone following this thread: Initial PR for MQTT Device triggers for the IKEA E1743 has been opened. 🔥
EPMatt#661

As soon as we merge that, we are gonna follow up with PRs for all the other controllers.
Thanks for everyone who contributed to the discussion here! Stay tuned and feel free to jump in the linked PR if you want to test the blueprints on your system and share your feedback.

@Xander-V
Copy link

Xander-V commented Jan 10, 2025

Great work guys, highly appreciated!
And also glad to see you back @EPMatt

If testing is needed, I will gladly help with:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.