Author Topic: How to display messages on MD's  (Read 2541 times)

ddamron

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 962
    • View Profile
    • My LinuxMCE User Page
Re: How to display messages on MD's
« Reply #15 on: January 16, 2008, 08:15:07 am »
Thanks for the section of source code, I added it to the wiki page.  I wanted to also put a word out for bulek who posted several messages which I tried to consolidate to a single page.

I see you are trying to get the little box in the corner, and not a full page to pop up.

Am I missing something here, why can you not send something like this.

/usr/pluto/bin/MessageSend dcerouter -targetType category -bl 5 1 5 1 809 251 0 9 "TESTING DISPLAY ALERT" 182 15 70 "test"
server= dcerouter
targetType= Category (device category found on template page)
-bl= 5 broadcast level 5 or whole house
Device from= 1 is the core
Device to = 5 (actually device category 5 orbiters)
command 809 with it parameters

I was able to send this to all of my orbiters.  I did not play with the parameters much, but it worked.

I hope this is what you are looking for.
Rob


Rob,
That's exactly what I'm trying to do.. but in Ruby...
The Ruby Command Object doesn't allow for the switches..
-bl=5 ..

Been pulling my hair out on this all day...

Thanks for the reply!

Maybe you can come up with another method??  Is there a command I can send to 'set' that flag??

Regards,

Dan
The only intuitive interface is the nipple.  After that it's all learned.
My other computer is your windows box.
I'm out of my mind.  Back in 5 minutes.
Q:  What's Red and smells like blue paint?

A:  Red Paint.

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5501
  • DOES work for LinuxMCE.
    • View Profile
Re: How to display messages on MD's
« Reply #16 on: January 16, 2008, 02:15:17 pm »
This is one kludgy kludge, but until it's figured out how to set broadcast level....

why don't you use system(); to fire the MessageSend command?

-Thom

ddamron

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 962
    • View Profile
    • My LinuxMCE User Page
Re: How to display messages on MD's
« Reply #17 on: January 16, 2008, 04:50:34 pm »
shhh thom!
trying to AVOID that...
The only intuitive interface is the nipple.  After that it's all learned.
My other computer is your windows box.
I'm out of my mind.  Back in 5 minutes.
Q:  What's Red and smells like blue paint?

A:  Red Paint.

rwilson131

  • Veteran
  • ***
  • Posts: 118
    • View Profile
Re: How to display messages on MD's
« Reply #18 on: January 16, 2008, 06:16:43 pm »
I did a little more testing and it appears that you do not need to set the broadcast level this command works as well
Code: [Select]
/usr/pluto/bin/MessageSend dcerouter -targetType category 1 5 1 809 251 0 9 "TESTING DISPLAY ALERT" 182 15 70 "test"
I do not think this will make much difference, because I do not think you can pass -targetType category either, but at least we now know.

Out of curiosity how are you sending the command via ruby,  I tried to follow the instructions at http://wiki.linuxmce.org/index.php/GSD_Ruby_Interface , but all of the methods I tried were always sent as plain text to the wrong device.

ddamron

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 962
    • View Profile
    • My LinuxMCE User Page
Re: How to display messages on MD's
« Reply #19 on: January 16, 2008, 08:58:09 pm »

Out of curiosity how are you sending the command via ruby,  I tried to follow the instructions at http://wiki.linuxmce.org/index.php/GSD_Ruby_Interface , but all of the methods I tried were always sent as plain text to the wrong device.

Yes, that's exactly how I'm doing it...
it's a bit complicated until you get your mind wrapped around it..

the basic method is:
Code: [Select]
mycmd = Command.new(from, to, priority, type, id)
mycmd.params_[x] = y
SendCommand(mycmd)

where:
Command is a command object (already defined by pluto) and new initializes a new Command..
SendCommand is a function (already defined by pluto)

everything else, you define in your code..
from is the device ID (you) (integer)
to is the device ID to. (normally, -1000 for a command, or -1001 for an event) (integer)
priority is an integer
Type (integer) is 1 for command, 2 for event
id is the command/event ID (integer) you want to send
to set the params,
x (integer) is the parameter you want to set
y (STRING) is the value you want to assign to x.

HTH,
Dan
« Last Edit: January 16, 2008, 09:00:41 pm by ddamron »
The only intuitive interface is the nipple.  After that it's all learned.
My other computer is your windows box.
I'm out of my mind.  Back in 5 minutes.
Q:  What's Red and smells like blue paint?

A:  Red Paint.