Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change motion detector action #29

Open
airart opened this issue Apr 8, 2020 · 11 comments
Open

Change motion detector action #29

airart opened this issue Apr 8, 2020 · 11 comments
Assignees

Comments

@airart
Copy link

airart commented Apr 8, 2020

Sorry for my bad english
Hello , is it possible to modify the module and make it display only a specified module when the cam detect a motion ?
It’s useful now but it turn off the TV and I’m forced to turn on manually After 5 minutes of inactivity
Ma goal is use your module to switch to a full screen clock to a normal MM
Tanks u so much

@rejas
Copy link
Owner

rejas commented Apr 14, 2020

hi @airart sorry for the late answer.
yes it would be possible to modifiy the module so that it does something similar to what you want.
The module already sends a "MOTION_DETECTED" notification to the system so any other module could listen to that and react accordingly. I dont know if there are modules out there that switch displayed modules depneding on notifications but I would be surprised if not.
My module "only" needs to be changed so that one can disable turning off/on the monitor autoamtically. Maybe I find some time for that later this week....

@rejas
Copy link
Owner

rejas commented Jul 7, 2020

Hey @airart I just added an option to the module so that the monitor is never turned off (by setting the timeout in the config to -1) Could you check if that would help you?

@BrianHepler
Copy link

BrianHepler commented Jul 13, 2020

Sorry, I just saw this. I'll check this out and get back to you soon.

@BrianHepler
Copy link

My testing is failing. After setting the timeout to -1, the module does not detection motion and never sends the notification. It also never blanks the screen, so there's that bit of good news.

The last I see in the electron console is "DiffCamEngine init successful." so that's encouraging. The stdout shows "MMM-MotionDetector: monitor display_power=1". But it doesn't respond to motion.

@rejas
Copy link
Owner

rejas commented Jul 14, 2020

Thx for testing. After looking again at my code I found some bugs in my line of thought :-)

Could you checkout the develop branch and see if now MOTION_DETECTED notifications can be received?

@BrianHepler
Copy link

I switched to the devlop branch and gave it ago. Sorry, but no change in behavior.

@rejas
Copy link
Owner

rejas commented Jul 15, 2020

Question on your use case: How do you consume the notifications (aka how do you debug if my module sends the MOTION_DETECTED notifications)?

@BrianHepler
Copy link

I normally put the Pi into debug mode with npm start devand then monitor the logs via pm2 log 0 to catch both electron and node_helper.js console output. If I am troubleshooting, I will add a debug switch and then write out to electron.

I have a monitor hooked up the Pi, so I can see if/when the monitor turns off.

@BrianHepler
Copy link

I'm going to take a crack at it and I'll send you a PR with my take. We'll get this knocked out.

@BrianHepler
Copy link

PR submitted.

@airart
Copy link
Author

airart commented Jul 18, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants