Chinese PIR

433Mhz opensource Receiver & Transmitter.

Moderators: leecollings, Stuntteam

Willem81
Posts: 35
Joined: Wednesday 13 January 2016 10:28
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Chinese PIR

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

Post 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
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)
User avatar
Stuntteam
Posts: 399
Joined: Wednesday 06 May 2015 16:39
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Chinese PIR

Post by Stuntteam »

Or mail a debug log to [email protected] to see why it reports "off"..
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
Willem81
Posts: 35
Joined: Wednesday 13 January 2016 10:28
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Chinese PIR

Post 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.
deennoo
Posts: 784
Joined: Wednesday 10 December 2014 13:06
Target OS: Linux
Domoticz version: beta
Location: Bordeaux France
Contact:

Re: Chinese PIR

Post by deennoo »

Willem81.

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
fets
Posts: 21
Joined: Monday 21 September 2015 20:10
Target OS: Raspberry Pi / ODroid
Domoticz version: 2.2969
Contact:

Re: Chinese PIR

Post by fets »

@Willem81 could you give a link to your chinese PIR sensor, please
Willem81
Posts: 35
Joined: Wednesday 13 January 2016 10:28
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Chinese PIR

Post 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 :)
fets
Posts: 21
Joined: Monday 21 September 2015 20:10
Target OS: Raspberry Pi / ODroid
Domoticz version: 2.2969
Contact:

Re: Chinese PIR

Post by fets »

@Willem81 thanks.
What about battery life ?
manjh
Posts: 748
Joined: Saturday 27 February 2016 12:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Re: Chinese PIR

Post 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
Hans
deennoo
Posts: 784
Joined: Wednesday 10 December 2014 13:06
Target OS: Linux
Domoticz version: beta
Location: Bordeaux France
Contact:

Re: Chinese PIR

Post 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
pir config.JPG (54.13 KiB) Viewed 9168 times

You have to set the OFF delay by the value you want to turn it OFF
pir delay off.JPG
pir delay off.JPG (18.18 KiB) Viewed 9168 times
Domoticz stable 3.5877 for real & Domoticz beta for test
Rfxtrxe / RFLink / Milight / Yeelight / Tasmota / MQTT / BLE / Zigate
http://domo-attitude.fr
manjh
Posts: 748
Joined: Saturday 27 February 2016 12:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Re: Chinese PIR

Post 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.
Hans
Martijn85
Posts: 53
Joined: Wednesday 20 January 2016 20:21
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: Netherlands
Contact:

Re: Chinese PIR

Post 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?
jackderuiter
Posts: 16
Joined: Thursday 27 October 2016 22:36
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Chinese PIR

Post by jackderuiter »

Just bought this Kerui curtain sensor and can report it's working ok in Domoticz with RFLink
SHadley1138
Posts: 47
Joined: Thursday 10 March 2016 14:03
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Chinese PIR

Post by SHadley1138 »

What do all the pins do, does anyone have a wiring chart?


Sent from my iPhone using Tapatalk
jackderuiter
Posts: 16
Joined: Thursday 27 October 2016 22:36
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Chinese PIR

Post 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?
SHadley1138
Posts: 47
Joined: Thursday 10 March 2016 14:03
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Chinese PIR

Post 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
jackderuiter
Posts: 16
Joined: Thursday 27 October 2016 22:36
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Chinese PIR

Post 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..
SHadley1138
Posts: 47
Joined: Thursday 10 March 2016 14:03
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Chinese PIR

Post 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
jackderuiter
Posts: 16
Joined: Thursday 27 October 2016 22:36
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Chinese PIR

Post by jackderuiter »

Nope..Image only the two dip switches. Believe some similar pirs and Pictures Are in the Same topic.
jackderuiter
Posts: 16
Joined: Thursday 27 October 2016 22:36
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Chinese PIR

Post by jackderuiter »

And since Today back again on the old id again.. don't know why the pir is hopping between
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest