LinHES Forums
http://forums.linhes.org/

instant view cam
http://forums.linhes.org/viewtopic.php?f=25&t=21080
Page 1 of 1

Author:  mythedoff [ Tue May 18, 2010 3:31 pm ]
Post subject:  instant view cam

Whether viewing a video, a recording or listening to music, clicking a button on the remote switchs the screen to firefox with a view of a cam that is set up to a view down the driveway. Probably possible to do this with other programs but in my case I'm using zoneminder on another box. I've added a user with view only to zoneminder and use that with the script.

After launching firefox manually I set the home page to what I want to view.
In my case:
http://<ip>/zm/index.php?view=watch&mid=5

On bootup firefox can be started in .fluxbox/apps or from the script.
I've add it before the LinHES-run line.
[startup] {/usr/bin/firefox}
then I added after the LinHES-run line
[startup] {/home/mythtv/zm.sh}


zm.sh

#!/bin/bash

#`/usr/bin/firefox`
sleep 20

WID=`xdotool search --title ZM`
xdotool windowactivate $WID
xdotool key Return
sleep 5
#xdotool key alt+Home
xdotool type --delay 1000 "<ZM-username>"
xdotool key Tab
xdotool type --delay 1000 "<ZM_password>"
xdotool key Tab
xdotool key Return
xdotool key alt+Home
sleep 1
xdotool key F11
sleep 3
xdotool key alt+Tab



then setup the remote. I added:
begin

prog = irexec
button = Pictures
#try each below
# config = xdotool key Alt+Escape
# config = xdotool key Alt+Tab
end

On my mce remote I needed to use Alt+Escape as Alt+Tab only toggled between firefox windows, but on my streamzap remote I had to use Alt+Tab as Alt-Escape didn't work. And on the streamzap I assigned the button = BLUE.

Not an elegant solution but it works for me on frontend only and master backend-frontend. The sleep times might need adjusting to allow the frontend to complete its launch. Also, I remember making some changes to firefox preferences.

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/