Open threesquare opened 3 days ago
Hi,
i just took a look at the code of MMM-Carousel to check if the module accepts null
in the payload of the notifications.
But the module does not listen for any notifications at all. So do you use any other version of MMM-Carousel and did you ever test if CAROUSEL_NEXT
changes to a different view?
If you started MagicMirror by pm2 you will find your log files in /home/pi/.pm2/logs
.
There is one file for errors called MagicMirror-error.log
and one for normal logs called MagicMirror-out.log
.
Is there anything relevant in the logs related to this module?
You will not be able to run your test script and my module at the same time. The access to GPIO is exclusive to one job since about one year.
Just found this fork of MMM-Carousel https://github.com/shbatm/MMM-Carousel
If you use this fork the null
payload should not be a problem.
yes, sorry I should have been more specific. I am using that fork. I am able to send notifications and initiate the slide change via MMM-RemoteControl. so that isolated the issue with that Carousel fork. I'm looking through the logs and I'm not seeing any error relating to MMM-GPIO-Notifications.
the console log shows everything is loaded
[Log] Load script: modules/MMM-GPIO-Notifications/MMM-GPIO-Notifications.js (loader.js, line 178)
[Log] Module registered: MMM-GPIO-Notifications (module.js, line 489)
[Info] Bootstrapping module: MMM-GPIO-Notifications (loader.js, line 151)
[Log] Scripts loaded for: MMM-GPIO-Notifications (loader.js, line 155)
[Log] Styles loaded for: MMM-GPIO-Notifications (loader.js, line 158)
[Log] Translations loaded for: MMM-GPIO-Notifications (loader.js, line 161)
[Log] Load script: modules/MMM-Carousel/MMM-Carousel.js (loader.js, line 178)
[Log] Check MagicMirror² version for module 'MMM-Carousel' - Minimum version: 2.3.0 - Current version: 2.29.0 (module.js, line 481)
[Log] Version is ok! (module.js, line 483)
[Log] Module registered: MMM-Carousel (module.js, line 489)
[Info] Bootstrapping module: MMM-Carousel (loader.js, line 151)
[Log] Scripts loaded for: MMM-Carousel (loader.js, line 155)
[Log] Load stylesheet: modules/MMM-Carousel/MMM-Carousel.css (loader.js, line 194)
[Log] Styles loaded for: MMM-Carousel (loader.js, line 158)
[Log] Translations loaded for: MMM-Carousel (loader.js, line 161)
MagicMirror-out.log
Module helper loaded: MMM-GPIO-Notifications
Connecting socket for: MMM-GPIO-Notifications
[2024-11-18 13:45:05.994] [LOG] MMM-GPIO-Notifications: Using naming schema Default
[2024-11-18 13:45:05.999] [LOG] Using naming schema of RaspberryPi_4B!
[2024-11-18 13:45:06.000] [LOG] MMM-GPIO-Notifications: Trying to registering pin: 17
[2024-11-18 13:45:06.003] [LOG] MMM-GPIO-Notifications: Using chip (0) and line (17) info of GPIO17
[2024-11-18 13:45:06.005] [LOG] MMM-GPIO-Notifications: Watched pin: 17 has low state delay of 0!
[2024-11-18 13:45:06.007] [LOG] MMM-GPIO-Notifications: Watched pin: 17 has high state delay of 0!
[2024-11-18 13:45:06.014] [LOG] MMM-GPIO-Notifications: Successfully registered pin: 17
[2024-11-18 13:45:06.015] [LOG] MMM-GPIO-Notifications: Trying to registering pin: 27
[2024-11-18 13:45:06.017] [LOG] MMM-GPIO-Notifications: Using chip (0) and line (27) info of GPIO27
[2024-11-18 13:45:06.018] [LOG] MMM-GPIO-Notifications: Watched pin: 27 has low state delay of 0!
[2024-11-18 13:45:06.020] [LOG] MMM-GPIO-Notifications: Watched pin: 27 has high state delay of 0!
[2024-11-18 13:45:06.025] [LOG] MMM-GPIO-Notifications: Successfully registered pin: 27
[2024-11-18 13:45:49.956] [LOG] MMM-GPIO-Notifications: Watched pin: 27 triggered with value 0!
[2024-11-18 13:45:49.958] [LOG] MMM-GPIO-Notifications: Sending notifications of pin 27...
[2024-11-18 13:45:49.959] [LOG] MMM-GPIO-Notifications: Skipped notifications of pin 27 cause the state 0 has no notifications configured.
[2024-11-18 13:45:49.964] [LOG] Falling Event false
[2024-11-18 13:45:49.967] [LOG] MMM-GPIO-Notifications: Watched pin: 27 triggered with value 0!
[2024-11-18 13:45:49.979] [LOG] MMM-GPIO-Notifications: Sending notifications of pin 27...
[2024-11-18 13:45:49.986] [LOG] MMM-GPIO-Notifications: Skipped notifications of pin 27 cause the state 0 has no notifications configured.
[2024-11-18 13:45:50.066] [LOG] Rising Event true
[2024-11-18 13:45:50.069] [LOG] MMM-GPIO-Notifications: Watched pin: 27 triggered with value 1!
[2024-11-18 13:45:50.071] [LOG] MMM-GPIO-Notifications: Sending notifications of pin 27...
[2024-11-18 13:45:50.073] [LOG] MMM-GPIO-Notifications: Sending notifications for high state of pin 27...
[2024-11-18 13:45:54.352] [LOG] Falling Event false
[2024-11-18 13:45:54.358] [LOG] MMM-GPIO-Notifications: Watched pin: 17 triggered with value 0!
[2024-11-18 13:45:54.363] [LOG] MMM-GPIO-Notifications: Sending notifications of pin 17...
[2024-11-18 13:45:54.364] [LOG] MMM-GPIO-Notifications: Skipped notifications of pin 17 cause the state 0 has no notifications configured.
[2024-11-18 13:45:54.741] [LOG] Rising Event true
[2024-11-18 13:45:54.743] [LOG] MMM-GPIO-Notifications: Watched pin: 17 triggered with value 1!
[2024-11-18 13:45:54.744] [LOG] MMM-GPIO-Notifications: Sending notifications of pin 17...
[2024-11-18 13:45:54.747] [LOG] MMM-GPIO-Notifications: Sending notifications for high state of pin 17...
[2024-11-18 13:45:57.507] [LOG] Falling Event false
[2024-11-18 13:45:57.517] [LOG] MMM-GPIO-Notifications: Watched pin: 17 triggered with value 0!
[2024-11-18 13:45:57.519] [LOG] MMM-GPIO-Notifications: Sending notifications of pin 17...
[2024-11-18 13:45:57.530] [LOG] MMM-GPIO-Notifications: Skipped notifications of pin 17 cause the state 0 has no notifications configured.
[2024-11-18 13:45:57.909] [LOG] Rising Event true
[2024-11-18 13:45:57.910] [LOG] MMM-GPIO-Notifications: Watched pin: 17 triggered with value 1!
[2024-11-18 13:45:57.916] [LOG] MMM-GPIO-Notifications: Sending notifications of pin 17...
[2024-11-18 13:45:57.917] [LOG] MMM-GPIO-Notifications: Sending notifications for high state of pin 17...
[2024-11-18 13:46:01.135] [LOG] Falling Event false
[2024-11-18 13:46:01.140] [LOG] MMM-GPIO-Notifications: Watched pin: 17 triggered with value 0!
[2024-11-18 13:46:01.141] [LOG] MMM-GPIO-Notifications: Sending notifications of pin 17...
[2024-11-18 13:46:01.142] [LOG] MMM-GPIO-Notifications: Skipped notifications of pin 17 cause the state 0 has no notifications configured.
there isn't anything relevant in the error.log
Hi,
two things... I would add a small delay of about 200ms to the buttons as it looks like at least the one connected to pin 17 bounces a little bit. And i am still unsure if null as a value will work at the moment. As Carousel accepts any payload for this notifications i think it is worth to try some other payload value.
{
module: 'MMM-GPIO-Notifications',
config: {
'17': {
delay: 200,
notifications_high: [
{
notification: 'CAROUSEL_NEXT',
payload: true
},
]
},
'27': {
delay: 200,
notifications_high: [
{
notification: 'CAROUSEL_PREVIOUS',
payload: true
}
]
}
}
},
All other things look good to me. The pins get registered correctly and the events are captured.
I want to use MMM-GPIO-Notifications to send notifications to MMM-Carousel to initiate page change. I can't seem to get it working at all.
buttons are connected and registered using a simple button test script. GPIOinfo shows the correct pins
my config.js
that simple button test script shows GPIO busy when MM is running with the MMM-GPIO-Notifications activated. which I think is the expected behavior. If I stop MM from running, the test script loads and shows the button press.
I also have OnOff installed in the MagicMirror directory The weird part is that I did managed to get MMM-GPIO-Notifications working with the button presses initially, then after a reboot it stopped working completely. More than happy to provide any additional info/logs. Not 100% proficient in this, so please bear with me. thanks!