Re: [SlimDevices: Plugins] Use remote control to control Linux

2010-01-25 Thread akennedy

it's hooked into Xorg using xautomation (xte) and it working great.

You were right about the repeat issue, even while going up and down
through menus I was being blocked by it.

You had it set to 2.5 seconds, I pulled that down to 0.05 or something
like that (0.0 seconds was rapid fire...)

In terms of security, you're right about the url attack angle.
Maybe just block kidsplayexec from being activated by url? (not sure if
that's even possible)

This even works when the squeezebox is off which is great; even while
the squeezebox is in use, the JVC DVD remote commands are processed
properly and does not affect the playback.  Completely transparent.

I have created a simple bash script which is called by KidsPlay.  
It's quick and dirty and needs some finesse work but it's working.

I could have skipped the bash script and had KidsPlay execute the xte
commands directly, but I wanted the extra abstraction layer.


In case anyone is interested here is the script.


Code:


  #!/bin/bash
  
  case $1 in
  up)
  xte -x :0.0  key Up
  ;;
  
  down)
  xte -x :0.0  key Down
  ;;
  
  left)
  xte -x :0.0  key Left
  ;;
  
  right)
  xte -x :0.0  key Right
  ;;
  
  play)
  xte -x :0.0  key Return
  ;;
  
  return)
  xte -x :0.0  key Return
  ;;
  
  escape)
  xte -x :0.0  key Escape
  ;;
  *)
  echo $Usage: $0 {right|left|up|down}
  exit 1
  
  esac
  



-- 
akennedy

akennedy's Profile: http://forums.slimdevices.com/member.php?userid=35900
View this thread: http://forums.slimdevices.com/showthread.php?t=74071

___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/plugins


Re: [SlimDevices: Plugins] Use remote control to control Linux

2010-01-23 Thread akennedy

jth:  Yeah, buying the pre-made, would be the easy way. but it would
mean another cable to run down a floor to the basement and another
electronic device (plus possibly remote) in the living room... more
clutter.

I'd like to use what i've already got to make this work.

peter: thanks for the updated KidsPlay!  it's working perfectly.  Just
need to hook it into XBMC


-- 
akennedy

akennedy's Profile: http://forums.slimdevices.com/member.php?userid=35900
View this thread: http://forums.slimdevices.com/showthread.php?t=74071

___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/plugins


Re: [SlimDevices: Plugins] Use remote control to control Linux

2010-01-23 Thread peterw

akennedy;509590 Wrote: 
 
 peter: thanks for the updated KidsPlay!  it's working perfectly.  Just
 need to hook it into XBMC

Good to hear. I'm considering a couple more changes for kidsplayexec to
address security concerns. I'm trying to get my head around all the ways
someone might abuse this new CLI command so I can make improvements to
better protect everyone. There might be both setup changes (e.g. a
different way of enabling kidsplayexec) and usage changes (e.g. needing
to pass a server-specific PIN as an argument to kidsplayexec).


-- 
peterw

http://www.tux.org/~peterw/
Free plugins:  'AllQuiet'
(http://www.tux.org/~peterw/slim/AllQuiet.html) 'Auto Dim/AutoDisplay'
(http://www.tux.org/~peterw/slim/AutoDisplay.html) 'BlankSaver'
(http://www.tux.org/~peterw/slim/BlankSaver.html) 'ContextMenu'
(http://www.tux.org/~peterw/slim/ContextMenu.html) 'DenonSerial'
(http://www.tux.org/~peterw/slim/DenonSerial.html)
'FuzzyTime' (http://www.tux.org/~peterw/slim/FuzzyTime.html) 'KidsPlay'
(http://www.tux.org/~peterw/slim/KidsPlay.html) 'KitchenTimer'
(http://www.tux.org/~peterw/slim/KitchenTimer.html) 'PlayLog'
(http://www.tux.org/~peterw/slim/PlayLog.html)
'PowerCenter/BottleRocket'
(http://www.tux.org/~peterw/slim/PowerCenter.html) 'SaverSwitcher'
(http://www.tux.org/~peterw/slim/SaverSwitcher.html)
'SettingsManager'
(http://www.tux.org/~peterw/slim/SettingsManager.html) 'SleepFade'
(http://www.tux.org/~peterw/slim/SleepFade.html) 'StatusFirst'
(http://www.tux.org/~peterw/slim/StatusFirst.html) 'SyncOptions'
(http://www.tux.org/~peterw/slim/SyncOptions.html) 'VolumeLock'
(http://www.tux.org/~peterw/slim/VolumeLock.html)

peterw's Profile: http://forums.slimdevices.com/member.php?userid=2107
View this thread: http://forums.slimdevices.com/showthread.php?t=74071

___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/plugins


Re: [SlimDevices: Plugins] Use remote control to control Linux

2010-01-22 Thread akennedy

Matt:
I've been looking into lirc and you're right, it would do what I want,
but it would mean building/finding a receiver and running another cable
through a wall.
This will the solution if I can't get the squeezebox working the way i
want.

epoch1970/maggior:
Thanks guys! I'll have a look into both of those avenues. They seem to
be pointing in the right direction.

I'll post by progress.


-- 
akennedy

akennedy's Profile: http://forums.slimdevices.com/member.php?userid=35900
View this thread: http://forums.slimdevices.com/showthread.php?t=74071

___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/plugins


Re: [SlimDevices: Plugins] Use remote control to control Linux

2010-01-22 Thread peterw

Take a look at KidsPlay. I could pretty easily add a new CLI command
such that you could use the web UI to map a JVC button to a CLI command
like 


Code:

kidsplayexec /usr/bin/eject cdrom



To execute the eject command with cdrom as its only argument...


-- 
peterw

http://www.tux.org/~peterw/
Free plugins:  'AllQuiet'
(http://www.tux.org/~peterw/slim/AllQuiet.html) 'Auto Dim/AutoDisplay'
(http://www.tux.org/~peterw/slim/AutoDisplay.html) 'BlankSaver'
(http://www.tux.org/~peterw/slim/BlankSaver.html) 'ContextMenu'
(http://www.tux.org/~peterw/slim/ContextMenu.html) 'DenonSerial'
(http://www.tux.org/~peterw/slim/DenonSerial.html)
'FuzzyTime' (http://www.tux.org/~peterw/slim/FuzzyTime.html) 'KidsPlay'
(http://www.tux.org/~peterw/slim/KidsPlay.html) 'KitchenTimer'
(http://www.tux.org/~peterw/slim/KitchenTimer.html) 'PlayLog'
(http://www.tux.org/~peterw/slim/PlayLog.html)
'PowerCenter/BottleRocket'
(http://www.tux.org/~peterw/slim/PowerCenter.html) 'SaverSwitcher'
(http://www.tux.org/~peterw/slim/SaverSwitcher.html)
'SettingsManager'
(http://www.tux.org/~peterw/slim/SettingsManager.html) 'SleepFade'
(http://www.tux.org/~peterw/slim/SleepFade.html) 'StatusFirst'
(http://www.tux.org/~peterw/slim/StatusFirst.html) 'SyncOptions'
(http://www.tux.org/~peterw/slim/SyncOptions.html) 'VolumeLock'
(http://www.tux.org/~peterw/slim/VolumeLock.html)

peterw's Profile: http://forums.slimdevices.com/member.php?userid=2107
View this thread: http://forums.slimdevices.com/showthread.php?t=74071

___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/plugins


Re: [SlimDevices: Plugins] Use remote control to control Linux

2010-01-22 Thread akennedy

KidsPlay (with the kidsplayexec) would do exactly what I am looking
for.

I had been looking at KidsPlay, but that before I knew most (all) IR
events went right to the server.

The end goal for me is to use a remote to control XBMC (XBox Media
Center) So i'll just have to find a way to hook into the XOrg input
controls.

Thanks!


-- 
akennedy

akennedy's Profile: http://forums.slimdevices.com/member.php?userid=35900
View this thread: http://forums.slimdevices.com/showthread.php?t=74071

___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/plugins


Re: [SlimDevices: Plugins] Use remote control to control Linux

2010-01-22 Thread akennedy

Now i've found a couple of programs to create keypress events.

1. xautomation (xte command)
2. xvkbd 

Looks like this will actually work!


-- 
akennedy

akennedy's Profile: http://forums.slimdevices.com/member.php?userid=35900
View this thread: http://forums.slimdevices.com/showthread.php?t=74071

___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/plugins


Re: [SlimDevices: Plugins] Use remote control to control Linux

2010-01-22 Thread peterw

akennedy;509352 Wrote: 
 KidsPlay (with the kidsplayexec) would do exactly what I am looking for.

OK, good to hear. I hope to find time to add this to KidsPlay over the
weekend.

 The end goal for me is to use a remote to control XBMC (XBox Media
 Center) So i'll just have to find a way to hook into the XOrg input
 controls.
 

These look promising:
* sending X11 keystrokes:
http://www.doctort.org/adam/nerd-notes/x11-fake-keypress-event.html
* sending LIRC IR/button codes: http://japiblog.dddgames.com/?p=12

I like the LIRC idea a lot, especially since I have an SB3 sitting
right next to a StreamZap USB IR receiver that I use as a LIRC receiver
for MythTV (and mplayer). Along those lines, the following is probably a
better solution than X11 since XBMC is designed to be used with LIRC:
http://sourceforge.net/projects/slim-plugins/files/LIRC/LIRC%20V1.0/ --
except, considering that plugin's age (over 4 years old!), it almost
certainly needs significant work to run in SC 7.3 / SBS 7.4.

Ooh, actually there might be a significant problem with KidsPlay here.
KidsPlay's main goal was to make an IR remote usable by my young child.
One of its deliberate features (with IR codes, not Boom/Receiver
physical buttons) is to ignore repeated button presses to some extent,
to make the IR remote less frustrating. You probably want something more
like the typical LIRC usage. E.G. if you hold the Volume Down button,
you probably want XBMC to see Volume Down button events over and over. I
don't remember how I coded that ignoring logic. It might be that I can
easily expose that as a configurable variable and you could just tweak
the config so it's responsive enough.

Also along those lines, you'd probably get better responsiveness from
something like a dedicated LIRC plugin that uses 100% Perl logic to send
UDP messages to a LIRC daemon than having something like KidsPlay spawn
a full process for each button press.


-- 
peterw

http://www.tux.org/~peterw/
Free plugins:  'AllQuiet'
(http://www.tux.org/~peterw/slim/AllQuiet.html) 'Auto Dim/AutoDisplay'
(http://www.tux.org/~peterw/slim/AutoDisplay.html) 'BlankSaver'
(http://www.tux.org/~peterw/slim/BlankSaver.html) 'ContextMenu'
(http://www.tux.org/~peterw/slim/ContextMenu.html) 'DenonSerial'
(http://www.tux.org/~peterw/slim/DenonSerial.html)
'FuzzyTime' (http://www.tux.org/~peterw/slim/FuzzyTime.html) 'KidsPlay'
(http://www.tux.org/~peterw/slim/KidsPlay.html) 'KitchenTimer'
(http://www.tux.org/~peterw/slim/KitchenTimer.html) 'PlayLog'
(http://www.tux.org/~peterw/slim/PlayLog.html)
'PowerCenter/BottleRocket'
(http://www.tux.org/~peterw/slim/PowerCenter.html) 'SaverSwitcher'
(http://www.tux.org/~peterw/slim/SaverSwitcher.html)
'SettingsManager'
(http://www.tux.org/~peterw/slim/SettingsManager.html) 'SleepFade'
(http://www.tux.org/~peterw/slim/SleepFade.html) 'StatusFirst'
(http://www.tux.org/~peterw/slim/StatusFirst.html) 'SyncOptions'
(http://www.tux.org/~peterw/slim/SyncOptions.html) 'VolumeLock'
(http://www.tux.org/~peterw/slim/VolumeLock.html)

peterw's Profile: http://forums.slimdevices.com/member.php?userid=2107
View this thread: http://forums.slimdevices.com/showthread.php?t=74071

___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/plugins


Re: [SlimDevices: Plugins] Use remote control to control Linux

2010-01-22 Thread akennedy

I didn't realize that there was a lirc plugin for squeezebox.  quite
interesting.


In terms of repeating events, i don't think that would be so much of an
issue for me.  I'm going to be old fashion and use the remote for my amp
for volume and such.


-- 
akennedy

akennedy's Profile: http://forums.slimdevices.com/member.php?userid=35900
View this thread: http://forums.slimdevices.com/showthread.php?t=74071

___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/plugins


Re: [SlimDevices: Plugins] Use remote control to control Linux

2010-01-22 Thread akennedy

after looking into the different options,  i think using kidsplay would
be the simplest method.

if you found the time to add the kisplayexec command i would greatly
appreciate it.


-- 
akennedy

akennedy's Profile: http://forums.slimdevices.com/member.php?userid=35900
View this thread: http://forums.slimdevices.com/showthread.php?t=74071

___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/plugins


Re: [SlimDevices: Plugins] Use remote control to control Linux

2010-01-22 Thread jth

Wouldn't it be easier to just buy a remote and IR receiver? You can get
one
compatible with XBMC for under $40 (I use a streamzap).

Otherwise you may end up with a brittle chain that breaks on each
major
upgrade to squeezeboxserver.


-- 
jth

jth's Profile: http://forums.slimdevices.com/member.php?userid=48
View this thread: http://forums.slimdevices.com/showthread.php?t=74071

___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/plugins


Re: [SlimDevices: Plugins] Use remote control to control Linux

2010-01-22 Thread peterw

akennedy;509399 Wrote: 
 after looking into the different options,  i think using kidsplay would
 be the simplest method.
 
 if you found the time to add the kisplayexec command i would greatly
 appreciate it.

OK, add this repository in your Extension Downloader page (if SC 7.3)
or Plugins page (if SBS 7.4):
http://www.tux.org/~peterw/slim/slim7/repodata-test.xml

and give KidsPlay 2.5.1 or newer a try. The new command is documented
in the KidsPlay configuration page. 

Note that unless you want to hack the Perl, KidsPlay requires you to
enable Password Protection and set CRSF Protection to at least Medium in
order to use the kidsplayexec command. The logic there is that
kidsplayexec is somewhat dangerous. Without password protection, and
device on your network could use it to basically get a shell prompt via
the SC/SBS CLI interface. Without CSRF protection, if somebody got you
to open a page with an IMG tag with
SRC=http://localhost:9000/status.html?p0=kidsplayexecp1=somebadcommandp2=etc,
then they could trick you into doing nasty things. I may yet add an
additional setting on the web page and default to this command not being
enabled, for another safety measure.

Please let me know how it goes!

Also, I wrote the author of that LIRC plugin, and he hasn't done any
work on it in years. :-( So that avenue would indeed require some
effort.

-Peter


-- 
peterw

http://www.tux.org/~peterw/
Free plugins:  'AllQuiet'
(http://www.tux.org/~peterw/slim/AllQuiet.html) 'Auto Dim/AutoDisplay'
(http://www.tux.org/~peterw/slim/AutoDisplay.html) 'BlankSaver'
(http://www.tux.org/~peterw/slim/BlankSaver.html) 'ContextMenu'
(http://www.tux.org/~peterw/slim/ContextMenu.html) 'DenonSerial'
(http://www.tux.org/~peterw/slim/DenonSerial.html)
'FuzzyTime' (http://www.tux.org/~peterw/slim/FuzzyTime.html) 'KidsPlay'
(http://www.tux.org/~peterw/slim/KidsPlay.html) 'KitchenTimer'
(http://www.tux.org/~peterw/slim/KitchenTimer.html) 'PlayLog'
(http://www.tux.org/~peterw/slim/PlayLog.html)
'PowerCenter/BottleRocket'
(http://www.tux.org/~peterw/slim/PowerCenter.html) 'SaverSwitcher'
(http://www.tux.org/~peterw/slim/SaverSwitcher.html)
'SettingsManager'
(http://www.tux.org/~peterw/slim/SettingsManager.html) 'SleepFade'
(http://www.tux.org/~peterw/slim/SleepFade.html) 'StatusFirst'
(http://www.tux.org/~peterw/slim/StatusFirst.html) 'SyncOptions'
(http://www.tux.org/~peterw/slim/SyncOptions.html) 'VolumeLock'
(http://www.tux.org/~peterw/slim/VolumeLock.html)

peterw's Profile: http://forums.slimdevices.com/member.php?userid=2107
View this thread: http://forums.slimdevices.com/showthread.php?t=74071

___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/plugins


Re: [SlimDevices: Plugins] Use remote control to control Linux

2010-01-21 Thread maggior

You can customize a couple of files to modify the behavior of certain IR
codes.  In a subdirectory in the squeezecenter heirarchy called IR, you
will find files with a .map extension and a .ir extension.  If you
create a custom.map file, changes you put in there will override what is
in the default.  Any .ir file you create will show up in the setup
options for a player in the web UI.

If you go into the help in the webui for SC, there are some details on
modifying these files.  I did some of this to make my DirecTV remote
work with my SB3:
http://forums.slimdevices.com/showthread.php?t=73546

To determine what IR codes are being generated, you can boost the
logging level for IR codes to INFO via the web UI.  Each time you press
a key on the remote, an entry will be created in the log file telling
you what IR code was generated.  You can then use this information to
change it's behavior in the .ir and/or .map files.

Hope that helps you out.


-- 
maggior

Rich
-
Setup: 2 SB3s, 4 Booms, 1 duet, 1 receiver.  SuSE 11.0 Server running
SqueezeCenter 7.3.3, MusicIP, and SqueezeSlave.  
Current library stats: 30,015 songs, 2,448 albums, 451 artists.
http://www.last.fm/user/maggior

maggior's Profile: http://forums.slimdevices.com/member.php?userid=9080
View this thread: http://forums.slimdevices.com/showthread.php?t=74071

___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/plugins


Re: [SlimDevices: Plugins] Use remote control to control Linux

2010-01-20 Thread MattC

sounds like you might want to take a look here:
http://www.lirc.org/

you'll need to build or acquire an IR receiver,  it's obviously not
ideal if your squeezebox is a long way away from your server...


-- 
MattC

MattC's Profile: http://forums.slimdevices.com/member.php?userid=4127
View this thread: http://forums.slimdevices.com/showthread.php?t=74071

___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/plugins


Re: [SlimDevices: Plugins] Use remote control to control Linux

2010-01-20 Thread epoch1970

IR blaster uses lirc, it has a learning mode which seems to prove
everything the player receives goes straight to the server.
The plugin handles a limited number of commands (power, volume) but
perhaps you can work your way from there ?
http://wiki.slimdevices.com/index.php/IRBlaster


-- 
epoch1970

epoch1970's Profile: http://forums.slimdevices.com/member.php?userid=16711
View this thread: http://forums.slimdevices.com/showthread.php?t=74071

___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/plugins