Keyboard Shortcuts
ctrl + shift + ? :
Show all keyboard shortcuts
ctrl + g :
Navigate to a group
ctrl + shift + f :
Find
ctrl + / :
Quick actions
esc to dismiss
Likes
- Crestron
- Messages
Search
Re: ZeeVee Zyper 4K Management Platform.
Tray,
I didn't write the Crestron module but we did write drivers for other platforms and they way you are sending the strings pretty closely matches our drivers. We are definitely sending the quotes around the command to send, as advised by ZeeVee. If I recall, once the connection for 232 is opened you can send or receive and then it get closed if you switch away, so you can maintain an rs232 connection, but they we have written it is more of a one and done type thing, much like yours. rich |
Re: Crestron Shade Custom Option
I have found out that it is possible to power the CSM-QMTDC-163-1-EX motor with a battery pack.? This is not supported by Crestron but it can be done.? The motor draws approximately one watt in standby mode at 24v DC and 43.5 watts during motion.? The manufacturer of the CSF-LLT05 fabric is Turnils in Bufurd, GA.??
|
HttpsClient => Content-Length issue
I am here having an issue with the HttpsClient.
The request runs into an "unknown error" whenever I try to add Content-Length to the header. It runs fine otherwise.
About the sample code below: you can directly copy/paste into VS2008 and load it as a test. I added a console command called "getit" to easily trigger the request.
This sample code works fine as is.?I also added my own custom header "Mycustomheader": "foo" and I do see it included on the response from httbin.org. This tells me that the custom headers do work as intended.
?
However, the moment this line gets uncommented:
//request.Header.SetHeaderValue("Content-Length", payload.Length.ToString());
The whole thing breaks down. And I can't figure out why... any help would be greatly appreciated.
using System; using Crestron.SimplSharp;? ? ? ? ? ? ? ? ? ? ? ? ? // For Basic SIMPL# Classes
using Crestron.SimplSharpPro;? ? ? ? ? ? ? ? ? ? ? ? // For Basic SIMPL#Pro classes
using Crestron.SimplSharpPro.CrestronThread;? ? ? ? // For Threading
using Crestron.SimplSharpPro.Diagnostics; ? ? // For System Monitor Access
using Crestron.SimplSharpPro.DeviceSupport;? ? ? ? ? // For Generic Device Support
using Crestron.SimplSharp.Net.Https;
?
namespace Simplified_Test
{
? ? public class ControlSystem : CrestronControlSystem
? ? {
? ? ? ? #region Private Fields
? ? ? ? private HttpsClient _httpsClient;
? ? ? ? #endregion
?
? ? ? ? public ControlSystem()
? ? ? ? ? ? : base()
? ? ? ? {
? ? ? ? ? ? try
? ? ? ? ? ? {
? ? ? ? ? ? ? ? Thread.MaxNumberOfUserThreads = 20;
?
? ? ? ? ? ? ? ? //Subscribe to the controller events (System, Program, and Ethernet)
? ? ? ? ? ? ? ? CrestronEnvironment.ProgramStatusEventHandler += new ProgramStatusEventHandler(ControlSystem_ControllerProgramEventHandler);
?
? ? ? ? ? ? }
? ? ? ? ? ? catch (Exception e)
? ? ? ? ? ? {
? ? ? ? ? ? ? ? ErrorLog.Error("Error in the constructor: {0}", e.Message);
? ? ? ? ? ? }
? ? ? ? }
?
?
? ? ? ? public override void InitializeSystem()
? ? ? ? {
? ? ? ? ? ? try
? ? ? ? ? ? {
? ? ? ? ? ? ? ? CrestronConsole.AddNewConsoleCommand(ConsoleCommandGetIt, "getit", "sends a GET request to httpbin with a small payload", ConsoleAccessLevelEnum.AccessAdministrator); //for tests
?
? ? ? ? ? ? ? ? _httpsClient = new HttpsClient();
? ? ? ? ? ? ? ? _httpsClient.Accept = "application/json";
? ? ? ? ? ? ? ? _httpsClient.KeepAlive = true;
? ? ? ? ? ? ? ? _httpsClient.Timeout = 20;
?
? ? ? ? ? ? ? ? _httpsClient.HostVerification = false;? ?//set to false for now - to keep things simple
? ? ? ? ? ? ? ? _httpsClient.PeerVerification = false;? ?//set to false for now - to keep things simple
?
? ? ? ? ? ? }
? ? ? ? ? ? catch (Exception e)
? ? ? ? ? ? {
? ? ? ? ? ? ? ? ErrorLog.Error("Error in InitializeSystem: {0}", e.Message);
? ? ? ? ? ? }
? ? ? ? }
?
? ? ? ? #region Creates a request and dispatches it Async
? ? ? ? private void ConsoleCommandGetIt(string cmdParameters)
? ? ? ? {
? ? ? ? ? ? string url = "https://httpbin.org/anything";
? ? ? ? ? ? string payload = "{\"memberId\":123,\"resultId\":1,\"timestamp\":\"2022-02-09T18:18:04.000Z\"}";
? ? ?
?
? ? ? ? ? ? var request = new HttpsClientRequest();
? ? ? ? ? ? request.Url.Parse(url);
? ? ? ? ? ? request.RequestType = RequestType.Get;
? ? ? ? ? ? request.Header.ContentType = "application/json";
? ? ? ? ? ? request.Header.SetHeaderValue("myCustomHeader", "foo"); //adding a custom header just to see if it appears on the far end
? ? ? ? ? ??
?
? ? ? ? ? ? //adding the json payload to the body of this request
? ? ? ? ? ? request.ContentString = payload;
?
? ? ? ? ? ? //trying to add a Content-Length to the header
? ? ? ? ? ? //request.Header.SetHeaderValue("Content-Length", payload.Length.ToString());
? ? ? ? ? ? //CrestronConsole.PrintLine("The request header as built is: " + request.Header.ToString());
?
? ? ? ? ? ? CrestronConsole.PrintLine("The request payload is: " + request.ContentString);
? ? ? ? ? ??
? ? ? ? ? ? //trying to dispatch it async
? ? ? ? ? ? var result = _httpsClient.DispatchAsync(request, httpsClientResponseCallback);
? ? ? ? ? ? if (result > 0)
? ? ? ? ? ? {
? ? ? ? ? ? ? ? CrestronConsole.PrintLine("There was an error with the dispatch async. Error code: " + (HttpsClient.DISPATCHASYNC_ERROR)result);
? ? ? ? ? ? }
? ? ? ? ? ? else
? ? ? ? ? ? {
? ? ? ? ? ? ? ? CrestronConsole.PrintLine("The request has been dispatched. Now waiting for a reply.");
? ? ? ? ? ? }
?
? ? ? ? }
? ? ? ? #endregion
?
? ? ? ? #region Here is the reply from the far end
? ? ? ? private void httpsClientResponseCallback(HttpsClientResponse response, HTTPS_CALLBACK_ERROR error)
? ? ? ? {
? ? ? ? ? ? CrestronConsole.PrintLine("The response for the request returned " + (HTTPS_CALLBACK_ERROR)error);
?
? ? ? ? ? ? if (error > 0) //if this is true, the response object will be null!!! Don't try to further process it.
? ? ? ? ? ? {
? ? ? ? ? ? ? ? CrestronConsole.PrintLine("httpsClientResponseCallback -> HTTPS_CALLBACK_ERROR=" + error);
? ? ? ? ? ? ? ? return;
? ? ? ? ? ? }
?
? ? ? ? ? ? CrestronConsole.PrintLine("The response code was " + response.Code);? ? //In the realword, I should make some logic that will look for a 200 OK and properly manage error codes in a log somehow.
?
? ? ? ? ? ? CrestronConsole.PrintLine("The response Encoding was " + response.Encoding);
? ? ? ? ? ? CrestronConsole.PrintLine("The response ContentLength was " + response.ContentLength);
? ? ? ? ? ? CrestronConsole.PrintLine("The URL of whoever provided this response is " + response.ResponseUrl);
? ? ? ? ? ? CrestronConsole.PrintLine("The response.Header.FirstHeader is: " + response.Header.FirstHeader);? ? ? ?//this seems to always return empty.
? ? ? ? ? ? CrestronConsole.PrintLine("The response.Header.RequestVersion is: " + response.Header.RequestVersion); //this seems to always return empty.
?
? ? ? ? ? ? CrestronConsole.PrintLine("The response.Chunked is " + response.Chunked);
?
? ? ? ? ? ? CrestronConsole.PrintLine("The response entire Header was:\n " + response.Header.ToString());
?
? ? ? ? ? ? CrestronConsole.PrintLine("Here is the actual response body:");
? ? ? ? ? ? CrestronConsole.PrintLine(response.ContentString);
?
? ? ? ? }
? ? ? ? #endregion
?
? ? ? ? #region House Cleaning
? ? ? ? void ControlSystem_ControllerProgramEventHandler(eProgramStatusEventType programStatusEventType)
? ? ? ? {
? ? ? ? ? ? switch (programStatusEventType)
? ? ? ? ? ? {
? ? ? ? ? ? ? ? case (eProgramStatusEventType.Stopping):
? ? ? ? ? ? ? ? ? ? _httpsClient.Dispose();
? ? ? ? ? ? ? ? ? ? break;
? ? ? ? ? ? }
?
? ? ? ? }
? ? ? ? #endregion?
?
?
? ? ? ??
? ? }
} |
Re: Samsung MDC Module to configure videowall layout
#crestron
Hi Shawn ? |
Re: Samsung MDC Module to configure videowall layout
#crestron
Have you used MDC before? If not I can get you started as I have all of the basic commands like On/Off, source selection, Volume up down, Brightness up down, mute. Do you have the MDC protocol PDF yet? I can send this to you if you need and you can easily find the commands for video wall modes on the MDC Protocol PDF.
?
Cheers
Shawn |
Stupid Sonos logs
#sonos
Is there any way to stop these stupid messages appearing in the logs from Sonos.
Debug is off. Really Crestron - just give us error msgs if something is broken. Do I really need my processor SD card degrading because of this crap! 343. Notice: splusmanagerapp.exe [App 1] # 2022-02-09 17:39:11? # Sonos - Multicast discovery started.
344. Notice: splusmanagerapp.exe [App 1] # 2022-02-09 17:39:11? # Sonos - The system state changed to "Connecting to Primary Device".
345. Notice: splusmanagerapp.exe [App 1] # 2022-02-09 17:39:11? # CRPCConnectionHelper - Created CIP Transport for ipaddress: 192.168.10.4, port: 0, adapterID: 0
346. Notice: splusmanagerapp.exe [App 1] # 2022-02-09 17:39:41? # Sonos - Discovery state changed to idle.
347. Notice: splusmanagerapp.exe [App 1] # 2022-02-09 17:39:41? # Sonos - Multicast discovery result: devices found.
348. Notice: splusmanagerapp.exe [App 1] # 2022-02-09 17:39:41? # Sonos - Discovery result: devices found.
349. Notice: splusmanagerapp.exe [App 1] # 2022-02-09 17:39:43? # Sonos - The primary device is changed to Sonos-01.
350. Notice: splusmanagerapp.exe [App 1] # 2022-02-09 17:39:43? # Sonos - The primary device(Sonos-01) favorites event subscription state changed to "Not Registered".
351. Notice: splusmanagerapp.exe [App 1] # 2022-02-09 17:39:43? # Sonos - The primary device(Sonos-01) group configuration event subscription state changed to "Not Registered".
352. Notice: splusmanagerapp.exe [App 1] # 2022-02-09 17:39:43? # Sonos - The system state changed to "Connected to Primary Device".
353. Notice: splusmanagerapp.exe [App 1] # 2022-02-09 17:39:43? # Sonos - The primary device(Sonos-01) state is changed to "connecting".
354. Notice: splusmanagerapp.exe [App 1] # 2022-02-09 17:39:44? # Sonos - The primary device(Sonos-01) state is changed to "connected".
355. Notice: splusmanagerapp.exe [App 1] # 2022-02-09 17:39:44? # Sonos - The system state changed to "Subscribing for Group Configuration Event".
356. Notice: splusmanagerapp.exe [App 1] # 2022-02-09 17:39:44? # Sonos - The primary Sonos household was changed to Sonos_vkgVNN43BVRzcGhoRbALjdC2ac.
357. Notice: splusmanagerapp.exe [App 1] # 2022-02-09 17:39:44? # Sonos - The system state changed to "Subscribed for Group Configuration Event".
358. Notice: splusmanagerapp.exe [App 1] # 2022-02-09 17:39:45? # Sonos - The system state changed to "Subscribed for favorites Event".
359. Notice: splusmanagerapp.exe [App 1] # 2022-02-09 17:39:45? # Sonos - The primary device(Sonos-01) favorites event subscription state changed to "Registered".
360. Notice: splusmanagerapp.exe [App 1] # 2022-02-09 17:39:45? # Sonos - The system state changed to "Subscribed for Group Configuration Event".
361. Notice: splusmanagerapp.exe [App 1] # 2022-02-09 17:39:45? # Sonos - The system state changed to "Subscribed for Group Configuration Event".
362. Notice: splusmanagerapp.exe [App 1] # 2022-02-09 17:39:45? # Sonos - The primary device(Sonos-01) group configuration event subscription state changed to "Registered".
363. Notice: splusmanagerapp.exe [App 1] # 2022-02-09 17:39:45? # Sonos - The system state changed to "System Ready". |
CK iPlayer 3 SD card failure
Not crestron directly, but it's controlled by Crestron.
I've got an CK iPlayer 3 by Phillips that the SD card has died and is unrecovreable.?? Does anyone have one of these they can grab the file structure of the SD card so I can rebuild the system.? I can't boot the device to reload a show without a working SD card file system.. Their support has been less than helpful so far |
Re: Simpl+ Analog_Input vs Long_Integer
Hi Brad,
The point that's being made is... signals is SIMPL **CANNOT** hold a value beyond the range 0 (all 16 bits off) to 65535 (all 16 bits on).? The value isn't being "converted", it's being "truncated". The full picture is that there is a way of looking at that 0-65535 range as a signed value where any value over 32767 represents the negative values -32768 to -1, but you're still stuck with 16 bits, and I don't think you want signed here anyway. In your code, you'll NEVER see a value of < 0, because -1 is actually POSITIVE 65535, and you have exactly "1 chance in 65536" of going above 65534. If you enter the value 65537, you're actually entering a 1. Crestron software may allow you to enter values outside of the 16 bit range, but they will immediately be truncated. If you're trying to check for values between 1 and 65534, your test should be < 1, rather than < 0. Hope that helps, Oliver |
Re: Crestron Q-SYS[Core] V5.0 - not staying connected
I no longer use the Crestron version but using Mathew Klucznyk version. He created these modules due to the issue of disconnecting from Core. We have been stable for the last 2 months, whereas using Crestron's version were disconnecting within 30 minutes of bootup and TB wasn't able to figure out the issue.
|
Re: Simpl+ Analog_Input vs Long_Integer
I'm not needing a larger number but 0-65534 but any value outside of that range is entered I am not getting an error but a conversion that still saves that value.
#DEFINE_CONSTANT maxLevels 65534 Change AudioLevel
{
x = GetLastModifiedArrayIndex();
if((AudioLevel[x] < 0) || (AudioLevel[x] > 65534))? ??
{
? ? ? ? ? ?makestring(Error$, "Audio Levels are from 1 to %u", maxLevels);
}? ??
Else
{
? ? Busy = 1;
AudioLevelFb[x] = AudioLevel[x];
AudioLevelFbTemp[x] = AudioLevelFb[x];
Busy = 0;
}
}
? |
Re: Weather widget on xx52 touch panels
I did go round and round with Tech support but in the end they weren't much help BUT what I did discover was this:
? I created a test project and just loaded that with all defaults (left crestron as default location) and it still came up with the rouge location. No matter what I did (changing DNS, everything) no change. I initilized and restored the panel and tried again, this time it stuck so I believe some how a location gets stuck in the panels bios or something and by restoring it and loading a test page and then your project seems to set the correct location? very odd. |
Re: Fusion C#
There's an example on the help file for the FusionRoom class:? On Wed, Feb 9, 2022 at 9:22 AM Crestron_Programmer <s.marszalek11@...> wrote: Does anyone have or know of an example code, showing how to program a room into Fusion via C#? |
Apple TV and the AMC streaming app
Hi All,
Just wasted a bit of time on this, so I thought I'd share for others'... Unlike the other major Apps like Netflix and Amazon Prime, The AMC app on the Apple TV will not return to the MAIN menu by continually pulsing the Menu/Back command. i.e. normally no matter how deep into menus that you are, you can get back to the main screen by pressing the Menu/Back command until you've stepped all the way back out... With the AMC app, you can step back from within its own menus, but it will not go all the way to the Home page. Of course, Pressing and Holding the Menu/Back button will bring you home (or using the separate 'TV' Home command) but I'm *shocked* at how many clients and even dealers either don't know about or don't use or remember the P+H feature... Just an FYI... |
to navigate to use esc to dismiss