Page 1 of 1

How to: Motion sensors from iSpy camera's

Posted: Friday 20 January 2017 9:21
by bbqkees
I am using (the free) iSpy software for my IP camera's.

In the software there is a function that can send a HTTP request when f.i. motion is detected.
You can use this in Domoticz to trigger a virtual sensor.

Step 1:
Create a virtual switch in Domoticz and set it to the Motion Sensor type.
Write down the device ID.

Step 2:
Go to iSpy and select the camera you want to use as a motion detector.
Go to Settings and then the tab Alerts.

Now you need to create 2 rules with the type 'Call URL'.
One rule for 'Alert' and one rule for 'Alert Stopped'.

Say the device ID of your virtual sensor is '228' and the IP address of your Domoticz is 192.168.1.100 with port 8080.

Rule for 'Alert':

Code: Select all

http://192.168.0.100:8080/json.htm?type=command&param=switchlight&idx=228&switchcmd=On
make sure you enable the rule by clicking on the checkmark!
Uncheck 'Send image'.


Image

Rule for 'Alert Stopped':

Code: Select all

http://192.168.0.100:8080/json.htm?type=command&param=switchlight&idx=228&switchcmd=Off
Image

What you get is this:

Image

It works pretty well.

Re: How to: Motion sensors from iSpy camera's

Posted: Saturday 11 February 2017 13:00
by PSYCHOTIC
Cool feature!

Does anyone know a free android equivalent to ispy? (Stand alone android motion app send json)
I want to use this to monitor a blinking led for my energy consumption.

Great thx.

Re: How to: Motion sensors from iSpy camera's

Posted: Monday 20 March 2017 23:18
by Marzel
Tried this, but it doesn't work.
Maybe you can help me out.

Domoticz has IP 127.0.0.1:8080

When I do the command for 127.0.... it just gives error.

Using Domoticz V3.7017 on Windows 10.

Re: How to: Motion sensors from iSpy camera's

Posted: Tuesday 21 March 2017 12:15
by bbqkees
Is Domoticz running on the same machine as iSpy?

Re: How to: Motion sensors from iSpy camera's

Posted: Sunday 26 March 2017 20:17
by adam0908
Tnx for this information...some new thing learn...

Re: How to: Motion sensors from iSpy camera's

Posted: Saturday 29 April 2017 18:48
by Marzel
bbqkees wrote:Is Domoticz running on the same machine as iSpy?
Hi,
I´m sorry I didn´t return here and didn´t answer your question.
I got it running in the meantime.
Thanx for your instructions.

Re: How to: Motion sensors from iSpy camera's

Posted: Friday 19 May 2017 21:23
by marktn
Top instructions! It works.

Verstuurd vanaf mijn HUAWEI GRA-L09 met Tapatalk

Re: How to: Motion sensors from iSpy camera's

Posted: Wednesday 27 December 2017 15:40
by steffo
Hello,
I have my iSpy and like to control a switch based on motion detecting on a Hikvision camera.
The camera works fine and the alerts are also OK (beep and recording)

I created a virtual switch but could not find the 'motion detector' in type selection.
Is this necessary and how can I get 'motion detection' ?

I tried to just create a swithch and use this url:
http://192.168.1.191:8080/json.htm?type ... itchcmd=On
This does not work - it does not work if i write it into a browser either - I get' Err'
as response..
I hope anyone can help!

Re: How to: Motion sensors from iSpy camera's

Posted: Tuesday 02 January 2018 10:00
by bbqkees
The switch ID is the IDX number of the switch in Domoticz.
This is usually a 3 digit number.

You can look it up via Setup->Devices and then search for the switch.

Re: How to: Motion sensors from iSpy camera's

Posted: Friday 05 January 2018 14:22
by jth62
Hi bbqkees !

thank you very much for these instructions!

I can launch the following link from a batch :

@echo off
start /b http://192.168.1.100:8080/json.htm?type ... itchcmd=On"
timeout /t 5
TASKKILL /IM chrome.exe /F

But when I try to activate the url call , nothing happens :
http://192.168.1.100:8080/json.htm?type ... itchcmd=On

Can you confirm that this synthax is correct?

thank you in advance
Best regards
Julien

Re: How to: Motion sensors from iSpy camera's

Posted: Sunday 07 January 2018 23:43
by astrapowerrr
Going to test this... looks


Verzonden vanaf mijn iPhone met Tapatalk

Re: How to: Motion sensors from iSpy camera's

Posted: Tuesday 09 January 2018 0:02
by Evelen
The problem with this is that ispy think lights turning on and off is motion

Re: How to: Motion sensors from iSpy camera's

Posted: Tuesday 01 January 2019 23:29
by eeve
Marzel wrote: Saturday 29 April 2017 18:48
bbqkees wrote:Is Domoticz running on the same machine as iSpy?
Hi,
I´m sorry I didn´t return here and didn´t answer your question.
I got it running in the meantime.
Thanx for your instructions.
Hi Marzel,
You got it running, but how?

I have also a problem with Domoticz and Ispy on the same WINDOWS computer. I can't login Domoticz and also the Domoticz App has problems with connecting as long as Ispy runs. If I shutdown Ispy and reboot without automatically starting Ispy on startup, Domoticz logs-in automatically and the app works fine. The port 8080 is connected in the Router and that isn't the problem. How can I tell Domoticz and/or Ispy to use another IP-address then 127.0.0.1?

Re: How to: Motion sensors from iSpy camera's

Posted: Wednesday 02 January 2019 9:11
by lost
Evelen wrote: Tuesday 09 January 2018 0:02 The problem with this is that ispy think lights turning on and off is motion
Motion detection results from image pixel variation estimates, so this issue is always there as well on cams embedded motion detection, when used. This can only be mitigated carefully tuning sensitivity/level and selecting motion detection zones less subject to this kind of changes... but not always!

For instancen cams that can switch day/night mode are not very "clever" on this: Usually, you get lots of false captures because the dumb guys who designed the firmware didn't provided the feature to switch motion detection off automatically for a few seconds when switching day/night!

On my side, as I don't want to have continous video flows using bandwidth on my LAN, I only used motion captures to FTP. Some cams (I have an Edimax the provide the feature, another from same manufacturer + other Dlink that do not) provide the ability to trigger an http link on captures that should be able to feed a Domoticz virtual PIR in the same way as iSpy directly from the IP cam.

But as it's quite uncommon, I prefer to rely on a service I wrote that monitors cams FTP subdirs every 10s (to have something still responsive enough & have time to do the in-loop processing) and, if files are found, is able to switch Domoticz associated cam virtual PIR for 10s using json http API.

It's also able to email captures (can be configured to do so only on absence, checking security panel status) in an encrypted archive + do some basic image check (more sophisticated stuff, like running another layer of motion check on camera FTP'ed motion images, would not run in the allocated timeframe on a PI, especially with several cams) to filter out those that are almost black (most of those resulting from day->night switch) for cams that provide the IR cut feature.

As well, most reliable cams on motion detection side are those able to provide separate images (instead of short videos). Don't ask me why, this is what I observed from my devices. They also allow better implementation in a security system as number of images in a time slice can be used as an estimate of motion (idea behind this: A bird passing by will not trigger many images compared to someone attempting to break your door): In a system that use an additive weighting mechanism for, lets's say 1mn time slices, were each sensor is allocated a weight... cam virtual PIRs can set a weight resulting from capture nb.

Idea behind this is an internal sensor have a base weight that immediately triggers the siren, external ones only have a fraction of it (so they must trigger several times or several sensors must trigger in the 1mn slice before cumulative weight reset) to reject false positives.

=> whatever the solution, some amount of post processing will be needed because motion detection is never perfect. Doing so, my advice is to make it per cam configurable as they will all behave differently depending on model and location.