Open Aergernis opened 9 months ago
Hi @Aergernis, Could you post your MMM-GPIO-HANDLER part of your Config.js? It looks like something is of with the debounce value. When I know your config I could have a look and see if I need to build in a check for this value as well.
In only added the the defalut config
modules: [
{
module: "MMM-mmpm",
},
{
module: "alert",
},
{
module: 'MMM-ViewNotifications',
position: "top_left",
header: "Notifications",
config:
{
timeout: 60,
includeModules: ["MMM-GPIO-Notifications", "MMM-Screen-Powersave-Notification", "MMM-MQTTbridge", "MMM-CommandToNotification", "MMM-GPIO-HANDLER" ]
}
},
{
module: "clock",
position: "top_left"
},
{
module: "MMM-GPIO-HANDLER",
config: {
debounce: 10000,
longPressTime: 500000,
longPressTimeOut: 3000000,
input: {
"24": {
type: "Button",
name: "Button 1",
pull: "PUD_DOWN"
},
"25": {
type: "Button",
name: "Button 2",
pull: "PUD_UP"
},
"14": {
type: "PIR",
name: "Pir Sensor",
pull: "PUD_DOWN"
},
"8": {
type: "Other",
name: "Other type of Sensor"
}
},
output: {
"4": {
type: "PWM",
name: "Ledstrip FET cool",
default_PWM_effect: "Fixed",
default_PWM_state: 250000
},
"12": {
type: "hardwarePWM",
name: "Button 8 LED FET",
default_PWM_effect: "Pulse",
default_PWM_speed: 50,
default_PWM_steps: 50
},
"15": {
type: "On/Off",
name: "Display K0",
default_state: 1
},
"10": {
type: "On/Off",
name: "Relay CH1",
default_state: 0
},
"17": {
type: "PWM",
name: "Button 7 LED FET",
default_PWM_effect: "Breath",
default_PWM_speed: 50,
default_PWM_steps: 10,
default_PWM_upperLimitDCP: 80,
default_PWM_lowerLimitDCP: 20
}
}
}
},
]
also tryed with older OS Verion
`.::///+:/-. --///+//-:`` philipp@MagicMirror
`+oooooooooooo: `+oooooooooooo: -------------------
/oooo++//ooooo: ooooo+//+ooooo. OS: Raspbian GNU/Linux 11 (bullseye) aarc
`+ooooooo:-:oo- +o+::/ooooooo: Host: Raspberry Pi 4 Model B Rev 1.2
`:oooooooo+`` `.oooooooo+- Kernel: 6.1.21-v8+
`:++ooo/. :+ooo+/.` Uptime: 5 mins
...` `.----.` ``.. Packages: 2031 (dpkg)
.::::-``:::::::::.`-:::-` Shell: bash 5.1.4
-:::-` .:::::::-` `-:::- Resolution: 2560x1440
`::. `.--.` `` `.---.``.::` Terminal: /dev/pts/0
.::::::::` -::::::::` ` CPU: BCM2835 (4) @ 1.500GHz
.::` .:::::::::- `::::::::::``::. Memory: 518MiB / 3794MiB
-:::` ::::::::::. ::::::::::.`:::-
:::: -::::::::. `-:::::::: ::::
-::- .-:::-.``....``.-::-. -::-
.. `` .::::::::. `..`..
-:::-` -::::::::::` .:::::`
:::::::` -::::::::::` :::::::.
.::::::: -::::::::. ::::::::
`-:::::` ..--.` ::::::.
`...` `...--..` `...`
.::::::::::
`.-::::-`
After some testing, and your hint with debounce time i lowerd it to 300 and it's working.
also is there a config method to connect to a remote pigpiod besides from editing the node_helper.js
?
Ah , yes debounce 300 will do. I've changed some code after making the initial example config and forgot to update the example. I will adjust the example config and will add some error handling for this and some other config values which do not have error handling right now.
At the moment it is not possible to connect to a remote pigpiod instance (without chaning 'node-helper.js'). I will dive into this config option as well.
This will be somewhere next week.
Thanks for help and don't stress it, remote connection is "only" a nice to have. But for your Info, the gpio config will only register pins when a client connects to the Magic Mirror Server, maybe there is a way to register them on connect from pigpiod. This way the Pins are not floating and relais will have a defined state.
Edit:
and also when reloading the Magic Mirror Page [ERROR] Notification 'CONFIG' received, but MMM-GPIO-HANDLER does not recognize this notification.
is logged and the Alert Module shows a empty Box overlaying everything
Hi, i've trouble to get the module to start.
pigpiod -v
79pigpiod -l
is runningMagic Mirror is controlled with pm2. Adding
sudo pigpiod -l
to mm.sh gives a error that it can't start (because it's already running) and even when killing the process before start i get the same Error.pm2 log:
Any idea?