sdetweil / MMM-SleepWake

module that uses an external source for motion detection, like a web camera
18 stars 0 forks source link

Display not sleeping and .mkv files being created in /var/lib/motion after motion detect #4

Closed Dresch360 closed 4 years ago

Dresch360 commented 4 years ago

Thank you very much for creating such a useful and versatile module, as I've been searching for this for some time. I'm completely new to motion and have been struggling with getting the MMM-SleepWake module to power on/off my display for the past several days. Any suggestions would be greatly appreciated!

Here are the issues I'm having:

I am using the onboard Picam (Arducam Noir)

Here is the module setup in my config.js: { disabled: false, module: 'MMM-SleepWake', position: 'top_left', delay: 0.5, // default source: 'external', mode: 'pi' },

MM Log file: [2020-09-23 12:01:37.522] [LOG] sleep-wake helper in socket notification=config [2020-09-23 12:01:37.547] [LOG] external source defined dir=/home/pi/MagicMirror/modules/MMM-SleepWake/motion [2020-09-23 12:01:37.556] [LOG] DIAL Server is running on PORT 8569 [2020-09-23 12:01:37.742] [ERROR] (node:3036) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated [2020-09-23 12:01:37.743] [ERROR] (node:3036) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated [2020-09-23 12:09:59.222] [LOG] motion detected from external source [2020-09-23 12:09:59.223] [LOG] !s: motionstart [2020-09-23 12:11:19.225] [LOG] motion detected from external source [2020-09-23 12:11:19.226] [LOG] !e: motionend

Motion log file:

cap.driver: "bm2835 mmal" cap.card: "mmal service 16.1" cap.bus_info: "platform:bcm2835-v4l2" cap.capabilities=0x85200005

[1:ml1] [NTC] [VID] [Sep 23 12:09:50] v4l2_get_capability: - VIDEO_CAPTURE [1:ml1] [NTC] [VID] [Sep 23 12:09:50] v4l2_get_capability: - VIDEO_OVERLAY [1:ml1] [NTC] [VID] [Sep 23 12:09:50] v4l2_get_capability: - READWRITE [1:ml1] [NTC] [VID] [Sep 23 12:09:50] v4l2_get_capability: - STREAMING [1:ml1] [NTC] [VID] [Sep 23 12:09:50] v4l2_select_input: name = "Camera 0", type 0x00000002, status 00000000 [1:ml1] [NTC] [VID] [Sep 23 12:09:50] v4l2_select_input: - CAMERA [1:ml1] [NTC] [VID] [Sep 23 12:09:50] v4l2_select_input: Device does not support specifying PAL/NTSC norm [1:ml1] [NTC] [VID] [Sep 23 12:09:50] v4l2_do_set_pix_format: Testing palette YU12 (320x240) [1:ml1] [NTC] [VID] [Sep 23 12:09:50] v4l2_do_set_pix_format: Using palette YU12 (320x240) bytesperlines 320 sizeimage 115200 colorspace 00000001 [1:ml1] [NTC] [VID] [Sep 23 12:09:50] v4l2_scan_controls: found control 0x00980900, "Brightness", range 0,100 [1:ml1] [NTC] [VID] [Sep 23 12:09:50] v4l2_scan_controls: "Brightness", default 50, current 50 [1:ml1] [NTC] [VID] [Sep 23 12:09:50] v4l2_scan_controls: found control 0x00980901, "Contrast", range -100,100 [1:ml1] [NTC] [VID] [Sep 23 12:09:50] v4l2_scan_controls: "Contrast", default 0, current 0 [1:ml1] [NTC] [VID] [Sep 23 12:09:50] v4l2_scan_controls: found control 0x00980902, "Saturation", range -100,100 [1:ml1] [NTC] [VID] [Sep 23 12:09:50] v4l2_scan_controls: "Saturation", default 0, current 0 [1:ml1] [NTC] [VID] [Sep 23 12:09:50] v4l2_scan_controls: found control 0x00980918, "Power Line Frequency", range 0,3 [1:ml1] [NTC] [VID] [Sep 23 12:09:50] v4l2_scan_controls: "Power Line Frequency", default 1, current 1 [1:ml1] [NTC] [VID] [Sep 23 12:09:50] v4l2_scan_controls: found control 0x0098090e, "Red Balance", range 1,7999 [1:ml1] [NTC] [VID] [Sep 23 12:09:50] v4l2_scan_controls: "Red Balance", default 1000, current 1000 [1:ml1] [NTC] [VID] [Sep 23 12:09:50] v4l2_scan_controls: found control 0x0098090f, "Blue Balance", range 1,7999 [1:ml1] [NTC] [VID] [Sep 23 12:09:50] v4l2_scan_controls: "Blue Balance", default 1000, current 1000 [1:ml1] [NTC] [ALL] [Sep 23 12:09:50] image_ring_resize: Resizing pre_capture buffer to 1 items [1:ml1] [NTC] [STR] [Sep 23 12:09:50] http_bindsock: listening on 127.0.0.1 port 8081 [1:ml1] [NTC] [ALL] [Sep 23 12:09:50] motion_init: Started motion-stream server on port 8081 (auth Disabled) [1:ml1] [NTC] [EVT] [Sep 23 12:09:58] event_newfile: File of type 8 saved to: /var/lib/motion/01-20200923120958.mkv [1:ml1] [NTC] [ALL] [Sep 23 12:09:58] motion_detected: Motion detected - starting event 1 [1:ml1] [NTC] [ALL] [Sep 23 12:11:18] mlp_actions: End of event 1 [1:ml1] [NTC] [EVT] [Sep 23 12:27:47] event_newfile: File of type 8 saved to: /var/lib/motion/02-20200923122747.mkv [1:ml1] [NTC] [ALL] [Sep 23 12:27:47] motion_detected: Motion detected - starting event 2 [1:ml1] [NTC] [ALL] [Sep 23 12:29:20] mlp_actions: End of event 2

sdetweil commented 4 years ago

make sure you set

ffmpeg_output_movies off

approx line 293 in /etc/motion/motion.conf have to restart motion process to make it active

also, go to the MMM-Sleepwake folder and do git pull to get some more debug

let me know

u might try these commands over ssh to turn off/on your display make sure u have another way onto system before trying these commands

screen off

/opt/vc/bin/tvservice -o

screen on

/opt/vc/bin/tvservice -p && sudo chvt 6 && sudo chvt 7
sdetweil commented 4 years ago

if u already did a git pull, do another.. this makes the command strings configurable, in case u have to change them for your system. u might also try mode:'hide' just to see the screen blank/redisplay

in the mmm-sleepwake config.js config section

    pi_on: "somestring",
    pi_off:  "somestring",
    dpms_on: ...
    dpms_off: ....
Dresch360 commented 4 years ago

Thanks for your help!

The .mkv issue is fixed and I'm now seeing files being created in the MMM-SleepWake/motion directory.

The screen off/on commands are working.

In the MM Log I'm seeing motion start, however now I'm not seeing motion end: [2020-09-23 13:06:03.868] [LOG] motion detected from external source [2020-09-23 13:06:03.869] [LOG] !s: motionstart

Here is the MMM-SleepWake git pull: remote: Enumerating objects: 5, done. remote: Counting objects: 100% (5/5), done. remote: Compressing objects: 100% (1/1), done. remote: Total 3 (delta 2), reused 3 (delta 2), pack-reused 0 Unpacking objects: 100% (3/3), done. From https://github.com/sdetweil/MMM-SleepWake bd79305..0685e87 master -> origin/master Updating bd79305..0685e87 Fast-forward node_helper.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)

sdetweil commented 4 years ago

i had commented out the console log for motionend.. I'll put it back..

Dresch360 commented 4 years ago

Did another git pull: Updating 0685e87..c7d5717 Fast-forward MMM-SleepWake.js | 8 ++++++-- node_helper.js | 16 ++++++++-------- 2 files changed, 14 insertions(+), 10 deletions(-)

Hmm..Just restarted and now I'm not seeing any detection from the camera in the MM Log.

sdetweil commented 4 years ago

hm.. pull again.. I tested and see both

does the display turn off/on?

sdetweil commented 4 years ago

Just restarted

rebooted?? if so, you need to start the motion module again

sudo motion &

i added it to the script i use to start MM

Dresch360 commented 4 years ago

Thanks - sorry - rebooted

I'm seeing motionstart and motionend in the MM dev console logs, but still not shutting of the display.

Revised the module:

disabled: false,
module: 'MMM-SleepWake',
position: 'top_left',
delay:  0.5,               // default
source: 'external',
//mode: 'pi',
pi_on: "/opt/vc/bin/tvservice -o",
pi_off: "/opt/vc/bin/tvservice -p && sudo chvt 6 && sudo chvt 7"

//detectionDir: '/home/pi/MagicMirror/modules/MMM-SleepWake/motion',
//detectionFile: 'detected'

},

Also retested screenoff/on commands and they are working: screen off /opt/vc/bin/tvservice -o screen on /opt/vc/bin/tvservice -p && sudo chvt 6 && sudo chvt 7

sdetweil commented 4 years ago

is there any console log to share?

Dresch360 commented 4 years ago

hmm...just included mode: 'hide' as well and it did nothing.

sure thing:

[2020-09-23 13:52:59.731] [LOG] motion detected from external source [2020-09-23 13:52:59.732] [LOG] !s: motionstart [2020-09-23 13:54:03.217] [LOG] motion detected from external source [2020-09-23 13:54:03.218] [LOG] !e: motionend

sdetweil commented 4 years ago

weird... can u open the developers console on the pi,

pi keyboard, ctrl-shift-i (letter i) select the tab labeled console and add sleep to the field labeled filter

this will reduce to the message from the sleepwake module

Dresch360 commented 4 years ago

Sorry - not sure I understand. - pi keyboard, ctrl-shift-i (letter i) us opening a tab window showing "pi@ClientPi4: ~/MagicMirror" - "Cancel" or "OK"

sdetweil commented 4 years ago

have to go watch grandson play hockey, back later

should look like this after ctrl-shift-i on the keyboard (all keys at once)

https://www.dropbox.com/s/n4o5dee7bzahtme/Screenshot%20at%202020-09-23%2016-26-30.png?dl=0

Dresch360 commented 4 years ago

Got it - and added filter.

Thanks again for all of your help! I'm going troubleshoot a little more.

sdetweil commented 4 years ago

I am back if u have any info or questions

Dresch360 commented 4 years ago

Thank you very much again for your extensive help and for getting back to me. Unfortunately, it's still not turning the monitor on/off or hiding the display. Must be an issue buried somewhere on my end and I'm going to keep working on it to figure it out.

sdetweil commented 4 years ago

ok, I am running the same code, using hide.. let me try pi

Dresch360 commented 4 years ago

Thanks! - also tired to load the sudo motion & command on MM boot, but now I'm getting the live video feed (Motion 4.1.1) instead of the MagicMirror display - Think I'm using the wrong instrucitons

To enable motion to run as a daemon on startup do the following: Edit /etc/default/motion

and change start_motion_daemon=no to start_motion_daemon=yes Next enable motion by entering the following at the command line: sudo systemctl enable motion

sdetweil commented 4 years ago

oh, the motion module tries to start a server for video viewing.. change its port (search conf for port) , or change MM's port in config.js (8090 maybe)

also do another git pull... I think its better now.. doing sleep /wake via pi (and hide) here

Dresch360 commented 4 years ago

Hmm...I think I just took a step backward. Now there is no motion detection indicated in the MM dev console.

sdetweil commented 4 years ago

just a refresher on the timing

motion signals motion_started after the gap time , motion signals motion_end sleep_wake starts timer now for delay minutes if no motion start from motion, and timer expires, turn off display else stop timer, and wait for motion_end again

# Event Gap is the seconds of no motion detection that triggers the end of an e$
# An event is defined as a series of motion images taken within a short timefra$
# Recommended value is 60 seconds (Default). The value -1 is allowed and disabl$
# events causing all Motion to be written to one single movie file and no pre_c$
# If set to 0, motion is running in gapless mode. Movies don't have gaps anymor$
# event ends right after no more motion is detected and post_capture is over.
event_gap 15
sdetweil commented 4 years ago

this is what I am seeing , just after start of MM (I have my delay set to 1 minute here)

sorry, that was hide
Dresch360 commented 4 years ago

Thanks - Hmm...no more motion detection indicated in the MM console.

sdetweil commented 4 years ago

eh? makes no sense.. you restarted MM after the pull, yes?

I don't have any mechanism to turn off the debug, it will always be there

sdetweil commented 4 years ago

this is what I am seeing, 1 minute delay, mode=pi

[2020-09-23 21:33:00.600] [LOG]    sleep-wake helper in socket notification=config
[2020-09-23 21:33:00.635] [LOG]     external source defined dir=/home/pi/MagicMirror/modules/MMM-SleepWake/motion
[2020-09-23 21:33:15.528] [LOG]    motion detected from external source
[2020-09-23 21:33:15.529] [LOG]    !s: motionstart
[2020-09-23 21:33:15.530] [LOG]    sleep-wake helper in socket notification=end_sleep
[2020-09-23 21:33:15.531] [LOG]    waking up
[2020-09-23 21:33:15.531] [LOG]    waking up, already awake
[2020-09-23 21:33:39.673] [LOG]    motion detected from external source
[2020-09-23 21:33:39.674] [LOG]    !e: motionend
[2020-09-23 21:33:39.675] [LOG]    idle timer started for 1 minutes
[2020-09-23 21:34:17.475] [LOG]    motion detected from external source
[2020-09-23 21:34:17.476] [LOG]    !s: motionstart
[2020-09-23 21:34:17.477] [LOG]    sleep-wake helper in socket notification=end_sleep
[2020-09-23 21:34:17.477] [LOG]    waking up
[2020-09-23 21:34:17.477] [LOG]    waking up, already awake
[2020-09-23 21:35:10.552] [LOG]    motion detected from external source
[2020-09-23 21:35:10.552] [LOG]    !e: motionend
[2020-09-23 21:35:10.553] [LOG]    idle timer started for 1 minutes
[2020-09-23 21:35:22.512] [LOG]    motion detected from external source
[2020-09-23 21:35:22.512] [LOG]    !s: motionstart
[2020-09-23 21:35:22.513] [LOG]    sleep-wake helper in socket notification=end_sleep
[2020-09-23 21:35:22.514] [LOG]    waking up
[2020-09-23 21:35:22.515] [LOG]    waking up, already awake
sdetweil commented 4 years ago

how long is your event gap? 60 seconds is the default... means from ANY motion, it waits 1 minute.. if motion at 59 seconds, it waits ANOTHER minute (without signalling motion started, cause it already did I have my gap set to 15 seconds

depends on how sensitive the camera is.. I have motion_frames set to 2 to hide small noise that trigger motion

Dresch360 commented 4 years ago

Thanks - I ran git pull, included a 1 minute timer, and rebooted twice and still no response from the camera in the MM Console.

Dresch360 commented 4 years ago

There might be an issue with my setup overall and I don't want to take up any more of your time. You've more than helpful and generous. Thanks again!

sdetweil commented 4 years ago

and because u rebooted, the motion module did get started???? mine does NOT start on boot..

sdetweil commented 4 years ago

I want it to work for you

sdetweil commented 4 years ago

u can check the motion.log to see if it is reporting

tail -f /var/log/motion/motion.log (ctrl -c to exit the live tail)

Dresch360 commented 4 years ago

Thanks so much - After running 'sudo motion &' at the command prompt - here is the new log:

[1:ml1] [NTC] [VID] [Sep 23 19:44:53] v4l2_set_pix_format: (12) NV21 (Y/CrCb 4:2:0) [1:ml1] [NTC] [VID] [Sep 23 19:44:53] v4l2_set_pix_format: 12 - Y/CrCb 4:2:0 (compressed : 0) (0x3132564e) [1:ml1] [NTC] [VID] [Sep 23 19:44:53] v4l2_set_pix_format: (13) BGR4 (32-bit BGRA/X 8-8-8-8) [1:ml1] [NTC] [VID] [Sep 23 19:44:53] v4l2_set_pix_format: 13 - 32-bit BGRA/X 8-8-8-8 (compressed : 0) (0x34524742) [1:ml1] [NTC] [VID] [Sep 23 19:44:53] v4l2_do_set_pix_format: Testing palette UYVY (320x240) [1:ml1] [ERR] [VID] [Sep 23 19:44:53] v4l2_do_set_pix_format: Error setting pixel format. VIDIOC_S_FMT: : Device or resource busy [1:ml1] [ERR] [VID] [Sep 23 19:44:53] v4l2_set_pix_format: Palette selection failed for format UYVY: Device or resource busy [1:ml1] [ERR] [VID] [Sep 23 19:44:53] v4l2_set_pix_format: Unable to find a compatible palette format. [1:ml1] [NTC] [ALL] [Sep 23 19:44:53] image_ring_resize: Resizing pre_capture buffer to 1 items [1:ml1] [ERR] [ALL] [Sep 23 19:45:03] motion_init: Error capturing first image [1:ml1] [CRT] [STR] [Sep 23 19:45:03] http_bindsock: error binding on 127.0.0.1 port 8081: Address already in use [1:ml1] [ERR] [ALL] [Sep 23 19:45:03] motion_init: Problem enabling motion-stream server in port 8081: Address already in use [1:ml1] [NTC] [ALL] [Sep 23 19:45:03] motion_loop: Thread exiting

sdetweil commented 4 years ago

looks like it was running. check the log for events

Dresch360 commented 4 years ago

still nothing in the log file unfortunately

Dresch360 commented 4 years ago

tail -f /var/log/motion/motion.log [1:ml1] [NTC] [VID] [Sep 23 19:51:41] v4l2_do_set_pix_format: Testing palette UYVY (320x240) [1:ml1] [ERR] [VID] [Sep 23 19:51:41] v4l2_do_set_pix_format: Error setting pixel format. VIDIOC_S_FMT: : Device or resource busy [1:ml1] [ERR] [VID] [Sep 23 19:51:41] v4l2_set_pix_format: Palette selection failed for format UYVY: Device or resource busy [1:ml1] [ERR] [VID] [Sep 23 19:51:41] v4l2_set_pix_format: Unable to find a compatible palette format. [1:ml1] [NTC] [ALL] [Sep 23 19:51:41] image_ring_resize: Resizing pre_capture buffer to 1 items [1:ml1] [ERR] [ALL] [Sep 23 19:51:51] motion_init: Error capturing first image [1:ml1] [CRT] [STR] [Sep 23 19:51:51] http_bindsock: error binding on 127.0.0.1 port 8081: Address already in use [1:ml1] [ERR] [ALL] [Sep 23 19:51:51] motion_init: Problem enabling motion-stream server in port 8081: Address already in use [1:ml1] [NTC] [ALL] [Sep 23 19:51:51] motion_loop: Thread exiting

Dresch360 commented 4 years ago

Oddly - motion detection is back now in the log files, but still not powering off or hiding the display.

sdetweil commented 4 years ago

can u post the mm log

Dresch360 commented 4 years ago

Sure thing. I was seeing the start and end camera notification after "Sonos Update" at the end, but now it's no longer appearing.

[2020-09-23 20:05:40.245] [LOG] Starting MagicMirror: v2.11.0 [2020-09-23 20:05:40.252] [LOG] Loading config ... [2020-09-23 20:05:40.259] [LOG] Loading module helpers ... [2020-09-23 20:05:40.267] [LOG] handler helper in init [2020-09-23 20:05:40.268] [LOG] Module helper loaded: MMM-SleepWake [2020-09-23 20:05:40.270] [LOG] Initializing new module helper ... [2020-09-23 20:05:40.270] [LOG] Module helper loaded: MMM-SmartTouch [2020-09-23 20:05:40.272] [LOG] Initializing new module helper ... [2020-09-23 20:05:40.273] [LOG] Module helper loaded: MMM-AlexaPi [2020-09-23 20:05:40.274] [LOG] No helper found for module: compliments. [2020-09-23 20:05:40.275] [LOG] No helper found for module: MMM-HTMLBox. [2020-09-23 20:05:40.646] [LOG] Initializing new module helper ... [2020-09-23 20:05:40.646] [LOG] Module helper loaded: calendar [2020-09-23 20:05:40.747] [LOG] Initializing new module helper ... [2020-09-23 20:05:40.748] [LOG] Module helper loaded: MMM-quote-of-the-day [2020-09-23 20:05:40.750] [LOG] Initializing new module helper ... [2020-09-23 20:05:40.750] [LOG] Module helper loaded: MMM-MoonPhase [2020-09-23 20:05:40.751] [LOG] No helper found for module: MMM-Cursor. [2020-09-23 20:05:41.025] [LOG] Initializing new module helper ... [2020-09-23 20:05:41.026] [LOG] Module helper loaded: MMM-AirNow [2020-09-23 20:05:41.321] [LOG] Initializing new module helper ... [2020-09-23 20:05:41.322] [LOG] Module helper loaded: MMM-MovieListings [2020-09-23 20:05:41.323] [LOG] Initializing new module helper ... [2020-09-23 20:05:41.324] [LOG] Module helper loaded: MMM-Sonos [2020-09-23 20:05:41.406] [LOG] Initializing new module helper ... [2020-09-23 20:05:41.406] [LOG] Module helper loaded: MMM-Remote-Control [2020-09-23 20:05:41.455] [LOG] Initializing new module helper ... [2020-09-23 20:05:41.455] [LOG] Module helper loaded: MMM-ModuleScheduler [2020-09-23 20:05:41.757] [LOG] Initializing new module helper ... [2020-09-23 20:05:41.758] [LOG] Module helper loaded: MMM-Screencast [2020-09-23 20:05:41.760] [LOG] Initializing new module helper ... [2020-09-23 20:05:41.760] [LOG] Module helper loaded: MMM-Events [2020-09-23 20:05:42.067] [LOG] Initializing new module helper ... [2020-09-23 20:05:42.068] [LOG] Module helper loaded: MMM-History [2020-09-23 20:05:42.068] [LOG] No helper found for module: MMM-Unsplash. [2020-09-23 20:05:42.094] [LOG] Initializing new module helper ... [2020-09-23 20:05:42.094] [LOG] Module helper loaded: newsfeed [2020-09-23 20:05:42.095] [LOG] No helper found for module: clock. [2020-09-23 20:05:42.097] [LOG] Initializing new module helper ... [2020-09-23 20:05:42.097] [LOG] Module helper loaded: MMM-MWWordOfTheDay [2020-09-23 20:05:42.098] [LOG] No helper found for module: MMM-connection-status. [2020-09-23 20:05:42.098] [LOG] No helper found for module: MMM-HideAll. [2020-09-23 20:05:42.113] [LOG] Initializing new module helper ... [2020-09-23 20:05:42.114] [LOG] Module helper loaded: MMM-SystemStats [2020-09-23 20:05:42.115] [LOG] All module helpers loaded. [2020-09-23 20:05:42.230] [LOG] Starting server on port 8090 ... [2020-09-23 20:05:42.232] [INFO] You're using a full whitelist configuration to allow for all IPs [2020-09-23 20:05:42.237] [LOG] Server started ... [2020-09-23 20:05:42.238] [LOG] Connecting socket for: MMM-SleepWake [2020-09-23 20:05:42.239] [LOG] handler helper in start [2020-09-23 20:05:42.239] [LOG] Connecting socket for: MMM-SmartTouch [2020-09-23 20:05:42.240] [LOG] Connecting socket for: MMM-AlexaPi [2020-09-23 20:05:42.240] [LOG] Starting node helper for: MMM-AlexaPi [2020-09-23 20:05:42.243] [LOG] Connecting socket for: calendar [2020-09-23 20:05:42.244] [LOG] Starting node helper for: calendar [2020-09-23 20:05:42.244] [LOG] Connecting socket for: MMM-quote-of-the-day [2020-09-23 20:05:42.245] [LOG] MMM-quote-of-the-day helper started [2020-09-23 20:05:42.258] [LOG] Connecting socket for: MMM-MoonPhase [2020-09-23 20:05:42.259] [LOG] Starting module helper: MMM-MoonPhase [2020-09-23 20:05:42.260] [LOG] Connecting socket for: MMM-AirNow [2020-09-23 20:05:42.261] [LOG] MMM-AirNow helper, started... [2020-09-23 20:05:42.261] [LOG] Connecting socket for: MMM-MovieListings [2020-09-23 20:05:42.262] [LOG] MMM-MovieListing helper started... [2020-09-23 20:05:42.263] [LOG] Connecting socket for: MMM-Sonos [2020-09-23 20:05:42.263] [LOG] Sonos helper started ... [2020-09-23 20:05:42.264] [LOG] Connecting socket for: MMM-Remote-Control [2020-09-23 20:05:42.265] [LOG] Starting node helper for: MMM-Remote-Control [2020-09-23 20:05:42.273] [LOG] Connecting socket for: MMM-ModuleScheduler [2020-09-23 20:05:42.274] [LOG] Starting node helper for: MMM-ModuleScheduler [2020-09-23 20:05:42.275] [LOG] Connecting socket for: MMM-Screencast [2020-09-23 20:05:42.276] [LOG] Connecting socket for: MMM-Events [2020-09-23 20:05:42.277] [LOG] Starting node_helper for: MMM-Events [2020-09-23 20:05:42.278] [LOG] Connecting socket for: MMM-History [2020-09-23 20:05:42.278] [LOG] Starting module: MMM-History [2020-09-23 20:05:42.279] [LOG] Connecting socket for: newsfeed [2020-09-23 20:05:42.279] [LOG] Starting module: newsfeed [2020-09-23 20:05:42.280] [LOG] Connecting socket for: MMM-MWWordOfTheDay [2020-09-23 20:05:42.280] [LOG] Starting module helper: MMM-MWWordOfTheDay [2020-09-23 20:05:42.281] [LOG] Connecting socket for: MMM-SystemStats [2020-09-23 20:05:42.281] [LOG] Sockets connected & modules started ... [2020-09-23 20:05:42.400] [LOG] Launching application. Username for 'https://github.com': [2020-09-23 20:05:49.827] [LOG] Create new calendar fetcher for url: http://www.calendarlabs.com/ical-calendar/ics/76/US_Holidays.ics - Interval: 300000 [2020-09-23 20:05:49.868] [LOG] Smart Touch module has started [2020-09-23 20:05:49.997] [LOG] MMM-quote-of-the-day received a socket notification: INIT_HELPER - Payload: [object Object] [2020-09-23 20:05:50.009] [LOG] MMM-quote-of-the-day received a socket notification: GET_QUOTE - Payload: [object Object] [2020-09-23 20:05:50.036] [LOG] SONOS_UPDATE [2020-09-23 20:05:50.039] [LOG] MMM-ModuleScheduler is removing all scheduled jobs [2020-09-23 20:05:50.040] [LOG] MMM-ModuleScheduler received CREATE_NOTIFICATION_SCHEDULE [2020-09-23 20:05:50.042] [LOG] MMM-ModuleScheduler is scheduling REMOTE_ACTION using "0 5 [2020-09-23 20:05:50.061] [LOG] MMM-ModuleScheduler has scheduled REMOTE_ACTION [2020-09-23 20:05:50.064] [LOG] MMM-ModuleScheduler will next send REMOTE_ACTION at Thu Sep 24 2020 05:00:00 GMT-0700 (Pacific Daylight Time) [2020-09-23 20:05:50.065] [LOG] MMM-ModuleScheduler is scheduling REMOTE_ACTION using "0 6 [2020-09-23 20:05:50.067] [LOG] MMM-ModuleScheduler has scheduled REMOTE_ACTION [2020-09-23 20:05:50.069] [LOG] MMM-ModuleScheduler will next send REMOTE_ACTION at Thu Sep 24 2020 06:00:00 GMT-0700 (Pacific Daylight Time) [2020-09-23 20:05:50.093] [LOG] Create new news fetcher for url: http://www.wral.com/news/rss/48/ - Interval: 300000 [2020-09-23 20:05:50.179] [LOG] Create new news fetcher for url: http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml - Interval: 300000 [2020-09-23 20:05:50.181] [LOG] Create new news fetcher for url: http://www.cnbc.com/id/100003114/device/rss/rss.html - Interval: 300000 [2020-09-23 20:05:50.329] [LOG] sleep-wake helper in socket notification=config [2020-09-23 20:05:50.352] [LOG] external source defined dir=/home/pi/MagicMirror/modules/MMM-SleepWake/motion [2020-09-23 20:05:50.362] [LOG] DIAL Server is running on PORT 8569 [2020-09-23 20:05:50.667] [ERROR] (node:9480) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated [2020-09-23 20:05:50.668] [ERROR] (node:9480) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated [2020-09-23 20:05:50.934] [LOG] { "quoteText": "Look with favour upon a bold beginning. ", "quoteAuthor": "Virgil", "senderName": "", "senderLink": "", "quoteLink": "http://forismatic.com/en/aa0ac5b49a/" } [2020-09-23 20:06:19.492] [LOG] SONOS_UPDATE [2020-09-23 20:06:49.491] [LOG] SONOS_UPDATE

Dresch360 commented 4 years ago

But it is showing motion in the motion.log

tail -f /var/log/motion/motion.log [1:ml1] [NTC] [VID] [Sep 23 20:11:27] v4l2_scan_controls: "Saturation", default 0, current 0 [1:ml1] [NTC] [VID] [Sep 23 20:11:27] v4l2_scan_controls: found control 0x00980918, "Power Line Frequency", range 0,3 [1:ml1] [NTC] [VID] [Sep 23 20:11:27] v4l2_scan_controls: "Power Line Frequency", default 1, current 1 [1:ml1] [NTC] [VID] [Sep 23 20:11:27] v4l2_scan_controls: found control 0x0098090e, "Red Balance", range 1,7999 [1:ml1] [NTC] [VID] [Sep 23 20:11:27] v4l2_scan_controls: "Red Balance", default 1000, current 1000 [1:ml1] [NTC] [VID] [Sep 23 20:11:27] v4l2_scan_controls: found control 0x0098090f, "Blue Balance", range 1,7999 [1:ml1] [NTC] [VID] [Sep 23 20:11:27] v4l2_scan_controls: "Blue Balance", default 1000, current 1000 [1:ml1] [NTC] [ALL] [Sep 23 20:11:28] image_ring_resize: Resizing pre_capture buffer to 1 items [1:ml1] [NTC] [STR] [Sep 23 20:11:28] http_bindsock: listening on 127.0.0.1 port 8081 [1:ml1] [NTC] [ALL] [Sep 23 20:11:28] motion_init: Started motion-stream server on port 8081 (auth Disabled) [1:ml1] [NTC] [ALL] [Sep 23 20:12:57] motion_detected: Motion detected - starting event 1 [1:ml1] [NTC] [ALL] [Sep 23 20:14:12] mlp_actions: End of event 1 [1:ml1] [NTC] [ALL] [Sep 23 20:14:21] motion_detected: Motion detected - starting event 2

Dresch360 commented 4 years ago

Could it be due to the MM port change from 8080 to 8090?

sdetweil commented 4 years ago

no.

try this chmod +x ~/MagicMirror/modules/MMM-SleepWake/external_motion

sdetweil commented 4 years ago

look in the MMM-SleepWake/motion folder. should be no files, erase if present

Dresch360 commented 4 years ago

Thanks - no files present in the MMM-SleepWake/motion folder and still no motion response in the MM log

sdetweil commented 4 years ago

ok, one more thing for the night

execute the external_motion

~/MagicMirror/modules/MMM-SleepWake/external_motion started

sdetweil commented 4 years ago

should add a file to the motion folder

Dresch360 commented 4 years ago

The detection file was added to the motion folder, but still no motion indication in the MM Log file.

Thanks again for all of your help and generosity! I may need to just start over with a clean install and see if that works.

sdetweil commented 4 years ago

I added some more debugging.. git pull when u have a chance also, I do not specify the pi_on or pi_off variables in config as the defaults are set correctly and work

Dresch360 commented 4 years ago

Thanks so much. There probably isn't any issue with your module. I think there is an issue on my end and I'm going to rebuild everything from scratch. I'll post an update once I get it working. Thanks again!

sdetweil commented 4 years ago

ok, seems a shame to go thru all that.. cant imagine what it might be tho..

sdetweil commented 4 years ago

before u start over, could u post the config for the module... thanks