LinuxMCE Forums
General => Users => Topic started by: mikeybs 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?
-
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
-
mikeybs,
easiest is: Watch dcerouter.log when you trigger the scenarios from the Orbiter. It will be two messagesend that you can use.
-
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>
-
I'm having a hard time figuring out what the "Execute Command Group message of the DCERouter device" is...
I have found the PK_CommandGroup for all of the items in the CommandGroup table I am interested in.
There are so many tables dealing with devices/commands/command_groups, it is hard to figure out how to connect them all together.
I know that my DCERouter is device 2, but I am not sure how to get a list of the commands it is capable of and their IDs.
I have been able to successfully turn individual lights on/off using MessageSend using the information in dcerouter.log.. I just can't figure out how to execute the command groups.
Any help would be appreciated. Thank you very much for the assistance provided so far.
-
Welcome to the club of the seekers :-)
Go into web admin, change your view to the device list (left hand side bottom), and click on the DCERouter device. On the right hand you will find a small button 'Send Command' ... click it, and smile :)
-
yay! thank you so much posde
smile I did...
-
Glad to be of help ... and to produce a smile :)
-
I'd like to be able to run MessageSend from another linux host. I tried to just copy the binary to the other linux host, but when I try to run it I get:
./MessageSend
-bash: ./MessageSend: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
Can I compile this on the other linux host without too much difficulty?
Right now I am using ssh keys to execute the MessageSend commands on the linuxmce core, but there is a delay while the ssh login takes place.... it would be nice to have the scenarios execute faster...
-
figured it out myself... simple recipe
svn checkout http://svn.linuxmce.org/svn/trunk/src/
cd src/MessageSend
make
in case anyone else is interested....
thanks again for all the help... and the smiles :)