No announcement yet.

MCSMovement Scripts command line parameters ?

  • Filter
  • Time
  • Show
Clear All
new posts

  • MCSMovement Scripts command line parameters ?

    Can you pass command line arguments to scripts inside MCSMOVEMENT similar to how you can in H.S. Events?

    i.e. I have a script that i call from H.S. event that takes a command line argument Main(Param)..

    on the event screen.. it has:
    <TABLE cellSpacing=1 cellPadding=0 width=0% border=0><TBODY><TR><TD class=tablecellactiontext noWrap align=right>Optional parameters (function,param)
    ie: ("main","lights")</TD><TD><TEXTAREA class=formtext name=script_parms cols=40>("main","q9:7im:100")</TEXTAREA></TD></TR></TBODY></TABLE>

    Is there a similar possibility for mcsmovement?

    If not.. np... i'll just have to have Non-Generic Scripts called from within plugin... a bit of a management issue... but not bad..

    BTW... I LOVE MCSMOVEMENT... after downloading and using it for a few hours.. i can see Great potential for saving me time and energy in configuration and scripting.

    Thank you,


    Andrew B.

  • #2
    The scripts that are called by mcsMovement based upon a status change are called with the device name as the parameter. I did not setup a mechanism to allow a user enter a parameter to the script, but technically easy to do. Can you describe a scenario where something like this would be used?


    • #3

      I have a generic script that i call on movement (or any event where i want a monostable (555 timer term) output)

      it turns on a light. <DEV>.. and sets a new timed event in <X> minutes to turn the light off.

      The Device Code <DEV> and delay <X> are passed to the script...

      This lets me have several events...

      Garage door opens ... Turns Garage lights on for 10 minutes.. then back off

      Motion detector Back yard.. turns Spotlights on for 5 minutes then back off.

      Motion detector basement.. turns Basement lights on for 2 minutes then back off.

      Each event calls same script ... just with different parameters.. (Q3,10 for first one.... Q2,5 for second one... etc..)

      It isn't a big deal.. i could just as easily do individual scripts with the parameters hardcoded... ... but then if i change the logic in how i want to handle this routine event... i need to change all individual scripts .. instead of just one master script..

      Just a thought..

      And again... thank you for devoting the time to this.. It is a boon.


      Andrew B.


      • #4
        The parameter is added to Version 1.10.0

        When a script is called and a non-blank parameter is specified then the parameter is suffixed to the device name using a semicolon delimiter. A blank parameter will not contain the semicolon delimiter so not to break existing scripts.


        • #5
          Thank you

          Andrew B.