jopyth / mmm-remote-control Goto Github PK
View Code? Open in Web Editor NEWMagic Mirror Module to shutdown or configure your mirror
License: MIT License
Magic Mirror Module to shutdown or configure your mirror
License: MIT License
Hey Jopyth,
The recent MM update has moved the font-awesome files around which means they are no longer available in remote html. The following diff will fix it, please apply when you can:
diff --git a/remote.html b/remote.html
index 569dbd4..d504268 100644
--- a/remote.html
+++ b/remote.html
@@ -7,7 +7,7 @@
<link rel="icon" href="data:;base64,iVBORw0KGgo=">
<link rel="stylesheet" type="text/css" href="css/main.css">
<link rel="stylesheet" type="text/css" href="fonts/roboto.css">
- <link rel="stylesheet" type="text/css" href="vendor/font-awesome-4.5.0/css/font-awesome.min.css">
+ <link rel="stylesheet" type="text/css" href="vendor/node_modules/font-awesome/css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="modules/MMM-Remote-Control/remote.css">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
When i run http://192.168.xxx.xxx:8080/remote?action=RESTART, it does not restart and it shows this error {"status";"error","reason";"unknown","info";null}. how can i solve this problem?
removeDefaultValues() doesn't properly remove all default values, like arrays and objects.
For example compliments gets saved like this, even though the compliments object is defined like this in the defaults:
{
module: "compliments",
position: "lower_third",
config: {
compliments: {
morning: [
"Good morning, handsome!",
"Enjoy your day!",
"How was your sleep?"
],
afternoon: [
"Hello, beauty!",
"You look sexy!",
"Looking good today!"
],
evening: [
"Wow, you look hot!",
"You look nice!",
"Hi, sexy!"
]
}
}
}
The problem is, that {} === {}
or [] === []
equals false and therefore isn't being removed.
Hi! Use your module daily! It's great, thank you!! :)
I have an enhancement suggestion. It would be great to be able to see what modules has currently locked other modules (by for example "hovering" over the locked module or in the "unlock" dialog if the hovering is to much). If I want to "show" a locked module, I get a warning about that it's locked but not by whom/what. When developing new modules it would be good to know for debugging purposes at least. :)
Hi, that’s great what u have done.
Why it doesn’t work on PC Browser? http://192.168.xxx.xx:8080/
On my HDMI monitor all thinks ok.
The module is showing up on the mirror, but it only displays: http://ip-of-your-mirror:8080/remote.html
I am running a Raspberry Pi 3 with Raspbian Jessie
Is there a way to Hide modules on startup? I would like to be able to rotate modules via voice command, but in doing so I need to have a 'default' layout on startup.
The status of modules is loaded on initialization of the MMM-Remote-Control module. When an update of a module is available this is only noticed after restarting (and reinitializing) the MMM-Remote-Control module.
I followed the instructions and installed in my config file and now my MagicMirror only loads up to the blank black screen sometimes and the no config page other times. I put my script into a java checker and it only has the one error same as with the default script "One undefined variable
83 module"
Attached is a txt version of my config.js
config.txt
Hi, what an awesome module!
I'd like to automate the monitor to be turned on when my phone connects with my home wlan and have the monitor turned off if I'm no longer connected to my home wlan, in order to reduce energy costs of the monitor.
I tried to find something with IFTTT but I struggle with open the link of your remote acces in the local network as it only works in it.
I hope you understand what I try to do and would extremely appreciate any help on this!
Thank you very much!
I loaded two other modules, snow and Daily XKCD, onto the Magic Mirror--the remote doesn't show these modules in the menu. Thus, i can't disable them like i can the others.
Sorry if this is a really newbie question but when I try to do curl http://localhost:8080/remote?action=NOTIFICATION¬ification=SHOW_ALERT&payload={%22title%22:%22Alert%22,%22message%22:%22This%20is%an%20alert.%22}
through Terminal, it says it was successful but nothing happens on my mirror. Entering the URL through Chrome works.
See issue filed over at the main repository MagicMirrorOrg/MagicMirror#664.
No undefined check is present thus the module will fail and lead to non expected behavior like not being able to hide apps following deeper down in the config file.
if (modules[i].identifier === moduleData[k].identifier) {
https://github.com/Jopyth/MMM-Remote-Control/blame/master/MMM-Remote-Control.js#L76
First of all, the website you made is great! And.. this is not an issue but a request.
Is it possible to upgrade and tweak the website a littlebit that you have different "classes" for different events.
I've seen someone created a option in the main menu called "party mode" which let dissapear all the personal modules and only shows the music player module.
It should be nice if i could make a party mode, dinner mode, or maybe a daddy, mother etc.. etc.. mode. I'm not interested in the calendar and traffic from my brother or mother. And ofcourse i can activate them all one by one, but is hard because the name duplicates or not user friendly. Another profit about classes is that the CPU usage is way lower than the facial recognition which already used the idea. (my parents are useless when it comes to technology :) )
I see forward to your reply!
While using MMM-Remote-Control, a black screen occurs on IP:8080 in Edge. IP:8080/remote.html does work. IP:8080 gives a copy of the mirror in Chrome.
Edge version: Microsoft Edge 38.14393.0.0
Microsoft EdgeHTML 14.14393
a (anonymised copied of my config.js is attached.
config.txt
When I try to open the url in my webbrowser, I get this message:
This device is not allowed to access your mirror.
Please check your config.js or config.js.sample to change this.
What can I do?
hey, maybe u can help me to change the function (turn on/off the monitor => disable hdmi screen) to dim the brightness and set the min (10?) and max (200?) value.
This avoids the problem of not finding a signal of the monitor.
when i choose "edit modules" the MMM-Remote-Control does't show any module.
It mean there are no modules loaded. But more than 6 modules are running at the mirror.
Any ideas?
In step 3, it is written to add IPs to the ipWhiteList in the confi.js.
How do I get to the said config.js?
First of all, excellent module, just what I was looking for.
A question, is it possible to return the state of the monitor?
MODULE_DATA returns brightness of the monitor, but it doesn't say if it is on or off. Is that possible to detect and report back?
Thanks!
Hello, I have cloned the module MMM-bitcoin and renamed MMM-Etheurum for show me the value of etheurums in the mirror. This module works fine but when I am in Edit view of MMM-Remote-Control
(http://localhost:8888/remote.html#edit-menu) iI have this message "No module loaded".
Can you help me?
So I have remote-control up and running perfectly for a few hours. Was even able to tie it into my openHab smart home system running on another raspberry pi downstairs and control the mirror via my google homes.
Then all of a sudden remote-control completely stopped working. It no longer loads any modules in "views", the brightness has no affect, for example.
I've tried removing it and uninstalling, restarting the machine, restarting MM obviously. I've run out of ideas.
Any suggestions as to how to get MMM-Remote-Control back up and running? It was working great and fulfilled a few needs of mine perfectly!
EDIT: I was actually unable to add any new moduels anymore - I have a feeling they were all being hidden / disabled automatically / immediately. Anyway I fixed by rebasing to develop branch and reseting. git status said file "core" was somehow changed. I know I didnt change it..
Hey,
I'm trying to access a remote interface. When I type the URL in in my mobile phone it says: This device is not allowed to access your mirror. How can I access it? When I type this (http://192.168.ipOf.myRaspberry:8080/remote.html) in my browser it doesnt work..
Is it caused by Proxy, Firewall etc.?
Can you please help me? :D
Thank you!
I've installed the repository and added it to the config.js and my ip the the ipWhiteList. I have no error, but when i put my IP on the web browser it asks for a Username and Paddword. Any idea? don't know what else to do, Thanks
Hi,
Great module btw, that's what I was looking for.
Everything works fine, except when I turn off the monitor and want to turn it back on.
When turned off, the screen goes into power saving mode -> OK
When turned on, it displays a single flashing line, like it was waiting for me to type ...
I tried refreshing the browser, that does not help
Only restarting the RPI gets the MM working again
help please!!
Rebooting the Rpi, turning the screen on and off both work fine, but the restart MM2 button doesn't do anything, seemingly.
What could be the problem?
Ive been trying to do this for a while now, and whatever ip I write into the ipwhitelist I still get the: "Your device is not allowed access to your mirror" message.
Thanks
ff2d0b2 breaks FontAwesome icons on MagicMirror² develop branch.
Its just this single line of code that makes the entire MM not start and just end up with the: you havnt configured your config.js thingy.
{
module: "MMM-Remote-Control"
position: "bottom_left" <----- This line crashes the startup
},
Hi,
I did a fresh installation of MM 2 days ago, i have everything updated, and today i did install your module, but i'm getting this error.
Cannot GET /remote.html
I have my IP on white list otherwise, i would not see this msg.
i did check and MMM-Remote is correctly install on module folder.
Any idea of what could i did wrong?
Regards,
Hello.
First of all, props to you for this Module. Great work.
Everytime I use the remote I am confused about the term "Ausschalten".
Maybe it's better to use "Energieoptionen", cause "Ausschalten" means the final and normally last executable action. But the "button" is refering to more actions which are useful for energy saving options.
edit: wanted to label the "issue" as enhancement, but can't find the option for labeling
When following the link I get to a webpage that says:
This device is not allowed to access your mirror.
Please check your config.js or config.js.sample to change this.
Any help please?
Can you help me a little bid...
How to add Stop MM and Start MM in this great tool
What i'm not finding is where to create the 2 buttons.
The other stuf i think i can copy from your source and change it a little bid.
I hope.....
MagicMirror Version: 2.1.3
OS: Linux
H/W: Raspberry Pi 3
Whenever I update config using post method. The mirror needs to restart for loading new config. Is there no way to update magic mirror configuration without restarting it to view the result of updated configuration and when the user is satisfied the config.js file is updated and then mirror restarts(better doesn't restarts) to load the config.js file.
Hi,
I am running MM2 with modules MMM-Remote-Control and MMM-ModuleScheduler.
My problem is that turning off the monitor simply doesn't work. I see the HDMI message in the MM-log but the screen simply stays on. It doesn't matter if I try to turn it off by using a schedule in MMM-ModuleScheduler or the web-interfac http://raspi-IP:port/remote.html.
Any ideas where to look?
Kind regards,
Bernd
Every time I try to access the website for the module, I get:
Cannot GET /remote.html
Can someone please help me? Thanks
Hi All,
Having trouble getting the notification requests to fire via curl.
If i visit, for example, http://192.168.178.61:8080/remote?action=NOTIFICATION¬ification=ARTICLE_MORE_DETAILS
it will work fine,
but via curl:
curl http://192.168.178.61:8080/remote?action=NOTIFICATION¬ification=ARTICLE_LESS_DETAILS
another row shows up with the JSON response and when I press enter on that another output appears that just says "Done and a chopped off version of my request. See paste:
$(ndo@ndo3)-(~)-(04:40 Sa Mär 31)-> $(jobs:0)-(32 files, 236Mb)-> curl http://192.168.178.61:8080/remote?action=NOTIFICATION¬ification=ARTICLE_MORE_DETAILS [1] 732 $(ndo@ndo3)-(~)-(04:58 Sa Mär 31)-> $(jobs:1)-(32 files, 236Mb)-> {"status":"success"} [1]+ Done curl http://192.168.178.61:8080/remote?action=NOTIFICATION
Does the module support notifications from other modules to trigger the actions. For example could I call sendNotification("MONITOROFF")
from my module and have your module perform the work?
I allowed all IP addresses with [], but after restart (pm2 restart mm) it shows a black screen. When I go to the url http://192.168.x.x:8080/remote.html it returns: "This device is not allowed to access your mirror. Please check your config.js or config.js.sample to change this."
var config = {
port: 8080,
ipWhitelist: [], // Set [] to allow all IP addresses
// or add a specific IPv4 of 192.168.1.5 :
// ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.1.5"],
// or IPv4 range of 192.168.3.0 --> 192.168.3.15 use CIDR format :
// ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.3.0/28"],
Hello,
Thank You for this module, it works perfect. I just found a little bug:
I if I have a disabled module in my config.js file, then all modules that are listed below it, can not be hidden / show over Your module. Those that are listed above works fine. When I removed disabled module from config.js, all works fine.
Thanks.
Peter.
Looks like it reports an error when there's no saved settings:
{ Error: ENOENT: no such file or directory, open '/home/pi/MagicMirror/modules/MMM-Remote-Control/settings.json'
at Error (native)
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '/home/pi/MagicMirror/modules/MMM-Remote-Control/settings.json' }
When I scan with nmap it doesnt even show port 8080 as an option. Do I need to manually install apache?
Hi,
after updating the MagicMirror repo the webinterface http://192.168.1.13:8080/remote.html#main-menu looks like this:
All Icons are missing ...
Karsten.
In the remote site, if I want to add one menu is to read a directory and list video files from the directory, how do I implement in the MMM.Remote-Control.js & remote.html?
after clicking that "Show video files", it will show a list of the video files from the directory path and able to play it.
This is the directory path.
When I commenting the position for the address of the remote, the config.js file cannot be found when starting the mirror. By removing that line or making the position a comment again, everything is fine and the remote works.
I'm unable to connect even after []'ing the whitelist. This is likely an isolated issue, since I'm running a strange mix.
Hardware: RPI3
OS: Raspbian Stretch
Electron: 1.4.15
MM: 2.1.3
On a previous setup I didn't have any issues. This time I opt'd to install Stretch instead of LXDE, and I'm running Electron 1.4.15 to save CPU usage (works wonderfully).
Unfortunately, no matter how I configure the whitelist, it seems like the remote server isn't running... at all.
any thoughts?
Thanks,
Rich
Would it be easy to implement a WiFi option to your module? I want to give a Magic Mirror as gifts (to non-technical people) and use your Module as the setup application. I want them to be able to enter all of their info for the modules like WiFi, email, calendar, Location Data (Weather/Forecast) NFL/NHL teams, etc. However, I'm gonna start with WiFi, because if I don't get the rest implemented I could remote in and setup the rest (when the Mirror is connected to WiFi).
According to the Raspberry Pi Forums:
https://www.raspberrypi.org/documentation/configuration/wireless/wireless-cli.md
It really only takes a simple "sudo echo" to really setup a new network.
I notice that I can only hide the clock and calendar by default using the menu of the remote. When I attempt to hide any other module the toggle switches to hidden, but the module remains on the mirror.
Hi,
so i added the IP address in the config.js from my phone, like the manual says.
But the access is denied, even the console (where I start the Magic Mirror) is saying: Access denied to IP address: 192.168.188.45
Here is my IP-Whitelist:
ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.188.45"],
Is there an easy way to avoid this Whitelist stuff? I really don't need it.
Thanks!
Hi,
I tried to use Module: Voice Control to sendNotification to Remote Control, but no lucky.
The setting of Voice Control in config.js:
{ module: 'voicecontrol', config: { models: [ { keyword: "ycsy", // keyword description: "Say 'ycsy' to hide clock", file: "ycsy.pmdl", // trained model file name message: "HIDECLOCK" // notification message that's broadcast in the MagicMirror app } ] } },
For Remote Control here, i really have no idea:
{ module: 'MMM-Remote-Control', notificationReceived: function(notification, payload, sender) { if (notification === "HIDECLOCK"){ **WHAT SHOULD I PUT HERE, have tried many times, all failed** } },
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.