r/crestron • • 16d ago

More Efficient Way To Send Serial Command

I came from a Data Scientist Role in the medical space to AV programming (and have only a few months of Crestron under my belt) so bear with me...

I have three identical displays, I need individual control and master power.

I realize I could just link up three Serial IOs to the touchpanel symbol and call it a day... I can't help thinking this isn't best practice though.

In my old world (Python/PHP), I would create a helper function with a generic command to pass to three different devices. IF deviceid=1, THEN I would run the function then send the output to var device1.

It seems like I should be able to do something in SIMPL, possibly with buffers.

  • On the touchpanel PRESS display1.on
  • BUFFER display1.on to display.on
  • Display.on grabs the line item from the SERIALIO
  • Some variable that indicates I was using display1 drives the signal high on a SERIAL BUFFER to only broadcast the hex to the first display...

I know I am not the first person to do this. Am I way out in left field? This seems overly complex for something that should be relatively straightforward... Perhaps I'm just better off with the individual SERIALIOs?

3 Upvotes

18 comments sorted by

6

u/midsprat123 16d ago

Allow me to introduce crosspoints.

Allows you to link single buttons to multiple displays and have feedback depending on which display you are talking to.

1

u/MadKod3r 12d ago

Overkill for 3 displays

7

u/CivilClassroom7948 16d ago

Just turn the fucker on.

Im the service guy who always has to go back and figure out why your logic crap stopped working.

If it push on simply send display on. Easy peasy.

Dont make it complicated Karl.

1

u/sausix 16d ago

If you write "IF deviceid = 1" in PHP or Python then it's already inefficient. You should use lists/arrays.

You have routers in Crestron and you can even put IF statements into a Simpl+ block.

I understand your wish to only have one driver definition as SIO. Main issue is signal wave timings. You could set a route to one or many devices by a push event and trigger your SIO by the release event. Kinda easy.

Crestron get's complicated beyond easy stuff. Could be easier to write your program within Simpl+ mostly. But then you have forward definition issues. You can't call functions which are defined later in the code. Been there. And I've seen strange workarounds of other programmers looping a signal out and back in into the symbol.

Crestron is complicated on efficient programming.

1

u/ryanworkaccount 16d ago

Thanks - yes....And you are correct, an if/then wouldn't be efficient like an array - this was an oversimplified example.

1

u/sausix 16d ago

I wish I could use Python on Crestron. I do it with Extron and it's sooo good. Full control and my programs create a webserver and you can monitor variables, devices and connections. And I'm implementing a driver designer within my running programs.

I wish Crestron would not be stuck in late 90s with their software suite.

2

u/engco431 No Such Thing as an AV Emergency 16d ago

4 series runs python and c#.

1

u/sausix 16d ago

Is it stable? Crestron Studio was a thing too. Can I use it without certification? I just wanna get rid of all the restrictions and bugs.

1

u/ryanworkaccount 16d ago

I'm going to try loading Python on a 4 series once service calls slow down this winter... Especially with all the newer UCs moving over to Construct, using HTML with a stack I'm familiar with could allow me to churn out projects wayyyy quicker. I also need to learn SIMPL sharp though...no shortage of things to do.

1

u/sausix 16d ago

C# still with an outdated VS IDE and needs to be wrapped in a Simpl+ symbol? That multiple levels of encapsulation is hell. If uploading Python directly is really possible then I would give Crestron another chance.

2

u/sk8rat843 Silver 16d ago

or just write in .NET8 and whatever ide of your choosing.

1

u/ryanworkaccount 16d ago

You may be able to do this. Python runs on the 4 series. You can also upload a web project directly. Not sure exactly how to connect the two as I haven't looked too terribly far into it, but it seems doable.

2

u/misterfastlygood 16d ago

Developer.crestron.com python section.

1

u/jbp216 16d ago

you absolutely can. just have claude interpret. even on 3 series theres repos that make it work

3

u/AstronautOk1630 16d ago

The most efficient way for the processor running a SIMPL program is likely 3 separate SIO’s and link the buttons or logic directly to them. Don’t over complicate SIMPL. C# or Python have at it.

1

u/Pale-Struggle6595 16d ago

you could write python in 3 and 4 series processor iirc and make it simple with your code

if you're using simpl windows and have identical display (LG for example) then you can use the serial command provided for that brand. make sure to connect com port processor to rs232 display (if it has any).

for me it's TP.DISPLAY1ON->SIO.ka0101\xd->COM1.DISPLAY1.TX

1

u/jbp216 16d ago

just do it in simpl# pro if you can program, otherwise crosspoints are what youre looking for

the reality is youre using a multicore processor running at an insane speed to send commands, if youre hitting the edge of a crestron processor youre using the wrong product

1

u/Separate_Mango4458 14d ago

If you can already program in Python/PHP, why the hell are you using SIMPL/SIMPL+? Just learn/use C#. 4 series controller can run Python, but Crestron's frankenfirmware is a joke. aarch64 kernel, but an armhf user space, and Python 3.8 (way out of date) with armel ABI. Makes using Python packages tricky. We get around it by installing a custom Python-3.14_aarch64 build on the controller and use that.