Read the statement by Michael Teeuw here.
MMM-homeassistant-sensors no icons after MM upgrade to 2.19.0
-
Hi everyone,
our MM was running like a charm with 2.18.0 and MMM-homeassistant-sensors from @snille showing our family members and fuel prices with the icons configured in Home Assistant.
After the upgrade to 2.19.0 (and some manual tweaks with other modules) everything is up and running again, but the same elements provided by ha as before do not show up any icons (in fromt of the entries!). At the moment it looks like this:
Normally there should be pictures from our family members and logos from the fuel stations and all comes from ha.Is there a way to fix this?
What more infos do you need to find what’s going wrong here?Any help welcome.
Regards -
Ok, I can reproduce this correction too! :-)
After changing address: “0.0.0.0” to the real ip address: “192.168.x.y” and removing every additional config from this thread ALL images are back again!Thank you all for this simple but effictive solution!
-
@wmx said in MMM-homeassistant-sensors no icons after MM upgrade to 2.19.0:
What more infos do you need to find what’s going wrong here?
may a cors problem, are there any errors in the console?
I assume you are running this on a pi, can you test if this works in a browser
http://<ip-address-of-the-pi>:8080
? -
@karsten13 on a desktop??
-
@wmx Hi, this has to do with “cors”, it’s not allowed anymore to load the pictures the way I do it, I have to rewrite stuff to fix it, I just don’t have the time… I’m currently loading the pictures form “internet” using a URL instead… It works, but not as nice as geting them from HA…
Like this:
values: [ { sensor: "person.jane_doe", name: "Jane are %v%", displayvalue: false, icons: [{ "default": "https://www.snille.net/img/magicmirror/users/jane.png" }] ], },
-
can you test
"default": location.protocol + "//" + location.host + "/cors?url=" + old_ha_url
?Since v2.19.0 there is a cors proxy inside mm which is used in the weather module and can be used by every other module.
-
@karsten13 Oh! I did not know that… I’m guessing this has to be done in the actual module somewhere? I have to see if I can figure it out. :)
-
-
-
@karsten13 Hm… Not sure if that works, the “picture” is different depending om what the “sensor” is sending, so it’s not possible to set the “url=http://your_not_working_url” to something static… I’ll have to read up on it… :) Thank you!
-
@Snille you should be able to see the CORS error in the dev window.
however the url gets built now for the image, should be able to change it
-
@karsten13 , @Snille
Sorry for the delay, but hanks for your feedback.Yes, I’m running MM on a raspi 3.
One more point I figured out:
The display connected to the raspi an showing THE mm on the wall has these problems with missing images.
If I connect with a browser from my desltop to the mm URL the images are visible.I’ll try to test your given notes this weekend and return the results back here.