Htd gw-sl1 / mc-66

Looks like you commented out the entire line, instead of just the DictType - pls either upgrade to newest version, which appears to be fixed, or follow my fix that’s posted/paste above.

When I do a Configuration check, I’m receiving “Integration error: htd_lync12 - Integration ‘htd_lync12’ not found”. I have added a htd_lync12 folder to the custom_components directory with the necessary files. Any thoughts on what I should be doing differently?

Found the error (missed a comma in the manifest file when adding version). Now I’m getting a invalid configuration error message "Invalid config for [htd_lync12]: expected a list for dictionary value @ data[‘htd_lync12’]. Got OrderedDict([(‘htd_lync12’, OrderedDict([(‘host’, ‘192.168.1.103’), (‘zones’, [‘Deck’, ‘Rec Room’, ‘Loft’, ‘Mechanical’, ‘Study’, ‘Kitchen’, ‘Test’, ‘Great Room’, ‘Garage’, ‘Porch’, ‘North Patio’, ‘South Patio’]), (‘sources’, [‘Test 1’, ‘NA 2’, ‘NA 3’, ‘NA 4’, ‘NA 5’, ‘NA 6’, ‘NA 7’, ‘NA 8’, ‘NA 9’, ‘NA 10’, ‘NA 11’, ‘NA 12’, ‘Streamer’, ‘AVR’, ‘Great Room TV’, ‘NA 16’, ‘Echo Dot’, ‘MP3 Player’])]))]). Any thoughts on this?

Solved by retyping all config lines, testing as a went. Copy / Paste probably caused the issue

So I’m following this thread to try to get my Lync 12 system into HA.

I started with the “integration not found error,” but after the changes tot the following files:

manifest.json (adding in the version line)

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

init.py (commenting out the Dict in line 8)

I have now “upgraded” to the following error when I check my configuration:

Component error: htd_lync12 - Exception importing custom_components.htd_lync12

This is what I’m currently running:

Home Assistant 2022.8.1
Supervisor 2022.07.0
Operating System 8.4
Frontend 20220802.0 - latest

I can’t find that in this thread anywhere. Anyone else run across this issue?

Edit: didn’t realize there was more info in the logs (sorry, I’m new to this.)

The logs pointed me right to the error and I removed the trailing comma before #Dict and then it was happy.

Logger: homeassistant.loader
Source: loader.py:638
First occurred: 8:57:03 PM (3 occurrences)
Last logged: 8:59:58 PM

Unexpected exception importing component custom_components.htd_lync12
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/loader.py", line 638, in get_component
    cache[self.domain] = importlib.import_module(self.pkg_path)
  File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 879, in exec_module
  File "<frozen importlib._bootstrap_external>", line 1017, in get_code
  File "<frozen importlib._bootstrap_external>", line 947, in source_to_code
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/config/custom_components/htd_lync12/__init__.py", line 8
    from homeassistant.helpers.typing import ConfigType, #Dict
                                                         ^^^^^
SyntaxError: trailing comma not allowed without surrounding parentheses

So I tried to do the changes in my previous comment on Github so someone wouldn’t have to do that themselves later, but I’ve never done pull requests or comits or anything before, so I might have screwed it up. Just hoping to help out a bit, as I’m always just leaching from everyone.

Anyone know how to hide sources or zones from the media player card?

First of all, thanks to EVERYONE who helped build this integration. This is AWESOME!

I have the integration installed and working great with the custom lovelace card @hikirsch suggested. The only issue I am having is the volume slider does not appear to send a signal to the MC-66 when you set the volume to exactly 100. If I set it to any other percentage, the unit responds immediately and sets the volume to the correct level (on the 0-60 scale). For some reason, only when setting the volume to max (100%), the MC-66 does not appear to receive the command.

Any suggestions?

EDIT: Just realized that if I use the MC app to set the level to max (60), the HA entities show 0 volume. Definitely something weird going on.

Thanks,
Ryan

If you try and set the volume to 100 things go wonky. Same thing if you go into the HTD app and try to set the volume to 60 and go back to HA it messes up.

Have you got the bsic functions working? i tried using your fork but its not powering on any zones

Yup, it’s all working on my Lync 12 system. Are there errors in the logs? Did you fix whatever that Dict issue was? I can’t remember it, but I think I made a note in the thread and tried to change it on Github, but I’ve never done that so I don’t know if what you downloaded had my change or not.

looks like its working now. i will test when i get home. is there a way to hide sources?

I wish there was a way to hide the sources.

what happens if you set them to “none” like inn the htd app

I figured out a solution for now.

image

Using Mini Media Player Card to hide the sources and put buttons that will trigger a source so that you can set which ones are visible.

type: custom:mini-media-player
entity: media_player.zone_1
hide:
  source: true
shortcuts:
  columns: 4
  buttons:
    - icon: mdi:bluetooth
      type: source
      id: Bluetooth
    - name: Sonos
      type: source
      id: Sonos
icon: mdi:bed-double-outline

Have to test if it works later. but it looks like it does right now.

Let me know if this works for you.

I got it to look like that, but not to switch sources. Do you have a script or something that these buttons are triggers?

My current approach is just to do on/off buttons.

Then when you long press on a button, this screen comes up:

Then the list of sources is there, and it’s not pretty.

Mini Media Player is how i got it done.

use this code.

type: custom:mini-media-player
entity: media_player.zone_1
hide:
  source: true
  play_pause: true
shortcuts:
  columns: 4
  buttons:
    - icon: mdi:bluetooth
      type: source
      id: Bluetooth
    - name: Sonos
      type: source
      id: Sonos
icon: mdi:bed-double-outline
  • Where entity is the zone entity.
  • Hide sets which features you want to hide. so I hide play pause because that doesn’t work and i hide the default sources
  • Shortcuts let you add buttons. and one of the button types allow you to select the source attribute of a media player entity.
  • Id is the exact spelling and capitalization as your source name. this will make the zone switch to that source when pressed.

Thank for your help regarding this thread. I’m brand new to hass. I added all files to the custom_components/htd_lync12 folder and inserted the yaml code in the configuration folder via [https://github.com/UngluedChalice/htd-lync12-home-assistant.] When I go to restart HASS I’m getting the following error message.

"Failed to restart Home Assistant

The system cannot restart because the configuration is not valid: Integration error: htd_lync12 - Integration ‘htd_lync12’ not found"

Does anyone know what I’m doing wrong? I’m using the visual studio code server to make changes.

Hi @UngluedChalice many thanks for the integration.

I have a question as to how you are connecting to the Lync12. Are you connecting a CAT6 to one of the Keypad Ports, or are you using the HTD?NET-Lync Server device?

If you connect to the Keypad Port, does this show up when you query your router, or use fing?

Thanks in advance.

I don’t have any keypads actually. I have the HTD GW-SL1, which I guess they no longer make and only offer a wireless version now?

There are 2 updates you need to make:

  1. Update the manifest.json file to add the Version:
{
    "domain": "htd_lync12",
    "name": "HTD Lync12 Series",
    "dependencies": [],
    "requirements": [],
    "version": "1.0.0"
}
  1. init.py (commenting out the Dict in line 8), just insert a # before the “, Dict” on line 8.