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

Add support for Control4 Rooms #20

Closed
wants to merge 4 commits into from

Conversation

kdkavanagh
Copy link
Contributor

@kdkavanagh kdkavanagh commented Apr 26, 2022

Will be accompanied by HomeAssistant media_player support

@nalin29
Copy link
Contributor

nalin29 commented Sep 9, 2022

Is their a reason this pull request hasn't been merged? Is the project stalled? It seems that room integration is big feature for media control and I would like to contribute to home assistant by including room control using pycontrol4 assuming the request is merged.

@nalin29
Copy link
Contributor

nalin29 commented Sep 10, 2022

Additionally, I have noticed that this is not integrated with the websocket implementation it seems that the websocket cannot subscribe to room updates. Is there a way I can test and get my own websocket working through trial and error. What were the steps taken to capture api and websocket messages?

@kdkavanagh
Copy link
Contributor Author

The websocket API seemed to require some unique handshake process to fully connect. Beyond that, the two methods seemed functionally similar and I didnt need any time-sensitive push updates into HA. It was a bit easier to just use the REST API, especially since the rest of this library was using that as well.

To reverse engineer the API, I had to MITM the android app installed on an old android phone I had lying around - I needed to rebuild the apk with custom CA certs and use BurpSuite Community edition to intercept the API calls from the app. Unfortunately I dont recall the exact set of steps, I just remember it was a bit of a pain, but there are tutorials out there since this is a pretty common need for app developers

@kdkavanagh
Copy link
Contributor Author

+1 re: the merge question. In the meantime, I've been using a local install of this plugin+the HA integration I wrote. I can probably get those HA changes cleaned up and PR'd if that'd be helpful

@nalin29
Copy link
Contributor

nalin29 commented Sep 10, 2022

Thank you. Yeah I installed your library and was able to change to current HA plugin to support my media rooms for source and volume/power control using the current polling approach. It would be better to be push and not as hard coded.

@nalin29
Copy link
Contributor

nalin29 commented Feb 6, 2023

I noticed that you have forked the home assistant core and modified the control4 integration there. What features have you got working since I have a version that I made a while back but is pretty bare bones and diy. If you need someone to help test it let me know.


async def setVideoAndAudioSource(self, source_id: int):
"""Sets the current audio and video source for the room"""
await self.setSource(source_id, audio_only=False)
Copy link
Owner

Choose a reason for hiding this comment

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

Since we have two different set audio/set audio and video methods, the setSource method should be private (_setSource)?

@lawtancool
Copy link
Owner

Closed by #21

@lawtancool lawtancool closed this Feb 15, 2023
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.

3 participants