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.

LM Ambient with GC-WF2IR
#21
(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.
BR,
Mr.D
Reply
#22
You can also add some logging to see what's going on between devices:
Code:
123456789101112131415161718192021222324
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
Reply
#23
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?
BR,
Mr.D
Reply
#24
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.
Reply
#25
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:
1234
if cmd then   tcpsend(cmd)   tcpsend(cmd) end
Reply


Forum Jump: