¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io
Date

Re: Program starts then stops. SimplWindows, Simpl+ and S#

 

¿ªÔÆÌåÓý

How do you know it¡¯s the code causing it? What¡¯s in the log?

?

Caleb Radecky | Manager, Online Products & Services
Crestron Silver Certified Programmer | DMC-D-4K | DMC-E-4K
ControlWorks Consulting, LLC | Crestron Services Provider | 8228 Mayfield Rd. #6B Rear Cleveland OH 44026
D. 440.771.4809 | O.440.449.1100 X1109 | F.440.449.1106 |

?

From: [email protected] <[email protected]> On Behalf Of Brad Wykoff via groups.io
Sent: Friday, June 3, 2022 14:05
To: [email protected]
Subject: [crestron] Program starts then stops. SimplWindows, Simpl+ and S#

?

[Edited Message Follows]

I am having an issue with my code starting and stopping.? I am not using "ProgramInitComplete" in SimplWindows. Once program is loaded, I send the ProgReset in text console and program starts then stops . Program ID Tags shows as SN and no program loaded.
I am pasting S# and Simpl+ code here.

S#

using Crestron.SimplSharp;

using Crestron.SimplSharp.CrestronIO;

using Crestron.SimplSharp.Net.Http;

using System;

?

namespace TriplePlayMyServer

?

{

? ? public class TriplePlayLoader

? ? {

? ? ? ? // Private member variables

? ? ? ? private string serverIP = "";

? ? ? ? public static string Username;

? ? ? ? public static string Password;

?

? ? ? ? // Public delegates

? ? ? ? public errorHandler OnError { get; set; }

? ? ? ? public delegate void errorHandler(SimplSharpString errMsg);

?

? ? ? ? // Public Properties

? ? ? ? public string ServerIP

? ? ? ? {

? ? ? ? ? ? set { serverIP = value; }

? ? ? ? }

? ? ? ? public TriplePlayLoader()

? ? ? ? {

? ? ? ? ? ?//Default Constructor to allow C# to communicate with Simpl+

? ? ? ? }

? ? ? ? public void Initialize()

? ? ? ? {

? ? ? ? ? ?CrestronConsole.PrintLine("Server IP is : {0}", serverIP);

? ? ? ? ? ?HttpClient httpClient = new HttpClient();

? ? ? ? ? ?HttpClientRequest httpRequest = new HttpClientRequest();

? ? ? ? ??

? ? ? ? ? if (serverIP == "" && OnError != null)

? ? ? ? ? {

? ? ? ? ? ? ? ? OnError(new SimplSharpString("No Server IP Specified"));

? ? ? ? ? }

? ? ? ? ? ? ??

? ??

? ? ? ? ? ? try

? ? ? ? ? ? {

? ? ? ? ? ? ? ? // Use this is if Port is 443 - HTTPS

? ? ? ? ? ? ? ? //string url = (Constants.SERVER_URL_PROTOCOL + Username + ":" + Password + "@" + ServerIP + Constants.SERVER_HEADER + Constants.SERVER_QUERY);

?

? ? ? ? ? ? ? ? // Get Json from Server

? ? ? ? ? ? ? ? httpClient.KeepAlive = false;

? ? ? ? ? ? ? ? string url = (Constants.SERVER_URL_PROTOCOL + serverIP + Constants.SERVER_HEADER + Constants.SERVER_QUERY);

? ? ? ? ? ? ? ? var json = new HttpClient().Get(url);

? ? ? ? ? ? ? ?// var json = File.ReadToEnd(Constants.CONFIG_DIRECTORY + "TriplePlay.json", Encoding.UTF8);

? ? ? ? ? ? ? ? StringReader stringReader = new StringReader(json);

? ? ? ? ? ? ? ? var jsonTextReader = new Newtonsoft.Json.JsonTextReader(stringReader);

? ? ? ? ? ? ? ? var jsonSerializer = new Newtonsoft.Json.JsonSerializer();

? ? ? ? ? ? ? ? TriplePlayParent parent = jsonSerializer.Deserialize<TriplePlayParent>(jsonTextReader);

? ? ? ? ? ? ? ? CrestronConsole.Print(" Method - Json return data: {0}", parent);

? ? ? ? ? ? }

? ? ? ? ? ? ? ? catch (Exception ex)

? ? ? ? ? ? {

? ? ? ? ? ? ? ? ErrorLog.Error("Error in Deserializing TriplePlay Json : {0}", ex);

? ? ? ? ? ? }

? ? ? ? }

? ? }

}


Simpl+

#USER_SIMPLSHARP_LIBRARY "TriplePlayServer"

?

/*

? DIGITAL, ANALOG and SERIAL INPUTS and OUTPUTS

? (Uncomment and declare inputs and outputs as needed)

*/

DIGITAL_INPUT? _SKIP_, _SKIP_, _SKIP_, _SKIP_, _SKIP_, Go, GetData;

// STRING_INPUT?

// BUFFER_INPUT?

?

DIGITAL_OUTPUT _SKIP_, _SKIP_, _SKIP_, _SKIP_, _SKIP_,Initialized_Fb;?

STRING_OUTPUT TotalClients, _SKIP_, ClientsID[MaxOutput], Location[MaxOutput];

?

?

TriplePlayLoader myServer;

?

/*

? SOCKETS

? (Uncomment and define socket definitions as needed)

*/

// TCP_CLIENT

// TCP_SERVER

// UDP_SOCKET

?

/*

? Parameters

? (Uncomment and declare parameters as needed)

*/

STRING_PARAMETER ServerIPAddress[15];

INTEGER_PARAMETER Port;

STRING_PARAMETER Username[20], Password[20];

?

?

?

#BEGIN_PARAMETER_PROPERTIES ServerIPAddress

propDefaultValue="192.168.1.40";

#END_PARAMETER_PROPERTIES

?

#BEGIN_PARAMETER_PROPERTIES Port

propValidUnits= unitDecimal;

propDefaultUnit=unitDecimal;

propDefaultValue=80d;

propList={ 80d,"HTTP" },{ 443d,"HTTPS" };

#END_PARAMETER_PROPERTIES

?

#BEGIN_PARAMETER_PROPERTIES Username

propValidUnits= unitString;

propDefaultUnit=unitString;

propDefaultValue="Admin";

#END_PARAMETER_PROPERTIES

?

#BEGIN_PARAMETER_PROPERTIES Password

propValidUnits= unitString;

propDefaultUnit=unitString;

propDefaultValue="";

#END_PARAMETER_PROPERTIES

?

?

Integer x;?

?

Function SetServerIP()

{

? ? ?RegisterDelegate(myServer,OnError,MyOnError); // Register the MyOnError function to the OnError delegate

? ? ?myServer.ServerIP = ServerIPAddress; //send IP address of TriplePlay Server to S#?

?// myServer.Initialize();

? ? print("Hello There");

}

?

// MyOnError is triggered from the C# module when an error happens. We add it to the ErrorLog

callback Function MyOnError(String strError)

{

GenerateUserError("TriplePlayServer Error %s\n\r",strError);

}

?

?

PUSH Go

{

? ? //Print("Server IP in Simpl+ is: %s", ServerIPAddress);

? ? SetServerIP();

? ? //Print("Returned from S#");

}

Push GetData

{

? ? //TriplePlayLoader.Initialize();?

?

? ?/* If(Port <> 80)

? ? {

? ? ? ? TriplePlayLoader.Username = Username;? ? ? ? ? ?// send Username of TriplePly Server to S#

? ? ? ? TriplePlayLoader.Password = Password;? ? ? ? ? ? ?// send Password of TriplePly Server to S#

? ? }

?

? ? TotalClients = TriplePlayParent.Result.Result.Total;

? ? */

}

Function Main()

{

? ? WaitForInitializationComplete();

}

?


Program starts then stops. SimplWindows, Simpl+ and S#

 
Edited

I am having an issue with my code starting and stopping.? I am not using "ProgramInitComplete" in SimplWindows. Once program is loaded, I send the ProgReset in text console and program starts then stops . Program ID Tags shows as SN and no program loaded.
I am pasting S# and Simpl+ code here.

S#
using Crestron.SimplSharp;
using Crestron.SimplSharp.CrestronIO;
using Crestron.SimplSharp.Net.Http;
using System;
?
namespace TriplePlayMyServer
?
{
? ? public class TriplePlayLoader
? ? {
? ? ? ? // Private member variables
? ? ? ? private string serverIP = "";
? ? ? ? public static string Username;
? ? ? ? public static string Password;
?
? ? ? ? // Public delegates
? ? ? ? public errorHandler OnError { get; set; }
? ? ? ? public delegate void errorHandler(SimplSharpString errMsg);
?
? ? ? ? // Public Properties
? ? ? ? public string ServerIP
? ? ? ? {
? ? ? ? ? ? set { serverIP = value; }
? ? ? ? }
? ? ? ? public TriplePlayLoader()
? ? ? ? {
? ? ? ? ? ?//Default Constructor to allow C# to communicate with Simpl+
? ? ? ? }
? ? ? ? public void Initialize()
? ? ? ? {
? ? ? ? ? ?CrestronConsole.PrintLine("Server IP is : {0}", serverIP);
? ? ? ? ? ?HttpClient httpClient = new HttpClient();
? ? ? ? ? ?HttpClientRequest httpRequest = new HttpClientRequest();
? ? ? ? ??
? ? ? ? ? if (serverIP == "" && OnError != null)
? ? ? ? ? {
? ? ? ? ? ? ? ? OnError(new SimplSharpString("No Server IP Specified"));
? ? ? ? ? }
? ? ? ? ? ? ??
? ??
? ? ? ? ? ? try
? ? ? ? ? ? {
? ? ? ? ? ? ? ? // Use this is if Port is 443 - HTTPS
? ? ? ? ? ? ? ? //string url = (Constants.SERVER_URL_PROTOCOL + Username + ":" + Password + "@" + ServerIP + Constants.SERVER_HEADER + Constants.SERVER_QUERY);
?
? ? ? ? ? ? ? ? // Get Json from Server
? ? ? ? ? ? ? ? httpClient.KeepAlive = false;
? ? ? ? ? ? ? ? string url = (Constants.SERVER_URL_PROTOCOL + serverIP + Constants.SERVER_HEADER + Constants.SERVER_QUERY);
? ? ? ? ? ? ? ? var json = new HttpClient().Get(url);
? ? ? ? ? ? ? ?// var json = File.ReadToEnd(Constants.CONFIG_DIRECTORY + "TriplePlay.json", Encoding.UTF8);
? ? ? ? ? ? ? ? StringReader stringReader = new StringReader(json);
? ? ? ? ? ? ? ? var jsonTextReader = new Newtonsoft.Json.JsonTextReader(stringReader);
? ? ? ? ? ? ? ? var jsonSerializer = new Newtonsoft.Json.JsonSerializer();
? ? ? ? ? ? ? ? TriplePlayParent parent = jsonSerializer.Deserialize<TriplePlayParent>(jsonTextReader);
? ? ? ? ? ? ? ? CrestronConsole.Print(" Method - Json return data: {0}", parent);
? ? ? ? ? ? }
? ? ? ? ? ? ? ? catch (Exception ex)
? ? ? ? ? ? {
? ? ? ? ? ? ? ? ErrorLog.Error("Error in Deserializing TriplePlay Json : {0}", ex);
? ? ? ? ? ? }
? ? ? ? }
? ? }
}


Simpl+

#USER_SIMPLSHARP_LIBRARY "TriplePlayServer"
?
/*
? DIGITAL, ANALOG and SERIAL INPUTS and OUTPUTS
? (Uncomment and declare inputs and outputs as needed)
*/
DIGITAL_INPUT? _SKIP_, _SKIP_, _SKIP_, _SKIP_, _SKIP_, Go, GetData;
// STRING_INPUT?
// BUFFER_INPUT?
?
DIGITAL_OUTPUT _SKIP_, _SKIP_, _SKIP_, _SKIP_, _SKIP_,Initialized_Fb;?
STRING_OUTPUT TotalClients, _SKIP_, ClientsID[MaxOutput], Location[MaxOutput];
?
?
TriplePlayLoader myServer;
?
/*
? SOCKETS
? (Uncomment and define socket definitions as needed)
*/
// TCP_CLIENT
// TCP_SERVER
// UDP_SOCKET
?
/*
? Parameters
? (Uncomment and declare parameters as needed)
*/
STRING_PARAMETER ServerIPAddress[15];
INTEGER_PARAMETER Port;
STRING_PARAMETER Username[20], Password[20];
?
?
?
#BEGIN_PARAMETER_PROPERTIES ServerIPAddress
propDefaultValue="192.168.1.40";
#END_PARAMETER_PROPERTIES
?
#BEGIN_PARAMETER_PROPERTIES Port
propValidUnits= unitDecimal;
propDefaultUnit=unitDecimal;
propDefaultValue=80d;
propList={ 80d,"HTTP" },{ 443d,"HTTPS" };
#END_PARAMETER_PROPERTIES
?
#BEGIN_PARAMETER_PROPERTIES Username
propValidUnits= unitString;
propDefaultUnit=unitString;
propDefaultValue="Admin";
#END_PARAMETER_PROPERTIES
?
#BEGIN_PARAMETER_PROPERTIES Password
propValidUnits= unitString;
propDefaultUnit=unitString;
propDefaultValue="";
#END_PARAMETER_PROPERTIES
?
?
Integer x;?
?
Function SetServerIP()
{
? ? ?RegisterDelegate(myServer,OnError,MyOnError); // Register the MyOnError function to the OnError delegate
? ? ?myServer.ServerIP = ServerIPAddress; //send IP address of TriplePlay Server to S#?
?// myServer.Initialize();
? ? print("Hello There");
}
?
// MyOnError is triggered from the C# module when an error happens. We add it to the ErrorLog
callback Function MyOnError(String strError)
{
GenerateUserError("TriplePlayServer Error %s\n\r",strError);
}
?
?
PUSH Go
{
? ? //Print("Server IP in Simpl+ is: %s", ServerIPAddress);
? ? SetServerIP();
? ? //Print("Returned from S#");
}
Push GetData
{
? ? //TriplePlayLoader.Initialize();?
?
? ?/* If(Port <> 80)
? ? {
? ? ? ? TriplePlayLoader.Username = Username;? ? ? ? ? ?// send Username of TriplePly Server to S#
? ? ? ? TriplePlayLoader.Password = Password;? ? ? ? ? ? ?// send Password of TriplePly Server to S#
? ? }
?
? ? TotalClients = TriplePlayParent.Result.Result.Total;
? ? */
}
Function Main()
{
? ? WaitForInitializationComplete();
}
?


Re: Horizon HZ-KPCN and HZ-KPEX on PAC2 and how do your remove the buttons.

 
Edited


I thought I make an update on what I found out.

Like Angel said, it does appear the HZ-KPCN works fine with a Series2 processor.? Thanks for the confirmation.

But the HZ-KPEX keypad connected to a Series2 processor via a CEN-GWEXER does NOT work.? You can drop those devices in your Series2 program, compile it without errors, and download it.? The CEN-GWEXER will acquire the HZ-KPEX and the CEN-GWEXER will appear to be connected to the Seres2 processor.? But when you press a key on the HZ-KPEX, the series2 processor will not see the button presses and the HZ-KPEX will display a flash error code that it cannot communicated to the processor.? Drop in a Series3 processor instead and everything will start working.

I found the best way to remove the buttons is to stick a small blade screwdriver under the left or right side of the button to pry it out a little and then lift the button out.? There are two tabs on the left and right sides of the button that snap into the frame of the keypad.? There is a gap between those 2 tabs on each side that you can stick a screwdriver in to pry them out.

YMMV,
Steve


Re: #websocket #lighting SACN SenderDirectSockets spits error trying to open a UDP comm #websocket #lighting

 

Sounds like it could be an issue with the UDP port trying to open before the Router has booted.? If your program doesn't need to be up and running in a critical amount of time after a reboot try issuing the "STARTPROGAFTERROUTER ON". This will delay program start until after the router has finished booting which can take like 2 minutes sometimes which is why it could only sometimes be a problem.

Hope this helps.
Robert


Re: StreamDeck Integration

 

On Fri, Jun 3, 2022 at 10:09 AM Dustin Hurlock <dustinhurlock@...> wrote:
It sounds like you're asking about using a Stream Deck with a Crestron processor, not with Crestron software on a PC.?
If that is the case, have you looked at Bitfocus Companion? They have generic TCP and HTTP modules that you could use the send commands to a Crestron processor. You would need a PC or a Raspberry Pi to run Companion and connect to the Stream Deck.


While I haven't yet integrated StreamDeck and Crestron, I am currently using Bitfocus Companion with a standalone StreamDeck in our church and I like it a lot better than the StreamDeck OEM software. It does a number of things that I would normally have programmed into my Crestron panel, controlling projectors, Blackmagic mixers and routers, A&H audio mixer scenes, OBS streaming software, ProPresenter Presentation Software, etc. It's pretty slick software and you can write (or request) custom modules for it, as it's open source supported. I would think that would be a great route to go with integrating with a Crestron controller rather than the OEM StreamDeck software.?

Oh, and bonus, you don't need a physical StreamDeck, as Bitfocus Companion includes a StreamDeck emulator, which both expands your points of control and allows you to program and test offline.

Hope this helps,
Jeff

-------------------------------------
Jeff Klein, DMC-E
Head Volunteer AV Geek
Faith Baptist Church
Glen Burnie, Maryland
(Website / Twitter)
?/ @FBC_TechTeam
?/ @mixingforjesus


"Clothe yourselves, all of you, with humility toward one another, for God opposes the proud but gives grace to the humble." 1 Peter 5:5


Re: StreamDeck Integration

 

It sounds like you're asking about using a Stream Deck with a Crestron processor, not with Crestron software on a PC.?
If that is the case, have you looked at Bitfocus Companion? They have generic TCP and HTTP modules that you could use the send commands to a Crestron processor. You would need a PC or a Raspberry Pi to run Companion and connect to the Stream Deck.


Re: StreamDeck Integration

 

So what are you using to get the SD button presses from the PC to Crestron???
I assume that SuperMacro creates a trigger on the PC side, but how do you get it to Crestron as an event?


Loewe IR?capture ?

 

Hi

Looking for a not too old Loewe TV IR capture ? Only one I could find in database is for a specific Loewe product range.

Thanks

³Õ¾±²Ô³¦¨¨²Ô


Re: Replacement for multichannel amplifier

 

¿ªÔÆÌåÓý

That looks interesting, thanks Chris.

There?s a distributor listed for Europe, i?ll reach out to him.

?

Cheers,

Thorsten

?

Von: [email protected] <[email protected]> Im Auftrag von Chris
Gesendet: Freitag, 3. Juni 2022 09:36
An: [email protected]
Betreff: Re: [crestron] Replacement for multichannel amplifier

?

Dn't know if this is helpful, haven't tried using controlling myself and I don't know about availability for you...


Cheers


Re: Replacement for multichannel amplifier

 

Dn't know if this is helpful, haven't tried using controlling myself and I don't know about availability for you...


Cheers


Re: Mag322 (Infomir) STB?IR?code ?

 

Thanks a lot Tony, works perfect :)


Re: SW-VMK-WIN

 

¿ªÔÆÌåÓý

Yep, indeed ¨C MCE just worked after install and the configuration and usage is pretty straightforward. So it?s potentially not worth the hassle to try to get VMK-WIN to fly.

?

Cheers,

Thorsten

?

Von: [email protected] <[email protected]> Im Auftrag von Geoffrey Reynolds
Gesendet: Donnerstag, 2. Juni 2022 14:21
An: [email protected]
Betreff: Re: [crestron] SW-VMK-WIN

?

It may be sufficient to have the VMK-WIN app run as Administrator.? But I honestly wouldn't try to jump through hoops to get VMK-WIN to work when there are viable alternatives that work really well and are easy to integrate with Crestron.

?

Geoff

?

On Thu, Jun 2, 2022 at 3:24 AM Joda via <j.fischer=[email protected]> wrote:

For me there were some more steps to make it work:

I dont know the exact english terms for it but you will find your way:?
- group policies -> administrative something -> windows components -> windows login -> software SAS -> activate, services and applications for ease of use
- regedit -> HKEY_LOCAL_MACHINE -> SOFTWARE -> Crestron Electronics Inc. -> Right click on Crestron VMK-WIN -> authorization -> user -> full access

For me that did the trick


Re: StreamDeck Integration

 

I have done some.? The only trick I found was to make sure the StreamDeck software was running at an elevated permission level.? Had to run it as Administrator same as the Crestron software.


Re: Biamp Tesira X400 - VOIP dialer not controlled via Crestron

 
Edited

Thanks, this works.?

Unfortunate that the new CLZ file has the same file name as the old one.?
Hopefully, there will be new modules for the X series.


Re: SW-VMK-WIN

 

It may be sufficient to have the VMK-WIN app run as Administrator.? But I honestly wouldn't try to jump through hoops to get VMK-WIN to work when there are viable alternatives that work really well and are easy to integrate with Crestron.

Geoff


On Thu, Jun 2, 2022 at 3:24 AM Joda via <j.fischer=[email protected]> wrote:
For me there were some more steps to make it work:

I dont know the exact english terms for it but you will find your way:?
- group policies -> administrative something -> windows components -> windows login -> software SAS -> activate, services and applications for ease of use
- regedit -> HKEY_LOCAL_MACHINE -> SOFTWARE -> Crestron Electronics Inc. -> Right click on Crestron VMK-WIN -> authorization -> user -> full access

For me that did the trick


#websocket #lighting SACN SenderDirectSockets spits error trying to open a UDP comm #websocket #lighting

 

Hello,

I am using a SACN SenderDirectSockets provided module for DIN-SACN-DMX (Enttec ODE MK2) loaded on a AV4 and i randomly get this error when reloading the program slot.

Error: SimplPlus[App02] # 2022-06-02 12:23:16 #? UDPServer: Unable to open port on the LAN side - Will work only on the CS side

Of course, it does not open the socket so no commands are send to the device. If i reload the same program sometimes opens the UDP comms without error and it is working fine .... until the next time i reload the program.
I have 3 devices with 3 instances of this module if it matters.?
Anyone has seen something similar ?
Have the same devices with the same module on a 3 series for quite a few months and no issues at all.

Thanks in advance.
Yordan


Re: SW-VMK-WIN

 

For me there were some more steps to make it work:

I dont know the exact english terms for it but you will find your way:?
- group policies -> administrative something -> windows components -> windows login -> software SAS -> activate, services and applications for ease of use
- regedit -> HKEY_LOCAL_MACHINE -> SOFTWARE -> Crestron Electronics Inc. -> Right click on Crestron VMK-WIN -> authorization -> user -> full access

For me that did the trick


Lutron Vive

Green House Guy
 

Hey Guys,
I have a CP4 processor and a Lutron Vive Hub with BACnet enabled. I've downloaded the Lutron Vive module from the application market but cant get this thing connected at all!
Anyone have any experience with this??
Thanks!


Re: Soundstructure 1.2 via IP - won't connect with DSP

 

I didn't find the modules so ended up writing my own - but only needed it to do a few specific things.
Looking at it, it looks like it's just the 232 commands sent via a TCP/IP block on port 52774 with a \x0D terminator and Delay(5) between commands
I think the delay was just needed so I could process the responses


Re: StreamDeck Integration

 

I have my stream deck integrated with SImpl, VTPro, Toolbox, Simpl+. I use BarRaider SuperMacro, I also have it calling AutoIT scripts, Powershell scripts and AutoHotKey


On Wed, Jun 1, 2022 at 9:37 AM ckangis <chris@...> wrote:
Hi All
has anyone done any work on integration with StreamDeck?
Specifically, having a way for a StreamDeck button press to trigger an event in Crestron/SMW...

TIA!