Jopyth/MMM-Remote-Control

remote alerts w/ image

gdbrehm opened this issue · 1 comments

OS

ubuntu 20.04 (arm)

NodeJS Version

10.19

MagicMirror Version

2.16.0 (latest git pull)

Remote Control Version

2.3.6 (latest git pull)

Did you try using just Remote Control alone with MM?

  • I have and the error still happening

Description

When I push a remote alert with an image in it with a shell script, the image only appears if the URL points to an image outside my network.

This is the remote script with server names redacted.

#!/bin/bash
curl -X POST http://magicmirror.local:8080/api/module/alert/showalert \
  -H 'content-type: application/json' \
  -d '{ 
    "title": "",
    "message": "",
    "imageUrl": "https://example.local/snap.png",
    "imageHeight": "570",
    "timer": 5000
    }'

Watching the logs on example.local I note that magicamirror.local is not making any at all request ... I have tried http, the IP address, various legitimate and tested hostnames, so it doesn't seem like it's an issue with my URL. I can download and access the image from the MagicMirror's OS with other software.

However, if put in a link from google images or any other random image from the Internet works as expected. I have tried downloading the images that work from the Internet to a local server, that also fails. Naively, I have ruled out hostname resolution and image format. The most basic URL does not make a request according to the logs on local network server, i.e., http://192.168.5.5/snap.png

Expected behavior

Image from a local server will appear as an alert.

Current behavior

Image from a local server does not appear. Image from a server outside my network appears.

Possible solution

None.

Steps to reproduce

Swap a URL from a server on my home network with an Internet URL.

Log

No relevant logs found.

config.js

{
    module: 'MMM-Remote-Control',
    config: {
        customCommand: {}, 
        showModuleApiMenu: true, 
        secureEndpoints: true, 
    }

Additional info

While I continue to suspect it's something to do with my local network, I feel like I have ruled that out with URL variations and wget and firefox directly from the magic mirror's OS.

This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.