This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Some assistance needed to improve HTTP call efficiency
#3
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..
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!
Reply


Messages In This Thread
RE: Some assistance needed to improve HTTP call efficiency - by Paddyb - 22.02.2021, 11:02

Forum Jump: