@cyberphox - You may be interested in checking this out too: https://forum.magicmirror.builders/topic/9291/mmm-remote-control-v2-dev-extensible-rest-api-and-socket-communication-update
Read the statement by Michael Teeuw here.
Posts
-
RE: is there a way to control MMM-carousel with buttons?
-
RE: [MMM-RTSPStream] - Video Streaming from Live Feeds & Security Cameras
@Cr4z33 No problem, sometimes I need a little prompting…
Glad the revert works. I’ll troubleshoot more when I’m back.
-
[MMM-Remote-Control](v2-dev) Extensible REST API, Dynamic Menus, and Socket Communications, plus other updates
Description
I created an updated version of @Jopyth’s excellent MMM-Remote-Control module with an extensible REST API for controlling everything about your mirror, as well as an upgrade of the
/remote.html
tool to use the module’s node_helper socket connection for communication back and forth–instead of get/post calls.Example REST Calls:
Turn on the monitor
GET /api/monitor/on (curl -X GET 'http://magicmirror:8080/api/monitor/on')
Hide All Modules
GET /api/modules/all/hide (curl -X GET 'http://magicmirror:8080/api/modules/all/hide')
Here’s the link to the API README and API Documentation. The API also includes the ability to automatically interpret other modules’ anticipated notifications to create a “guessed” API to control it (created from MMM-API). Modules’ can also send a notification to this module to explicitly declare their own API actions.
This is still in testing, and I’m still adding a few features, but I wanted to share in case anyone is interested in testing as well.
Inspiration
I’ve now written several modules and end up constantly including similar functions into my code (things like monitor control, module switching, etc.) for the different modules and I wanted to start migrating to a “One Remote to Rule Them All”-style module. @Jopyth’s module is an awesome base with a lot of the functions needed already built in, but I also wanted to have a better RESTful interface (inspired by @juzim’s MMM-API module natively incorporated) so I could control the mirror from my home automation devices. Eventually, I’ll scrub my other modules like MMM-OnScreenMenu and MMM-KeyBindings to just call the functions from this module and keep them focused on their own key features.
Download
[card:shbatm/MMM-Remote-Control]
Recommend using the Develop Branch for most recent changes.Key Features and Changes
Added:
- REST API interface for controlling all aspects of the MagicMirror from HTTP RESTful-style GET and POST calls, based on principles from MMM-Api
- Full API Documentation at API/README.md
- Extensible Actions – Interprets other modules’ notifications to “guess” an API, but also allows a module to explicitly provide API actions to use.
- Live daily updates of
modules.json
from the MagicMirror wiki, based on @eouia’s MMM-Remote-Control-Repository. - Incorporated some features found in MMM-OnScreenMenu that were not originally in this module.
- Monitor (Connected Screen) On-Off Status and Toggle
- If using Electron: Open Dev Tools, Minimize, Toggle Fullscreen
- Configuration Option to send custom shell commands to use. Currently, only custom monitor on/off/status commands are supported. Addresses PR #99.
Changed:
- Updates to
remote.html
and thenode_helper.js
to use direct SocketIO communication back and forth instead of separate HTTP calls.- Future framework for following PM2 logs and more live update options.
- General clean-up and standardization of status reporting for GET and POST calls, to original URLs and to new API URLs.
- Updated to ES2015 (ES Version 6) function calls in most locations.
- Added USER_PRESENCE controls from AgP42, PR #84
- Added translations from BKeyport, PR #103
- Added SHOW/HIDE/TOGGLE ALL modules option per request from Rene1709, Issue #101
- REST API interface for controlling all aspects of the MagicMirror from HTTP RESTful-style GET and POST calls, based on principles from MMM-Api
-
RE: [MMM-RTSPStream] - Video Streaming from Live Feeds & Security Cameras
@cr4z33 Hey, sorry, I’m out of town and don’t have access to test anything related to this module (no easy access to cameras or a RPi) for the next few weeks.
There is definitely a glitch in the calls to stop and restart the streams, but I can’t test right now. You can try backing up to a previous version and see if it was the latest updates to cause the problem: try using
git checkout f583553
I will take a look as soon as I can, and on a side note, there is now official support for VLC w/ Hardware Accelerated Decoding on Raspbian, I am planning to see if it would be better to abandon OMXPlayer in favor of VLC.
-
RE: is there a way to control MMM-carousel with buttons?
Which version of MMM-Carousel are you using? If you use this one: MMM-Carousel w/ Slide Navigation you can navigate left and right or jump to a particular slide by sending a notification from another module.
Just pushed an update to make this even easier. See the details at the bottom of the README
-
RE: MMM-Carousel switching slides using MMM-Buttons
Which version of MMM-Carousel are you using? If you use this one: MMM-Carousel w/ Slide Navigation you can navigate left and right or jump to a particular slide by sending a notification from another module.
Just pushed an update to make this even easier. See the details at the bottom of the README
-
RE: Is there a "Rasbian simulation enviroment" for windows??
Staying away from the implications of installing on your corporate computer…
Try Debian for Linux Subsystem for Windows if you use Windows 10, you can install it from the Windows Store.
EDIT:
To use the store app you have to enable the WSL subsystem first by following the guide.
https://docs.microsoft.com/en-us/windows/wsl/install-win10
Afterward just install the “Debian GNU/Linux” app from the windows store. -
RE: How do all of you controle (/interact with) your MagicMirror modules?
A couple of shameless plugs for my own modules:
Title Description MMM-KeyBindings A module for getting bluetooth remote control and keyboard inputs MMM-OnScreenMenu Simple On-Screen Menu for controlling the MagicMirror² MMM-AlexaOnOff Simple Mirror Control from External Home Assistant (Alexa/Google Home/HASS.io) In addition, I’m currently working on a new version of MMM-Remote-Control with a RESTful API – Which is an extension/combination of the original MMM-Remote-Control and MMM-Api modules. See details on the API here. It will allow you to control the mirror with simple URL calls like:
http://magicmirror:8080/api/monitor/off
to turn off the screen.The end goal is to get rid of duplicate functionality in all of my modules (like exposing external routes, turning on/off the monitor, showing/hiding modules, etc.) and use API calls or Module Notifications for controlling everything, plus allow other modules to customize and integrate their own API.
This part is still an active work in progress, but if anyone is interested in testing, please let me know.
-
RE: MMM-Hue-Lights - new module for your Philips Hue lights!
@michael5r Awesome looking module! Extremely professional looking.
When I get time I’m definitely going look at integrating with my MMM-ISY module to render on top of the Floorplan (my ultimate goal is to use a MagicMirror instance as a web-based home control interface-slash-ISY/Hass.io/Hue front-end on my mirrors, tablets, etc).
-
RE: [MMM-AlexaOnOff] Simple Mirror Control from External Home Assistant (Alexa/Google Home/HASS.io)
@reropa1904 said in [MMM-AlexaOnOff] Simple Mirror Control from External Home Assistant (Alexa/Google Home/HASS.io):
Is there any way to execute two commands?
Out of curiosity, which module are you using for the show/hide?
I should be able to add the ability to send multiple notifications pretty easily when I get a chance.
EDIT: Done, you can now have multiple notifications fire when a “device” is turned on or off (Note: I was not able to fully test on the Mirror but it works in the browser, let me know if you have issues).
Update your version and see the last example at the bottom of the updated README
To update:
cd ~/MagicMirror/modules/MMM-AlexaOnOff/ git fetch && git pull