• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

Use node_helper.js functionality in config file

Scheduled Pinned Locked Moved Troubleshooting
callbackbutton
1 Posts 1 Posters 935 Views 1 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    faxe1008
    last edited by Jan 17, 2018, 6:04 PM

    Hi,

    I am building an app with different buttons which the user can define for them selfes what happens when they are pressed. This information is located in the configuration array:

    config = {
        button : {
            name : "bla",
            callback : function(){}
        }
    }
    

    and the class organnizing it has a refrence to that button and subscribes to the click event and triggers said callback when clicked.
    How can I use module.sendSocketNotification in this configuration for the button callback?

    1 Reply Last reply Reply Quote 0
    • 1 / 1
    1 / 1
    • First post
      1/1
      Last post
    Enjoying MagicMirror? Please consider a donation!
    MagicMirror created by Michael Teeuw.
    Forum managed by Sam, technical setup by Karsten.
    This forum is using NodeBB as its core | Contributors
    Contact | Privacy Policy