Tips: NexaHome 'Motion Detector'

Moderators: hekj, Telldus

Post Reply
hekj
Posts: 990
Joined: Thu Jan 18, 2018 11:08 am
Location: Stockholm
Contact:

Tips: NexaHome 'Motion Detector'

Post by hekj » Thu Jan 18, 2018 11:08 am

Den som kör windows samt NexaHome version 2.9.3 eller senare kan prova "Motion Detector" funktioner i NexaHome, börja med att hämta följande zip-arkiv.
http://nexahome.se/NexaHomeMD_beta.zip

Därefter ska man göra följande:

1) packa upp zip-arkivet så att alla dess filer placeras i biblioteket
C:\apps\NexaHomeMD_beta

2) skapa följande bibliotek samt skriv in dess sökväg under 'Config' fliken i NexaHome (Motion Detect Image Directories)
C:\apps\nexahome\overtornea

3) skapa biblioteket 'motion' i 'My Web Server Directory' biblioteket (om det inte redan finns)
C:\apps\nexahome\mywebserver\motion

4) skapa följande bsh filer i 'My Web Server Directory' biblioteket
C:\apps\nexahome\mywebserver

motion.html

Code: Select all

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head><title>NexaHome - Life Made Easy With Home Automation</title>
<link rel="Shortcut Icon" href="http://nexahome.se/favicon32x32.ico">
<meta http-equiv="refresh" content="300;#URL#?mypage=motion&psw=#PSW#">
</head>

<!-- dynamic="motion_1" url="file:///C:/apps/nexahome/mywebserver/motion/index_1.html" keep="60" -->
<!-- dynamic="motion_2" url="file:///C:/apps/nexahome/mywebserver/motion/index_2.html" keep="60" -->
<!-- dynamic="motion_3" url="file:///C:/apps/nexahome/mywebserver/motion/index_3.html" keep="60" -->
<!-- dynamic="motion_4" url="file:///C:/apps/nexahome/mywebserver/motion/index_4.html" keep="60" -->
<!-- dynamic="motion_5" url="file:///C:/apps/nexahome/mywebserver/motion/index_5.html" keep="60" -->
<!-- dynamic="motion_6" url="file:///C:/apps/nexahome/mywebserver/motion/index_6.html" keep="60" -->
<!-- dynamic="motion_7" url="file:///C:/apps/nexahome/mywebserver/motion/index_7.html" keep="60" -->
<!-- dynamic="motion_8" url="file:///C:/apps/nexahome/mywebserver/motion/index_8.html" keep="60" -->
<!-- dynamic="motion_9" url="file:///C:/apps/nexahome/mywebserver/motion/index_9.html" keep="60" -->
<!-- dynamic="delete_1" url="file:///C:/apps/nexahome/mywebserver/motion/delete_1.html" keep="60" -->
<!-- dynamic="delete_2" url="file:///C:/apps/nexahome/mywebserver/motion/delete_2.html" keep="60" -->
<!-- dynamic="delete_3" url="file:///C:/apps/nexahome/mywebserver/motion/delete_3.html" keep="60" -->
<!-- dynamic="delete_4" url="file:///C:/apps/nexahome/mywebserver/motion/delete_4.html" keep="60" -->
<!-- dynamic="delete_5" url="file:///C:/apps/nexahome/mywebserver/motion/delete_5.html" keep="60" -->
<!-- dynamic="delete_6" url="file:///C:/apps/nexahome/mywebserver/motion/delete_6.html" keep="60" -->
<!-- dynamic="delete_7" url="file:///C:/apps/nexahome/mywebserver/motion/delete_7.html" keep="60" -->
<!-- dynamic="delete_8" url="file:///C:/apps/nexahome/mywebserver/motion/delete_8.html" keep="60" -->
<!-- dynamic="delete_9" url="file:///C:/apps/nexahome/mywebserver/motion/delete_9.html" keep="60" -->
<!-- dynamic="delete_1-9" url="file:///C:/apps/nexahome/mywebserver/motion/delete_1-9.html" keep="60" -->

<body bgcolor="#ffffff" background="/nexahome/nexahome_bg.jpg">

<div style="position: absolute; top: 5px; left: 25px;">
<form action="nexahome" method="get">
<input type=hidden name="mypage" value="motion">
<input type=hidden name="return" value="motion">
<input type=hidden name="psw" value="#PSW#">
<input type=hidden name="rnd" value="#RND#">
<input type=submit value="#TIMESTAMP#">
</form>
</div>

<div style="position: absolute; top: 5px; left: 320px;">
<form action="nexahome" method="get">
<input type=hidden name="mypage" value="#RETURN#">
<input type=hidden name="psw" value="#PSW#">
<input type=hidden name="rnd" value="#RND#">
<input type=submit value="Gå tillbaka">
</form>
</div>

<div style="position: absolute; top: 40px; left: 25px;">
<form action="nexahome" method="get">
<input type=hidden name="mypage" value="motion1">
<input type=hidden name="return" value="motion">
<input type=hidden name="psw" value="#PSW#">
<input type=hidden name="rnd" value="#RND#">
<input type=submit value="1">
</form>
</div>

<div style="position: absolute; top: 40px; left: 90px;">
<form action="nexahome" method="get">
<input type=hidden name="mypage" value="motion">
<input type=hidden name="return" value="motion">
<input type=hidden name="delete" value="#DYNAMIC#delete_1#">
<input type=hidden name="psw" value="#PSW#">
<input type=hidden name="rnd" value="#RND#">
<input type=submit value="Radera">
</form>
</div>

<div style="position: absolute; top: 70px; left: 25px;">
#DYNAMIC#motion_1#st
</div>

<div style="position: absolute; top: 40px; left: 235px;">
<form action="nexahome" method="get">
<input type=hidden name="mypage" value="motion2">
<input type=hidden name="return" value="motion">
<input type=hidden name="psw" value="#PSW#">
<input type=hidden name="rnd" value="#RND#">
<input type=submit value="2">
</form>
</div>

<div style="position: absolute; top: 40px; left: 300px;">
<form action="nexahome" method="get">
<input type=hidden name="mypage" value="motion">
<input type=hidden name="return" value="motion">
<input type=hidden name="delete" value="#DYNAMIC#delete_2#">
<input type=hidden name="psw" value="#PSW#">
<input type=hidden name="rnd" value="#RND#">
<input type=submit value="Radera">
</form>
</div>

<div style="position: absolute; top: 70px; left: 235px;">
#DYNAMIC#motion_2#st
</div>

<div style="position: absolute; top: 40px; left: 445px;">
<form action="nexahome" method="get">
<input type=hidden name="mypage" value="motion3">
<input type=hidden name="return" value="motion">
<input type=hidden name="psw" value="#PSW#">
<input type=hidden name="rnd" value="#RND#">
<input type=submit value="3">
</form>
</div>

<div style="position: absolute; top: 40px; left: 510px;">
<form action="nexahome" method="get">
<input type=hidden name="mypage" value="motion">
<input type=hidden name="return" value="motion">
<input type=hidden name="delete" value="#DYNAMIC#delete_3#">
<input type=hidden name="psw" value="#PSW#">
<input type=hidden name="rnd" value="#RND#">
<input type=submit value="Radera">
</form>
</div>

<div style="position: absolute; top: 70px; left: 445px;">
#DYNAMIC#motion_3#st
</div>

<div style="position: absolute; top: 240px; left: 25px;">
<form action="nexahome" method="get">
<input type=hidden name="mypage" value="motion4">
<input type=hidden name="return" value="motion">
<input type=hidden name="psw" value="#PSW#">
<input type=hidden name="rnd" value="#RND#">
<input type=submit value="4">
</form>
</div>

<div style="position: absolute; top: 240px; left: 90px;">
<form action="nexahome" method="get">
<input type=hidden name="mypage" value="motion">
<input type=hidden name="return" value="motion">
<input type=hidden name="delete" value="#DYNAMIC#delete_4#">
<input type=hidden name="psw" value="#PSW#">
<input type=hidden name="rnd" value="#RND#">
<input type=submit value="Radera">
</form>
</div>

<div style="position: absolute; top: 270px; left: 25px;">
#DYNAMIC#motion_4#st
</div>

<div style="position: absolute; top: 240px; left: 235px;">
<form action="nexahome" method="get">
<input type=hidden name="mypage" value="motion5">
<input type=hidden name="return" value="motion">
<input type=hidden name="psw" value="#PSW#">
<input type=hidden name="rnd" value="#RND#">
<input type=submit value="5">
</form>
</div>

<div style="position: absolute; top: 240px; left: 300px;">
<form action="nexahome" method="get">
<input type=hidden name="mypage" value="motion">
<input type=hidden name="return" value="motion">
<input type=hidden name="delete" value="#DYNAMIC#delete_5#">
<input type=hidden name="psw" value="#PSW#">
<input type=hidden name="rnd" value="#RND#">
<input type=submit value="Radera">
</form>
</div>

<div style="position: absolute; top: 270px; left: 235px;">
#DYNAMIC#motion_5#st
</div>

<div style="position: absolute; top: 240px; left: 445px;">
<form action="nexahome" method="get">
<input type=hidden name="mypage" value="motion6">
<input type=hidden name="return" value="motion">
<input type=hidden name="psw" value="#PSW#">
<input type=hidden name="rnd" value="#RND#">
<input type=submit value="6">
</form>
</div>

<div style="position: absolute; top: 240px; left: 510px;">
<form action="nexahome" method="get">
<input type=hidden name="mypage" value="motion">
<input type=hidden name="return" value="motion">
<input type=hidden name="delete" value="#DYNAMIC#delete_6#">
<input type=hidden name="psw" value="#PSW#">
<input type=hidden name="rnd" value="#RND#">
<input type=submit value="Radera">
</form>
</div>

<div style="position: absolute; top: 270px; left: 445px;">
#DYNAMIC#motion_6#st
</div>

<div style="position: absolute; top: 440px; left: 25px;">
<form action="nexahome" method="get">
<input type=hidden name="mypage" value="motion7">
<input type=hidden name="return" value="motion">
<input type=hidden name="psw" value="#PSW#">
<input type=hidden name="rnd" value="#RND#">
<input type=submit value="7">
</form>
</div>

<div style="position: absolute; top: 440px; left: 90px;">
<form action="nexahome" method="get">
<input type=hidden name="mypage" value="motion">
<input type=hidden name="return" value="motion">
<input type=hidden name="delete" value="#DYNAMIC#delete_7#">
<input type=hidden name="psw" value="#PSW#">
<input type=hidden name="rnd" value="#RND#">
<input type=submit value="Radera">
</form>
</div>

<div style="position: absolute; top: 470px; left: 25px;">
#DYNAMIC#motion_7#st
</div>

<div style="position: absolute; top: 440px; left: 235px;">
<form action="nexahome" method="get">
<input type=hidden name="mypage" value="motion8">
<input type=hidden name="return" value="motion">
<input type=hidden name="psw" value="#PSW#">
<input type=hidden name="rnd" value="#RND#">
<input type=submit value="8">
</form>
</div>

<div style="position: absolute; top: 440px; left: 300px;">
<form action="nexahome" method="get">
<input type=hidden name="mypage" value="motion">
<input type=hidden name="return" value="motion">
<input type=hidden name="delete" value="#DYNAMIC#delete_8#">
<input type=hidden name="psw" value="#PSW#">
<input type=hidden name="rnd" value="#RND#">
<input type=submit value="Radera">
</form>
</div>

<div style="position: absolute; top: 470px; left: 235px;">
#DYNAMIC#motion_8#st
</div>

<div style="position: absolute; top: 440px; left: 445px;">
<form action="nexahome" method="get">
<input type=hidden name="mypage" value="motion9">
<input type=hidden name="return" value="motion">
<input type=hidden name="psw" value="#PSW#">
<input type=hidden name="rnd" value="#RND#">
<input type=submit value="9">
</form>
</div>

<div style="position: absolute; top: 440px; left: 510px;">
<form action="nexahome" method="get">
<input type=hidden name="mypage" value="motion">
<input type=hidden name="return" value="motion">
<input type=hidden name="delete" value="#DYNAMIC#delete_9#">
<input type=hidden name="psw" value="#PSW#">
<input type=hidden name="rnd" value="#RND#">
<input type=submit value="Radera">
</form>
</div>

<div style="position: absolute; top: 470px; left: 445px;">
#DYNAMIC#motion_9#st
</div>

<div style="position: absolute; top: 640px; left: 25px;">
<form action="nexahome" method="get">
<input type=hidden name="mypage" value="motion">
<input type=hidden name="return" value="motion">
<input type=hidden name="delete" value="#DYNAMIC#delete_1-9#">
<input type=hidden name="psw" value="#PSW#">
<input type=hidden name="rnd" value="#RND#">
<input type=submit value="Radera 1-9">
</form>
</div>

</body>
</html>
motion1.html

Code: Select all

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head><title>NexaHome - Life Made Easy With Home Automation</title>
<link rel="Shortcut Icon" href="http://nexahome.se/favicon32x32.ico">
<meta http-equiv="refresh" content="300;#URL#?mypage=motion1&psw=#PSW#">
</head>

<!-- dynamic="motion1" url="file:///C:/apps/nexahome/mywebserver/motion/index1.html" keep="60" -->

<body bgcolor="#ffffff" background="/nexahome/nexahome_bg.jpg">

<div style="position: absolute; top: 5px; left: 25px;">
<form action="nexahome" method="get">
<input type=hidden name="mypage" value="motion1">
<input type=hidden name="return" value="motion">
<input type=hidden name="psw" value="#PSW#">
<input type=hidden name="rnd" value="#RND#">
<input type=submit value="#TIMESTAMP#">
</form>
</div>

<div style="position: absolute; top: 5px; left: 180px;">
<form action="nexahome" method="get">
<input type=hidden name="mypage" value="motion9">
<input type=hidden name="return" value="motion1">
<input type=hidden name="psw" value="#PSW#">
<input type=hidden name="rnd" value="#RND#">
<input type=submit value="Äldsta">
</form>
</div>

<div style="position: absolute; top: 5px; left: 250px;">
<form action="nexahome" method="get">
<input type=hidden name="mypage" value="motion2">
<input type=hidden name="return" value="motion1">
<input type=hidden name="psw" value="#PSW#">
<input type=hidden name="rnd" value="#RND#">
<input type=submit value="Äldre">
</form>
</div>

<div style="position: absolute; top: 5px; left: 320px;">
<form action="nexahome" method="get">
<input type=hidden name="mypage" value="#RETURN#">
<input type=hidden name="psw" value="#PSW#">
<input type=hidden name="rnd" value="#RND#">
<input type=submit value="Gå tillbaka">
</form>
</div>

<div style="position: absolute; top: 30px; left: 25px">
#DYNAMIC#motion1#
</div>

</body>
</html>
motion2.html

Code: Select all

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head><title>NexaHome - Life Made Easy With Home Automation</title>
<link rel="Shortcut Icon" href="http://nexahome.se/favicon32x32.ico">
<meta http-equiv="refresh" content="300;#URL#?mypage=motion1&psw=#PSW#">
</head>

<!-- dynamic="motion2" url="file:///C:/apps/nexahome/mywebserver/motion/index2.html" keep="60" -->

<body bgcolor="#ffffff" background="/nexahome/nexahome_bg.jpg">

<div style="position: absolute; top: 5px; left: 25px;">
<form action="nexahome" method="get">
<input type=hidden name="mypage" value="motion1">
<input type=hidden name="return" value="motion">
<input type=hidden name="psw" value="#PSW#">
<input type=hidden name="rnd" value="#RND#">
<input type=submit value="#TIMESTAMP#">
</form>
</div>

<div style="position: absolute; top: 5px; left: 180px;">
<form action="nexahome" method="get">
<input type=hidden name="mypage" value="motion1">
<input type=hidden name="return" value="motion2">
<input type=hidden name="psw" value="#PSW#">
<input type=hidden name="rnd" value="#RND#">
<input type=submit value="Nyare">
</form>
</div>

<div style="position: absolute; top: 5px; left: 250px;">
<form action="nexahome" method="get">
<input type=hidden name="mypage" value="motion3">
<input type=hidden name="return" value="motion2">
<input type=hidden name="psw" value="#PSW#">
<input type=hidden name="rnd" value="#RND#">
<input type=submit value="Äldre">
</form>
</div>

<div style="position: absolute; top: 5px; left: 320px;">
<form action="nexahome" method="get">
<input type=hidden name="mypage" value="#RETURN#">
<input type=hidden name="psw" value="#PSW#">
<input type=hidden name="rnd" value="#RND#">
<input type=submit value="Gå tillbaka">
</form>
</div>

<div style="position: absolute; top: 30px; left: 25px">
#DYNAMIC#motion2#
</div>

</body>
</html>
motion3.html

Code: Select all

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head><title>NexaHome - Life Made Easy With Home Automation</title>
<link rel="Shortcut Icon" href="http://nexahome.se/favicon32x32.ico">
<meta http-equiv="refresh" content="300;#URL#?mypage=motion1&psw=#PSW#">
</head>

<!-- dynamic="motion3" url="file:///C:/apps/nexahome/mywebserver/motion/index3.html" keep="60" -->

<body bgcolor="#ffffff" background="/nexahome/nexahome_bg.jpg">

<div style="position: absolute; top: 5px; left: 25px;">
<form action="nexahome" method="get">
<input type=hidden name="mypage" value="motion1">
<input type=hidden name="return" value="motion3">
<input type=hidden name="psw" value="#PSW#">
<input type=hidden name="rnd" value="#RND#">
<input type=submit value="#TIMESTAMP#">
</form>
</div>

<div style="position: absolute; top: 5px; left: 180px;">
<form action="nexahome" method="get">
<input type=hidden name="mypage" value="motion2">
<input type=hidden name="return" value="motion3">
<input type=hidden name="psw" value="#PSW#">
<input type=hidden name="rnd" value="#RND#">
<input type=submit value="Nyare">
</form>
</div>

<div style="position: absolute; top: 5px; left: 250px;">
<form action="nexahome" method="get">
<input type=hidden name="mypage" value="motion4">
<input type=hidden name="return" value="motion3">
<input type=hidden name="psw" value="#PSW#">
<input type=hidden name="rnd" value="#RND#">
<input type=submit value="Äldre">
</form>
</div>

<div style="position: absolute; top: 5px; left: 320px;">
<form action="nexahome" method="get">
<input type=hidden name="mypage" value="#RETURN#">
<input type=hidden name="psw" value="#PSW#">
<input type=hidden name="rnd" value="#RND#">
<input type=submit value="Gå tillbaka">
</form>
</div>

<div style="position: absolute; top: 30px; left: 25px">
#DYNAMIC#motion3#
</div>

</body>
</html>
motion4.html

Code: Select all

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head><title>NexaHome - Life Made Easy With Home Automation</title>
<link rel="Shortcut Icon" href="http://nexahome.se/favicon32x32.ico">
<meta http-equiv="refresh" content="300;#URL#?mypage=motion1&psw=#PSW#">
</head>

<!-- dynamic="motion4" url="file:///C:/apps/nexahome/mywebserver/motion/index4.html" keep="60" -->

<body bgcolor="#ffffff" background="/nexahome/nexahome_bg.jpg">

<div style="position: absolute; top: 5px; left: 25px;">
<form action="nexahome" method="get">
<input type=hidden name="mypage" value="motion1">
<input type=hidden name="return" value="motion">
<input type=hidden name="psw" value="#PSW#">
<input type=hidden name="rnd" value="#RND#">
<input type=submit value="#TIMESTAMP#">
</form>
</div>

<div style="position: absolute; top: 5px; left: 180px;">
<form action="nexahome" method="get">
<input type=hidden name="mypage" value="motion3">
<input type=hidden name="return" value="motion4">
<input type=hidden name="psw" value="#PSW#">
<input type=hidden name="rnd" value="#RND#">
<input type=submit value="Nyare">
</form>
</div>

<div style="position: absolute; top: 5px; left: 250px;">
<form action="nexahome" method="get">
<input type=hidden name="mypage" value="motion5">
<input type=hidden name="return" value="motion4">
<input type=hidden name="psw" value="#PSW#">
<input type=hidden name="rnd" value="#RND#">
<input type=submit value="Äldre">
</form>
</div>

<div style="position: absolute; top: 5px; left: 320px;">
<form action="nexahome" method="get">
<input type=hidden name="mypage" value="#RETURN#">
<input type=hidden name="psw" value="#PSW#">
<input type=hidden name="rnd" value="#RND#">
<input type=submit value="Gå tillbaka">
</form>
</div>

<div style="position: absolute; top: 30px; left: 25px">
#DYNAMIC#motion4#
</div>

</body>
</html>
motion5.html

Code: Select all

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head><title>NexaHome - Life Made Easy With Home Automation</title>
<link rel="Shortcut Icon" href="http://nexahome.se/favicon32x32.ico">
<meta http-equiv="refresh" content="300;#URL#?mypage=motion1&psw=#PSW#">
</head>

<!-- dynamic="motion5" url="file:///C:/apps/nexahome/mywebserver/motion/index5.html" keep="60" -->

<body bgcolor="#ffffff" background="/nexahome/nexahome_bg.jpg">

<div style="position: absolute; top: 5px; left: 25px;">
<form action="nexahome" method="get">
<input type=hidden name="mypage" value="motion1">
<input type=hidden name="return" value="motion">
<input type=hidden name="psw" value="#PSW#">
<input type=hidden name="rnd" value="#RND#">
<input type=submit value="#TIMESTAMP#">
</form>
</div>

<div style="position: absolute; top: 5px; left: 180px;">
<form action="nexahome" method="get">
<input type=hidden name="mypage" value="motion4">
<input type=hidden name="return" value="motion5">
<input type=hidden name="psw" value="#PSW#">
<input type=hidden name="rnd" value="#RND#">
<input type=submit value="Nyare">
</form>
</div>

<div style="position: absolute; top: 5px; left: 250px;">
<form action="nexahome" method="get">
<input type=hidden name="mypage" value="motion6">
<input type=hidden name="return" value="motion5">
<input type=hidden name="psw" value="#PSW#">
<input type=hidden name="rnd" value="#RND#">
<input type=submit value="Äldre">
</form>
</div>

<div style="position: absolute; top: 5px; left: 320px;">
<form action="nexahome" method="get">
<input type=hidden name="mypage" value="#RETURN#">
<input type=hidden name="psw" value="#PSW#">
<input type=hidden name="rnd" value="#RND#">
<input type=submit value="Gå tillbaka">
</form>
</div>

<div style="position: absolute; top: 30px; left: 25px">
#DYNAMIC#motion5#
</div>

</body>
</html>
motion6.html

Code: Select all

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head><title>NexaHome - Life Made Easy With Home Automation</title>
<link rel="Shortcut Icon" href="http://nexahome.se/favicon32x32.ico">
<meta http-equiv="refresh" content="300;#URL#?mypage=motion1&psw=#PSW#">
</head>

<!-- dynamic="motion6" url="file:///C:/apps/nexahome/mywebserver/motion/index6.html" keep="60" -->

<body bgcolor="#ffffff" background="/nexahome/nexahome_bg.jpg">

<div style="position: absolute; top: 5px; left: 25px;">
<form action="nexahome" method="get">
<input type=hidden name="mypage" value="motion1">
<input type=hidden name="return" value="motion">
<input type=hidden name="psw" value="#PSW#">
<input type=hidden name="rnd" value="#RND#">
<input type=submit value="#TIMESTAMP#">
</form>
</div>

<div style="position: absolute; top: 5px; left: 180px;">
<form action="nexahome" method="get">
<input type=hidden name="mypage" value="motion5">
<input type=hidden name="return" value="motion6">
<input type=hidden name="psw" value="#PSW#">
<input type=hidden name="rnd" value="#RND#">
<input type=submit value="Nyare">
</form>
</div>

<div style="position: absolute; top: 5px; left: 250px;">
<form action="nexahome" method="get">
<input type=hidden name="mypage" value="motion7">
<input type=hidden name="return" value="motion6">
<input type=hidden name="psw" value="#PSW#">
<input type=hidden name="rnd" value="#RND#">
<input type=submit value="Äldre">
</form>
</div>

<div style="position: absolute; top: 5px; left: 320px;">
<form action="nexahome" method="get">
<input type=hidden name="mypage" value="#RETURN#">
<input type=hidden name="psw" value="#PSW#">
<input type=hidden name="rnd" value="#RND#">
<input type=submit value="Gå tillbaka">
</form>
</div>

<div style="position: absolute; top: 30px; left: 25px">
#DYNAMIC#motion6#
</div>

</body>
</html>
motion7.html

Code: Select all

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head><title>NexaHome - Life Made Easy With Home Automation</title>
<link rel="Shortcut Icon" href="http://nexahome.se/favicon32x32.ico">
<meta http-equiv="refresh" content="300;#URL#?mypage=motion1&psw=#PSW#">
</head>

<!-- dynamic="motion7" url="file:///C:/apps/nexahome/mywebserver/motion/index7.html" keep="60" -->

<body bgcolor="#ffffff" background="/nexahome/nexahome_bg.jpg">

<div style="position: absolute; top: 5px; left: 25px;">
<form action="nexahome" method="get">
<input type=hidden name="mypage" value="motion1">
<input type=hidden name="return" value="motion">
<input type=hidden name="psw" value="#PSW#">
<input type=hidden name="rnd" value="#RND#">
<input type=submit value="#TIMESTAMP#">
</form>
</div>

<div style="position: absolute; top: 5px; left: 180px;">
<form action="nexahome" method="get">
<input type=hidden name="mypage" value="motion6">
<input type=hidden name="return" value="motion7">
<input type=hidden name="psw" value="#PSW#">
<input type=hidden name="rnd" value="#RND#">
<input type=submit value="Nyare">
</form>
</div>

<div style="position: absolute; top: 5px; left: 250px;">
<form action="nexahome" method="get">
<input type=hidden name="mypage" value="motion8">
<input type=hidden name="return" value="motion7">
<input type=hidden name="psw" value="#PSW#">
<input type=hidden name="rnd" value="#RND#">
<input type=submit value="Äldre">
</form>
</div>

<div style="position: absolute; top: 5px; left: 320px;">
<form action="nexahome" method="get">
<input type=hidden name="mypage" value="#RETURN#">
<input type=hidden name="psw" value="#PSW#">
<input type=hidden name="rnd" value="#RND#">
<input type=submit value="Gå tillbaka">
</form>
</div>

<div style="position: absolute; top: 30px; left: 25px">
#DYNAMIC#motion7#
</div>

</body>
</html>
motion8.html

Code: Select all

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head><title>NexaHome - Life Made Easy With Home Automation</title>
<link rel="Shortcut Icon" href="http://nexahome.se/favicon32x32.ico">
<meta http-equiv="refresh" content="300;#URL#?mypage=motion1&psw=#PSW#">
</head>

<!-- dynamic="motion8" url="file:///C:/apps/nexahome/mywebserver/motion/index8.html" keep="60" -->

<body bgcolor="#ffffff" background="/nexahome/nexahome_bg.jpg">

<div style="position: absolute; top: 5px; left: 25px;">
<form action="nexahome" method="get">
<input type=hidden name="mypage" value="motion1">
<input type=hidden name="return" value="motion">
<input type=hidden name="psw" value="#PSW#">
<input type=hidden name="rnd" value="#RND#">
<input type=submit value="#TIMESTAMP#">
</form>
</div>

<div style="position: absolute; top: 5px; left: 180px;">
<form action="nexahome" method="get">
<input type=hidden name="mypage" value="motion7">
<input type=hidden name="return" value="motion8">
<input type=hidden name="psw" value="#PSW#">
<input type=hidden name="rnd" value="#RND#">
<input type=submit value="Nyare">
</form>
</div>

<div style="position: absolute; top: 5px; left: 250px;">
<form action="nexahome" method="get">
<input type=hidden name="mypage" value="motion9">
<input type=hidden name="return" value="motion8">
<input type=hidden name="psw" value="#PSW#">
<input type=hidden name="rnd" value="#RND#">
<input type=submit value="Äldre">
</form>
</div>

<div style="position: absolute; top: 5px; left: 320px;">
<form action="nexahome" method="get">
<input type=hidden name="mypage" value="#RETURN#">
<input type=hidden name="psw" value="#PSW#">
<input type=hidden name="rnd" value="#RND#">
<input type=submit value="Gå tillbaka">
</form>
</div>

<div style="position: absolute; top: 30px; left: 25px">
#DYNAMIC#motion8#
</div>

</body>
</html>
motion9.html

Code: Select all

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head><title>NexaHome - Life Made Easy With Home Automation</title>
<link rel="Shortcut Icon" href="http://nexahome.se/favicon32x32.ico">
<meta http-equiv="refresh" content="300;#URL#?mypage=motion1&psw=#PSW#">
</head>

<!-- dynamic="motion9" url="file:///C:/apps/nexahome/mywebserver/motion/index9.html" keep="60" -->

<body bgcolor="#ffffff" background="/nexahome/nexahome_bg.jpg">

<div style="position: absolute; top: 5px; left: 25px;">
<form action="nexahome" method="get">
<input type=hidden name="mypage" value="motion1">
<input type=hidden name="return" value="motion">
<input type=hidden name="psw" value="#PSW#">
<input type=hidden name="rnd" value="#RND#">
<input type=submit value="#TIMESTAMP#">
</form>
</div>

<div style="position: absolute; top: 5px; left: 180px;">
<form action="nexahome" method="get">
<input type=hidden name="mypage" value="motion8">
<input type=hidden name="return" value="motion9">
<input type=hidden name="psw" value="#PSW#">
<input type=hidden name="rnd" value="#RND#">
<input type=submit value="Nyare">
</form>
</div>

<div style="position: absolute; top: 5px; left: 250px;">
<form action="nexahome" method="get">
<input type=hidden name="mypage" value="motion1">
<input type=hidden name="return" value="motion9">
<input type=hidden name="psw" value="#PSW#">
<input type=hidden name="rnd" value="#RND#">
<input type=submit value="Nyaste">
</form>
</div>

<div style="position: absolute; top: 5px; left: 320px;">
<form action="nexahome" method="get">
<input type=hidden name="mypage" value="#RETURN#">
<input type=hidden name="psw" value="#PSW#">
<input type=hidden name="rnd" value="#RND#">
<input type=submit value="Gå tillbaka">
</form>
</div>

<div style="position: absolute; top: 30px; left: 25px">
#DYNAMIC#motion9#
</div>

</body>
</html>
5) starta om NexaHome

6) starta "motion detector" programmet
C:\apps\NexaHomeMD_beta\NexaHomeMD.exe

7) gå till "mypage" sidan motion

Edit: Observera att filändelserna ska vara .html
Edit: 2012-12-08 Uppdaterade motion.html, lade till knappen "Radera 1-9"

hekj
Posts: 990
Joined: Thu Jan 18, 2018 11:08 am
Location: Stockholm
Contact:

Re: Tips: NexaHome 'Motion Detector'

Post by hekj » Thu Jan 18, 2018 11:08 am

Ett exempel på hur det kan se ut efter att rörelse har detekterats.
Attachments
motion_detector.png
motion_detector.png (195.48 KiB) Viewed 6744 times

hekj
Posts: 990
Joined: Thu Jan 18, 2018 11:08 am
Location: Stockholm
Contact:

Re: Tips: NexaHome 'Motion Detector'

Post by hekj » Thu Jan 18, 2018 11:08 am

Den som vill se en stillbild på det som just nu händer i Övertorneå kan lägga in följande knapp i filen motion.html

Code: Select all

<div style="position: absolute; top: 5px; left: 595px;">
<form action="nexahome" method="get">
<input type=hidden name="mypage" value="overtornea">
<input type=hidden name="return" value="motion">
<input type=hidden name="psw" value="#PSW#">
<input type=hidden name="rnd" value="#RND#">
<input type=submit value="SNAPSHOT">
</form>
</div>
Samt skapa filen overtornea.html

Code: Select all

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head><title>NexaHome - Life Made Easy With Home Automation</title>
<link rel="Shortcut Icon" href="http://nexahome.se/favicon32x32.ico">
</head>

<!-- dynamic="webcamera" url="http://webkamera.overtornea.se/axis-cgi/jpg/image.cgi?resolution=640x480&compression=0" keep="2" -->

<body bgcolor="#ffffff" background="/nexahome/nexahome_bg.jpg">

<div style="position: absolute; top: 5px; left: 15x">
<img src="#DYNAMIC#webcamera#"/>
</div>

<div style="position: absolute; top: 500px; left: 25px;">
<form action="nexahome" method="get">
<input type=hidden name="mypage" value="overtornea">
<input type=hidden name="return" value="motion">
<input type=hidden name="psw" value="#PSW#">
<input type=hidden name="rnd" value="#RND#">
<input type=submit value="#TIMESTAMP#">
</form>
</div>

<div style="position: absolute; top: 540px; left: 25px;">
<form action="nexahome" method="get">
<input type=hidden name="mypage" value="#RETURN#">
<input type=hidden name="psw" value="#PSW#">
<input type=hidden name="rnd" value="#RND#">
<input type=submit value="Gå tillbaka">
</form>
</div>

</body>
</html>
För att få se bilden så är det bara klicka på SNAPSHOT knappen.

Snoopy
Posts: 253
Joined: Thu Jan 18, 2018 11:08 am
Location: Kalmar
Contact:

Re: Tips: NexaHome 'Motion Detector'

Post by Snoopy » Thu Jan 18, 2018 11:08 am

Vad använder du för kamera? USB eller network?
... världen är full av tappade sugar, några är mina....
HA 3.1.1 i en Raspberry Pi 2 + Tellstick Duo
owfs i annan Raspberry B+ + Tellstick och en Tellstick Net som backup

hekj
Posts: 990
Joined: Thu Jan 18, 2018 11:08 am
Location: Stockholm
Contact:

Re: Tips: NexaHome 'Motion Detector'

Post by hekj » Thu Jan 18, 2018 11:08 am

Snoopy wrote:Vad använder du för kamera? USB eller network?
Nätverksanslutna webkameror av följande fabrikat fungerar:
D-Link
Axis

hekj
Posts: 990
Joined: Thu Jan 18, 2018 11:08 am
Location: Stockholm
Contact:

Re: Tips: NexaHome 'Motion Detector'

Post by hekj » Thu Jan 18, 2018 11:08 am

Har uppdaterat filen motion.html (lade till följande rader):

Code: Select all

<!-- dynamic="delete_1-9" url="file:///C:/apps/nexahome/mywebserver/motion/delete_1-9.html" keep="60" -->

Code: Select all

<div style="position: absolute; top: 640px; left: 25px;">
<form action="nexahome" method="get">
<input type=hidden name="mypage" value="motion">
<input type=hidden name="return" value="motion">
<input type=hidden name="delete" value="#DYNAMIC#delete_1-9#">
<input type=hidden name="psw" value="#PSW#">
<input type=hidden name="rnd" value="#RND#">
<input type=submit value="Radera 1-9">
</form>
</div>


erse
Posts: 8
Joined: Thu Jan 18, 2018 11:08 am

Re: Tips: NexaHome 'Motion Detector'

Post by erse » Thu Jan 18, 2018 11:08 am

Vore bra om man som komplement till motion detect kunde ställa om själva kameran att övervaka rörelse. Har dock problem med att ställa om motion detect i en kamera via Away och motion_on.bat med innehållet:

START "" "http://192.168.0.163:99/set_alarm.cgi?m ... =<password>"
Taskkill /im "iexplore.exe"

Kan man åstadkomma samma sak direkt via .bsh utan att behöva köra explorer? Tacksam för tips.

Dessutom kommer jag inte förbi inloggningsrutan i en D-link kamera med ovanstående script. Har även försökt med user="<user>" password="<password>" resp. user:password utan framgång.

hekj
Posts: 990
Joined: Thu Jan 18, 2018 11:08 am
Location: Stockholm
Contact:

Re: Tips: NexaHome 'Motion Detector'

Post by hekj » Thu Jan 18, 2018 11:08 am

erse wrote:Vore bra om man som komplement till motion detect kunde ställa om själva kameran att övervaka rörelse. Har dock problem med att ställa om motion detect i en kamera via Away och motion_on.bat med innehållet:

START "" "http://192.168.0.163:99/set_alarm.cgi?m ... =<password>"
Taskkill /im "iexplore.exe"

Kan man åstadkomma samma sak direkt via .bsh utan att behöva köra explorer? Tacksam för tips.

Dessutom kommer jag inte förbi inloggningsrutan i en D-link kamera med ovanstående script. Har även försökt med user="<user>" password="<password>" resp. user:password utan framgång.
Funderar på om du skulle kunna använda dig av "gmail" koden som finns beskriven i manualen (http://nexahome.se/manual/index.html#Topic61). Har inte uppdaterat manualen på ett tag... "http://hem.bredband.net/hekj/nexahome/BshAddOn.jar"...

Hämta http://nexahome.se/BshAddOn.jar och använd dig av en modfierad variant av gmail.bsh.

fetchWebContent() metoden gör nog nästan samma sak som du redan testat manuellt (user:password) så den kanske inte hjälper dig att komma runt inloggningen för D-link kameran, men du skulle kunna bli av med iexplore.exe då du vill anropa "http://192.168.0.163:99/set_alarm.cgi?m ... =<password>"

gmail.bsh

Code: Select all

// Change to your own gmail account, user name and password
usr = "user";
psw = "password";
// Change the timeout if needed
timeout = 4 * 60;  // 4 minutes
// Set location for the BshAddOn code
addClassPath("C:/apps/nexahome/BshAddOn.jar");
page = BshAddOn.fetchWebContent("https://mail.google.com/mail/feed/atom", usr, psw);
if (page != null && page.indexOf("<fullcount>") != -1) {
   if (page.indexOf("<fullcount>0</fullcount>") != -1) {
      echo("Sorry, no unread mail found...");
      if (deviceIsOn("5")) {
         deviceOff("5");
      }
   } else {
      echo("You've got mail!");
      if (!deviceIsOn("5")) {
         deviceOn("5");
      } else {
         timeout *= 3;  // 12 minutes
      }
   }
} else {
   echo("Unable to check the gmail account!");
}
startTimer("gmail", timeout);
motion_armed.bsh

Code: Select all

addClassPath("C:/apps/nexahome/BshAddOn.jar");
page = BshAddOn.fetchWebContent("http://192.168.0.163:99/set_alarm.cgi?motion_armed=1&user=<user>&pwd=<password>", null, null);
//page = BshAddOn.fetchWebContent("http://192.168.0.163:99/set_alarm.cgi?motion_armed=1, "<user>", "<password>");
if (page != null) {
   echo(page);
}
Testa med
page = BshAddOn.fetchWebContent("http://192.168.0.163:99/set_alarm.cgi?m ... =<password>", null, null);
eller
page = BshAddOn.fetchWebContent("http://192.168.0.163:99/set_alarm.cgi?motion_armed=1, "<user>", "<password>");

erse
Posts: 8
Joined: Thu Jan 18, 2018 11:08 am

Re: Tips: NexaHome 'Motion Detector'

Post by erse » Thu Jan 18, 2018 11:08 am

Fungerar perfekt med motion_armed. Ordnar man en motion_armed_on.bsh och en motion_armed_off.bsh (armed=0) styrda från Mode så får man övervakning i läge Away som stängs av i Home. Tack för hjälpen! :D

Återstår att fixa inloggning till D-link så jag kan välja kameran under Open MJPEG i NexahomeMD.exe. Kan man föresten ändra känsligheten i dess motion detection? Får för ofta bilder sparade.

hekj
Posts: 990
Joined: Thu Jan 18, 2018 11:08 am
Location: Stockholm
Contact:

Re: Tips: NexaHome 'Motion Detector'

Post by hekj » Thu Jan 18, 2018 11:08 am

erse wrote:Fungerar perfekt med motion_armed. Ordnar man en motion_armed_on.bsh och en motion_armed_off.bsh (armed=0) styrda från Mode så får man övervakning i läge Away som stängs av i Home. Tack för hjälpen! :D

Återstår att fixa inloggning till D-link så jag kan välja kameran under Open MJPEG i NexahomeMD.exe. Kan man föresten ändra känsligheten i dess motion detection? Får för ofta bilder sparade.
Testa med att öka 'sensitivity' från 10 till 20 i NexaHomeMD.xml filen.

Code: Select all

sensitivity="20"
Du kan också säga till programmet att det måste vara rörelse i två områden under vissa klockslag för att inspelning ska starta, lägg till 'threshold' enligt följande exempel.

Code: Select all

			<threshold areas="2" hours="8,9,10,11,12,13,14,15,16" ></threshold>
		</alarm>
När det gäller user/password i NexaHomeMD.xml filen så ska man ange sådant enligt följande exempel.

Code: Select all

mjpeg="http://<user>:<password>@webkamera.overtornea.se/mjpg/video.mjpg"

Post Reply