Motion - Support Question 2006x 07x 09x 085553

Easy control using a mobile phone?

Question

What would be the simpliest way to pause/start motion detection with a mobile phone (Nokia 9300, Symbian 7.0 series 80)? One click to pause/start would be perfect. If it requires n+1 clicks plus logging in it's too complicated for every day use. Python scipt? I don't know any language that my mobile understands, but I'm familiar with many other programming and scripting languages. I'm willing to learn some Python or whatever this takes to make it work. If someone has a solution right away, that would be really cool.

Environment

Motion version: 3.2.3
ffmpeg version:  
Libraries:  
Server OS:  

-- JussiJarvela - 09 Jul 2006

Answer

I would think your phone can show WAP.

Here is a small PHP program that delivers WAP and pauses and restarts two cameras.

It is assumed the program is called motion.php

<?php
  header("Content-type: text/vnd.wap.wml");
  echo "<?xml version=\"1.0\"?>";
  $command = IsSet($_REQUEST['command']) ? $_REQUEST['command'] : "" ;
?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
  <head>
    <meta http-equiv="Cache-Control" content="max-age=30" forua="true" />
  </head>
  
  <card id="WapMotion" title="Wap Motion">
    <p>Enter command:</p>
    <p>
      <do type="accept" label="Start">
        <go href="motion.php" method="post">
          <postfield name="command" value="start"/>
        </go>
      </do>
      <do type="A" label="Pause">
        <go href="motion.php" method="post">
          <postfield name="command" value="pause"/>
        </go>
      </do>
    </p>

    <?php
      if (isset($command))
      {
        switch ($command)
        {
          case "start":
            readfile('http://username:password@localhost:8080/1/detection/start');
            readfile('http://username:password@localhost:8080/2/detection/start');
            echo "<p>Detection Started</p>";
            break;
          case "pause":
            readfile('http://username:password@localhost:8080/1/detection/pause');
            readfile('http://username:password@localhost:8080/2/detection/pause');
            echo "<p>Detection Paused</p>";
            break;
          default:
            break;
        }
      }
    ?>
  </card>
</wml>

I think it should work.

-- KennethLavrsen - 17 Jul 2006
Topic revision: r2 - 17 Jul 2006, KennethLavrsen
Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Please do not email Kenneth for support questions (read why). Use the Support Requests page or join the Mailing List.
This website only use harmless session cookies. See Cookie Policy for details. By using this website you accept the use of these cookies.