Bug Filed on 03-17-2016: Motion Sensor as trigger

Not sure if this is in the “to do list” or if I’m missing something, but can we add a motion sensor as a trigger?

So, motion sensor triggers, and switches relay on/off?

I’ve got a HC-SR501 PIR hooked up at the moment.
Link: HC-SR501 PIR Motion Sensor (Passive Infrared Sensor) - ElectroDragon

1 Like

Seconding this, I was also wondering why the motion sensor cannot be used as trigger?..

@derikj @mac_ha It should show up in the drop down.

Can you do me a favor? I assume you used the motion sensor widget for putting the motion sensor on the dashboard. Delete the widget and add the motion sensor as a ‘Generic Digital Input’ widget and let me know if it shows up in the trigger dropdown?

Moving this to Bugs / Issues since it looks like bug.

Hi, What is the exact action required ?
Are you after latch / solid / hold when triggered or just want a pulse ?

I too would recommend a ‘Latch’ input option in future as one tick box along with some other tricks like perhaps a stay high/low for hh:mm:ss when adding Digital Inputs.

As above suggest try just use generic (if there is any difference)
The OP from most of these motion sensors is usually momentary but should be programmable to a certain extend by the sensitivity and delay potentiometers and or links.

~ Andrew

With either the motion sensor widget loaded or the generic digital input widget loaded I don’t see either as a choice in the trigger drop down.


Sorry, couldn’t check this out. Having a strange issue where my rpi shows as offline, but I can ssh in, and access wepiopi via the browser. Second time this has happened now. Also reset the pi, router and pc (Saw the other post regarding the pi going offline) Works for a few hours, and then just becomes completely unresponsive.

Edit: I’ll rebuild it after work, and see if I can fix it.


Here we are 7 hours later and all of the sensors I added last night have now populated the drop down list! The original screen grab was done probably 30 minutes after the sensors were added and the one below 7 or so hours later.

Seems to be some lag, or maybe a browser cache problem (I’m on the desktop dashboard). I will do some fiddling and see if I can replicate the delay.


Sorry was unable to try earlier… Just removed the Motion Sensor and replaced by a generic digital IO - but as Ian noted above, don’t see it under Triggers yet. Let’s wait…

I just deleted the generic and added the PIR then an F5 to reload the page, didn’t populate the list.

I then deleted the PIR and added the generic back and checked the list, not there, then F5, and it IS there. Set up the trigger and the PIR via a generic input widget triggers the lamp to come on.

It seems to be a solution, albeit a little clumsy.


Hm, very interesting! I’ve already logged out of the portal, but reading Ian’s message, logged in - and it says my Pi is off line. After 5 minutes still off line, though I can ssh into it wihtout problem. So I restarted it, and - surprise surprise, the generig digital IO is there under Triggers!! So what’s was the “kick” - restarting?..
BTW, I’m very frequently having this - the portal shows RPi off line, while I can still ssh into it. Seems I saw some other thread with this, need to add my voice to that too…

Good to hear.
Making progress.
Still some stumbling though.

@mac_ha, I just noted its nearly 30°C where you are, its -4.5°C here, do you want to switch?


He he, it might be too far to switch!..

@mac_ha @Ian @derikj @picaxe Looks like we found the issue. Verifying fix and then will be release in one of next releases.


Facing same problem. When will be the bug fixed !


I ran into same issue — adding a ‘proper PIR sensor’ doesn’t function.

Now I have a generic input and generic output and it works. PIR > LED

However, It’s very laggy. So laggy that the PIR will often make several on/off cycles before the LED responds. (PIR set to several second hold)

Any thoughts?

Hi @marcel.lenormand,

Yep, we’re going to fix the motion sensor bug after Arduino integration is released (soon!).

Regarding the lag time, is your Pi on Wifi?


Ace. Arduino integration sounds great too! Thanks.

Yes, Pi is on wifi.

Check the PIR sensor module various types and information: Some have a nice sensistivity and ON duration adjustment This one has 5 to 200 second adjustment

~ Andrew

@marcel.lenormand @picaxe @mahi @Ian @mac_ha @derikj Hi guys, this should be fixed now. Let us know otherwise!