Read the statement by Michael Teeuw here.
Can I rotate the pages (MMM-Pages) with MMM-TelegramBot or MMM-RemoteControl?
-
With the MMM-Pages module, is there a way to turn pages whenever you want without touching the screen?
-
@MiguelDAD You should be able to do it with remote control or telegram module. check the documentation of MMM-Pages. You need to send notification to it to change the page.
-
I have tried to follow the wiki of the modules but it has not worked for me.
{ module: 'MMM-Remote-Control', // uncomment the following line to show the URL of the remote control on the mirror // position: 'bottom_right', // you can hide this module afterwards from the remote control itself config: { apiKey: 'xxx', customCommand: { PAGE_INCREMENT: 'Pasar de página', PAGE_DECREMENT: 'Retroceder de página' }, } }, { module: 'MMM-TelegramBot', position: 'top_center', config: { telegramAPIKey: 'xxx', allowedUser: ['MiguelDAD'], customCommands: [ { getCommands: function (commander) { commander.add({ command: 'PAGE_INCREMENT', callback: 'PasarPagina' }); }, } ] } -
read wiki of TB
-
@MiguelDAD the telegram bot syntax looks incorrect. Check the wiki https://github.com/bugsounet/MMM-TelegramBot/wiki/Custom-Command as @Bugsounet suggested or try below (I have not tested it my self yet)
customCommands: [ { command: "nextpage", description: "Show next page" callback: (command, handler, self) => { self.sendNotification("PAGE_INCREMENT") handler.reply("TEXT", "Okay... next page will be shown!") } } ]you can then use
/nextpagecommand in telegram to change the page -
@ashishtank I’m very stupid I know but I try these two options and neither works for me:
{ module: 'MMM-TelegramBot', position: 'top_center', config: { telegramAPIKey : 'thisapkiokey', allowedUser : ['MiguelDAD'], // This is NOT the username of bot. customCommands: [ { command: "nextpage", description: "Muestra la siguiente página" callback: (command, handler, self) => { self.sendNotification("PAGE_INCREMENT") handler.reply("TEXT", "Okay... mostrando la siguiente página") } } ] } },{ module: 'MMM-TelegramBot', position: 'top_center', config: { telegramAPIKey : 'thisisokey', allowedUser : ['MiguelDAD'], // This is NOT the username of bot. } customCommands: [ { command: "nextpage", description: "Muestra la siguiente página" callback: (command, handler, self) => { self.sendNotification("PAGE_INCREMENT") handler.reply("TEXT", "Okay... mostrando la siguiente página") } } ] }, -
try this: (you have miss a coma)
{ module: 'MMM-TelegramBot', position: 'top_center', config: { telegramAPIKey : 'thisapkiokey', allowedUser : ['MiguelDAD'], // This is NOT the username of bot. customCommands: [ { command: "nextpage", description: "Muestra la siguiente página", callback: (command, handler, self) => { self.sendNotification("PAGE_INCREMENT") handler.reply("TEXT", "Okay... mostrando la siguiente página") } } ] } },result of
/nexpageand/helpBugsounet Cédric, [13.01.21 00:04 /help nextpage Dev MagicMirror, [13.01.21 00:04] [En réponse à Bugsounet Cédric] /nextpage Muestra la siguiente página Servi par MMM-TelegramBot Bugsounet Cédric, [13.01.21 00:04] /nextpage Dev MagicMirror, [13.01.21 00:04] [En réponse à Bugsounet Cédric] Okay... mostrando la siguiente páginaand Naturaly the notification will be sended: (verified with my personal debug module)
[Notification][MMM-TelegramBot] PAGE_INCREMENTNote: don’t forget your
adminChatIdfield -
@MiguelDAD said in Can I rotate the pages (MMM-Pages) with MMM-TelegramBot or MMM-RemoteControl?:
> config: { > telegramAPIKey : 'thisisokey', > allowedUser : ['MiguelDAD'], // This is NOT the username of bot. > } < ---------------------------------Comma is missing here > customCommands: [ > { > command: "nextpage", >@MiguelDAD Are you able to get it working after adding comma here as @Bugsounet have suggested ?
-
@Bugsounet said in Can I rotate the pages (MMM-Pages) with MMM-TelegramBot or MMM-RemoteControl?:
{
module: ‘MMM-TelegramBot’,
position: ‘top_center’,
config: {
telegramAPIKey : ‘thisapkiokey’,
allowedUser : [‘MiguelDAD’], // This is NOT the username of bot.
customCommands: [
{
command: “nextpage”,
description: “Muestra la siguiente página”,
callback: (command, handler, self) => {
self.sendNotification(“PAGE_INCREMENT”)
handler.reply(“TEXT”, “Okay… mostrando la siguiente página”)
}
}
]
}
},Niceee, thanks so much <3
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