Magic Mirror addon for home assistant

Tags: #<Tag:0x00007f73986235f0> #<Tag:0x00007f73986234b0>

Hi,

Just made a addon for magic mirror. Pretty simple at the moment so have a look and let me know if you have any issues or suggestions.

Add this url as a repository in the hass.io addon store

URL: https://github.com/sytone/hassio-addons

It starts up magic mirror listening on port 8181. It will use the default config on first run and make a magicmirror folder in your config directory. If you modify the files or add any custom modules there you will need to restart to pick them up and run.

When installed it will place a pre-configured config file in place to get you started. This
can be edited. Please make sure you do not change the Home Assistant urls as they are for
the internal API Proxy used by HASS.

Default home page showing some sensor data

Using the menu you can navigate to the full Home Assistant UI, handy for tablets.

14 Likes

That’s great! Will check it out

Intersting, I created a magic mirror style page using floorplan, had another pi that would open the site in kiosk mode.

I’ll have a go with this sounds very promising.

EDIT

Ok just installed no problems but I cant open the web UI

In the log it says this

Starting server on port 8080 ... 
Server started ...
Connecting socket for: updatenotification
Connecting socket for: calendar
Starting node helper for: calendar
Connecting socket for: newsfeed
Starting module: newsfeed
Sockets connected & modules started ...
Ready to go! Please point your browser to: http://localhost:8080

The open web UI button points to http://hassio.local:8181/

Im running duckDNS so I tried

https://hassio.local:8080/
https://hassio.local:8181/
Also tried without the SSL but i just get site cant be reached error.

Running 0.73.0 HASSIO standalone on Intel NUC

The port is mapped to 8181. You can change that in the add on page configuration. I had 8080 in use already so set it to 8181.

I’ll update the output to try and reflect that. The log you entered is what magic mirror thinks the world looks like not what it is mapped to outside of the container.

Can you try hitting the host machine up address with port 8181?

I did… Nothing

I’ll try again when I’m home though just to confirm.

UPDATE:

Still nothing unfortunately, tried 8181 with IP / https and without and using the normal hassio.local no luck.

I also tried a different port 9000 same results.

Ok. I redeployed it last night and it worked and bound to the port. Will try and add more logging and will update the version to try and get more information into the logs to trouble shoot.

Are you comfortable in running the docker container directly on the host via ssh? If so I will send you a command to run and pull information directly from docker to troubleshoot

ok, new version pushed and you should see a update. After it is run try to connect to http://yourhostname:8181 to see if the page loads.

If not please try another port int he config and validate that works. There is no https support as magic mirror is not meant to run outside of the network as there are no access controls.

Also check page source to see if there is a rendering issue.

Is this magic mirror addon for home assistant is to have magic mirror installed on the same ha ?

Also anyway to install this addon using hassbian?

Thank you very much.

I’m interested to see screenshots / photos of this in action

Its going to look exactly like stand along magic mirror just hosted on your HA hardware.

See here - https://magicmirror.builders/

I’m guessing (as I haven’t got it working) its like a webserver for the software you will need another pi or device to display the website behind the mirror.

Hi there

I removed and reinstalled using latest update, no luck again.

I then changed the port and still no luck

website has no source just connection refused…

This site can’t be reached
hassio.local refused to connect.
Search Google for hassio local 9985
ERR_CONNECTION_REFUSED

I have node red add-on running with no problems port hassio.local:1880.

That might be a bit beyond me sorry. Im running hassio standalone Resin OS 2.3.0+rev1.

I guess I was thinking the add on would be simple and keep everything on my NUC, but if its going to get complicated I’m probably better off running magic mirror on a pi behind my mirror. From what I can work out I would still need a pi behind the mirror, that opens the website in kiosk mode from my HA device anyway right ?

@Sunonline & @lerroy_b yes, this is running the magic mirror server in a container via HASS.IO. Then you can bring the site up on any device that can run a web browser. I have it as my default page at home on my PC and on a tablet on the wall. More to come over time.

@sparkydave Ill take a shot of my site and add it, by itself it is not much other than hosting. Going to add the hass modules to it by default over the weekend.

@lerroy_b I am running node red as well without issue alongside the magic mirror container. Still poking at it to try and work out why you are getting connection refused. There must be something special in here.

@lerroy_b crud… I think I know what it is. By default the configuration that comes with magic mirror restricts access to local host :slight_smile:

Go to your ha config and look for the magicmirror/config folder. Open config.js in your editor of choice and replace this


	address: "localhost", // Address to listen on, can be:
	                      // - "localhost", "127.0.0.1", "::1" to listen on loopback interface
	                      // - another specific IPv4/6 to listen on a specific interface
	                      // - "", "0.0.0.0", "::" to listen on any interface
	                      // Default, when address config is left out, is "localhost"
	port: 8080,
	ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"], // 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"],

with

    address: "", // Address to listen on, can be:
                          // - "localhost", "127.0.0.1", "::1" to listen on loopback interface
                          // - another specific IPv4/6 to listen on a specific interface
                          // - "", "0.0.0.0", "::" to listen on any interface
                          // Default, when address config is left out, is "localhost"
    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"],

If that work I need to work out if I do that by default when it starts for the first time and makes the config.js. May just make a custom one with the hass modules added as an example.

1 Like

@sparkydave have a look at the default configuration here for screen shots.

Wahoo that did it.

Awesome works really well, opened perfectly in a kiosk window on another pi.
Thanks for working that through.

Now time to play with some more modules …down the rabbit hole I go :stuck_out_tongue:

One small thing though I cant get the custom panel working, just shows a blank page, not a problem ill likely not use it anyway but thought I would point out.

Thank you for this app. Before, I was running some mirror Android app that stopped loading the news and weather. Now I can load up a browser and point it to this!

Can you give me more details? Which panel in particular.

This one - listed on your Git readme - https://github.com/sytone/hassio-addons/blob/master/magic_mirror/README.md

panel_iframe:
  MagicMirror:
    title: Magic Mirror
    icon: mdi:image-filter-frames
    url: http://addres.to.your.hass.io:8181

There are modules that need to run for example “cd email” how can i do this? And other thing panel iframe not working, Great addon

Very Good addon, but i can’t install any modules, can someone help?