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

Multi-Plug Devices as Power Strip Accessory in HomeKit #341

Open
wants to merge 38 commits into
base: main
Choose a base branch
from

Conversation

ZeliardM
Copy link

@ZeliardM ZeliardM commented Mar 12, 2024

@plasticrake,
I have tried my hand at working with your API and your plugin for TPLink Smarthome for Homebridge and first and foremost, it was very well done, and I thank you for your work.

I have made several modifications here to implement sending Multi-Plug Devices to HomeKit as a Power Strip Single Grouped Accessory with the Outlets being individually controlled.

The way your API is written, it will allow for childId's to be used, but only when coming from a Plug Device, but sense the Plugs are all just services underneath a single device, I had to work with what I had.

There may be some changes that can be done on the API side of things to work with powerStrips and have them as a deviceType, but I didn't want to mess with the API.

The changes create a single homebridge and homekit accessory, they add multiple outlet services for each outlet and then allow for those outlets to be controlled individually either in the Kasa App, Homebridge, or HomeKit and the state will update across all areas.

I also looked into several of the open issues right now with the ECONNRESET issues and I found that changing over to UDP as the transport resolved those issues, not sure if that fixes the issue, but it stops the logs. I also removed the energy characteristics from default as they are listed under the HomeKit as optional and not required or used in HomeKit, they can still be enabled, but just disabled by default.

If you have any questions about this, please let me know.

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.

1 participant