Read the statement by Michael Teeuw here.
Unknown Error after initializing buttons
-
Hello all,
I am trying to implement a way to start a timer with an external device and am using StopwatchTimer and Buttons to do this. Recently, I kept getting this error which leads me to believe that is why my button is not working as expected.

Thank you! -
@changaud the error is that the gpio pin is in input only mode not output
-
@changaud looking at the code there is a field used for a button that is not defined
activeLow
can you add this to your button definitions
after pin:
activeLow: true or false depending on how you have it wired
if the signal is high when pressed, then false.
if it has a pull up resistor then true, it will be pulled down when pressedyou said your python is reporting high sll the time
-
@sdetweil
I tried{ module: 'MMM-Buttons', //position: "middle_center", config: { buttons: [ { pin: 5, activeLow = false, name: "test_button", longPress: { notification: "PAUSE_STOPWATCHTIMER", payload: {action: "PAUSE_STOPWATCHTIMER"} }, shortPress: { notification: "START_STOPWATCH", payload: {action: "START_STOPWATCH"} } } ] } } and I get this error:[ERROR] WARNING! Could not validate config file. Starting with default configuration. Please correct syntax errors at or above this line: /home/group6/MagicMirror/config/config.js:117
activeLow = false,
^^^^^^^^^^^^^^^^^SyntaxError: Invalid shorthand property initializer
at internalCompileFunction (node:internal/vm:73:18)
at wrapSafe (node:internal/modules/cjs/loader:1160:20)
at Module._compile (node:internal/modules/cjs/loader:1212:27)
at Module._extensions…js (node:internal/modules/cjs/loader:1311:10)
at Module.load (node:internal/modules/cjs/loader:1098:32)
at Module._load (node:internal/modules/cjs/loader:945:12)
at c._load (node:electron/js2c/node_init:2:13672)
at Module.require (node:internal/modules/cjs/loader:1122:19)
at require (node:internal/modules/helpers:130:18)
at loadConfig (/home/group6/MagicMirror/js/app.js:117:14)
at App.start (/home/group6/MagicMirror/js/app.js:250:18)
at Object. (/home/group6/MagicMirror/js/electron.js:193:7)
at Module._compile (node:internal/modules/cjs/loader:1256:14)
at Module._extensions…js (node:internal/modules/cjs/loader:1311:10)
at Module.load (node:internal/modules/cjs/loader:1098:32)
at Module._load (node:internal/modules/cjs/loader:945:12)``t
-
@changaud said in Unknown Error after initializing buttons:
activeLow = false,
not =
activeLow : false
-
@sdetweil That did not fix the error :(
-
-
@sdetweil Yes I do. I think I will just implement it with TouchButtons. But thank you so much for all your help.
-
@changaud which same error are we talking about? the syntax error or the einval write error
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login
