GithubHelp home page GithubHelp logo

jopyth / mmm-remote-control Goto Github PK

View Code? Open in Web Editor NEW
494.0 30.0 146.0 992 KB

Magic Mirror Module to shutdown or configure your mirror

License: MIT License

JavaScript 79.04% CSS 5.41% HTML 10.28% Shell 3.79% Python 1.47%
magicmirror shutdown notifications magic-mirror-modules raspberry-pi remote-control mmm-modulescheduler magicmirror2

mmm-remote-control's People

Contributors

bangee44 avatar bkeyport avatar davystrong avatar ezeholz avatar iamyzc avatar ianperrin avatar joekarlsson avatar jopyth avatar jxga avatar khassel avatar kristjanesperanto avatar kurtern84 avatar michmich avatar monkofthefunk avatar mysh3ll avatar princesselulu avatar qistoph avatar qnimbus avatar shbatm avatar slametps avatar snille avatar tonymin avatar varguit avatar xsu1010 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mmm-remote-control's Issues

Font Awesome Broken

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>

removeDefaultValues() doesn't remove arrays and objects

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.

Modules locked by who/what...

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. :)

Show/Hide Modules on Startup.

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.

Module updates not noticed without restart

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.

Installed on config, now MM doesn't show up

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

remote control automation

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!

Remote doesn't detect non-default modules

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.

curl http requests not working

Sorry if this is a really newbie question but when I try to do curl http://localhost:8080/remote?action=NOTIFICATION&notification=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.

Classes with activities?

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!

Black Screen on IP:8080 in Edge

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

Change function of turn on/off monitor

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.

MagicMirror² v2.1.0 no Modules

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?

config.js

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?

Status of the monitor via rest?

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!

"No modules loaded."

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..

unable to access

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!

Asks for User and Password

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

Monitor On function does not work

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!!

Unsuspected token

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
},

Cannot GET /remote.html

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,

German term "Ausschalten" confusing

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

Device not allowed

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?

How to add Stop MM and Start MM.

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.....

Config Update Restarts the MagicMirror

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.

Turning off monitor fails without an error

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

Cannot GET remote.html

Every time I try to access the website for the module, I get:
Cannot GET /remote.html
Can someone please help me? Thanks

curl does not work, visiting it via browser does?

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&notification=ARTICLE_MORE_DETAILS it will work fine,

but via curl:

curl http://192.168.178.61:8080/remote?action=NOTIFICATION&notification=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

Support for notifications from other modules

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?

This device is not allowed to access your mirror. Please check your config.js or config.js.sample to change this.

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"],

Error in console when first run

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' }

Wont Start

When I scan with nmap it doesnt even show port 8080 as an option. Do I need to manually install apache?

Add one more menu "Show video files" in the remote.html

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?

capture
after clicking that "Show video files", it will show a list of the video files from the directory path and able to play it.
path
This is the directory path.

Can't connect to the server....

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

Wifi implementation - Enchancement

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.

Some modules can not be hidden

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.

Not allowed to access...

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!

Need help about voice control sendnotification

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** } },

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.