Read the statement by Michael Teeuw here.
MMM-Buttons calling MMM-Remote config help
-
Hi, bit new to linux only got a pi 3 months ago and its been a bit of a steep learning curve.
I’m having a bit of trouble understanding how to configure config.js What I’m trying to do is get MMM-Buttons to send a message to MMM-Remote to hide a module.
Everything runs ok (remote hides modules when access from my phone), but pressing the button does nothing. I’m guessing I’ve misunderstood how to configure the payload.
Config for Buttons looks like this:
{module: 'MMM-Buttons', config: { buttons: [ { pin: 32, name: "monitor_control", longPress: { notification: "REMOTE_ACTION", payload: {action: "HIDE", "moduleData":[ {"hidden":true,"name":"clock","identifier":"module_1_clock","position":"top_left"},],},}, shortPress: { notification: "REMOTE_ACTION", payload: {action: "SHOW","moduleData":[ {"hidden":false,"name":"clock","identifier":"module_1_clock","position":"top_left"},],},} }] },config for remote section (same file config.js)
{ module: 'MMM-Remote-Control', position: "bottom_bar" // uncomment the following line to show the URL of the remote control on the mirror // , position: 'bottom_left' // you can hide this module afterwards from the remote control itself },Any advice would be appreciated.
Thanks.
Grant
:::Spoiler Text
:::
-
I was thinking that MMM-Remote-Control was sending the notification, hence the confusion.
Cleaned the config up to look like this:
{module: 'MMM-Buttons', config: { buttons: [ { pin: 32, name: "monitor_control", longPress: { notification: "REMOTE_ACTION", payload: {"action": "HIDE", "module": "module_1_clock"} }, shortPress: { notification: "REMOTE_ACTION", payload: {"action": "SHOW", "module": "module_1_clock"} } } ] }},``Can I add another payload from the same action i.e. hide clock & calendar?
Not had any success with that so far, can somebody give me a pointer to the syntax.
Ta.
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