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 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.
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.
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 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.
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.
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.
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