How to: Motion sensors from iSpy camera's

Moderator: leecollings

Post Reply
User avatar
bbqkees
Posts: 407
Joined: Sunday 17 August 2014 21:01
Target OS: Linux
Domoticz version: 4.1x
Location: The Netherlands
Contact:

How to: Motion sensors from iSpy camera's

Post 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.
Bosch / Nefit / Buderus / Junkers / Worcester / Sieger EMS bus Wi-Fi MQTT Gateway and interface boards: https://bbqkees-electronics.nl/
PSYCHOTIC
Posts: 20
Joined: Saturday 21 February 2015 16:32
Target OS: Windows
Domoticz version:
Location: Netherlands
Contact:

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

Post 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.
Marzel
Posts: 2
Joined: Monday 20 March 2017 23:04
Target OS: Windows
Domoticz version:
Contact:

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

Post 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.
User avatar
bbqkees
Posts: 407
Joined: Sunday 17 August 2014 21:01
Target OS: Linux
Domoticz version: 4.1x
Location: The Netherlands
Contact:

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

Post by bbqkees »

Is Domoticz running on the same machine as iSpy?
Bosch / Nefit / Buderus / Junkers / Worcester / Sieger EMS bus Wi-Fi MQTT Gateway and interface boards: https://bbqkees-electronics.nl/
adam0908
Posts: 1
Joined: Sunday 26 March 2017 20:14
Target OS: Windows
Domoticz version:
Contact:

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

Post by adam0908 »

Tnx for this information...some new thing learn...
Marzel
Posts: 2
Joined: Monday 20 March 2017 23:04
Target OS: Windows
Domoticz version:
Contact:

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

Post 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.
marktn
Posts: 233
Joined: Tuesday 21 April 2015 21:39
Target OS: Windows
Domoticz version:
Contact:

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

Post by marktn »

Top instructions! It works.

Verstuurd vanaf mijn HUAWEI GRA-L09 met Tapatalk
Domoticz latest stable, Intel NUC, Proxmox, Zigate, RFLink, Kaku switches, Ikea lights, Xiaomi sensors, Honeywell smoke detectors, Yeelight, Shelly, Slave Domoticz PI 3B+, Node-Red, Espeasy.
steffo
Posts: 10
Joined: Wednesday 27 December 2017 15:28
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post 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!
User avatar
bbqkees
Posts: 407
Joined: Sunday 17 August 2014 21:01
Target OS: Linux
Domoticz version: 4.1x
Location: The Netherlands
Contact:

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

Post 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.
Bosch / Nefit / Buderus / Junkers / Worcester / Sieger EMS bus Wi-Fi MQTT Gateway and interface boards: https://bbqkees-electronics.nl/
jth62
Posts: 1
Joined: Friday 05 January 2018 14:08
Target OS: Windows
Domoticz version:
Contact:

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

Post 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
astrapowerrr
Posts: 141
Joined: Tuesday 31 January 2017 20:34
Target OS: -
Domoticz version:
Contact:

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

Post by astrapowerrr »

Going to test this... looks


Verzonden vanaf mijn iPhone met Tapatalk
Evelen
Posts: 234
Joined: Thursday 09 July 2015 12:03
Target OS: Linux
Domoticz version: 2.4538
Location: Norway
Contact:

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

Post by Evelen »

The problem with this is that ispy think lights turning on and off is motion
User avatar
eeve
Posts: 2
Joined: Saturday 29 December 2018 16:56
Target OS: Windows
Domoticz version: 4.97
Location: Roermond, The Netherlands

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

Post 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?
Domoticz + Ispy @ Windows 10
-----
A wheelchair doesn't end your life;
but it's a challenge to continu
lost
Posts: 618
Joined: Thursday 10 November 2016 9:30
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post 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.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests