Read the statement by Michael Teeuw here.
MMM-NotificationTrigger second trigger not working
-
@sdetweil Have tried that, but that doesn’t change anything.
My main problem is that the second trigger never reacts.
I have never seen it fire a OKAY as an answer -
@arynio who is listening for the fire notification?
not in your config.
turn_off fires okay after 20 seconds
but no one is listening for it
-
@sdetweil Yeah TURN_OFF fires fine.
MMM-NotificationTrigger is supposed to listen to its own TURN_OFF and fire again so that it will turn the screen off after a 20-second delay -
@arynio add a module that reports all the notifications
my SampleModule does this
https://github.com/sdetweil/SampleModulethen open the developers window, ctrl-shift-i on the keyboard, and select the console tab to see the messages
-
@sdetweil Can i do this via ssh or do I have to connect my keyboard to my pi?
-
@arynio if u set
address:“0.0.0.0”,
ipWhitelist:[],in config.js for mm
then you can use a browser on your PC to access mm, and do the same debugging
-
@sdetweil
This is what happens when motion is detected:MMM-MotionDetector: Motion detected, score 28
MMM-NotificationTrigger.js:84 [NOTTRG] TURN_OFF is emitted.
MMM-MotionDetector.js:89 MMM-MotionDetector: Motion detected, score 29
MMM-NotificationTrigger.js:84 [NOTTRG] TURN_OFF is emitted.
MMM-MotionDetector.js:89 MMM-MotionDetector: Motion detected, score 67
MMM-NotificationTrigger.js:84 [NOTTRG] TURN_OFF is emitted.
null:1 GET http://localhost:8080/null 404 (Not Found)
Image (async)
getDom @ MMM-EveryNews.js:118
(anonymous) @ main.js:113
updateDom @ main.js:111
updateDom @ main.js:550
updateDom @ module.js:358
(anonymous) @ MMM-EveryNews.js:146
MMM-NotificationTrigger.js:42 [NOTTRG] Execution Result: {trigger: ‘MOTION_DETECTED’, fire: ‘TURN_OFF’, error: null, stdout: ‘opening a connection to the CEC adapter…\n’, stderr: ‘’}
MMM-NotificationTrigger.js:42 [NOTTRG] Execution Result: {trigger: ‘MOTION_DETECTED’, fire: ‘TURN_OFF’, error: null, stdout: ‘opening a connection to the CEC adapter…\nERROR: … 4085]\tcould not open a connection (try 5)\n’, std>
MMM-NotificationTrigger.js:42 [NOTTRG] Execution Result: {trigger: ‘MOTION_DETECTED’, fire: ‘TURN_OFF’, error: {…}, stdout: ‘opening a connection to the CEC adapter…\nERROR: … 10208]\tcould not start CEC communications\n’, stde>null:1 GET http://localhost:8080/null 404 (Not Found)So i know that there are some erros about not being able to connect but it still works fine regardless.
Still the main problem is that TURN_OFF is emitted but I never get a reaction to it from my second trigger. -
@arynio said in MMM-NotificationTrigger second trigger not working:
stdout: ‘opening a connection to the CEC adapter…\nERROR: … 10208]\tcould not start CEC communications\n’,
so there was an error
did it get emitted? (NOTTRG)
does it depend on the results from exec?
( I do not know anything about module, just guessing)do u see it on the notifications received by other modules?
-
@sdetweil Yes the TURN_OFF gets emitted and i can see it. But MMM-NotificationTrigger doesn’t react to it, doesn’t fire the OKAY and doesnt execute the “echo ‘standby 0.0.0.0’ | cec-client -s -d 1”
-
@arynio
I haven’t tested. But as far as I know, a notification from the module itself would not be heard by itself to prevent infinite loop possibility.