¿ªÔÆÌåÓý

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

New vs Old Program logic - logic running too many times

 

the following Simp+ code is intended to set flags and send a command to console to retrieve data. During the "change Console_Rx$" I have placed several flags to prevent if already processing data, only running an event once until Initialize button is triggered again but once triggered the data is being received from Console_Rx$ the logic is running anywhere from 7-10 times. The debugger Print statement confirms that the flags are reset to "0" but the logic continues to trigger without setting flags to 1.?
What am I missing here?
?
#DEFINE_CONSTANT MAX_LINES 18
#DEFAULT_VOLATILE
#ENABLE_STACK_CHECKING
#ENABLE_TRACE

DIGITAL_INPUT Initialize;
?
BUFFER_INPUT Console_Rx$[3000];?
DIGITAL_OUTPUT NewProgram, ExistingProgram;
STRING_OUTPUT Console_Tx$;
// global variables
STRING ParsedLines[20][100], tempSource$[100], tempCompiled$[100], accumulatedData$[56534];?
INTEGER i, savedFile, savedDate, iFlag, iFlagConditionals, iCheck;
NONVOLATILE STRING savedFile$[100], savedDate$[100];
push Initialize
{
? ?//reset flags before data to be processed
? ?iFlag = 1;
? ?iFlagConditionals = 1;
? ?iCheck = 1;
? ?accumulatedData$ = "";
? ?Console_Rx$ = "";
? ?
? ?//clear array at startup
? ?for (i = 1 to MAX_LINES)
? ?{
? ? ? ParsedLines[i] = "";
? ?}
? ?makestring(console_tx$, "PROGCOMMENTS:%d\n", GetProgramNumber());
}
change Console_Rx$
{
? integer isProcessing, lineIndex, lineStart, lineEnd;;
? isProcessing = 0;
??
? // Check if the handler is already processing data
? if (isProcessing = 1)?
? {
? ? return;
? }
? isProcessing = 1;
? // If incoming data is empty, avoid execution
? if (len(Console_Rx$) = 0)?
? {
? ? iFlag = 0;
? ? iFlagConditionals = 0;
? ? iCheck = 0;
? ? isProcessing = 0;
? ? return;
? }
? // Set default variable values
? lineIndex = 1;
? lineStart = 1;
? lineEnd = 0;
? // Append incoming data into a single string and clear Console_Rx$
? while (len(Console_Rx$) > 0 && iCheck = 1)?
? {
? ? accumulatedData$ = accumulatedData$ + Console_Rx$;
? ? // Adding a small delay for debounce to allow incoming data to stabilize
? ? Delay(10); // Wait for 10ms to allow data accumulation to stabilize
? ? Console_Rx$ = ""; // Clear buffer immediately after appending
? ? if (find("Friendly Name:", accumulatedData$, 1))?
? ? {
? ? ? iCheck = 0;
? ? }
? }
? if (iFlag = 1)?
??
? {
? ? // Create an array of incoming string
? ? while (lineStart <= len(accumulatedData$)) {
? ? ? lineEnd = find("\x0D\x0A", accumulatedData$, lineStart);
? ? ? if (lineEnd > 0) {
? ? ? ? ParsedLines[lineIndex] = mid(accumulatedData$, lineStart, lineEnd - lineStart);
? ? ? ? lineStart = lineEnd + 2;
? ? ? ? lineIndex = lineIndex + 1;
? ? ? }?
? ? ? else?
? ? ? {
? ? ? ? break;
? ? ? }
? ? ? if (lineIndex > MAX_LINES)?
? ? ? {
? ? ? ? break;
? ? ? }
? ? }
? ? // Search array for specific parameters
? ? for (i = 1 to MAX_LINES) {
? ? ? if (find("Program File:", ParsedLines[i], 1))?
? ? ? {
? ? ? ? tempSource$ = mid(ParsedLines[i], 15, len(ParsedLines[i]) - 14);
? ? ? }
? ? ? if (find("Compiled On:", ParsedLines[i], 1))?
? ? ? {
? ? ? ? tempCompiled$ = mid(ParsedLines[i], 14, len(ParsedLines[i]) - 13);
? ? ? }
? ? }
? ? print("Saved File: %s\r", savedFile$);
? ? print("Saved Date: %s\r", savedDate$);
? ? print("Current File: %s\r", tempSource$);
? ? print("Current Date: %s]\r", tempCompiled$);
? ? if (iFlagConditionals = 1)?
? ? {
? ? ? // Determine if new or existing data
? ? ? if (tempSource$ = savedFile$)?
? ? ? {
? ? ? ? savedFile = 1;
? ? ? } else {
? ? ? ? savedFile = 0;
? ? ? ? savedFile$ = tempSource$;
? ? ? }
? ? ? if (tempCompiled$ = savedDate$)?
? ? ? {
? ? ? ? savedDate = 1;
? ? ? } else {
? ? ? ? savedDate = 0;
? ? ? ? savedDate$ = tempCompiled$;
? ? ? }
? ? ? // Compare values to determine feedback
? ? ? if (savedFile = 1 && savedDate = 1)?
? ? ? {
? ? ? ? NewProgram = 0;
? ? ? ? ExistingProgram = 1;
? ? ? } else {
? ? ? ? ExistingProgram = 0;
? ? ? ? NewProgram = 1;
? ? ? }
? ? ? // Set flag to indicate data has been processed
? ? ? iFlag = 0;
? ? ? iFlagConditionals = 0;
? ? ? // Clear accumulatedData$ after processing
? ? ? accumulatedData$ = "";
? ? }
? }
? print("End of Command: iFlag is %d and iFlagConditional is %d\r", iFlag, iFlagConditionals);
? // Release the processing lock
? isProcessing = 0;
}
FUNCTION MAIN()
{
? //set startup global variables
? iFlag = 0;
? iFlagConditionals = 0;
? accumulatedData$ = "";
? WaitForInitializationComplete();?
}


Re: Looking for Ben Street

 

Looks like he is on LinkedIn.


On Fri, Nov 15, 2024 at 10:35?AM Deuterios via <OSCAR7EMAIL=[email protected]> wrote:
Hello, i am looking for a programmer going by Ben Street name, for a Restaurant job he did in Miami FL, if anybody knows him please reach out.
?
Thanks


Looking for Ben Street

 

Hello, i am looking for a programmer going by Ben Street name, for a Restaurant job he did in Miami FL, if anybody knows him please reach out.
?
Thanks


Re: Floor Heating Tstat, Hi-Volt thats Integratable

 

¿ªÔÆÌåÓý

Thanks Chris.

I've just been a firm believer for a long time that there are great IoT devices out there, that have some incredible functionality, and can really enhance a smart home.? And, Just because Crestron wants everything in a smart home to be purchased from them, that shouldn't be a barrier to adoption.? Even if the lack of margins on these devices keep them from being used on many customer projects, Crestron programmers, with a system in their own homes, can save a boatload of money compared to Crestron products.? And, once programmers become comfortable with these devices in their own home, they can be used in limited ways in customer systems to add special functionality.?

That being said I still think Crestron makes some great products.? I have CLW light switches throughout my home and the ability to customize the button configurations and engrave them is still a significant differentiator when compared to off the shelf smart switches.? I also think that Crestron will eventually come out with a Matter gateway for Crestron systems.? In this way they can monetize dealers adding consumer IoT devices into a Crestron system.

For those that want to dip their toe into the waters of consumer IoT devices, I would recommend looking at the Aqara FP2 presence sensor.? The product is a game changer when it comes to what you can do wrt presence sensing in a room.? Its use of mmWave radar allows you to setup zones in a room and detect when people are in a specific zone, not just in the room.? You can create all kinds of automations based around that knowledge.? For example, you could create a detection zone in front of a gas fireplace and shut the fireplace down when someone approaches it.? This could save a toddler from significant burns if they are attracted by the flames of the fireplace when someone isn't watching. You could also setup detection zones on either side of a bed and dimly light pathway lights to the bathroom if someone gets up at night.? But, the lights won't get turned on if there is movement in the bed itself.? Finally, the FP2 is so sensitive it can detect the movement of someone breathing while they are asleep.? So, you can truly know if a room is occupied or not.? All of this is impossible with a standard presence/motion detector.? The only downside to the FP2 is that it isn't battery powered, it has to be wired to an outlet.

Here is an article I wrote on it:

You can find all the drivers I've written, including the Crestron-Hubitat driver on my github:

Thanks again

Jay

On 11/15/2024 6:23 AM, ckangis via groups.io wrote:

As always, Thanks to Brian and Jay...
?
I hope that we can do some testing for a good floor heat TStat and find a decent solution for these kinds of things. Hubitat and Home Assistant increasingly seem to be the way we will need to interface to things that we never (in the past) would have considered worthy of using but now may be our only solutions!!
?
And especially a big shout out to Jay who has singularly led the charge in developing and testing these things.
I highly recommend his resources and think that others should try them and send him some $$$!!...:)


Re: Floor Heating Tstat, Hi-Volt thats Integratable

 

As always, Thanks to Brian and Jay...
?
I hope that we can do some testing for a good floor heat TStat and find a decent solution for these kinds of things. Hubitat and Home Assistant increasingly seem to be the way we will need to interface to things that we never (in the past) would have considered worthy of using but now may be our only solutions!!
?
And especially a big shout out to Jay who has singularly led the charge in developing and testing these things.
I highly recommend his resources and think that others should try them and send him some $$$!!...:)


Re: C9300 Multicast flooding to NVXs

 

Hi!? ?I had a similar circumstance.? ?It turned out that I needed to turn of spanning tree protocol on all NVX ports and the problem was gone.


Re: C9300 Multicast flooding to NVXs

 

Did you update the firmware? Older ones had issue with NO TCN FLOOD commands not working properly. Although that will require a topology change, such one of the switches dropping and reconnecting.?


Re: C9300 Multicast flooding to NVXs

 

Thanks Both!?Appreciate the help!
?
I will take alook at that video.
?
Perhaps maybe I will test by moving the querier on to the access switch, where most of these encoders and decoders are and not the core.
?
I have "no igmp snooping tcn flood" applied to all the access ports for devices on this vlan, I have a few other devices on other vlans on this switch should I apply it here as well and o I need it on the uplinks as well?
?
Uplink bandwidth seems fine no drops or anything there, issue is with the access ports where these devices connect just seem to receive a burst of traffic at random times filling up the buffers and dropping the packets but could go hours and hours without issue.
?


Re: C9300 Multicast flooding to NVXs

 

¿ªÔÆÌåÓý

So two things...

L2 Multicast will always go to the querier, best practice in simple configurations IME is to have the querier on the switch hosting the majority of encoders and you may need to make sure the uplinks are sized accordingly...

Second you need to disable flooding on a STP topology change notification (TCN). I'm sitting at a hotel restaurant right now but IIRC it's" no span tcn flood" applied to every interface.

If I weren't on mobile I'd give the dissertation for why this is the default but my thumbs are tired ?

Get


From: [email protected] <[email protected]> on behalf of JossNolie via groups.io <joss.nolan@...>
Sent: Thursday, November 14, 2024 4:05:54 PM
To: [email protected] <[email protected]>
Subject: [crestron] C9300 Multicast flooding to NVXs
?
Hi,
?
I am working on a project to implement Creston NVXs, Q-Sys etc, I work on the network side so don't 100% understand all of it. We are having an issue where ports connected to NVX-D30 at random point during the day and night get flooded with traffic, overwhelming port causing traffic to drop therefore the display flick. We can go hours with out issue, there no real pattern to when and why it occurs. Network consists C9300 connected to C9500 core where the igmp querier is. This AV kit sits on its own vlan. Snooping and immediate leave are enabled. No matter how much QoS I put on the put it still falls over. Has anyone see this kind of this before? or has some example config in which might help? I am lost on what it could be. Any help would much appreciated.

Happy to share more logs and config.
From the 9300:
Vlan 703:
--------
IGMP snooping ? ? ? ? ? ? ? ? ? ? ? : Enabled
Pim Snooping ? ? ? ? ? ? ? ? ? ? ? ?: Disabled
IGMPv2 immediate leave ? ? ? ? ? ? ?: Enabled
Explicit host tracking ? ? ? ? ? ? ?: Enabled
Multicast router learning mode ? ? ?: pim-dvmrp
CGMP interoperability mode ? ? ? ? ?: IGMP_ONLY
Robustness variable ? ? ? ? ? ? ? ? : 2
Last member query count ? ? ? ? ? ? : 2
Last member query interval ? ? ? ? ?: 1000
Topology change ? ? ? ? ? ? ? ? ? ? : No


IP address ? ? ? ? ? ? ? : 10.16.203.1
IGMP version ? ? ? ? ? ? : v2
Port ? ? ? ? ? ? ? ? ? ? : Po1
Max response time ? ? ? ?: 10s


Re: C9300 Multicast flooding to NVXs

 

Sounds like something we were kinda running into on some Aruba switches too. I don't know what the Cisco equivalent is, but it could be related to this:
https://www.youtube.com/watch?v=BqlGlY8GjNM


Re: Toolbox on a Macbook Pro via Parallels

 

I have been running Crestron software on Mac computers since 1990 using a variety on means. I've been using Parallels since Intel Macs and am now running it on an M3 MacBook Pro. USB is problematic, but networking over WiFi or Ethernet works fine, but there are some cavitates. As mentioned previously the default is Shared Networking where Windows has a private address using NAT. However, if you select Bridged Network, Windows will obtain an address on the same subnet as the Mac, either via WiFi or Ethernet, and the menu allows you to select from which or Default, so it is possible to use say WiFi for Wan connectivity and Ethernet for whatever you doing with Toolbox.
?
However, in all the above options Windows will default to DHCP. So, if you want to discover devices on a particular subnet, especially if you don't have a DHCP server, you will want to dive into Windows and set a static IP address on the same subnet as the static address that you've set on your Ethernet adaptor (when you are in Bridged Network using an Ethernet adaptor). Don't forget to set it back to DHCP when you have finished or you'll wonder why you can connect to anything.?
?
As an aside, I've never has so much freedom with the M3 Mac, I can work all day on Crestron stuff without having to worry about know much battery is left, phenomenal.
?
Lindsay


Re: Toolbox on a Macbook Pro via Parallels

 

Oh, right on, great to know.? I either missed that possibility completely, or gave up before that became an option.

My long term favored solution has?just been to?dedicate a Windows machine for running Crestron software, and then control it on the MacBook from remote desktop (such as with Jump Desktop or another app that makes remoting into Windows as pleasant as possible).? Each thing I "must" use Windows for, generally gets its own dedicated laptop, or one of those cheap fanless mini-PC's you can get on Amazon with Windows pre-installed.

Mike


On Thu, Nov 14, 2024 at 3:17?PM Eric Luckart via <eluckart=[email protected]> wrote:
Mike, you can run the wifi in bridged mode. I did this for over 10 years on several MacBook's. The only system I ever had an issue with is Ruckus. By default they prevent this. A simple command on the ZD or Master AP and it will work.






Re: Toolbox on a Macbook Pro via Parallels

 

Mike, you can run the wifi in bridged mode. I did this for over 10 years on several MacBook's. The only system I ever had an issue with is Ruckus. By default they prevent this. A simple command on the ZD or Master AP and it will work.


Re: Toolbox on a Macbook Pro via Parallels

 

The problem you are having isn't normal. I ran a few different MacBook's until they went away from Intel, I never had the issue you are having. Try changing your network settings.


Re: Toolbox on a Macbook Pro via Parallels

 

The operative issue here is how you connect to the network.? Also, WiFi and Ethernet have two different stories and two different solutions.

For the purposes of this message, caution for similar terminology:? "MAC" does not mean the same thing as "MacBook".? "MAC address" is the unique 12-hex-digit number that is burned into the network adapter at manufacture, and applies to all network adapters, whether WiFi/Ethernet/MacOS/Windows.

Anyway -- If you are connecting via WiFi, you are going to struggle to get a Parallels?VM to connect to the network without restriction, unless you 1) use an external USB WiFi adapter and 2) let Windows operate it directly by assigning the USB port directly to the VM.? This is because your Windows virtual machine is normally going to get a private IP address using NAT, behind the MacBook (as though the MacBook is a router) and it won't have its own IP address on the target network, nor direct access to scan it.? There is no way around this, when sharing the MacBook's WiFi adapter.

On Ethernet, it's conceptually possible for one Ethernet connection to present multiple hosts (each with their own MAC address) to the network...on WiFi, this is not allowed, each WiFi adapter makes its own connection and gets one IP associated with its single MAC address.? So to reiterate the solution, you'd use a second WiFi adapter over USB, which has a separate MAC address, and let Windows drive this second WiFi adapter directly, by assigning the USB port to the virtual machine.? The MacBook won't know anything about it, other than that it is just a USB device that is forwarded into the VM.

If it's Ethernet, there's less of a struggle, because you are allowed to configure the virtual machine to be "bridged" to the system ethernet connection and have the MacBook present two MAC addresses to the network simultaneously.? Bridging is not the default network configuration for Parallels, you must manually configure that in Parallels options.? But when successful, you'll have two IP addresses on the local network...one for Mac OS, the other for Windows.

Mike






On Thu, Nov 14, 2024 at 1:05?PM Chris Armenta via <info=[email protected]> wrote:
Has anyone been able to successfully run Toolbox on a Macbook Pro via Parallels?
?
I know this question has been asked in a previous thread from a few years ago, but I was hoping there would be some new info/success stories available.
Toolbox opens just fine and I can see all of the Crestron devices in the system. However, I can't connect to anything, be it through Device Discovery or the Address Book. I've tried every setting suggestion in the old thread and it still won't allow me to connect to any devices. Is this a settings issue on the Macbook Pro side? Or is this a Parallels-Windows issue that hasn't/can't been solved? If so, is anyone using a differnt software-VM combo that will work on my Macbook Pro? Heres what I'm using:
?
2018 Macbook Pro 15"
OS: Ventura 13.7.1
Processor: 2.9 GHz 6-Core Intel Core i9 processor
Parallels with Windows 10 VM
?
Thank you in advance for any help or solutions!
?
?


Re: Toolbox on a Macbook Pro via Parallels

 

¿ªÔÆÌåÓý

Have been running Parallels on all machines running back to 2014 after I was tired of getting the blue screens of death on Dell computers.? Haven¡¯t had any issues other than on my 21 32GB M1 16¡± MBP with just USB devices. Some devices work no issues and others don¡¯t.? Haven¡¯t had to do anything particular to get it all to work.

?

Pat M

?

?

From: "[email protected]" <[email protected]> on behalf of "Chris Armenta via groups.io" <info@...>
Reply-To: "[email protected]" <[email protected]>
Date: Thursday, November 14, 2024 at 3:05?PM
To: "[email protected]" <[email protected]>
Subject: [crestron] Toolbox on a Macbook Pro via Parallels

?

Has anyone been able to successfully run Toolbox on a Macbook Pro via Parallels?

?

I know this question has been asked in a previous thread from a few years ago, but I was hoping there would be some new info/success stories available.

Toolbox opens just fine and I can see all of the Crestron devices in the system. However, I can't connect to anything, be it through Device Discovery or the Address Book. I've tried every setting suggestion in the old thread and it still won't allow me to connect to any devices. Is this a settings issue on the Macbook Pro side? Or is this a Parallels-Windows issue that hasn't/can't been solved? If so, is anyone using a differnt software-VM combo that will work on my Macbook Pro? Heres what I'm using:

?

2018 Macbook Pro 15"

OS: Ventura 13.7.1

Processor: 2.9 GHz 6-Core Intel Core i9 processor

Parallels with Windows 10 VM

?

Thank you in advance for any help or solutions!

?

?


Re: Toolbox on a Macbook Pro via Parallels

 

I have not been using Parallels, but duel boot instead.? It can be a little pain to reboot if you need the MAC side, but I have not have any issues at all using the Macbook running windows with Bootcamp....? ?


C9300 Multicast flooding to NVXs

 

Hi,
?
I am working on a project to implement Creston NVXs, Q-Sys etc, I work on the network side so don't 100% understand all of it. We are having an issue where ports connected to NVX-D30 at random point during the day and night get flooded with traffic, overwhelming port causing traffic to drop therefore the display flick. We can go hours with out issue, there no real pattern to when and why it occurs. Network consists C9300 connected to C9500 core where the igmp querier is. This AV kit sits on its own vlan. Snooping and immediate leave are enabled. No matter how much QoS I put on the put it still falls over. Has anyone see this kind of this before? or has some example config in which might help? I am lost on what it could be. Any help would much appreciated.

Happy to share more logs and config.
From the 9300:
Vlan 703:
--------
IGMP snooping ? ? ? ? ? ? ? ? ? ? ? : Enabled
Pim Snooping ? ? ? ? ? ? ? ? ? ? ? ?: Disabled
IGMPv2 immediate leave ? ? ? ? ? ? ?: Enabled
Explicit host tracking ? ? ? ? ? ? ?: Enabled
Multicast router learning mode ? ? ?: pim-dvmrp
CGMP interoperability mode ? ? ? ? ?: IGMP_ONLY
Robustness variable ? ? ? ? ? ? ? ? : 2
Last member query count ? ? ? ? ? ? : 2
Last member query interval ? ? ? ? ?: 1000
Topology change ? ? ? ? ? ? ? ? ? ? : No


IP address ? ? ? ? ? ? ? : 10.16.203.1
IGMP version ? ? ? ? ? ? : v2
Port ? ? ? ? ? ? ? ? ? ? : Po1
Max response time ? ? ? ?: 10s


Re: Toolbox on a Macbook Pro via Parallels

 

Ok great, thank you for that info!
I will definitely try VMWare Fusion Pro, because I am sick and tired of carrying 2 laptops with me everywhere I go. ??


Re: Toolbox on a Macbook Pro via Parallels

 

Chris, I have been using Toolbox on my Macbook Pro via VMWare Fusion Player for about 2 years now.? It works great, as long as I don't try to connect via USB cable directly to the device.? VMWare does not support the driver needed for the USB cable to communicate to the device.
?
I just saw that Workstation Player and Fusion Player have been discontinued, but VMWare Fusion Pro is free for personal use.? It's available from Broadcom.? You would need to re-install your Windows, though.