Chinese PIR
Moderators: leecollings, Stuntteam
-
- Posts: 35
- Joined: Wednesday 13 January 2016 10:28
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Chinese PIR
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.
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.
-
- Posts: 74
- Joined: Tuesday 07 April 2015 20:32
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.8872
- Location: Heerhugowaard, The Netherlands
- Contact:
Re: Chinese PIR
You can solve this by making a LUA script instead of blocky.
Example:
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
Example:
Code: Select all
commandArray = {}
if (devicechanged['PIR'] == 'Off' and otherdevices['Gardenlights'] == 'Off') then
commandArray['Gardenlights']='On FOR 5'
end
return commandArray
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
Last edited by mischa on Sunday 14 February 2016 14:46, edited 1 time in total.
Pi 2 - Pi 1 - Razzbery 2.0 - Fibaro FGD-211 - Fibaro FGD-212 - Fibaro FGRGBWM-441 (RGBW Module) - Fibaro FGBS321 (Universal Switch) - FGWPF-102 - TBK Home TZ67-G - Synology DS1515+ - Esp Easy (with wemos D1 mini)
- Stuntteam
- Posts: 399
- Joined: Wednesday 06 May 2015 16:39
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Chinese PIR
Or mail a debug log to [email protected] to see why it reports "off"..
Perhaps we can make it report "on"
Perhaps we can make it report "on"
-=# RFLink Gateway Development Team #=-
Introduction: http://www.nemcon.nl/blog2/
Generic RFLink Support forum: http://www.esp8266.nu/forum/viewforum.php?f=8
Introduction: http://www.nemcon.nl/blog2/
Generic RFLink Support forum: http://www.esp8266.nu/forum/viewforum.php?f=8
-
- Posts: 35
- Joined: Wednesday 13 January 2016 10:28
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Chinese PIR
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.

Also Thanks to Stuntteam

-
- Posts: 784
- Joined: Wednesday 10 December 2014 13:06
- Target OS: Linux
- Domoticz version: beta
- Location: Bordeaux France
- Contact:
Re: Chinese PIR
Willem81.
Please can you post a picture of your pir sensor board ?
On or off frequentely dépend of jumper configuration.
Please can you post a picture of your pir sensor board ?
On or off frequentely dépend of jumper configuration.
Domoticz stable 3.5877 for real & Domoticz beta for test
Rfxtrxe / RFLink / Milight / Yeelight / Tasmota / MQTT / BLE / Zigate
http://domo-attitude.fr
Rfxtrxe / RFLink / Milight / Yeelight / Tasmota / MQTT / BLE / Zigate
http://domo-attitude.fr
-
- Posts: 21
- Joined: Monday 21 September 2015 20:10
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2.2969
- Contact:
Re: Chinese PIR
@Willem81 could you give a link to your chinese PIR sensor, please
-
- Posts: 35
- Joined: Wednesday 13 January 2016 10:28
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Chinese PIR
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
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

-
- Posts: 21
- Joined: Monday 21 September 2015 20:10
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2.2969
- Contact:
Re: Chinese PIR
@Willem81 thanks.
What about battery life ?
What about battery life ?
-
- Posts: 748
- Joined: Saturday 27 February 2016 12:49
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2020.2
- Location: NL
- Contact:
Re: Chinese PIR
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
Strange.
Does this sound familiar to anyone?
Hans
Hans
-
- Posts: 784
- Joined: Wednesday 10 December 2014 13:06
- Target OS: Linux
- Domoticz version: beta
- Location: Bordeaux France
- Contact:
Re: Chinese PIR
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
You have to set the OFF delay by the value you want to turn it OFF
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
You have to set the OFF delay by the value you want to turn it OFF
Domoticz stable 3.5877 for real & Domoticz beta for test
Rfxtrxe / RFLink / Milight / Yeelight / Tasmota / MQTT / BLE / Zigate
http://domo-attitude.fr
Rfxtrxe / RFLink / Milight / Yeelight / Tasmota / MQTT / BLE / Zigate
http://domo-attitude.fr
-
- Posts: 748
- Joined: Saturday 27 February 2016 12:49
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2020.2
- Location: NL
- Contact:
Re: Chinese PIR
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.
As usual with this type of sensor, an "off" signal is never sent so I use the "off delay" value of 5 seconds.
Hans
-
- Posts: 53
- Joined: Wednesday 20 January 2016 20:21
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: Netherlands
- Contact:
Re: Chinese PIR
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?
Can i reverse this?
-
- Posts: 16
- Joined: Thursday 27 October 2016 22:36
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Chinese PIR
Just bought this Kerui curtain sensor and can report it's working ok in Domoticz with RFLink
-
- Posts: 47
- Joined: Thursday 10 March 2016 14:03
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Chinese PIR
What do all the pins do, does anyone have a wiring chart?
Sent from my iPhone using Tapatalk
Sent from my iPhone using Tapatalk
-
- Posts: 16
- Joined: Thursday 27 October 2016 22:36
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Chinese PIR
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?
however since last weekend it appears to have a different ID... Anyone with similar problems?
-
- Posts: 47
- Joined: Thursday 10 March 2016 14:03
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Chinese PIR
Which pins are they?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?
Sent from my iPhone using Tapatalk
-
- Posts: 16
- Joined: Thursday 27 October 2016 22:36
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Chinese PIR
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..
-
- Posts: 47
- Joined: Thursday 10 March 2016 14:03
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Chinese PIR
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
Sent from my iPhone using Tapatalk
-
- Posts: 16
- Joined: Thursday 27 October 2016 22:36
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Chinese PIR
Nope..
only the two dip switches. Believe some similar pirs and Pictures Are in the Same topic.

-
- Posts: 16
- Joined: Thursday 27 October 2016 22:36
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Chinese PIR
And since Today back again on the old id again.. don't know why the pir is hopping between
Who is online
Users browsing this forum: No registered users and 1 guest