¿ªÔÆÌåÓý

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

Re: POLY GY500 CONTROL VIA RS232

 

I believe the baud rate should be 115200.
Did the login mode change or update? I typically set mine to none


Re: POLY GY500 CONTROL VIA RS232

 

I tried the test program and the CP4 com ports seem to be fine.Also the serial settings on the G7500 are as they should be.Could the issue be the G7500 serial port?Has anyone encountered this kind of scenario?


On Wed, May 14, 2025, 20:26 igor.pero.bauer via <igor.pero.bauer=[email protected]> wrote:
you can try with a test program you'll load into an unused slot, just stop and unregister the program currently talking to COM 1 and 2. then cross-connect ports 1 and 2, Rx to Tx and vice versa, and try sending some strings back and forth to see if they are getting through. I have so far seen a fair number of fried COM ports on controllers, so you may be looking at that.
also, check if the polycom had a firmware update pushed to it which disabled serial communication or messed with the parameters.


Re: TSW-770 Virtual Buttons on XPanel

 

Thanks ! turns out there is no way to see those Virtual Tool Bar buttons on XPanel as per Crestron.
?
What I think I can and will do is just hold high the signals that I need to test manually on SIMPL Debugger and when the 70 series arrive I can test with the real hardware.
?
Thanks !


Re: TSW-770 Virtual Buttons on XPanel

 

Great question, not sure lol.? Typically in the XPanel settings there is the "show faceplate" option but being that the buttons are not on the faceplate that may not make a difference with the 770.

If you really need them and can not work it out you can always leave the 1050 in the file for xpanel purposes and then just add an additional touch screen for the 770.




On Thu, May 15, 2025, 10:30?AM santiago via <santiago=[email protected]> wrote:
Hi all, thanks for taking the time to read. I would like to know if there is a way to show the Virtual Buttons tool bar in XPanel, I was tasked to update a system from an old TSW 1050s series that has Hard Buttons programmed (Power ON/OFF, Volume UP/DOWN, Light Presets). I know this new 70 series panels have those buttons on a tool bar, but when I Saved As my VT project as TSW 770 and I run the XPanel I don't get to see those buttons.
?
There is any way to make XPanel to show the Virtual Tool Bar on a 70 series like it would show Faceplate on 50 or 60 series ?
?
?
Thanks !
?
?
?
?
?
?


TSW-770 Virtual Buttons on XPanel

 

Hi all, thanks for taking the time to read. I would like to know if there is a way to show the Virtual Buttons tool bar in XPanel, I was tasked to update a system from an old TSW 1050s series that has Hard Buttons programmed (Power ON/OFF, Volume UP/DOWN, Light Presets). I know this new 70 series panels have those buttons on a tool bar, but when I Saved As my VT project as TSW 770 and I run the XPanel I don't get to see those buttons.
?
There is any way to make XPanel to show the Virtual Tool Bar on a 70 series like it would show Faceplate on 50 or 60 series ?
?
?
Thanks !
?
?
?
?
?
?


Re: Lutron RadioRA 3 Processor not connecting

 

¿ªÔÆÌåÓý

Hi?
Is the QSX and DMPS in same VLAN?

Leap doesn¡¯t work when in different VLANs.

Verstuurd vanaf mijn iPhone

Op 15 mei 2025 om 14:41 heeft jeff via groups.io <jeff.mackie@...> het volgende geschreven:

?
Leap uses TLS, this seems to be a handshaking issue. Do you see Lutron certs in the root and intermediate cert stores? I am not sure if the DMPS has present day firmware, meaning still being maintained. The error seems to be coming from the secure TCP socket.


Re: Lutron RadioRA 3 Processor not connecting

 

Leap uses TLS, this seems to be a handshaking issue. Do you see Lutron certs in the root and intermediate cert stores? I am not sure if the DMPS has present day firmware, meaning still being maintained. The error seems to be coming from the secure TCP socket.


Re: VX automate / 1Beyond user feedback

 

¿ªÔÆÌåÓý

IIRC, with the MXA920 the best results are not in lobe mode but in automatic coverage mode where VX is looking at the actual beam angle and position.

?

Proper setup and seat anchoring is key ¨C if seats can move around too much relative to the .1BRD the results will be lousy. IME, it¡¯s best if there¡¯s a landmark (for example, a power tablebox/popup where the client¡¯s facility staff can be trained ¡°when you reset the room before a meeting make sure each seat is centered on the popup¡± ¨C there is also an option for a ¡°ghost¡± image to mirror the accepted furniture layout but IME it¡¯s not a great choice for movable seats (but awesome for movable furniture)

?

My most recent few 1Beyond deployments (each using a handful of MXA920s in automatic coverage mode) were pretty painless ¨C but also preparing the clients expectations is critical¡ª1Beyond isn¡¯t a magical unicorn that can find someone anywhere in the room [yet] ¨C it can find someone in places where its expecting to find them.

?

--

Lincoln King-Cliby

Commercial Market Director
Sr. Systems Architect | Crestron Certified Master Programmer (Diamond)
ControlWorks Consulting, LLC

Direct: (+1)440.771.4807 | Cleveland: (+1)440.449.1100? | Boston: (+1)508.695.0188 | DC: (+1)202.381.9070 | London: (+44) (0)20 4520 4600?
Crestron Services Provider | Biamp Authorized Independent Programmers | Extron Qualified Independent Programmer

?

?

?

From: [email protected] <[email protected]> On Behalf Of Marty via groups.io
Sent: Wednesday, May 14, 2025 8:41 AM
To: [email protected]
Subject: Re: [crestron] VX automate / 1Beyond user feedback

?

We're using two Shure MXA 920s. We treated the room for acoustics so no issues there, but the mic lobe placement was finicky and took some testing. The camera recalling the lobe when it's activated works great, but to get the coverage area tight enough to only grab 1-2 people based on the chairs was where we saw issues. That's where visual AI has helped mitigate those issues.?

?

My experience is as long as your coverage areas from the mic lobes is EXACTLY where it should be, you won't see any issues.?


Re: Lutron RadioRA 3 Processor not connecting

 

The only error in the log is the one "Unhandled Exception" in the original post, nothing relating to the license as far as I can tell. It also only posts that error on program start, even if I pulse "connect" on the command processor symbol multiple times through toolbox.


Re: POLY GY500 CONTROL VIA RS232

 

you can try with a test program you'll load into an unused slot, just stop and unregister the program currently talking to COM 1 and 2. then cross-connect ports 1 and 2, Rx to Tx and vice versa, and try sending some strings back and forth to see if they are getting through. I have so far seen a fair number of fried COM ports on controllers, so you may be looking at that.
also, check if the polycom had a firmware update pushed to it which disabled serial communication or messed with the parameters.


Re: POLY GY500 CONTROL VIA RS232

 

The baud rate is currently set to 19200 on both devices.


On Wed, May 14, 2025, 18:45 Daygecko via <dylandot9=[email protected]> wrote:
Make ?sure that the baud rate on your RS-232 ports match the baud rate set on the Poly.


Re: POLY GY500 CONTROL VIA RS232

 

Make ?sure that the baud rate on your RS-232 ports match the baud rate set on the Poly.


POLY GY500 CONTROL VIA RS232

 

Hello team,?
I have a poly G7500 that is/was being controlled via rs232 by a CP4.This was working fine. However, this stopped recently. On COM port 1 of the CP4 I can no longer receive feedback from the poly G7500.When I change to COM port 2, I occasionally get feedback from the G7500, however seems to be just to be random symbols. Kindly advise.


Topics in Home Automation - New Article in Residential Tech Today

 

¿ªÔÆÌåÓý

I personally don't know anyone who enjoys mowing their lawn.? It takes time that could be much better spent with family and friends, it has to be performed on even the hottest days of the summer, and it is an even more miserable task for people that suffer from seasonal allergies.? Fortunately, there are a wide range of robotic lawn mowers available today that can eliminate this job from a homeowner's weekend chores.?

Segway has been making robotic mowers since 2021.? The Navimow X3 series are their latest line of wire-free, robotic mowers and includes models that can handle lawns between 1/2 and 2-1/2 acres.? I was a beta tester last fall and my latest article looks at the Navimow X3 series of robotic mowers in detail.

You can find the article here:


For those interested in earlier articles that I've written, you can find those here:



For these interested in even earlier content that I wrote, you can find it all here though older content has formatting issues due to a transfer from blogspot to wordpress.



Thanks


Re: Websockets and frames

 

¿ªÔÆÌåÓý

Thanks Jan!

On 5/14/2025 8:34 AM, Jan Hy?ha via groups.io wrote:

Hi Jay, this is my code I use for websocket communication, maybe for inspiration. Jan
?
using System;
using System.Text;
using Crestron.SimplSharp;// For Basic SIMPL# Classes
using Crestron.SimplSharp.CrestronWebSocketClient;
using Newtonsoft.Json;

namespace WebSocket
{
? ? public delegate void SendDigitalAnalogData(ushort Data);
? ? // ? ?public delegate void ReceivedDataEventHandler(string data);
? ? public delegate void ConnectionStatusChangedEventHandler(bool isConnected);
? ? public delegate void SerialChangedEventHandler(SerialChangeEventArgs e); ? ? ? ? ? ?//event posilani dat do S+
? ? public class MyWebSocket
? ? {
? ? ? ? // ? ? ? ?public event ReceivedDataEventHandler OnDataReceived;
? ? ? ? // ? ? ? ?public event ReceivedDataEventHandler OnReceivedValueChange;
? ? ? ? public event ConnectionStatusChangedEventHandler OnConnectionStatusChanged;
? ? ? ? private WebSocketClient myWSC = new WebSocketClient();
? ? ? ? public WebSocketClient.WEBSOCKET_RESULT_CODES rCode;
? ? ? ? public WebSocketClient.WEBSOCKET_PACKET_TYPES pType;
? ? ? ? public byte[] sendData;
? ? ? ? public byte[] receiveData;
? ? ? ? public int connected_i;
? ? ? ? WebSocketClient.WEBSOCKET_RESULT_CODES error;
? ? ? ? private CTimer heartbeatTimer;
? ? ? ? public SendDigitalAnalogData UpdateSocketStatus { get; set; }
? ? ? ? // ? ? public ReceivedDataEventHandler OnDataReceived { get; set; }
? ? ? ? public MyWebSocket()
? ? ? ? {
? ? ? ? ? ? // Inicializujte ?asova? pro odes¨ªl¨¢n¨ª heartbeat zpr¨¢v ka?d?ch 5 sekund
? ? ? ? ? ? heartbeatTimer = new CTimer(SendHeartbeat, null, 0, 5000);
? ? ? ? }
? ? ? ? public void Connect(String Url)
? ? ? ? {
? ? ? ? ? ? myWSC.URL = Url;
? ? ? ? ? ? CrestronConsole.PrintLine(myWSC.URL);
? ? ? ? ? ? error = myWSC.Connect();
? ? ? ? ? ? if (error == WebSocketClient.WEBSOCKET_RESULT_CODES.WEBSOCKET_CLIENT_SUCCESS)
? ? ? ? ? ? {
? ? ? ? ? ? ? ? UpdateSocketStatus(1);
? ? ? ? ? ? ? ? connected_i = 1;
? ? ? ? ? ? ? ? CrestronConsole.PrintLine("WSClient Websocket connected");
? ? ? ? ? ? ? ? StartListening();
? ? ? ? ? ? ? ? if (OnConnectionStatusChanged != null) OnConnectionStatusChanged(true);
? ? ? ? ? ? }
? ? ? ? ? ? else
? ? ? ? ? ? {
? ? ? ? ? ? ? ? CrestronConsole.PrintLine("WSClient Websocket could not connect to server. Connect return code: " + error.ToString());
? ? ? ? ? ? }
? ? ? ? }
? ? ? ? public void DisconnectWebSocket()
? ? ? ? {
? ? ? ? ? ? myWSC.Disconnect();
? ? ? ? ? ? connected_i = 0;
? ? ? ? ? ? UpdateSocketStatus(0);
? ? ? ? ? ? CrestronConsole.PrintLine("WSClient Websocket disconnected. \r\n");
? ? ? ? ? ? if (OnConnectionStatusChanged != null) OnConnectionStatusChanged(false);
? ? ? ? }
? ? ? ? private void StartListening()
? ? ? ? {
? ? ? ? ? ? CrestronInvoke.BeginInvoke((Crestron.SimplSharp.CrestronSharpHelperDelegate)ListenForData);
? ? ? ? }
? ? ? ? private void ListenForData(object obj)
? ? ? ? {
? ? ? ? ? ? while (connected_i == 1)
? ? ? ? ? ? {
? ? ? ? ? ? ? ? try
? ? ? ? ? ? ? ? {
? ? ? ? ? ? ? ? ? ? myWSC.Receive(out receiveData, out pType);
? ? ? ? ? ? ? ? ? ? if (receiveData != null)
? ? ? ? ? ? ? ? ? ? {
? ? ? ? ? ? ? ? ? ? ? ? string receivedString = Encoding.ASCII.GetString(receiveData, 0, receiveData.Length);
? ? ? ? ? ? ? ? ? ? ? ? // ? ? ? ? ?if (OnReceivedValueChange != null) OnReceivedValueChange(receivedString);
? ? ? ? ? ?// ? ? ? ? ? CrestronConsole.Print("Data received: " + receivedString + "\r\n");
? ? ? ? ? ? ? ? ? ? ? ? SignalChangeEvents.SerialValueChange(0, receivedString, 0); ? ? ? ? ? ? ? ? ? ? //udalost co posle prijata data do S+
? ? ? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? catch (Exception e)
? ? ? ? ? ? ? ? {
? ? ? ? ? ? ? ? ? ? CrestronConsole.Print("Error receiving data - Error Code:" + e + "\r\n");
? ? ? ? ? ? ? ? ? ? DisconnectWebSocket();
? ? ? ? ? ? ? ? ? ? ReconnectWebSocket();
? ? ? ? ? ? ? ? }
? ? ? ? ? ? }
? ? ? ? }
? ? ? ? public void SingleSendAndReceive(String data)
? ? ? ? {
? // ? ? ? ?CrestronConsole.PrintLine("Sending data");
? ? ? ? ? ? try
? ? ? ? ? ? {
? ? ? ? ? ? ? ? sendData = Encoding.ASCII.GetBytes(data);
? ? ? ? ? ? ? ? rCode = myWSC.Send(sendData, (uint)sendData.Length, WebSocketClient.WEBSOCKET_PACKET_TYPES.LWS_WS_OPCODE_07__TEXT_FRAME, WebSocketClient.WEBSOCKET_PACKET_SEGMENT_CONTROL.WEBSOCKET_CLIENT_PACKET_END);
? ? ? ? ? ? ? ? StartListening();
? ? ? ? ? ? }
? ? ? ? ? ? catch (Exception e)
? ? ? ? ? ? {
? ? ? ? ? ? ? ? DisconnectWebSocket();
? ? ? ? ? ? ? ? UpdateSocketStatus(0);
? ? ? ? ? ? ? ? CrestronConsole.Print("WSClient Something went wrong - Error Code:" + e + "\r\n");
? ? ? ? ? ? ? ? ReconnectWebSocket();
? ? ? ? ? ? }
? ? ? ? }
? ? ? ? private void ReconnectWebSocket()
? ? ? ? {
? ? ? ? ? ? CrestronConsole.PrintLine("WSClient Attempting to reconnect...");
? ? ? ? ? ? while (connected_i == 0)
? ? ? ? ? ? {
? ? ? ? ? ? ? ? Crestron.SimplSharp.CrestronEnvironment.Sleep(5000); // Wait 5 seconds before reconnecting
? ? ? ? ? ? ? ? Connect(myWSC.URL);
? ? ? ? ? ? }
? ? ? ? }
? ? ? ? private void SendHeartbeat(object obj)
? ? ? ? {
? ? ? ? ? ? if (connected_i == 1)
? ? ? ? ? ? {
? ? ? ? ? ? ? ? string heartbeatMessage = "ping";
? ? ? ? ? ? ? ? sendData = Encoding.ASCII.GetBytes(heartbeatMessage);
? ? ? ? ? ? ? ? rCode = myWSC.Send(sendData, (uint)sendData.Length, WebSocketClient.WEBSOCKET_PACKET_TYPES.LWS_WS_OPCODE_07__PING, WebSocketClient.WEBSOCKET_PACKET_SEGMENT_CONTROL.WEBSOCKET_CLIENT_PACKET_END);
? ? ? ? ? ? ? ? //CrestronConsole.PrintLine("rCode na ping = " + rCode);
? ? ? ? ? ? ? ? // Pokud ping nen¨ª ¨²sp¨§?n?, odpojte a znovu p?ipojte websocket
? ? ? ? ? ? ? ? if (rCode != WebSocketClient.WEBSOCKET_RESULT_CODES.WEBSOCKET_CLIENT_SUCCESS)
? ? ? ? ? ? ? ? {
? ? ? ? ? ? ? ? ? ? CrestronConsole.PrintLine("WSClient Ping failed, reconnecting...");
? ? ? ? ? ? ? ? ? ? DisconnectWebSocket();
? ? ? ? ? ? ? ? ? ? ReconnectWebSocket();
? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? else
? ? ? ? ? ? ? ? {
? ? ? ? ?// ? ? ? ? ? CrestronConsole.PrintLine("WSClient Heartbeat sent: " + heartbeatMessage);
? ? ? ? ? ? ? ? }
? ? ? ? ? ? }
? ? ? ? }
? ? }
? ? public class SerialChangeEventArgs : EventArgs
? ? {
? ? ? ? public short msgType { get; set; }
? ? ? ? public string stringToSplus { get; set; }
? ? ? ? public short shortToSplus { get; set; }
? ? ? ? public SerialChangeEventArgs()
? ? ? ? {
? ? ? ? }
? ? ? ? public SerialChangeEventArgs(short msgType, string stringToSplus, short shortToSplus)
? ? ? ? {
? ? ? ? ? ? this.msgType = msgType;
? ? ? ? ? ? this.stringToSplus = stringToSplus;
? ? ? ? ? ? this.shortToSplus = shortToSplus;
? ? ? ? }
? ? }
? ? public static class SignalChangeEvents
? ? {
? ? ? ? public static event SerialChangedEventHandler onSerialValueChange;
? ? ? ? public static void SerialValueChange(short msgType, string stringToSplus, short shortToSplus)
? ? ? ? {
? ? ? ? ? ? SignalChangeEvents.onSerialValueChange(new SerialChangeEventArgs(msgType, stringToSplus, shortToSplus));
? ? ? ? }
? ? }
}
?
?
?
/*
? SIMPL+ Module Information
? (Fill in comments below)
*/
/*
Dealer Name:
System Name:
System Number:
Programmer:
Comments:
*/
?
/*
? Compiler Directives
? (Uncomment and declare compiler directives as needed)
*/
// #ENABLE_DYNAMIC
// #SYMBOL_NAME ""
// #HINT ""
// #DEFINE_CONSTANT
// #CATEGORY ""?
// #PRINT_TO_TRACE
// #DIGITAL_EXPAND?
// #ANALOG_SERIAL_EXPAND?
// #OUTPUT_SHIFT?
// #HELP_PDF_FILE ""
#DEFAULT_VOLATILE
#ENABLE_STACK_CHECKING
#ENABLE_TRACE
// #ENCODING_ASCII
// #ENCODING_UTF16
// #ENCODING_INHERIT_FROM_PARENT
// #ENCODING_INHERIT_FROM_PROGRAM
?
#HELP_BEGIN
p?¨ªklad url:
?
?
?
#HELP_END
?
?
/*
? Include Libraries
? (Uncomment and include additional libraries as needed)
*/
//#INCLUDEPATH "C:\Crestron\Simpl\usrSIMPL#\WSClient\WSClient\bin\debug"
//#INCLUDEPATH "D:\Crestron\_Projekty\_testiky\WebSocketTest_v01\SIMPLSharp_WebSocketClient_Basic-master\WSClient\bin\Debug"
#INCLUDEPATH "D:\Crestron\_Projekty\_testiky\WebSocketTest_v01\SIMPLSharp_WebSocketClient_Basic-master\WSClient\bin\Release"
?
#USER_SIMPLSHARP_LIBRARY "WSClient"?
?
/*
? DIGITAL, ANALOG and SERIAL INPUTS and OUTPUTS
? (Uncomment and declare inputs and outputs as needed)
*/
DIGITAL_INPUT Connect,Disconnect;?
// ANALOG_INPUT?
STRING_INPUT Url$[256], Message$[65534];?
// BUFFER_INPUT?
?
DIGITAL_OUTPUT ConnectedFb;?
// ANALOG_OUTPUT?
STRING_OUTPUT receivedData$;
?
/*
? SOCKETS
? (Uncomment and define socket definitions as needed)
*/
// TCP_CLIENT
// TCP_SERVER
// UDP_SOCKET
?
?
/*
? Parameters
? (Uncomment and declare parameters as needed)
*/
// INTEGER_PARAMETER
// SIGNED_INTEGER_PARAMETER
// LONG_INTEGER_PARAMETER
// SIGNED_LONG_INTEGER_PARAMETER
// STRING_PARAMETER
?
/*
? Parameter Properties
? (Uncomment and declare parameter properties as needed)
*/
/*
#BEGIN_PARAMETER_PROPERTIES parameter_variable, parameter_variable, ...
? ?// propValidUnits = // unitString or unitDecimal|unitHex|unitPercent|unitCharacter|unitTime|unitTicks;
? ?// propDefaultUnit = // unitString, unitDecimal, unitHex, unitPercent, unitCharacter, unitTime or unitTicks;
? ?// propBounds = lower_bound , upper_bound;
? ?// propDefaultValue = ;? // or, propDefaultValue = "";
? ?// propList = // { "value" , "label" } , { "value" , "label" } , ... ;
? ?// propShortDescription = "status_bar_hint_text";
? ?// #BEGIN_PROP_FULL_DESCRIPTION? line_1...? line_2...? line_n? #END_PROP_FULL_DESCRIPTION
? ?// #BEGIN_PROP_NOTES line_1...? line_2...? line_n? #END_PROP_NOTES
#END_PARAMETER_PROPERTIES
*/
?
/*
? Structure Definitions
? (Uncomment and define structure definitions as needed)
? Note:? Be sure to initialize all declared STRING variables as needed
? ? ? ? ?For example, in Function Main: struct.myString = "";
*/
/*
STRUCTURE MyStruct1
{
};
?
MyStruct1 struct;
*/
?
/*
? Global Variables
? (Uncomment and declare global variables as needed)
? Note:? Be sure to initialize all declared STRING variables as needed
? ? ? ? ?For example, in Function Main: myString = "";
*/
// INTEGER
// LONG_INTEGER
// SIGNED_INTEGER
// SIGNED_LONG_INTEGER
// STRING
MyWebSocket ws;
/*
? Functions
? (Add any additional functions here)
? Note:? Functions must be physically placed before the location in
? ? ? ? ?the code that calls them.
*/
/*
Function MyFunction1()
{
? ? // TODO:? Add local variable declarations here
?
? ? // TODO:? Add code here
}
*/
?
/*
Integer_Function MyIntFunction1()
{
? ? // TODO:? Add local variable declarations here
?
? ? // TODO:? Add code here
?
? ? Return (0);
}
*/
?
/*
String_Function MyStrFunction1()
{
? ? // TODO:? Add local variable declarations here
?
? ? // TODO:? Add code here
?
? ? Return ("");
}
*/
?
/*
? Event Handlers
? (Uncomment and declare additional event handlers as needed)
*/
? ??
PUSH Connect
{
ws.Connect(Url$);
}
?
PUSH Disconnect?
{
? ? ws.DisconnectWebSocket();
}
?
CHANGE Message$
{
? ?ws.SingleSendAndReceive(Message$);?
}
??
Callback Function SocketStatusChange(integer Status)
{
ConnectedFb = Status;
}
EVENTHANDLER _onSerialValueChange(SerialChangeEventArgs e)
{
switch(e.msgType)
{
? ? case(0): { receivedData$ = e.stringToSplus; } //received serial data?
/* case(1): //mainPwr (v promenne e.shortToSplus)
{?
if(e.shortToSplus = 0) { mainPwrIsOn_fb = 0; mainPwrIsOff_fb = 1; }?
else { mainPwrIsOn_fb = 1; mainPwrIsOff_fb = 0; }
}
case(2): { mainBrightness_fb = e.shortToSplus; } //mainBrightness (v promenne e.shortToSplus)
case(3): { mainTransition_fb = e.shortToSplus; } //mainTransition (v promenne e.shortToSplus)
case(4): { mainBlend_fb = e.shortToSplus; } //mainBlend (bs) (v promenne e.shortToSplus)
case(5): { mainPreset_fb = e.shortToSplus; } //mainPreset (v promenne e.shortToSplus)
*/
}
}
? ?
?
?
?
/*
? Main()
? Uncomment and place one-time startup code here
? (This code will get called when the system starts up)
*/
?
Function Main()
{
WaitForInitializationComplete();
? RegisterDelegate(ws, UpdateSocketStatus, SocketStatusChange);
? ? RegisterEvent(SignalChangeEvents, onSerialValueChange, _onSerialValueChange);
}
?
?


Re: Websockets and frames

 

Hi Jay, this is my code I use for websocket communication, maybe for inspiration. Jan
?
using System;
using System.Text;
using Crestron.SimplSharp;// For Basic SIMPL# Classes
using Crestron.SimplSharp.CrestronWebSocketClient;
using Newtonsoft.Json;

namespace WebSocket
{
? ? public delegate void SendDigitalAnalogData(ushort Data);
? ? // ? ?public delegate void ReceivedDataEventHandler(string data);
? ? public delegate void ConnectionStatusChangedEventHandler(bool isConnected);
? ? public delegate void SerialChangedEventHandler(SerialChangeEventArgs e); ? ? ? ? ? ?//event posilani dat do S+
? ? public class MyWebSocket
? ? {
? ? ? ? // ? ? ? ?public event ReceivedDataEventHandler OnDataReceived;
? ? ? ? // ? ? ? ?public event ReceivedDataEventHandler OnReceivedValueChange;
? ? ? ? public event ConnectionStatusChangedEventHandler OnConnectionStatusChanged;
? ? ? ? private WebSocketClient myWSC = new WebSocketClient();
? ? ? ? public WebSocketClient.WEBSOCKET_RESULT_CODES rCode;
? ? ? ? public WebSocketClient.WEBSOCKET_PACKET_TYPES pType;
? ? ? ? public byte[] sendData;
? ? ? ? public byte[] receiveData;
? ? ? ? public int connected_i;
? ? ? ? WebSocketClient.WEBSOCKET_RESULT_CODES error;
? ? ? ? private CTimer heartbeatTimer;
? ? ? ? public SendDigitalAnalogData UpdateSocketStatus { get; set; }
? ? ? ? // ? ? public ReceivedDataEventHandler OnDataReceived { get; set; }
? ? ? ? public MyWebSocket()
? ? ? ? {
? ? ? ? ? ? // Inicializujte ?asova? pro odes¨ªl¨¢n¨ª heartbeat zpr¨¢v ka?d?ch 5 sekund
? ? ? ? ? ? heartbeatTimer = new CTimer(SendHeartbeat, null, 0, 5000);
? ? ? ? }
? ? ? ? public void Connect(String Url)
? ? ? ? {
? ? ? ? ? ? myWSC.URL = Url;
? ? ? ? ? ? CrestronConsole.PrintLine(myWSC.URL);
? ? ? ? ? ? error = myWSC.Connect();
? ? ? ? ? ? if (error == WebSocketClient.WEBSOCKET_RESULT_CODES.WEBSOCKET_CLIENT_SUCCESS)
? ? ? ? ? ? {
? ? ? ? ? ? ? ? UpdateSocketStatus(1);
? ? ? ? ? ? ? ? connected_i = 1;
? ? ? ? ? ? ? ? CrestronConsole.PrintLine("WSClient Websocket connected");
? ? ? ? ? ? ? ? StartListening();
? ? ? ? ? ? ? ? if (OnConnectionStatusChanged != null) OnConnectionStatusChanged(true);
? ? ? ? ? ? }
? ? ? ? ? ? else
? ? ? ? ? ? {
? ? ? ? ? ? ? ? CrestronConsole.PrintLine("WSClient Websocket could not connect to server. Connect return code: " + error.ToString());
? ? ? ? ? ? }
? ? ? ? }
? ? ? ? public void DisconnectWebSocket()
? ? ? ? {
? ? ? ? ? ? myWSC.Disconnect();
? ? ? ? ? ? connected_i = 0;
? ? ? ? ? ? UpdateSocketStatus(0);
? ? ? ? ? ? CrestronConsole.PrintLine("WSClient Websocket disconnected. \r\n");
? ? ? ? ? ? if (OnConnectionStatusChanged != null) OnConnectionStatusChanged(false);
? ? ? ? }
? ? ? ? private void StartListening()
? ? ? ? {
? ? ? ? ? ? CrestronInvoke.BeginInvoke((Crestron.SimplSharp.CrestronSharpHelperDelegate)ListenForData);
? ? ? ? }
? ? ? ? private void ListenForData(object obj)
? ? ? ? {
? ? ? ? ? ? while (connected_i == 1)
? ? ? ? ? ? {
? ? ? ? ? ? ? ? try
? ? ? ? ? ? ? ? {
? ? ? ? ? ? ? ? ? ? myWSC.Receive(out receiveData, out pType);
? ? ? ? ? ? ? ? ? ? if (receiveData != null)
? ? ? ? ? ? ? ? ? ? {
? ? ? ? ? ? ? ? ? ? ? ? string receivedString = Encoding.ASCII.GetString(receiveData, 0, receiveData.Length);
? ? ? ? ? ? ? ? ? ? ? ? // ? ? ? ? ?if (OnReceivedValueChange != null) OnReceivedValueChange(receivedString);
? ? ? ? ? ?// ? ? ? ? ? CrestronConsole.Print("Data received: " + receivedString + "\r\n");
? ? ? ? ? ? ? ? ? ? ? ? SignalChangeEvents.SerialValueChange(0, receivedString, 0); ? ? ? ? ? ? ? ? ? ? //udalost co posle prijata data do S+
? ? ? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? catch (Exception e)
? ? ? ? ? ? ? ? {
? ? ? ? ? ? ? ? ? ? CrestronConsole.Print("Error receiving data - Error Code:" + e + "\r\n");
? ? ? ? ? ? ? ? ? ? DisconnectWebSocket();
? ? ? ? ? ? ? ? ? ? ReconnectWebSocket();
? ? ? ? ? ? ? ? }
? ? ? ? ? ? }
? ? ? ? }
? ? ? ? public void SingleSendAndReceive(String data)
? ? ? ? {
? // ? ? ? ?CrestronConsole.PrintLine("Sending data");
? ? ? ? ? ? try
? ? ? ? ? ? {
? ? ? ? ? ? ? ? sendData = Encoding.ASCII.GetBytes(data);
? ? ? ? ? ? ? ? rCode = myWSC.Send(sendData, (uint)sendData.Length, WebSocketClient.WEBSOCKET_PACKET_TYPES.LWS_WS_OPCODE_07__TEXT_FRAME, WebSocketClient.WEBSOCKET_PACKET_SEGMENT_CONTROL.WEBSOCKET_CLIENT_PACKET_END);
? ? ? ? ? ? ? ? StartListening();
? ? ? ? ? ? }
? ? ? ? ? ? catch (Exception e)
? ? ? ? ? ? {
? ? ? ? ? ? ? ? DisconnectWebSocket();
? ? ? ? ? ? ? ? UpdateSocketStatus(0);
? ? ? ? ? ? ? ? CrestronConsole.Print("WSClient Something went wrong - Error Code:" + e + "\r\n");
? ? ? ? ? ? ? ? ReconnectWebSocket();
? ? ? ? ? ? }
? ? ? ? }
? ? ? ? private void ReconnectWebSocket()
? ? ? ? {
? ? ? ? ? ? CrestronConsole.PrintLine("WSClient Attempting to reconnect...");
? ? ? ? ? ? while (connected_i == 0)
? ? ? ? ? ? {
? ? ? ? ? ? ? ? Crestron.SimplSharp.CrestronEnvironment.Sleep(5000); // Wait 5 seconds before reconnecting
? ? ? ? ? ? ? ? Connect(myWSC.URL);
? ? ? ? ? ? }
? ? ? ? }
? ? ? ? private void SendHeartbeat(object obj)
? ? ? ? {
? ? ? ? ? ? if (connected_i == 1)
? ? ? ? ? ? {
? ? ? ? ? ? ? ? string heartbeatMessage = "ping";
? ? ? ? ? ? ? ? sendData = Encoding.ASCII.GetBytes(heartbeatMessage);
? ? ? ? ? ? ? ? rCode = myWSC.Send(sendData, (uint)sendData.Length, WebSocketClient.WEBSOCKET_PACKET_TYPES.LWS_WS_OPCODE_07__PING, WebSocketClient.WEBSOCKET_PACKET_SEGMENT_CONTROL.WEBSOCKET_CLIENT_PACKET_END);
? ? ? ? ? ? ? ? //CrestronConsole.PrintLine("rCode na ping = " + rCode);
? ? ? ? ? ? ? ? // Pokud ping nen¨ª ¨²sp¨§?n?, odpojte a znovu p?ipojte websocket
? ? ? ? ? ? ? ? if (rCode != WebSocketClient.WEBSOCKET_RESULT_CODES.WEBSOCKET_CLIENT_SUCCESS)
? ? ? ? ? ? ? ? {
? ? ? ? ? ? ? ? ? ? CrestronConsole.PrintLine("WSClient Ping failed, reconnecting...");
? ? ? ? ? ? ? ? ? ? DisconnectWebSocket();
? ? ? ? ? ? ? ? ? ? ReconnectWebSocket();
? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? else
? ? ? ? ? ? ? ? {
? ? ? ? ?// ? ? ? ? ? CrestronConsole.PrintLine("WSClient Heartbeat sent: " + heartbeatMessage);
? ? ? ? ? ? ? ? }
? ? ? ? ? ? }
? ? ? ? }
? ? }
? ? public class SerialChangeEventArgs : EventArgs
? ? {
? ? ? ? public short msgType { get; set; }
? ? ? ? public string stringToSplus { get; set; }
? ? ? ? public short shortToSplus { get; set; }
? ? ? ? public SerialChangeEventArgs()
? ? ? ? {
? ? ? ? }
? ? ? ? public SerialChangeEventArgs(short msgType, string stringToSplus, short shortToSplus)
? ? ? ? {
? ? ? ? ? ? this.msgType = msgType;
? ? ? ? ? ? this.stringToSplus = stringToSplus;
? ? ? ? ? ? this.shortToSplus = shortToSplus;
? ? ? ? }
? ? }
? ? public static class SignalChangeEvents
? ? {
? ? ? ? public static event SerialChangedEventHandler onSerialValueChange;
? ? ? ? public static void SerialValueChange(short msgType, string stringToSplus, short shortToSplus)
? ? ? ? {
? ? ? ? ? ? SignalChangeEvents.onSerialValueChange(new SerialChangeEventArgs(msgType, stringToSplus, shortToSplus));
? ? ? ? }
? ? }
}
?
?
?
/*
? SIMPL+ Module Information
? (Fill in comments below)
*/
/*
Dealer Name:
System Name:
System Number:
Programmer:
Comments:
*/
?
/*
? Compiler Directives
? (Uncomment and declare compiler directives as needed)
*/
// #ENABLE_DYNAMIC
// #SYMBOL_NAME ""
// #HINT ""
// #DEFINE_CONSTANT
// #CATEGORY ""?
// #PRINT_TO_TRACE
// #DIGITAL_EXPAND?
// #ANALOG_SERIAL_EXPAND?
// #OUTPUT_SHIFT?
// #HELP_PDF_FILE ""
#DEFAULT_VOLATILE
#ENABLE_STACK_CHECKING
#ENABLE_TRACE
// #ENCODING_ASCII
// #ENCODING_UTF16
// #ENCODING_INHERIT_FROM_PARENT
// #ENCODING_INHERIT_FROM_PROGRAM
?
#HELP_BEGIN
p?¨ªklad url:
ws://192.168.22.126:80/rpc
ws://192.168.0.5:80/ws
?
?
?
#HELP_END
?
?
/*
? Include Libraries
? (Uncomment and include additional libraries as needed)
*/
//#INCLUDEPATH "C:\Crestron\Simpl\usrSIMPL#\WSClient\WSClient\bin\debug"
//#INCLUDEPATH "D:\Crestron\_Projekty\_testiky\WebSocketTest_v01\SIMPLSharp_WebSocketClient_Basic-master\WSClient\bin\Debug"
#INCLUDEPATH "D:\Crestron\_Projekty\_testiky\WebSocketTest_v01\SIMPLSharp_WebSocketClient_Basic-master\WSClient\bin\Release"
?
#USER_SIMPLSHARP_LIBRARY "WSClient"?
?
/*
? DIGITAL, ANALOG and SERIAL INPUTS and OUTPUTS
? (Uncomment and declare inputs and outputs as needed)
*/
DIGITAL_INPUT Connect,Disconnect;?
// ANALOG_INPUT?
STRING_INPUT Url$[256], Message$[65534];?
// BUFFER_INPUT?
?
DIGITAL_OUTPUT ConnectedFb;?
// ANALOG_OUTPUT?
STRING_OUTPUT receivedData$;
?
/*
? SOCKETS
? (Uncomment and define socket definitions as needed)
*/
// TCP_CLIENT
// TCP_SERVER
// UDP_SOCKET
?
?
/*
? Parameters
? (Uncomment and declare parameters as needed)
*/
// INTEGER_PARAMETER
// SIGNED_INTEGER_PARAMETER
// LONG_INTEGER_PARAMETER
// SIGNED_LONG_INTEGER_PARAMETER
// STRING_PARAMETER
?
/*
? Parameter Properties
? (Uncomment and declare parameter properties as needed)
*/
/*
#BEGIN_PARAMETER_PROPERTIES parameter_variable, parameter_variable, ...
? ?// propValidUnits = // unitString or unitDecimal|unitHex|unitPercent|unitCharacter|unitTime|unitTicks;
? ?// propDefaultUnit = // unitString, unitDecimal, unitHex, unitPercent, unitCharacter, unitTime or unitTicks;
? ?// propBounds = lower_bound , upper_bound;
? ?// propDefaultValue = ;? // or, propDefaultValue = "";
? ?// propList = // { "value" , "label" } , { "value" , "label" } , ... ;
? ?// propShortDescription = "status_bar_hint_text";
? ?// #BEGIN_PROP_FULL_DESCRIPTION? line_1...? line_2...? line_n? #END_PROP_FULL_DESCRIPTION
? ?// #BEGIN_PROP_NOTES line_1...? line_2...? line_n? #END_PROP_NOTES
#END_PARAMETER_PROPERTIES
*/
?
/*
? Structure Definitions
? (Uncomment and define structure definitions as needed)
? Note:? Be sure to initialize all declared STRING variables as needed
? ? ? ? ?For example, in Function Main: struct.myString = "";
*/
/*
STRUCTURE MyStruct1
{
};
?
MyStruct1 struct;
*/
?
/*
? Global Variables
? (Uncomment and declare global variables as needed)
? Note:? Be sure to initialize all declared STRING variables as needed
? ? ? ? ?For example, in Function Main: myString = "";
*/
// INTEGER
// LONG_INTEGER
// SIGNED_INTEGER
// SIGNED_LONG_INTEGER
// STRING
MyWebSocket ws;
/*
? Functions
? (Add any additional functions here)
? Note:? Functions must be physically placed before the location in
? ? ? ? ?the code that calls them.
*/
/*
Function MyFunction1()
{
? ? // TODO:? Add local variable declarations here
?
? ? // TODO:? Add code here
}
*/
?
/*
Integer_Function MyIntFunction1()
{
? ? // TODO:? Add local variable declarations here
?
? ? // TODO:? Add code here
?
? ? Return (0);
}
*/
?
/*
String_Function MyStrFunction1()
{
? ? // TODO:? Add local variable declarations here
?
? ? // TODO:? Add code here
?
? ? Return ("");
}
*/
?
/*
? Event Handlers
? (Uncomment and declare additional event handlers as needed)
*/
? ??
PUSH Connect
{
ws.Connect(Url$);
}
?
PUSH Disconnect?
{
? ? ws.DisconnectWebSocket();
}
?
CHANGE Message$
{
? ?ws.SingleSendAndReceive(Message$);?
}
??
Callback Function SocketStatusChange(integer Status)
{
ConnectedFb = Status;
}
EVENTHANDLER _onSerialValueChange(SerialChangeEventArgs e)
{
switch(e.msgType)
{
? ? case(0): { receivedData$ = e.stringToSplus; } //received serial data?
/* case(1): //mainPwr (v promenne e.shortToSplus)
{?
if(e.shortToSplus = 0) { mainPwrIsOn_fb = 0; mainPwrIsOff_fb = 1; }?
else { mainPwrIsOn_fb = 1; mainPwrIsOff_fb = 0; }
}
case(2): { mainBrightness_fb = e.shortToSplus; } //mainBrightness (v promenne e.shortToSplus)
case(3): { mainTransition_fb = e.shortToSplus; } //mainTransition (v promenne e.shortToSplus)
case(4): { mainBlend_fb = e.shortToSplus; } //mainBlend (bs) (v promenne e.shortToSplus)
case(5): { mainPreset_fb = e.shortToSplus; } //mainPreset (v promenne e.shortToSplus)
*/
}
}
? ?
?
?
?
/*
? Main()
? Uncomment and place one-time startup code here
? (This code will get called when the system starts up)
*/
?
Function Main()
{
WaitForInitializationComplete();
? RegisterDelegate(ws, UpdateSocketStatus, SocketStatusChange);
? ? RegisterEvent(SignalChangeEvents, onSerialValueChange, _onSerialValueChange);
}
?
?


Websockets and frames

 

For all the drivers I've written I've had to do lots of http communications with various devices.? However, I've never had to get into the nitty gritty details of WebSockets and formatting strings into frames.? I've been banging my head against the wall with this for a few days so I figured it was time to ask if anyone has any code for sending and receiving strings through a WebSocket that they would be willing to share.? Of course I'm trying to do this with VS2008 so the code will run on a 3 series processor.

Just to tell you how desperate I am I've even asked ChatGPT to write the code but it hasn't come back with anything workable. Not a big surprise?

Thanks in advance for the help

Jay


Re: VX automate / 1Beyond user feedback

 

Thanks for the infos
?
Would you by any chance know your RT60 and S/N ration measurements for your room ??
?
?


Re: VX automate / 1Beyond user feedback

 

We're using two Shure MXA 920s. We treated the room for acoustics so no issues there, but the mic lobe placement was finicky and took some testing. The camera recalling the lobe when it's activated works great, but to get the coverage area tight enough to only grab 1-2 people based on the chairs was where we saw issues. That's where visual AI has helped mitigate those issues.?
?
My experience is as long as your coverage areas from the mic lobes is EXACTLY where it should be, you won't see any issues.?


Re: VX automate / 1Beyond user feedback

 

Hi Marty,
?
What microphones are you using ? and how many of them ? How is your room acoustics ?
?
The feedback i've got from integrators is that, in general, tracking with ceiling mics yield mixed results. Unfortunately we cannot use table mics.?
?
Thx,