DJ-Dingo / pibooth-pir-sensor

PIR sensor for Pibooth. It plays a random sound & turn on an light when there are motion after a user-time without motion has expired.
1 stars 0 forks source link

Question on what you want this to do #1

Open werdeil opened 4 years ago

werdeil commented 4 years ago

Hi @DJ-Dingo, I'm looking into transforming it to a plugin but I want to be sure on what you want.

Here is what I understand that your code is doing: if a motion is detected turn on light, play a song and then turn off the light (with delays between action), then what for 120s without motion to restart this.

Is it it? Is it what you want? To be honest I find It strange to wait for 120 second to wait again for motion. I would have expected something like: if there is motion turn on light and music, if not and 120s without it, then turn on light and music anyways.

Tell me what you expect so I don't break things.

DJ-Dingo commented 4 years ago

Yes, thats right. :-) Here's what I've used it for.

When there has been no one passing by and using the selfiecam for a while, 2-5min etc. and there is someone passing by, it turns on some light and plays a message. (Hey beautiful please take a photo) or similar message. Just like some arcade machines.

It may be able to do it automatically every 5min, but it must be able to turn off the automatic part. otherwise it may be tiring to listen to, e.g. if people sit and eat dinner. The advantage of my model is that it only happens when it has not been used for a periode and PIR gets activated after the countdown with no motion.

Now i can change things like:

  1. The Delay when there has been no motion for etc. 120sec. before it is ready .. When you run my script it counts down and if there is motion in front of the PIR within the 2 min, countdown starts all over again

  2. How long time the light is on 7 sec. etc.

  3. How many sec. delay before the random sounds starts playing, after the light has been switched on. Normally i had this to 0 - 1 - or 2 sec.

  4. The sounds-messages i want to randomly play.

Of course, it could also be used to play music with lights flashing in the meantime. But i think of this as an extra future

DJ-Dingo commented 4 years ago

Hi @werdeil, I made the readme file so it looks like other pibooth readme. Had some problems installing Fritzing on Rpi, so ended up with a windows version.

What program are you using to make the state sequence diagram?

werdeil commented 4 years ago

I think we use https://app.diagrams.net to make it.