Gordon,
I'm moving all my CLI stuff to Json. I use JSON::RPC::Client.
Using SC 7.3.4 and Server Power Control (v20091017.22), I am able to
set and delete blockers with Json same as with the CLI, except the
'viacli' special blockerid doesn't seem to work at all.

set a block (ok): my @query =
['',['srvrpowerctrl','setblock','REASON','BLOCKERID']];
remove a block (ok): @query =
['',['srvrpowerctrl','clearblock',$sbblockid,'BLOCKERID']];
remove a block (fails): @query =
['',['srvrpowerctrl','clearblock',$sbblockid,'viacli']];
remove a block (fails): @query =
['',['srvrpowerctrl','clearblock','','viacli']];
remove a block (fails): @query =
['',['srvrpowerctrl','clearblock','viacli']];


Additionally, when I get an error no response seems returned at all,
while my naive code expected to get an object with a value in the
"is_error" method. mySB.com does return a proper $response->is_error in
case of problem. I wouldn't know if this slight issue -easily cured with
an extra check- is plugin or server dependent.


-- 
epoch1970

Daily dose delivered by: 2 SB Classic (fw 130), 1 SB Boom (fw 50) •
SqueezeCenter 7.3.4 (Debian 5.0) with plugins: ContextMenu,
SaverSwitcher by Peter Watkins • Server Power Control by Gordon Harris •
WeatherTime by Martin Rehfeld • IRBlaster by Gwendesign (Felix) •
FindArt, CDplayer by bpa • BBC iPlayer, SwitchPlayer by Triode •
PowerSave by Jason Holtzapple • TrackStat by Erland Isaksson.
------------------------------------------------------------------------
epoch1970's Profile: http://forums.slimdevices.com/member.php?userid=16711
View this thread: http://forums.slimdevices.com/showthread.php?t=48521

_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins

Reply via email to