Calling a Module from Web
Dear, I am new at web development and also in MM, this is the reason why I need help to understand how I can call from Web(php) a specific module from a RespberyPi in the same network. For instance, I am trying to use the remote control to change the position of calendar trough another computer using the Web(I am developing the web page to control it).
@rsellmer First, There is already a module for that purpose -
Second, You should allow remote IP for your remote computer. See the
IPwhitelistin your config.
Last, you need to develop
Listenter Modulefor your purpose by yourself. That module could listen some port(maybe 8080) and hook the request and parse it, then do something. Maybe front could be built with PHP, however controlling MM itself should be built with nodejs, unless your goal is not just modifying
@Sean Thank you very much for your answer. It is exactly what I need. Understand how to use the MMM-Remote-Control with a web browser. I believe that I have to create the front end with PHP and use nodejs to call the MMM-Remote-Control, right ? If you have any example I appreciate that.
MMM-Remote-Controlalready has front-UI. You don’t need to make another UI for it.
See the MMM-Remote-Control first.
@Sean Let me try to explain to you. I have 2 mirrors in my house, one is in the room and another one in the bedroom, ok ? Through the web browser I want select one mirror or another and control the MMM-Remote-Control for this one which I selected and I want to use a new front end and just call the functions from the MMM-Remote-Control passing the parameters, is this possible ?
If you install
MMM-Remote-Controlin both Mirrors, (assume; 192.168.178.100 is for room, 192.168.178.101 is for bedroom), you can access each of them by
http://192.168.178.10X/remote.html. and can control each.
But I guess, you seem to need a new interface for your own.(maybe… for family?). It is unsure how to be able with
MMM-Remote-Control. I think, If it could, it might be limited so what.
Anyway, you can build a new module for that purpose by yourself. Good luck! :D
@Sean Thank you very much for your help.