Htd gw-sl1 / mc-66

I got htd_mc up and running smoothly. Thanks @hikirsch and everyone who helped.

I did run into one problem at startup:

2020-12-20 17:01:33 ERROR (MainThread) [homeassistant.components.media_player] Error while setting up htd_mc platform for media_player
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 199, in _async_setup_platform
await asyncio.shield(task)
File “/usr/local/lib/python3.8/concurrent/futures/thread.py”, line 57, in run
result = self.fn(*self.args, **self.kwargs)
File “/config/custom_components/htd_mc/media_player.py”, line 43, in setup_platform
entities.append(HtdDevice(k, client, sources, i + 1, zones[i]))
File “/config/custom_components/htd_mc/media_player.py”, line 55, in init
self.update()
File “/config/custom_components/htd_mc/media_player.py”, line 70, in update
self.zone_info = self.client.query_zone(self.zone)
File “/config/custom_components/htd_mc/htd_mc.py”, line 159, in query_zone
return self.send_command(cmd, zone)
File “/config/custom_components/htd_mc/htd_mc.py”, line 192, in send_command
return self.parse(cmd, data, zone)
File “/config/custom_components/htd_mc/htd_mc.py”, line 57, in parse
success = self.parse_message(cmd, i, zone_number) or success
UnboundLocalError: local variable ‘success’ referenced before assignment

Line 57 of htd_mc.py was referencing variable “success” before defining it.

I simply added “success = False” to the line above it and everything started up fine after that.

Has anyone integrated htd_mc with Google Home voice commands? That is the final step to completing my 7 year quest.

I’m new to HA. Ordered a RaspberryPi for the sole purpose of installing HA to intergrate my HTD-Lync12 into my home automation system. I’m hopeful someone has been able to advance the work done here to work with the Lync12. I have been tinkering with the code from the HTD-MC66, but I feel with my extremely limited knowledge of Python, I am extremely disadvantaged. I have gotten past the errors thrown by HA by re-writing what I can figure out, but still not there yet. Anybody able to get the Lync up and running yet?

I’m trying to figure out the interface with the Lync12. Please let me know if you have had any success

Thank you!

Wondering if you have made any progress on the Lync12 integration? I have yet to purchase one, but I will be upgrading at some point.

I was able to get it up and running. I’m not real certain as to how to share it, but I am more than willing to help out. It is a modified version of the HTD-MC integration. It does recognize all 12 zones and 18 sources.

I do not have the ability to control the MP3 player nor do I have party mode built-in. For party mode, I was just going to build an Node-Red customization.

Is it possible to share the yaml file?

I’ve attempted to create a fork on GitHub

Hopefully this helps

Excellent! I have a Lync6 and got most of the python working. Next step was going to be working on the interface piece. Lync 12 and Lync 6 use all of the same commands, just zoned different.

Curious if I can use a serial to usb ftdi cable instead of a iTach IP2SL for this integration?

This Lync12 integration worked great for me on my Lync 6! I just started setting up HA for the first time today. I did not anticipate getting my Lync6 working so quickly. Thank you, @charger68!

I upgraded to version 2021.6.3 last night and my Lync12 integration stopped working. Here is the log file.

Any ideas why the integration would not be found anymore? The code is still there

Logger: homeassistant.setup
Source: setup.py:172
First occurred: June 10, 2021, 10:48:53 PM (1 occurrences)
Last logged: June 10, 2021, 10:48:53 PM

Setup failed for htd_lync12: Integration not found.

It got it to work. I had to add “version” to the manifest.json file in the htd_lync12 folder.

{
“domain”: “htd_lync12”,
“name”: “HTD Lync12 Series”,
“dependencies”: [],
“requirements”: [],
“version”: “1.0.0”
}

I then had to delete all of my htd_lync12 info from my configuration.yaml file, delete my htd entities, and then reboot the server. After reboot, I added the config code back to configuration.yaml file, rebooted the server again, and all was good.

@hikirsch have you noticed a bug with the volume if you go to 60 within the HTD app, then open home assistant with your integration- it reports at 0.

I’m another newbie discovering this thread. I’m trying to figure out where to start to add MCA66 control to HA. Is it located at @hikirsch 's github? Or has something else evolved since those posts. Thanks for the help.

Yes I’m still supporting my repo. If anyone has any suggestions that I’ve missed out over the time period I’ve been “away”, please let me know!

It’s in his GitHub repo

have you noticed a bug with the volume if you go to 60 within the HTD app, then open home assistant with your integration- it reports at 0

More newbie q’s. Successfully d/l files from @hikirsch repo. Had a typo in confi.yaml I found and fixed. No log errors. Now what? Should a new htd integration show up? I’m thinking it is working, I just don’t know where to look or how to use it? Thanks for the help.

yes they expose as media_player entities, you should be able to add a Media Player entity

Good news, and bad. I tracked down why I can’t find/see it. Trying to figure out the issue, which appears to be some kind of connection issue. BTW, I’m running directly on Odroid N2.

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 250, in _async_setup_platform
    await asyncio.shield(task)
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/htd_mc/media_player.py", line 43, in setup_platform
    entities.append(HtdDevice(k, client, sources, i + 1, zones[i]))
  File "/config/custom_components/htd_mc/media_player.py", line 55, in __init__
    self.update()
  File "/config/custom_components/htd_mc/media_player.py", line 70, in update
    self.zone_info = self.client.query_zone(self.zone)
  File "/config/custom_components/htd_mc/htd_mc.py", line 159, in query_zone
    return self.send_command(cmd, zone)
  File "/config/custom_components/htd_mc/htd_mc.py", line 186, in send_command
    mySocket.connect((self.ip_address, self.port)) ConnectionRefusedError: [Errno 111] Connection refused

Thanks for any ideas/help on how to investigate.