Author Topic: using a script to launch scenarios  (Read 111 times)

mikeybs

  • Regular Poster
  • **
  • Posts: 47
    • View Profile
using a script to launch scenarios
« on: April 15, 2014, 10:02:35 am »
I'd like to be able to trigger my predefined lighting and media scenarios with external scripts

I've read a bit about /usr/pluto/bin/MessageSend

but I'm not sure if that is what I am looking for or if that can only be used to update  status rather than make the events happen

can anyone offer me any advice on how this is best accomplished?

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5476
  • DOES work for LinuxMCE.
    • View Profile
Re: using a script to launch scenarios
« Reply #1 on: April 15, 2014, 05:00:09 pm »
MessageSend can be used for what you want to do.

MessageSend can send ANY message that DCE can properly consume, this includes commands and events.

For what you want, you'll need the Execute Command Group message of the DCERouter device, passing it the PK_CommandGroup to execute (CommandGroups are the internal name for Scenarios).

-Thom

posde

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2846
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: using a script to launch scenarios
« Reply #2 on: April 16, 2014, 09:50:23 am »
mikeybs,

easiest is: Watch dcerouter.log when you trigger the scenarios from the Orbiter. It will be two messagesend that you can use.

mikeybs

  • Regular Poster
  • **
  • Posts: 47
    • View Profile
Re: using a script to launch scenarios
« Reply #3 on: April 17, 2014, 08:06:12 am »
here is what I see when I click on one of my lighting scenarios in my web orbiter

it just shows the individual messages to each device, it doesn't show what command group was executed...

will I have to send messages to each device individually?

maybe I need to increase the verbosity of my logs in order to see command group information?


DCERouter.log
08   04/17/14 2:00:21.315      Received Message from 56 (myweb2orbiter / ) to 79 (Ceiling Lights / Home Theater), type 1 id 184 Command:Set Level, retry none, parameters: <0x7a18ab40>
08   04/17/14 2:00:21.315        Parameter 76(Level): 45 <0x7a18ab40>
08   04/17/14 2:00:21.317      Received Message from 56 (myweb2orbiter / ) to 78 (Daybed Lights / Home Theater), type 1 id 184 Command:Set Level, retry none, parameters: <0x7a18ab40>
08   04/17/14 2:00:21.317        Parameter 76(Level): 45 <0x7a18ab40>
08   04/17/14 2:00:21.319      Received Message from 56 (myweb2orbiter / ) to 81 (Lamp / Home Theater), type 1 id 184 Command:Set Level, retry none, parameters: <0x7a18ab40>
08   04/17/14 2:00:21.320        Parameter 76(Level): 50 <0x7a18ab40>
08   04/17/14 2:00:21.321      Received Message from 56 (myweb2orbiter / ) to 80 (Window Lights / Home Theater), type 1 id 184 Command:Set Level, retry none, parameters: <0x7a18ab40>
08   04/17/14 2:00:21.321        Parameter 76(Level): 45 <0x7a18ab40>