Jump to content

Welcome, Guest!

Be a part of CinemaVision today! Once registered and logged in, you will have access to public chat and your own private messenger, you can view and contribute guides, collaborate on the forums, review downloads, give reputation to your fellow members, contribute content and so much more. Registering is quick and completely free, so what are you waiting for?
   Sign In    Sign Up

Become a RedCarpet Club Member Today!

Lorem ipsum dolor sit amet, sea eu causae aperiri periculis, iusto affert soleat an sea, soluta petentium inciderint nec no. Dolorum reprimique ullamcorper sed ad. Ei quo malorum singulis, tota mundi feugait ut pro. Choro utamur inimicus ex sea. Tota dicit te usu. Sea ad erant possim reformidans. An modus detraxit postulant vel. Per no habeo ludus qualisque. Vix legere singulis legendos et, an cum eius soluta accumsan. Facer discere no nec.
   Join Now

Download the Kodi Add-on Today!

Lorem ipsum dolor sit amet, sea eu causae aperiri periculis, iusto affert soleat an sea, soluta petentium inciderint nec no. Dolorum reprimique ullamcorper sed ad. Ei quo malorum singulis, tota mundi feugait ut pro. Choro utamur inimicus ex sea. Tota dicit te usu. Sea ad erant possim reformidans. An modus detraxit postulant vel. Per no habeo ludus qualisque. Vix legere singulis legendos et, an cum eius soluta accumsan. Facer discere no nec.

Slider (4)

Lorem ipsum dolor sit amet, sea eu causae aperiri periculis, iusto affert soleat an sea, soluta petentium inciderint nec no. Dolorum reprimique ullamcorper sed ad. Ei quo malorum singulis, tota mundi feugait ut pro. Choro utamur inimicus ex sea. Tota dicit te usu. Sea ad erant possim reformidans. An modus detraxit postulant vel. Per no habeo ludus qualisque. Vix legere singulis legendos et, an cum eius soluta accumsan. Facer discere no nec.

Slider (5)

Lorem ipsum dolor sit amet, sea eu causae aperiri periculis, iusto affert soleat an sea, soluta petentium inciderint nec no. Dolorum reprimique ullamcorper sed ad. Ei quo malorum singulis, tota mundi feugait ut pro. Choro utamur inimicus ex sea. Tota dicit te usu. Sea ad erant possim reformidans. An modus detraxit postulant vel. Per no habeo ludus qualisque. Vix legere singulis legendos et, an cum eius soluta accumsan. Facer discere no nec.
  • 0
xbmcgotham2014

Automation script command delay

Question

Hi,

Hope someone can assist. I have the attached script made to be triggered to switch on and change certain lights within the room through a home automation box called Homewizard.co.uk however it seems to give random an error. With every run some urls give the following error response, however, it changes, so sometimes the same url is successfully executed and sometimes not when running it again. (please note the url's are working correctly, as I can enter them in an IE browser and execute them without errors.

I have contacted people that know about the Homewizard and they told me that the Home automation box has problems with receiving to much request in a short period of time. So They advice to give after every command a very short pause before going to the next command.

1. So is there a way to add a line of next that would allow me to pause the followup command in the list with x milliseconds?

2. If no pause code can be given in the cinema vision script, is there a way to have the list executed through PHP with a delay? and if so, could someone give me the correct line of code within the PHP script so I can build on that? My knowledge of PHP is limited. :-)

 

The error that is sometimes given:

ERROR: Traceback (most recent call last):
<aantal regels met KODI files geeft hij terug>
ConnectionError: ('Connection aborted.', BadStatusLine(",))

 

many thanks for any help

 

test.cvaction

Share this post


Link to post
Share on other sites

6 answers to this question

Recommended Posts

  • 0
Guest xbmcgotham

Thanks so much guys!! It worked. I added the

sleep://500

code after every action/command and made sure to have an empty row above and below it.

That solved all the errors. :-)

Share this post


Link to post
Share on other sites
  • 0

Hello,

I'm not sure if this will work by try placing 

time.sleep(1)

between each of the commands.  This is Python and since the plugin is written in python it might work, I have not personally tried it but give that a test.  The number is within seconds.  Give this a test and let me know.  If it does not work possibly @Ragnarok may know of how to accomplish this.

Share this post


Link to post
Share on other sites
  • 0

Thanks guys!! Appreciated. :-)

I am going to read through the guide and test is.

 

May I assume that the sleep command will also be on a command line separated by a single line above and below?

 In coding, what would be generally a good amount of milli seconds to start of with while testing? 

Share this post


Link to post
Share on other sites
  • 0

Hello Gotham,

I would just put it on a new line and it should be good.  I would see if you can find out what the recommended time between commands is from your devices manufacture.  They can tell you so that you can say ok they say wait about half a second, then to be safe I would be just a little over half a second to be on the safe side.  Also a half second is usually a good starting point I find anyway.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

About Us

CinemaVision began in 2014 as a collaboration to create content for use with your home theater, offering movie trivia slides and video bumpers. It has since grown to be THE PREMIER WAY to create and customize your preshow experience. Download the CinemaVision add-on for Kodi today from the official Kodi repository, and easily create a sequence of trivia, videos, trailers, home automation triggers and more that will bring the experience of a movie theater straight to your screen!

×

Important Information

By using this site, you agree to our Guidelines and Terms of Use.