PDA

View Full Version : Jive: causing a popup from SC7 menu actions?



peterw
2007-12-23, 06:53
Along the lines of
http://wiki.slimdevices.com/index.cgi?JiveAndSqueezeCenterPlugins
can I have Perl code in SC7 cause a popup on a Jive screen?

This is more BottleRocket stuff -- for instance, if a user chooses the "Extras -> X-10 devices -> Upstairs light -> On" action, I'd like some sort of visual indication on the Jive display that something is happening. A Jive popup seems like a good way to go. Can I do that in server-side Perl code?

Thanks,

Peter

bklaas
2007-12-23, 11:12
Yes, you should be able to do this. I haven't done it before, but the mechanism for sending playerstatus updates should be fairly generic. I recommend poking around the source code for SqueezeCenter and finding how "ShowBriefly"s are done for things like "player paused". Then it's just a matter of sending out a custom message to ShowBriefly, and Jive will pick it up indiscriminately.

cheers,
#!/ben

Triode
2007-12-23, 13:50
Just call do $client->showBriefly as you would for the player interface (using the display hash based api) - this should be sent to jive.

If you want to customise the message for jive or prevent a normal showBriefly then include jive component in the hash:

$client->showBriefly( {
jive => [ 'text line1', 'text line2' ]
});

[grep the code as I've done this from memory!]

Adrian

----- Original Message ----
From: bklaas <bklaas.3223qz1198433701 (AT) no-mx (DOT) forums.slimdevices.com>
To: developers (AT) lists (DOT) slimdevices.com
Sent: Sunday, 23 December, 2007 6:12:55 PM
Subject: Re: [Developers] Jive: causing a popup from SC7 menu actions?


Yes, you should be able to do this. I haven't done it before, but the
mechanism for sending playerstatus updates should be fairly generic. I
recommend poking around the source code for SqueezeCenter and finding
how "ShowBriefly"s are done for things like "player paused". Then it's
just a matter of sending out a custom message to ShowBriefly, and Jive
will pick it up indiscriminately.

cheers,
#!/ben


--
bklaas

"the Nokia770 skin guy"
http://www.last.fm/user/bklaas/
------------------------------------------------------------------------
bklaas's Profile: http://forums.slimdevices.com/member.php?userid=58
View this thread: http://forums.slimdevices.com/showthread.php?t=41325