Page 1 of 2
Chinese PIR
Posted: Saturday 13 February 2016 19:59
by Willem81
Hi everyone,
I am using some Chinese PIR motion sensors in my garden.
They detect motion very well, but... in Domoticz the motion is logged as "off", so actually when the PIR it motion-triggered, it sends an off signal to the RFLINK and Domoticz.
I set up a notification on "turn off" which work fine. But now I am trying to setup my garden light to turn on as soon as the motion sensor sends an off signal after sunset. The problem is that the Chinese PIR is normally off, so if I put in Blocky "If (Chinese PIR=OFF) the event is immediately triggered. There is no option to trigger on "off signal received". Is there a way to change the way the signal of the PIR is received? for example: if motion would be logged as ON or as MOTION then I could get my event to work!
Thanks in avance for helping!
Kind regards, Willem.
Re: Chinese PIR
Posted: Sunday 14 February 2016 14:30
by mischa
You can solve this by making a LUA script instead of blocky.
Example:
Code: Select all
commandArray = {}
if (devicechanged['PIR'] == 'Off' and otherdevices['Gardenlights'] == 'Off') then
commandArray['Gardenlights']='On FOR 5'
end
return commandArray
Explanation:
if your Chinees PIR detects movement it will send a device changed event to Domoticz this script will be triggert and if your gardenlights are off (otherdevices) then it wil send a command to put the gardenlight on just for 5 minutes.
Always do a second check like (otherdevices['Gardenights'] == 'Off' otherwise the script will put the lights on every time your PIR sees movement when the lights are already on, this will result in unwanted commands send.
I do the same thing with the 2nd switch input on a Fibaro dimmer module, instead of always off the Fibaro 2nd switch is always on (value 255)
Put this script in the LUA folder in your Domoticz install.
Good luck,
Mischa
Re: Chinese PIR
Posted: Sunday 14 February 2016 14:36
by Stuntteam
Or mail a debug log to
[email protected] to see why it reports "off"..
Perhaps we can make it report "on"
Re: Chinese PIR
Posted: Sunday 14 February 2016 20:07
by Willem81
Thank you Mischa! Very clear explaination. It works

! (I made a dummy switch for sunset/sunrise, so I can check that also)
Also Thanks to Stuntteam

! I will check the debug log and send it later this week.
Re: Chinese PIR
Posted: Monday 15 February 2016 22:11
by deennoo
Willem81.
Please can you post a picture of your pir sensor board ?
On or off frequentely dépend of jumper configuration.
Re: Chinese PIR
Posted: Thursday 18 February 2016 22:44
by fets
@Willem81 could you give a link to your chinese PIR sensor, please
Re: Chinese PIR
Posted: Monday 29 February 2016 18:21
by Willem81
Of course! I am sorry for the delay, I didn't read the topic anymore.
These are the ones:
http://nl.aliexpress.com/item/Free-ship ... 28749.html
I cannot make a picture because it is mounted high in my shed

Re: Chinese PIR
Posted: Wednesday 02 March 2016 22:21
by fets
@Willem81 thanks.
What about battery life ?
Re: Chinese PIR
Posted: Monday 04 April 2016 22:01
by manjh
I use similar sensors, and the setup is driving me insane. I got the whole thing working, and then without any obvious reason Domoticz "loses" the sensor signal. This has happened for 3 or 4 times now. Solution has been to delete the old switch and install fresh. Then it all works again.
Strange.
Does this sound familiar to anyone?
Hans
Re: Chinese PIR
Posted: Wednesday 06 April 2016 11:54
by deennoo
Got 5 of them.
Sometime it looks like rfx or rflink discover 2 differents "devices" one is the real the other one is a parasit. hard to find which one is the good...my solution is to record both of them and saw on time which one react each time PIR is on.
on RFXTRXE you have to active lighting 4
Below a pic of my material config who make it reconize as an ON action PIR

- pir config.JPG (54.13 KiB) Viewed 9171 times
You have to set the OFF delay by the value you want to turn it OFF

- pir delay off.JPG (18.18 KiB) Viewed 9171 times
Re: Chinese PIR
Posted: Wednesday 06 April 2016 11:55
by manjh
Additional remark: my sensors send out an "on" signal when motion is detected.
As usual with this type of sensor, an "off" signal is never sent so I use the "off delay" value of 5 seconds.
Re: Chinese PIR
Posted: Monday 24 October 2016 1:04
by Martijn85
I have a Chinese PIR for A few years now, this one always send a ON command intil A few weeks. Now it will only send an OFF command?!
Can i reverse this?
Re: Chinese PIR
Posted: Saturday 12 November 2016 21:22
by jackderuiter
Just bought
this Kerui curtain sensor and can report it's working ok in Domoticz with RFLink
Re: Chinese PIR
Posted: Saturday 12 November 2016 21:27
by SHadley1138
What do all the pins do, does anyone have a wiring chart?
Sent from my iPhone using Tapatalk
Re: Chinese PIR
Posted: Sunday 20 November 2016 20:08
by jackderuiter
I have two dip switches that are responsible for led on/off and instant report or every 5 minutes.
however since last weekend it appears to have a different ID... Anyone with similar problems?
Re: Chinese PIR
Posted: Wednesday 23 November 2016 17:59
by SHadley1138
jackderuiter wrote:I have two dip switches that are responsible for led on/off and instant report or every 5 minutes.
however since last weekend it appears to have a different ID... Anyone with similar problems?
Which pins are they?
Sent from my iPhone using Tapatalk
Re: Chinese PIR
Posted: Wednesday 23 November 2016 18:06
by jackderuiter
They are dip switches on the top left if i am nog mistaken. Pins Are below but did not change them. Can't Make a picture Right now..
Re: Chinese PIR
Posted: Wednesday 23 November 2016 18:08
by SHadley1138
Yes I know about the bank of pins, but do you have any documentation about what each one is
Sent from my iPhone using Tapatalk
Re: Chinese PIR
Posted: Wednesday 23 November 2016 18:36
by jackderuiter
Nope..

only the two dip switches. Believe some similar pirs and Pictures Are in the Same topic.
Re: Chinese PIR
Posted: Wednesday 23 November 2016 18:39
by jackderuiter
And since Today back again on the old id again.. don't know why the pir is hopping between