MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    MMM-homeassistant-sensors no icons after MM upgrade to 2.19.0

    Scheduled Pinned Locked Moved Solved Troubleshooting
    38 Posts 5 Posters 15.6k Views 4 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • W Offline
      wmx
      last edited by

      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:
      ef215707-5a90-469a-af5a-218cb3edc296-image.png
      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

      karsten13K SnilleS 2 Replies Last reply Reply Quote 0
      • W Offline
        wmx
        last edited by

        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!

        1 Reply Last reply Reply Quote 1
        • karsten13K Offline
          karsten13 @wmx
          last edited by

          @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 ?

          S 1 Reply Last reply Reply Quote 0
          • S Offline
            sdetweil @karsten13
            last edited by

            @karsten13 on a desktop??

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            1 Reply Last reply Reply Quote 0
            • SnilleS Offline
              Snille Module Developer @wmx
              last edited by Snille

              @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"
              		}]
              	],
              },
              

              If you cant find it, make it and share it!
              Modules: MMM-homeassistant-sensors, MMM-Modulebar, MMM-Profilepicture, MMM-Videoplayer

              karsten13K B 2 Replies Last reply Reply Quote 0
              • karsten13K Offline
                karsten13 @Snille
                last edited by

                @Snille

                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.

                SnilleS 1 Reply Last reply Reply Quote 0
                • SnilleS Offline
                  Snille Module Developer @karsten13
                  last edited by

                  @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. :)

                  If you cant find it, make it and share it!
                  Modules: MMM-homeassistant-sensors, MMM-Modulebar, MMM-Profilepicture, MMM-Videoplayer

                  karsten13K 1 Reply Last reply Reply Quote 0
                  • S sdetweil referenced this topic on
                  • karsten13K Offline
                    karsten13 @Snille
                    last edited by

                    @Snille works only with latest mm release, you can test this before coding with "default": "http://localhost:8080/cors?url=http://your_not_working_url" (you have to adjust params to https or other port if necassary).

                    You find the corresponding PR here.

                    SnilleS 1 Reply Last reply Reply Quote 0
                    • SnilleS Offline
                      Snille Module Developer @karsten13
                      last edited by

                      @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!

                      If you cant find it, make it and share it!
                      Modules: MMM-homeassistant-sensors, MMM-Modulebar, MMM-Profilepicture, MMM-Videoplayer

                      S 1 Reply Last reply Reply Quote 0
                      • S Offline
                        sdetweil @Snille
                        last edited by

                        @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

                        Sam

                        How to add modules

                        learning how to use browser developers window for css changes

                        1 Reply Last reply Reply Quote 0
                        • W Offline
                          wmx
                          last edited by

                          @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.

                          1 Reply Last reply Reply Quote 0
                          • W Offline
                            wmx
                            last edited by wmx

                            @Snille said in MMM-homeassistant-sensors no icons after MM upgrade to 2.19.0:

                              icons: [{
                              	"default": "https://www.snille.net/img/magicmirror/users/jane.png"
                              }]
                            

                            (think in the example there is one closing bracket missing “]”)

                            Had the time right now to test this one issue. I insertet the URL to the image from ha :-) (which is a static one here)

                            http://<my-ha-url>:8123/local/images/hem.png
                            

                            but after restart of MM the problem still exists.

                            karsten13K 1 Reply Last reply Reply Quote 0
                            • karsten13K Offline
                              karsten13 @wmx
                              last edited by

                              @wmx

                              should be

                              icons: [{
                                "default": "http://localhost:8080/cors?url=http://<my-ha-url>:8123/local/images/hem.png"
                              }]
                              
                              1 Reply Last reply Reply Quote 1
                              • W Offline
                                wmx
                                last edited by

                                @karsten13
                                Ok, tried this new config, but it does not change anything. :-(

                                1 Reply Last reply Reply Quote 0
                                • B Offline
                                  borrmi @Snille
                                  last edited by borrmi

                                  @karsten13

                                  I tried this(in the brackets)

                                  default": "http://mm_url:8080/cors?url=http://ha_url:8123/media/borrmi.png but this doesn’t work. :-(

                                  can i also use a local path on my mm instead? (e.g. ‘~/MagicMirror/pictures/person.png’)

                                  S 1 Reply Last reply Reply Quote 0
                                  • S Offline
                                    sdetweil @borrmi
                                    last edited by

                                    @borrmi said in MMM-homeassistant-sensors no icons after MM upgrade to 2.19.0:

                                    http://ha_url:8123/media/borrmi.png

                                    does that work from a browser or curl on the system running MagicMirror?

                                    curl -sL http://ha_url:8123/media/borrmi.png >borrmi.png
                                    

                                    Sam

                                    How to add modules

                                    learning how to use browser developers window for css changes

                                    B 1 Reply Last reply Reply Quote 0
                                    • B Offline
                                      borrmi @sdetweil
                                      last edited by

                                      @sdetweil said in MMM-homeassistant-sensors no icons after MM upgrade to 2.19.0:

                                      curl -sL http://ha_url:8123/media/borrmi.png >borrmi.png

                                      no “404: Not Found”

                                      S 1 Reply Last reply Reply Quote 0
                                      • S Offline
                                        sdetweil @borrmi
                                        last edited by

                                        @borrmi u replaced ha_url with the right value, correct?

                                        Sam

                                        How to add modules

                                        learning how to use browser developers window for css changes

                                        B 1 Reply Last reply Reply Quote 0
                                        • B Offline
                                          borrmi @sdetweil
                                          last edited by

                                          @sdetweil yes. My ha is under 192.168.2.100 and reachable via Browser(8123) and also in ssh

                                          S 1 Reply Last reply Reply Quote 0
                                          • S Offline
                                            sdetweil @borrmi
                                            last edited by

                                            @borrmi ok, I just copy/pasted your url…

                                            if it says 404, then thats the wrong URL to get the image

                                            http://192.168.2.100:8123/ 
                                            

                                            is right… its the rest that is not

                                            Sam

                                            How to add modules

                                            learning how to use browser developers window for css changes

                                            B 1 Reply Last reply Reply Quote 0
                                            • B Offline
                                              borrmi @sdetweil
                                              last edited by

                                              @sdetweil
                                              i checked the ha path via ssh
                                              the pictures are in /media.
                                              should i put them in another directory (e.g. /home/borrmi/pictures)

                                              S 1 Reply Last reply Reply Quote 0

                                              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
                                              • 1
                                              • 2
                                              • 1 / 2
                                              • First post
                                                Last post
                                              Enjoying MagicMirror? Please consider a donation!
                                              MagicMirror created by Michael Teeuw.
                                              Forum managed by Sam, technical setup by Karsten.
                                              This forum is using NodeBB as its core | Contributors
                                              Contact | Privacy Policy