@AxLed said in [MMM-Remote-Control] Cannot GET /api:
api/module/alert/showalert?message=Hello&timer=2000
it looks like the api was changed, but not documented…
looking thru node_helper.js you can see all the commands
ip:port/remote?action=xxxxx&parms=???&parms2=???
the code lists these actions
if (query.action === "SHUTDOWN") {
if (query.action === "REBOOT") {
if (query.action === "RESTART" || query.action === "STOP") {
if (query.action === "USER_PRESENCE") {
if (["MONITORON", "MONITOROFF", "MONITORTOGGLE", "MONITORSTATUS"].indexOf(query.action) !== -1) {
this.monitorControl(query.action, opts, res);
if (query.action === "HIDE" || query.action === "SHOW" || query.action === "TOGGLE") {
self.sendSocketNotification(query.action, query);
if (query.action === "BRIGHTNESS") {
self.sendSocketNotification(query.action, query.value);
if (query.action === "SAVE") {
if (query.action === "MODULE_DATA") {
if (query.action === "INSTALL") {
if (query.action === "REFRESH") {
self.sendSocketNotification(query.action);
if (query.action === "HIDE_ALERT") {
self.sendSocketNotification(query.action);
if (query.action === "SHOW_ALERT") {
self.sendSocketNotification(query.action, {
if (query.action === "UPDATE") {
if (query.action === 'NOTIFICATION') {
this.sendSocketNotification(query.action, { 'notification': query.notification, 'payload': payload });
if (["MINIMIZE", "TOGGLEFULLSCREEN", "DEVTOOLS"].indexOf(query.action) !== -1) {
switch (query.action) {
if (query.action === "DELAYED") {
to send an alert thru the api
http://mirror_ip:mirror_port/remote?action=SHOW_ALERT&message=foo&title=help&timer=10&type=alert
the remote.html does NOT use the api, but uses the socketNotifications pipe under the covers.
which is why it works, but the older /api/modulename… approach doesn’t