Thanks, Admin. I knew about the MQTT possibilities but was trying to avoid it if possible. I didn't want to set up another server to run MQTT for the sake of some feedback on my visualizations. I can't use any of the new LM firmware either (which has MQTT on board), as my device is a SHAC from Schneider, not a standard-issue LM.
Anyways, following your tip, I eliminated a lot of bogus events and have reached an acceptable solution and level of performance. Checking for an 'sr' event didn't actually work for me, but after a bit of logging and debugging, I found the correct events for my device that I needed to act on, or ignore, as needed..
I put this at the start of each individual Event script, and now it is no longer re-triggered by my resident script..
Thank you!
Anyways, following your tip, I eliminated a lot of bogus events and have reached an acceptable solution and level of performance. Checking for an 'sr' event didn't actually work for me, but after a bit of logging and debugging, I found the correct events for my device that I needed to act on, or ignore, as needed..
I put this at the start of each individual Event script, and now it is no longer re-triggered by my resident script..
Code:
log ("Event Sender : ", event.sender) -- Inspect the sender - Returns 'cb' if a real event from cbus bus or 'cl' if it came from my resident script
-- Do nothing if this event has been caused by a 'cl' event
if event.sender == 'cl' then
log ("Bailing out...")
return -- Script exits here, the rest is ignored
end
Thank you!