SIMPL Module Best Practices

When I started programming Crestron systems, there were two other programmers on my team. One was a senior programmer who had been doing it for years already; the other was a junior programmer who had been doing it for a year maybe? I feel like I fit into the middle slot between them quite nicely. So, I tried to follow the senior guy’s example and help the junior guy out when I felt that I could.

The workflow I picked up from the senior programmer was:

  • Copy-and-paste the previous program you worked on and only change the bits needed for the new system. 90% of the code is probably going to be the same anyway.
  • Don’t jam ANY signals together, always buffer them or use an OR.
  • Never hide program logic inside of a module.

I can already tell this is going to be a divisive post because of how different people treat user modules. I want to present 3 modules in this post, talking about why they were written, how they evolved, and why they were the best approach.

Continue reading “SIMPL Module Best Practices”

SIMPL Best Practices

I recently received an email asking if I could document some of the things I wished I had known when I started Crestron programming. I didn’t touch Crestron until the twilight years of the 2-series (2010), but it was thankfully a solid platform to learn SIMPL Windows on. I had several years of AMX under my belt, so at least SIMPL+ wasn’t strange to me.

I’d like to write a few posts that explore how I approach programming now that I have a little hindsight. I’ll also reveal areas where I still struggle to find the best methods.

Crestron has a SIMPL Windows Best Practices guide that is useful. The release notes also contain some good rules to follow. I’ll try not to repeat what’s already stated there.

Let’s dig in!

Continue reading “SIMPL Best Practices”

Short Take: Recover a VTZ

Today I was asked if it is possible to recover a VTZ (compiled touchpanel layout) from a physical panel and use it on a replacement panel. In this particular case, they want to take the layout off a TST-902 panel and use it on a new TSW-760 that is being installed. The client doesn’t have the existing uncompiled project (and possibly can’t get it). I said it might be possible as a last resort, but for the sake of maintenance and service, lets try to get the uncompiled project first.

Continue reading “Short Take: Recover a VTZ”

CWS: Part 1

One thing that always seems to come up during the C# labs at Masters is Crestron Web Scripting (CWS). I never think about adding this to my own projects, but it is a good way to provide some level of advanced configuration (or even remote control) of the running program. I’m watching the Intermediate C# videos this morning and see that the first lab dives right into using CWS. So in the spirit of Masters, let me try to incorporate some of their teachings into my day-to-day programming.

I’m hoping in this series of posts to build out a CWS program that can:

  • Work on 3-series and 4-series processors
  • Configure a room system
  • Provide a REST API for external control

Let’s begin!

Continue reading “CWS: Part 1”

Community Support

Like most mornings, I started today by reading through the Crestron Groups.io daily digest. It’s the spiritual successor to the old Yahoo message group. Reading through those posts really helped me out when I first started programming Crestron in SIMPL. I was already familiar with control systems (I’d been immersed in AMX for a couple years by that point), but coming to SIMPL from any other imperative programming language requires some different thinking. Lucky for me, there was a thriving community of professionals who were willing to share their knowledge and experience.

Continue reading “Community Support”

VC-4: Websocket-Sharp

The first version of my web console bastardized the Control Concepts module. Since we’re targeting the VC-4, we have unrestricted access to standard libraries that fall outside the Crestron sandbox. In this part, I’ll swap out WebsocketServer.dll for a NuGet package containing a WebsocketServer class instead.

Continue reading “VC-4: Websocket-Sharp”