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

In Home Assistant, with multiple Russound controllers, there is response lag for zones not on first controller #11

Open
widehat opened this issue Mar 27, 2022 · 0 comments

Comments

@widehat
Copy link

widehat commented Mar 27, 2022

Thank you everyone for writing and maintaining the Russound RNET interface. I am new to Home Assistant and have acquired some old Russound boxes. I have them linked in HA after modifying the media_payer.py in a custom_components sub folder to cope with multiple controllers. Everything works, however, I notice a significant lag for actions, specifically Power Off, on zones connected to my second controller. I think the issue is that the response message signature, built in function get_zone_info, with this line:
resp_msg_signature = self.create_response_signature("04 02 00 @zz 07", zone)
assumes a controller id value of 00 and should be amended to be along these lines
resp_msg_signature = self.create_response_signature("70 @cc 00 7F 00 00 04 02 00 @zz 07", zone, controller)
to take into account the controller Id. And, obviously, with a knock on change required to
create_response_signature(self, string_message, zone)
to become something like (please forgive my Python):
`
def create_response_signature(self, string_message, zone, controller):
""" Basic helper function to keep code clean for defining a response message signature """

    zz = ''
    if zone is not None:
        zz = hex(int(zone)-1).replace('0x', '')  # RNET requires zone value to be zero based
    string_message = string_message.replace('@zz', zz)  # Replace zone parameter
    cc = hex(int(controller)-1).replace('0x', '')  # RNET requires controller value to be zero based
    string_message = string_message.replace('@cc', cc)  # Replace controller parameter
    return string_message

`
Honestly, I'm guessing this as I'm actually not sure how to test my proposal. Can I just copy Russound.py in to my custom_components folder but then how do I reference that version from the your original one in media_player.py? I'm new to Python and still have a long learning curve to climb.

Many thanks Richard

I've managed to get a test setup and realised it was more complicated and have updated my issue, however, I douibt that my initial assertion is correct. Can anyone tell me how I can switch to debug mode/see the debug logger messages?

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

No branches or pull requests

1 participant