Author Topic: Here are some Tips for iTach, IR and UI7  (Read 2495 times)

Offline parkerc

  • Sr. Hero Member
  • ******
  • Posts: 2324
  • Karma: +32/-44
  • Life Moves Pretty Fast....
    • Node Central
Re: Here are some Tips for iTach, IR and UI7
« Reply #15 on: September 08, 2017, 04:02:29 am »
I also noticed you can close the connection too early and Monoprice will just stop processing the commands you sent.  So I put a sleep in before the closing of the socket particularly if you are sending a bunch of commands (I break them in to no more than 6 commands in a row than sleep for a second, etc).  Definitely sleep before you close the socket if sending more than 4 or 5 commands.

Hi @shallowearth

just an FYI - I understand from reading other threads that luup.sleep is not the best thing to use as it can cause restarts.

Offline shallowearth

  • Hero Member
  • *****
  • Posts: 905
  • Karma: +42/-9
Re: Here are some Tips for iTach, IR and UI7
« Reply #16 on: September 08, 2017, 11:53:18 am »
I haven't seen any restarts using that code on my Vera edge.  It has been very stable.  But The sleeps are very short and could probably be reduced even further, if you see instability.  General the sleep commons is s problem of you are talking long sleeps.  This is just a second pause to allow the itach to catchup.