@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…
Read the statement by Michael Teeuw here.

Posts
-
RE: MMM-homeassistant-sensors no icons after MM upgrade to 2.19.0
-
RE: MMM-homeassistant-sensors no icons after MM upgrade to 2.19.0
@sdetweil Correct, it’s the cors error:
-
RE: MMM-homeassistant-sensors no icons after MM upgrade to 2.19.0
@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? :)
-
RE: MMM-homeassistant-sensors no icons after MM upgrade to 2.19.0
@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/512x512
So, 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… :)
-
RE: MMM-homeassistant-sensors no icons after MM upgrade to 2.19.0
@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!
-
RE: MMM-homeassistant-sensors no icons after MM upgrade to 2.19.0
@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. :)
-
RE: MMM-homeassistant-sensors no icons after MM upgrade to 2.19.0
@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" }] ], },
-
RE: Magic Mirror with touchscreen Display/Monitor
@BJK I don’t start the xin.sh (with pm2). if you read in the xin.sh file you will find instructions how I did it… :) Here you can download the xin.sh.
The script (if you don’t want to download it):
#!/bin/bash # Before I just tested with the xinput command directly in the autostart file, but that did not work. So now instead I just created a script called xin.sh. # nano ~/xin.sh # Then added # DISPLAY=:0.0 xinput --set-prop "Multi touch Multi touch overlay device" "Coordinate Transformation Matrix" 0 1 0 -1 0 1 0 0 1 # There should actually be 3 spaces between “Multi touch” and “Multi touch overlay device”. For some reason the board removes the extra spaces here. # # You can actually find the “name” of the device with this commandDISPLAY=:0.0 xinput list # Shows something like this: # # Virtual core pointer id=2 [master pointer (3)] # Virtual core XTEST pointer id=4 [slave pointer (2)] # Multi touch Multi touch overlay device id=6 [slave pointer (2)] # Virtual core keyboard id=3 [master keyboard (2)] # Virtual core XTEST keyboard id=5 [slave keyboard (3)] # # Depending on what you have connected to your RPi. 🙂 # # So, after creating the xin.sh I added that to the autostart file for LXDE: # Like this: # nano ~/.config/lxsession/LXDE-pi/autostart # Added at the end of the file. # @/home/pi/xin.sh # Restarted and it works. # DISPLAY=:0.0 xinput --set-prop "Multi touch Multi touch overlay device" "Coordinate Transformation Matrix" 0 1 0 -1 0 1 0 0 1
You have to figure out your own “matrix” of course… :) Not sure if mine is the same…
-
RE: Magic Mirror with touchscreen Display/Monitor
@core I also used a IR-Frame in my build. Works very well if you just want “simple” point and click and/or point and drag (even with two fingers)… I have not tested it with more advanced stuff. :) But for the MM it’s great. You can read about my build here and underneath the picture, you can find a link to a full photo album with pictures and text to all pictures about what you see. :)