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

Hello all,

I’ve been working on a custom component to allow integration with a Crestron control system using the Inter-System Communication (XSIG) symbol in the control system program.

I’ve added support for the following devices/components: lights, thermostats, shades, binary_sensors, (analog) sensors, switches, and AV switchers as media players.

It’s not using config flows yet (or even a validated config). There is a lot of room for improvement.
But, I’ve been using it for a few weeks with great success with my own control system and I think I’ve got it to a point where I’m not embarrassed to share it :slight_smile:

So, with the caveat that it’s pretty rough at this point a definitely subject to change, you are welcome to try it. Please give feedback on what I can improve or post here with questions.

You can find the github repo here.

-Nick

7 Likes

Thank you so much!

I’ll definately give this a go!

Hopefully it can evolve into an official integration some day

Yes, I’m hoping to bring it up to full official integration quality. I’ve just added config validation throughout. I’ve posted a new v0.2.2 release here with config validation and cleaned up documentaion.

I welcome any feedback, bug reports or feature requests.

-Nick

Very nice!

Thank you for your hard work I am hoping I can use this somehow in the near future.

I’m considering buying a crestron swamp 24x8 to control all the ceiling speakers I have installed in my house. Could this be used to control it, or would I need something else?

If something else what you you recommend as an amp to control whole home audio?

Sorry if I’m off topic a bit, new to Home Assistant and trying to learn.

Thanks again!

First off I want to thank you for this excellent code! I am new to HA and once I got it up and running I knew I had to get my crestron system connected and until I found this thread there was no clear way to move analogs back and forth. I was able to install it and get it up and running but when I try to put in more then one light, only the last entry is showing in HA. I am sure it’s just me being a newbie to yaml but after looking at many examples I still have not cracked this nut.

So far the only way I can get it to validate is as follows;


light:
  - platform: crestron
    name: "Living_Room_Overhead"
    brightness_join: 1
    type: brightness
light:
  - platform: crestron
    name: "Hall_Lite"
    brightness_join: 2
    type: brightness

But as I said only the last entry will show in HA

Thankx in advance for any help you can provide!
J

My guess is that you only want a single light: element. Then you can have as many entries under this light: section as you need. So, to rework you’re example from above:

light:
  - platform: crestron
    name: "Living_Room_Overhead"
    brightness_join: 1
    type: brightness
  - platform: crestron
    name: "Hall_Lite"
    brightness_join: 2
    type: brightness

Sorry for the late reply. I missed the original message :frowning:

The integration currently uses an XSIG symbol in a SIMPL program. This requires a control system. The good news is that this symbol is supported even on the oldest gen processors. That SWAMP 24x8 is an expensive amp :slight_smile: So grabbing an old CP2E (or equivalent) from eBay shouldn’t set you back more than another $25.

Thank you very much Nick!!! I knew it must have been syntax, danced all around that combination but kept getting a invalid error when I checked the yaml. It works great now.

I ran into another hitch on the digital switch though,
Using the example;

switch:
- platform: crestron
  name: "day_mode"
  switch_join: 1

It appears to work but does not tickle join 1

Any ideas?

Also what would it take to get ahold of the 5 analog light channels for a color bulb so I can control with the crestron panel?

Lastly, is there a place to donate! This really saved my day.

Thankx again,

J

Just found a clue on the switch problem. When I hit the switch in HA I get an error on the cmd line of the crestron

‘Signal Mismatch in Receive in Intersystem Communications S-40’
(S-40 is the position of the xsig symbol in my pgm)

I left the offset and option parms zero, did I miss something there?

Next I figured out that I had only defined 7 analog devices in HA when I expanded the xsig to 10 analogs so I added 3 more in HA to align, thought that would do it but still not.

Then I realized I had the switch statement was before the lights in my yaml which the xsig uses analog first so put that after the lights, still no joy.

I am out of ideas, hopefully another silly syntax error :slight_smile:

Also I can not define areas to the crestron lights/switches in the HA UI, any suggestions there?

Thankx again, All,
J

After further investigating I found that when HA sends the switch data there are only 2 bytes but when sending analog data it sends 4 bytes, should it not be 4 bytes for everything (to fill the xsig registers?)

I just figured it out, join numbers for the digitals have to come after the analogs, in HA. I defined 10 analogs so the first digital would be join 11 in HA for Digital 1 on the xsig symbol.

So is there somewhere I can donate to this project?

Tx agn, J

The analog join takes 4 bytes, while the digital takes 2. Take a look at the help for the XSIG symbol in SIMPL and it explains the protocol at the bottom.

One confusing thing about the XSIG symbol (I touch on this in the README.MD) is that, if you combine analogs and digitals on the same XSIG, it numbers the digitals with joins starting after the analogs. What’s misleading is that the symbol says “dig_in1” and dig_out1" which may lead you to believe this is digital join #1. But in reality it’s digital join number 1-more-than-your-last-analog.

An example may be clearer. Let’s say you combine 45 analogs and 10 digitals on the same XSIG. Your analogs will be 1-45 and your digitals will be 46-55. You can actually use 2 separate XSIGs connected to the same TCP client symbol (TX$ and RX$ connected to the same TCP client). Then your analogs and digitals joins follow intuitive numbering (since each symbol numbers its joins independently).

I’ve tested the module pretty extensively, and I have a combination of analogs, digitals and serials (that I’ve tried in all kinds of different combos/orders) with everything working perfectly.

I hope this helps!

Funny,

Looks like you posted as I was typing my reply. Indeed this was confusing during testing and was the source of much hair pulling. It doesn’t explain this anywhere in the docs, so just had to figure out the behavior by observation.

Maybe I should make the section where I explain this weirdness in the README more prominent?

As far as donation, at this point, this is just something that I work on in my spare time to fill a personal need that I have (I have a large investment in Crestron gear but love, love love Home Assistant). My next step is to try and get config entries to work with the module so that everything can be configured from the GUI.

Keep the feedback coming, happy to try and fix anything that’s broken. Or add anything that’s missing. At this point, I can only test with the stuff I personally own. So, having others using it is key to making sure it works with a variety of Crestron gear.

We are exactly in the same position, I love crestron and in finding HA it gives more UI to the cause, putting them together with ISC is the cats meow. Crestron is much stronger with the media controls where HA is extremely strong with integrating the smart home devices available now so it’s a great marriage. I also found tasmota witch allows all (most) smart devices to link directly to HA via mqtt (no cloud) so this now is DIY heaven.

As of tonight the only thing I have issues with is that the crestron entity that is created in HA will not allow me to assign it an area so the UI is not as clean as I would like. Seems like a syntax thing in the yaml but so far I can’t crack it.

Pls google jmayes and drop me a msg, I would love to collaborate!

J

I have things working nicely now but I have run into a slight issue, at first it seemed like there was not good sync until I would work the switches in ha at least once but I finally figured out that HA would not switch an analog off if it’s not at 100% so after I would switch it on/off/on it would change to 100% and then go off and on correctly from 100 to 0 and back. If I would change the level to something in the middle it would not turn off again from ha

Also I have tried all kinds of syntax in the yaml to get an id attached to the devices so that I could attach zones to the lights and switches, no luck at all. Is there a way? Right now all switches and lights are just grouped together in the ui.

Overall it’s fantastic!
TX, J

Any ideas why I can’t switch an analog off when it’s not at 100%?

Why can’t the temperature and humidity be displayed at the same time

I set it to show only humidity

sensor :
   - platform: crestron
     name: "Office Temperature"
     value_join: 18
     device_class: "temperature"
     unit_of_measurement: "°C"
     divisor: 10
    
     name: "Humidity"
     value_join: 19
     device_class: "Humidity"
     unit_of_measurement: "%"

Remove the humidity to display the temperature

First off thank you for the information I will have go at it today and see if I can make this work with some of my Crestron lighting projects. In 20 years of programming Crestron I can not recall the last time I used the XSIG symbol so this will be a refreshing for me and a we see if I can get HAS talking this way to DINAP3 …thanks again
Richard.

Are you still developing this integration?

Yeah, XSIG is a little old school. I chose it because the protocol is documented by Crestron in the publicly available docs. I have found a Python module that implements CIP, which could be interesting.

Yes. I haven’t added or done anything in a while because it seems to be working well. The next thing to tackle is almost certainly to implement config entries and UI flow so the integration can be configured from the UI instead of YAML only.

Is there something missing you’d like to see?

-Nick