View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 1 post ] 
Print view Previous topic   Next topic  
Author Message
Search for:
 Post subject: instant view cam
PostPosted: Tue May 18, 2010 3:31 pm 
Offline
Joined: Mon Jul 31, 2006 10:41 pm
Posts: 149
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.


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 18 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu