Logic Machine Forum
LM Ambient with GC-WF2IR - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8)
+--- Thread: LM Ambient with GC-WF2IR (/showthread.php?tid=335)

Pages: 1 2


RE: LM Ambient with GC-WF2IR - Mr.D - 17.12.2018

(17.12.2018, 12:27)admin Wrote: Basically you need to add collectgarbage('collect') after tcpsend(cmd). You can set sleep time to 0.

Thanks Smile
Ill give this a try.... unfortunately I will not know for sure if this fixes my problem until a couple of days.

I will post back if this fixes the issue, others might experience the same thing.


RE: LM Ambient with GC-WF2IR - admin - 17.12.2018

You can also add some logging to see what's going on between devices:
Code:
function tcpsend(cmd, retry)
  local sock = tcpconnect()

  if sock then
    local res, err = sock:send(cmd)

    if res then
      res, err = sock:receive()
      if res then
        alert('receive ok: %s', tostring(res))
      else
        alert('receive failed: %s', tostring(err))
      end
    else
      alert('send failed: %s (retry: %s)', tostring(err), tostring(retry))
    end

    -- send failed, retry once
    if not res and not retry then
      tcpclose()
      tcpsend(cmd, true)
    end
  end
end



RE: LM Ambient with GC-WF2IR - Mr.D - 03.01.2019

This fixed the issue, or at least I have not encountered any communications errors Smile
However, I am experiencing some really high loads on my CPU/IO because of this script...
When disabling the script the load goes down fairly quickly, this is why I am pretty sure the high load is related to this script.
PS: The load do go up and down at times, so it is not always causing a high load.... and I do not know why this is the case.

Any suggestions?


RE: LM Ambient with GC-WF2IR - Sumit - 30.01.2020

Hi,
I have integrated one Philips Blu-Ray and Epson Projector with Global Cache GC-100-06 and Logic Machine LM5.
IR code we have learned from remote of respective devices directly.
But the response is either slow or we have to double tap on the commands like for play button we are sending command only one time but to pause we have to send command twice or vice versa.
Again commands like 2x to 4x and using arrow commands we have to press multiple time for a single commands which sometime works and sometimes does not.


RE: LM Ambient with GC-WF2IR - admin - 30.01.2020

Maybe the IR signal is weak and the end devices do not always receive it? You can send each command twice by modifying the script:
Code:
if cmd then
  tcpsend(cmd)
  tcpsend(cmd)
end