Read the statement by Michael Teeuw here.
MMM-homeassistant-sensors no icons after MM upgrade to 2.19.0
-
@borrmi i have no idea where ha server makes them available to outside the ha machine consumers…
what did u have before this latest MM update?
-
nothing, it is a new installation. first time with a running ha instance in the house
funfact:
in a browser on my pc i can see the pictures with only
{ sensor: "person.borrmi", name: "Borrmi ist %v%", displayvalue: false, replace: [{ "home": "zu Hause", "not_home": "nicht zu Hause", } ] }, -
@borrmi ok never ha for me
that is the image definitions, what to use for what…
but not the image itself, which is what mm needs
I don’t know if u request it by name (sensor) or filename (person.borrmi)
-
@sdetweil person.borrmi ist a sensor
-
@sdetweil This is what you get back (as a picture) from HA when adding a person as a sensor looks like this:
https://your.haipaddress.here:443/api/image/serve/d5b50f6cf5e15d2e1d3f5457293458f6/512x512So, before “cors” I just did:
<img src="https://your.haipaddress.here:443/api/image/serve/d5b50f6cf5e15d2e1d3f5457293458f6/512x512" class="ha-img">And it worked (still does in a browser), but not on the mirror.
The whole “person”-object looks like this:
{ "entity_id": "person.firstname_lastname", "state": "at Some Place", "attributes": { "editable": false, "id": "9cd6gj3a4eb8ds4d0bfd2b0e1e57804ea", "latitude": 16.1241928, "longitude": 82.9718906, "gps_accuracy": 18, "source": "device_tracker.google_maps_105082325327346729172", "user_id": "402df0jd89b84230bf8fe3g7ff653048", "entity_picture": "/api/image/serve/a2dc96037s5b9dg86s4cc6336b62d742/512x512", "friendly_name": "FirstName LastName" }, "last_changed": "2022-04-11T18:17:53.738567+00:00", "last_updated": "2022-04-11T19:53:55.043510+00:00", "context": { "id": "2489fb6bas56fgdds142155e5668093a28", "parent_id": null, "user_id": null } }Don’t know if this helps… :)
-
@Snille said in MMM-homeassistant-sensors no icons after MM upgrade to 2.19.0:
“entity_picture”: “/api/image/serve/a2dc96037s5b9dg86s4cc6336b62d742/512x512”
right, there is the url to use
-
@sdetweil Correct, and in a normal browser it works. And for me, the “person.sensor” works too (now?)…
Anyway, here you have the “Map-extract” from HA, also using my module for showing the picture of the vacuum-map… In the browser it works, on the Mirror it does not… :)
Browser:

Mirror:

Here is “part” of the extract object (including the picture):
... ], "model": "roborock.vacuum.s5", "used_api": "xiaomi", "entity_picture": "/api/camera_proxy/camera.xiaomi_cloud_map_extractor?token=1e870c95e944a30b0731ae4b3a3bc8dsf65231b6ba03fd91d8s96af38d05c6ce", "friendly_name": "Xiaomi Cloud Map Extractor", "supported_features": 1 }, ...For some reson the Browser works… Confused yet? :)
-
@sdetweil, @Snille
same here.
The urls to the icons work in browser sessions showing MM, but do not work local in raspi with MM.I tested access from raspi console with
curl -sL http://<ma-ha-url>:8123/local/images/person.jpg >person.jpgand this works too.
I also have the same problem, the local MM is not able to access a remote_compliments.conf file via URL in the local module\defaults\compliments folder, but I can access it from a browser. Seems to be the same problem!?
-
@Snille what is the view of the console in the MM dev window? should be an access error
-
@sdetweil Correct, it’s the cors error:

-
if you can manage to insert
http://localhost:8080/cors?url=so that the whole url ishttp://localhost:8080/cors?url=http://10.0.0.249: ...it should work -
@karsten13 Almost… I can’t use “localhost” because then I cant access the “remote control” (and therefore can not open DevTools) from anywhere… So I have to set at least the “IP” of the mirror… But I still get the broken image…

But I get no errors in the console now… Hmm… -
@Snille said in MMM-homeassistant-sensors no icons after MM upgrade to 2.19.0:
But I get no errors in the console now… Hmm…
strange, may errors in the server logs?
-
@karsten13 in the (pm2 log) I get:
0|MagicMirror | [11.04.2022 23:30.43.266] [LOG] 0|MagicMirror | cors url: http://10.0.0.249:8123/api/camera_proxy/camera.xiaomi_cloud_map_extractor?token=5b341e663bd99335792031e6f0129db5502c3eddfc4e297f70bdbfbc284a528eFor every try. Now it no longer works in the browser… And if I curl it…
curl -sL http://10.0.0.112:8080/cors?url=http://10.0.0.249:8123/api/camera_proxy/camera.xiaomi_cloud_map_extractor?token=562f09c026b6a8a87de4dc0ed7bfe5273e23429c1fb152be3597c37cf1b6d2d0I get nothing… :)
So, something is not working more now… :) -
the cors url log entry is o.k., but no idea at the moment. I’m not sure if the ip (instead of localhost) works, will try to test this tomorrow (I have no homeassistant so this will be no real test) …
-
Hang on, I just reset everything “back”, reset the MMM-homeassistant-sensors
to it’s “original” state but let the IP be set in the config… And now it works?
What’s going on here?! :)All modules that are fetching pictures from other places are now working!?
So, the config needs to have the actual IP of the mirror set now. I have been using 0.0.0.0 all the time… Also tried “localhost” and it did not work. But the actual IP works!Great!! Thank you all for helping out! :)
-
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!
-
Yep! changing “0.0.0.0” to “192.168.x.x” solved the problem and pictures are shown! Thanks to everybody!
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login
