Crestron - custom component to integrate a Crestron control system via XSIG

Hi
I’m trying to use to joins and from joins following github guide but nothing flows from/to HA and Crestron. If I use switches or sensors I had them working.
Here is my HA code:

crestron:
port: 32768
to_joins:
- join: d1
entity_id: switch.cucina
- join: d5
entity_id: switch.corridoio
from_joins:

  • join: d2
    script:
    service: switch.toggle
    data:
    entity_id: switch.cucina
  • join: d3
    script:
    service: switch.turn_on
    data:
    entity_id: switch.cucina
  • join: d3
    script:
    service: switch.turn_off
    data:
    entity_id: switch.cucina
  • join: d6
    script:
    service: switch.toggle
    data:
    entity_id: switch.corridoio
  • join: d7
    script:
    service: switch.turn_on
    data:
    entity_id: switch.corridoio
  • join: d8
    script:
    service: switch.turn_off
    data:
    entity_id: switch.corridoio

Any advice?
Thank you

Hi @glenn.turbodad. I’m also new to HA so I don’t have an answer to your question but couldn’t resist reaching out because you said you are a Crestron expert :slight_smile: feel free to ignore:
I have a crestron system installed by a 3rd party. It’s only controlling lights and shades, the rest I plan to use HA for. The problem is I’m stuck with this crestron black box. I asked the installer for some integration, he offered a homekit integration (which would also work for me) but he gave it a $6,000 price tag
I’m trying to figure out a diffrent route and ran across this thread.
I think I’ll ask him for a tech guy and pay him by the hour but I don’t know what I need to tell him is needed, and I don’t think he’ll be thrilled going into threads and investigating so I want to come prepare with the task list.
I have a very basic system with an AP3 controller a crestnet hub and relayers for lights and shades (no dimmers).
I was trully about to throw the crestron system away and put so open alternative but I’m down $20,000 on this system, it feels quick legacy but does work without any issues for 5 years now.
Any help would be greatly appriciated!

Old thread, but an amazing piece of software!

I’ve successfully implemented a link to my Crestron system. By making a virtual switch I can get Crestron to toggle the HA switch which in turn toggles hue (and other elements)

I am now trying to go the other way. I have made a switch which pushes back to Crestron. However the switch gets stuck:-

  1. Press switch in HA GUI it switches and holds to on but nothing happens at crestron other than the HA-RX getting some code
  2. Press switch again and it switches off, no code pushed to crestron
  3. Press switch last time, it toggles, code runs as expected on crestron
  4. got 1 and repeat!

Very frustrating as its so close, any ideas how to avoid steps 1 and 2 greatly appreciated!

Hi. I am currently having the same issue as domhampton with the switch.
I am trying to control my garage port. I have used the signal and feedback for my up and down buttons in my TSW panel over to the xsig. The feedback from crestron showing the real up and down state on the garage port is always working perfect. But the trigger signal from HA to Crestron is just working once and then. I get a \xA0f but the down is not sending a new command.

The toggle is broken. It does only send a digital high signal and remains high all the time. I may need to use a oneshot for the HA->Crestron button presses?

Update: I am only able to trig the button press from the switch button in HA to crestron once. When debugging in toolbox debugger i find the button signal from HA to remain high all the time. And therefor i am not able to retrigg the signal again since it is already high. I have tried both 0,1,2 as option parameters on the XSIG without any change, it is the same result with all those button parameters. If i try to open the big switch toggle button i can press the button on an off 3-4 more times then it will trigger once more.

so i bodged this. It seems the HA switch never properly goes off. I made an automation that when the switch is turned on wait 10ms then turn it off.

This fixed my problem, but doesnt feel like its the “right way”.

I have tried to use this via georgesak new fork. But i still get this error. And I cant seem to find where the problem is coming from.
Any suggestions where to go from here?

I’m also using this repository of @georgesak and I’ve also encountered some problems.
I’ll start by saying that I’m not a python programmer, but Crestron, but I managed to somehow make it work.
I changed the def async_setup in init with this:

    """Set up a the crestron component."""
    _LOGGER.debug("Crestron: Starting async_setup")
    try:
        if config.get(DOMAIN) is not None:
            _LOGGER.debug("Crestron: Configuration found")
            hass.data[DOMAIN] = {}
            hub = CrestronHub(hass, config[DOMAIN])
            _LOGGER.debug("Crestron: CrestronHub instance created")
            await hub.start()
            _LOGGER.debug("Crestron: hub.start() completed")
            hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, hub.stop)
            tasks = [async_load_platform(hass, platform, DOMAIN, {}, config) for platform in PLATFORMS]
            await asyncio.gather(*tasks)
            _LOGGER.debug("Crestron: Platforms loaded")
        else:
            _LOGGER.warning("Crestron: Configuration not found")
    except Exception as e:
        _LOGGER.error(f"Crestron: Error during async_setup: {e}")
    finally:
        _LOGGER.debug("Crestron: async_setup completed")

    return True

and then in the crestron.py file I commented out these two lines:

server.serve_forever()
await server.start()

and added this:
await server.serve_forever()
it’s currently working, although with some warnings (which I’m working on)

Hey, I’ve been working on this for about a year now, and its what I use to integrate crestron into my home assistant quite well. It still has its bugs and weird features here and there, but fully allows digital, analog and serial joins to and from HA.

Hope this might come in handy for anyone