MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    1. Home
    2. Snille
    3. Posts
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.
    Offline
    • Profile
    • Following 0
    • Followers 5
    • Topics 17
    • Posts 267
    • Groups 1

    Posts

    Recent Best Controversial
    • RE: Show Module based on date

      I’m doing this on my setup, I’m using “MMM-ProfileSwitcher”. There you can do just about anything regarding showing a / a group of modules on different times/ dates…
      I group mu modules with the “classes” option…
      So the clock looks like this:

      		{
      			disabled: false,
      			module: "clock",
      			hiddenOnStartup: true,
      			position: "top_left",
      			header: "Datum och tid",
      			classes: "default Erik Camilla Louise Media Jobba Väder Födelsedag small",
      			config: {
      				showDate: true,
      				dateFormat: "YYYY-MM-DD",
      				showWeek: true
      			}
      		},
      

      It’s shown for almost all profiles… :)

      Here are some parts of my conf…

      My global settings for the module...
      		{
      			disabled: false,
      			module: "MMM-ProfileSwitcher",
      			hiddenOnStartup: true,
      			header: "Profile",
      			classes: "none",
      			config: {
      				title: false,
      				useLockStrings: false,
      				defaultTime: 600000,
      				enterMessages: {
      					"Erik Camilla Louise Kakan Cappuccino": "Hej %profile%!",
      					"Erik": ["Hoppas dagen varit bra Erik!", "Ser man på, välkommen Erik!", "Kul att se dig Erik!"],
      					"Camilla": ["Toppendag hoppas jag, Camilla!", "Oh, trevligt att se dig Camilla!", "Kul att se dig Camilla!"],
      					"Louise": ["Kul i skolan idag Louise?", "Lekt något skoj idag Louise?", "Kul att se dig Louise!"],
      					"Media": ["Hej, här är allt nytt!", "Här finns mycket nytt!", "Ny media!", "Hoppas det finns något att se."],
      					"Jobba": ["Dags att jobba nu!", "Jobba på nu!", "Var på tiden!", "Dagen är inte slut än!"],
      					"Klocka": ["Var på tiden!"],
      					"Väder": ["Dags för väder!", "Här är allt om vädret!", "Hoppas det blir fint väder.", "Glöm inte att kolla vädret!"],
      					"Skattjakt": ["Skattjakten är igång!", "Nu blir det skattjakt!", "Äntligen skattjakt!"],
      					"Grattis": ["Bra jobbat!", "Grattis!"],
      				},
      				leaveMessages: {
      					"everyone": "Hejdå %profile%...",
      					"Erik": ["Hejdå, jag kommer sakna dig...", true],
      					"Camilla": ["Hejdå Camilla.", true],
      					"Louise": ["Hejdå Louise.", true],
      					"Media": ["Hoppas du hittade något.", true],
      					"Jobba": ["Jobbat klart redan!?", true],
      					"Klocka": ["Slut på tiden.", true],
      					"Väder": ["Ha så trevligt.", true],
      					"Skattjakt": ["Hoppas det varit kul!"],
      					"Grattis": ["Ses om ett år..."],
      				},
      				timers: {
      					"Erik": {},
      					"Camilla": {},
      					"Louise": {},
      					"Kakan": {},
      					"Cappuccino": {},
      					"Klocka": {},
      				},
      				ignoreModules: ["alert", "updatenotification"]
      			}
      		},
      
      Then I have a specific module for halloween.... :)
      		{
      			disabled: false,
      			module: 'MMM-Videoplayer',
      			hiddenOnStartup: true,
      			position: "fullscreen_below",
      			classes: "scheduler turn90",
      			config: {
      				random: true,
      				loop: true,
      				hideonstart: true,
      				notification: "VIDEOPLAYER1",
      				videolist: ["a",
      					    "list",
      					    "of", 
      					    "videos..."],
      				module_schedule: [
      					{from: '0 6 31 9 *', to: '3 6 31 9 *'},
      					{from: '6 6 31 9 *', to: '9 6 31 9 *'},
      					{from: '12 6 31 9 *', to: '15 6 31 9 *'},
      					{from: '18 6 31 9 *', to: '21 6 31 9 *'},
      					{from: '24 6 31 9 *', to: '27 6 31 9 *'},
      					{from: '30 6 31 9 *', to: '33 6 31 9 *'},
      					{from: '36 6 31 9 *', to: '39 6 31 9 *'},
      					{from: '42 6 31 9 *', to: '45 6 31 9 *'},
      					{from: '48 6 31 9 *', to: '51 6 31 9 *'},
      					{from: '54 6 31 9 *', to: '57 6 31 9 *'},
      					{from: '0 7 31 9 *', to: '3 7 31 9 *'},
      					{from: '6 7 31 9 *', to: '9 7 31 9 *'},
      					{from: '12 7 31 9 *', to: '15 7 31 9 *'},
      					{from: '18 7 31 9 *', to: '21 7 31 9 *'},
      					{from: '24 7 31 9 *', to: '27 7 31 9 *'},
      					{from: '30 7 31 9 *', to: '33 7 31 9 *'},
      					{from: '36 7 31 9 *', to: '39 7 31 9 *'},
      					{from: '42 7 31 9 *', to: '45 7 31 9 *'},
      					{from: '48 7 31 9 *', to: '51 7 31 9 *'},
      					{from: '54 7 31 9 *', to: '57 7 31 9 *'},
      					{from: '0 8 31 9 *', to: '3 8 31 9 *'},
      					{from: '6 8 31 9 *', to: '9 8 31 9 *'},
      					{from: '12 8 31 9 *', to: '15 8 31 9 *'},
      					{from: '18 8 31 9 *', to: '21 8 31 9 *'},
      					{from: '24 8 31 9 *', to: '27 8 31 9 *'},
      					{from: '30 8 31 9 *', to: '33 8 31 9 *'},
      					{from: '36 8 31 9 *', to: '39 8 31 9 *'},
      					{from: '42 8 31 9 *', to: '45 8 31 9 *'},
      					{from: '48 8 31 9 *', to: '51 8 31 9 *'},
      					{from: '54 8 31 9 *', to: '57 8 31 9 *'},
      					{from: '0 9 31 9 *', to: '3 9 31 9 *'},
      					{from: '6 9 31 9 *', to: '9 9 31 9 *'},
      					{from: '12 9 31 9 *', to: '15 9 31 9 *'},
      					{from: '18 9 31 9 *', to: '21 9 31 9 *'},
      					{from: '24 9 31 9 *', to: '27 9 31 9 *'},
      					{from: '30 9 31 9 *', to: '33 9 31 9 *'},
      					{from: '36 9 31 9 *', to: '39 9 31 9 *'},
      					{from: '42 9 31 9 *', to: '45 9 31 9 *'},
      					{from: '48 9 31 9 *', to: '51 9 31 9 *'},
      					{from: '54 9 31 9 *', to: '57 9 31 9 *'},
      					{from: '0 10 31 9 *', to: '3 10 31 9 *'},
      					{from: '6 10 31 9 *', to: '9 10 31 9 *'},
      					{from: '12 10 31 9 *', to: '15 10 31 9 *'},
      					{from: '18 10 31 9 *', to: '21 10 31 9 *'},
      					{from: '24 10 31 9 *', to: '27 10 31 9 *'},
      					{from: '30 10 31 9 *', to: '33 10 31 9 *'},
      					{from: '36 10 31 9 *', to: '39 10 31 9 *'},
      					{from: '42 10 31 9 *', to: '45 10 31 9 *'},
      					{from: '48 10 31 9 *', to: '51 10 31 9 *'},
      					{from: '54 10 31 9 *', to: '57 10 31 9 *'},
      					{from: '0 11 31 9 *', to: '3 11 31 9 *'},
      					{from: '6 11 31 9 *', to: '9 11 31 9 *'},
      					{from: '12 11 31 9 *', to: '15 11 31 9 *'},
      					{from: '18 11 31 9 *', to: '21 11 31 9 *'},
      					{from: '24 11 31 9 *', to: '27 11 31 9 *'},
      					{from: '30 11 31 9 *', to: '33 11 31 9 *'},
      					{from: '36 11 31 9 *', to: '39 11 31 9 *'},
      					{from: '42 11 31 9 *', to: '45 11 31 9 *'},
      					{from: '48 11 31 9 *', to: '51 11 31 9 *'},
      					{from: '54 11 31 9 *', to: '57 11 31 9 *'},
      					{from: '0 12 31 9 *', to: '3 12 31 9 *'},
      					{from: '6 12 31 9 *', to: '9 12 31 9 *'},
      					{from: '12 12 31 9 *', to: '15 12 31 9 *'},
      					{from: '18 12 31 9 *', to: '21 12 31 9 *'},
      					{from: '24 12 31 9 *', to: '27 12 31 9 *'},
      					{from: '30 12 31 9 *', to: '33 12 31 9 *'},
      					{from: '36 12 31 9 *', to: '39 12 31 9 *'},
      					{from: '42 12 31 9 *', to: '45 12 31 9 *'},
      					{from: '48 12 31 9 *', to: '51 12 31 9 *'},
      					{from: '54 12 31 9 *', to: '57 12 31 9 *'},
      					{from: '0 13 31 9 *', to: '3 13 31 9 *'},
      					{from: '6 13 31 9 *', to: '9 13 31 9 *'},
      					{from: '12 13 31 9 *', to: '15 13 31 9 *'},
      					{from: '18 13 31 9 *', to: '21 13 31 9 *'},
      					{from: '24 13 31 9 *', to: '27 13 31 9 *'},
      					{from: '30 13 31 9 *', to: '33 13 31 9 *'},
      					{from: '36 13 31 9 *', to: '39 13 31 9 *'},
      					{from: '42 13 31 9 *', to: '45 13 31 9 *'},
      					{from: '48 13 31 9 *', to: '51 13 31 9 *'},
      					{from: '54 13 31 9 *', to: '57 13 31 9 *'},
      					{from: '0 14 31 9 *', to: '3 14 31 9 *'},
      					{from: '6 14 31 9 *', to: '9 14 31 9 *'},
      					{from: '12 14 31 9 *', to: '15 14 31 9 *'},
      					{from: '18 14 31 9 *', to: '21 14 31 9 *'},
      					{from: '24 14 31 9 *', to: '27 14 31 9 *'},
      					{from: '30 14 31 9 *', to: '33 14 31 9 *'},
      					{from: '36 14 31 9 *', to: '39 14 31 9 *'},
      					{from: '42 14 31 9 *', to: '45 14 31 9 *'},
      					{from: '48 14 31 9 *', to: '51 14 31 9 *'},
      					{from: '54 14 31 9 *', to: '57 14 31 9 *'},
      					{from: '0 15 31 9 *', to: '3 15 31 9 *'},
      					{from: '6 15 31 9 *', to: '9 15 31 9 *'},
      					{from: '12 15 31 9 *', to: '15 15 31 9 *'},
      					{from: '18 15 31 9 *', to: '21 15 31 9 *'},
      					{from: '24 15 31 9 *', to: '27 15 31 9 *'},
      					{from: '30 15 31 9 *', to: '33 15 31 9 *'},
      					{from: '36 15 31 9 *', to: '39 15 31 9 *'},
      					{from: '42 15 31 9 *', to: '45 15 31 9 *'},
      					{from: '48 15 31 9 *', to: '51 15 31 9 *'},
      					{from: '54 15 31 9 *', to: '57 15 31 9 *'},
      					{from: '0 16 31 9 *', to: '3 16 31 9 *'},
      					{from: '6 16 31 9 *', to: '9 16 31 9 *'},
      					{from: '12 16 31 9 *', to: '15 16 31 9 *'},
      					{from: '18 16 31 9 *', to: '21 16 31 9 *'},
      					{from: '24 16 31 9 *', to: '27 16 31 9 *'},
      					{from: '30 16 31 9 *', to: '33 16 31 9 *'},
      					{from: '36 16 31 9 *', to: '39 16 31 9 *'},
      					{from: '42 16 31 9 *', to: '45 16 31 9 *'},
      					{from: '48 16 31 9 *', to: '51 16 31 9 *'},
      					{from: '54 16 31 9 *', to: '57 16 31 9 *'},
      					{from: '0 17 31 9 *', to: '3 17 31 9 *'},
      					{from: '6 17 31 9 *', to: '9 17 31 9 *'},
      					{from: '12 17 31 9 *', to: '15 17 31 9 *'},
      					{from: '18 17 31 9 *', to: '21 17 31 9 *'},
      					{from: '24 17 31 9 *', to: '27 17 31 9 *'},
      					{from: '30 17 31 9 *', to: '33 17 31 9 *'},
      					{from: '36 17 31 9 *', to: '39 17 31 9 *'},
      					{from: '42 17 31 9 *', to: '45 17 31 9 *'},
      					{from: '48 17 31 9 *', to: '51 17 31 9 *'},
      					{from: '54 17 31 9 *', to: '57 17 31 9 *'},
      					{from: '0 18 31 9 *', to: '3 18 31 9 *'},
      					{from: '6 18 31 9 *', to: '9 18 31 9 *'},
      					{from: '12 18 31 9 *', to: '15 18 31 9 *'},
      					{from: '18 18 31 9 *', to: '21 18 31 9 *'},
      					{from: '24 18 31 9 *', to: '27 18 31 9 *'},
      					{from: '30 18 31 9 *', to: '33 18 31 9 *'},
      					{from: '36 18 31 9 *', to: '39 18 31 9 *'},
      					{from: '42 18 31 9 *', to: '45 18 31 9 *'},
      					{from: '48 18 31 9 *', to: '51 18 31 9 *'},
      					{from: '54 18 31 9 *', to: '57 18 31 9 *'},
      					{from: '0 19 31 9 *', to: '3 19 31 9 *'},
      					{from: '6 19 31 9 *', to: '9 19 31 9 *'},
      					{from: '12 19 31 9 *', to: '15 19 31 9 *'},
      					{from: '18 19 31 9 *', to: '21 19 31 9 *'},
      					{from: '24 19 31 9 *', to: '27 19 31 9 *'},
      					{from: '30 19 31 9 *', to: '33 19 31 9 *'},
      					{from: '36 19 31 9 *', to: '39 19 31 9 *'},
      					{from: '42 19 31 9 *', to: '45 19 31 9 *'},
      					{from: '48 19 31 9 *', to: '51 19 31 9 *'},
      					{from: '54 19 31 9 *', to: '57 19 31 9 *'},
      					{from: '0 20 31 9 *', to: '3 20 31 9 *'},
      					{from: '6 20 31 9 *', to: '9 20 31 9 *'},
      					{from: '12 20 31 9 *', to: '15 20 31 9 *'},
      					{from: '18 20 31 9 *', to: '21 20 31 9 *'},
      					{from: '24 20 31 9 *', to: '27 20 31 9 *'},
      					{from: '30 20 31 9 *', to: '33 20 31 9 *'},
      					{from: '36 20 31 9 *', to: '39 20 31 9 *'},
      					{from: '42 20 31 9 *', to: '45 20 31 9 *'},
      					{from: '48 20 31 9 *', to: '51 20 31 9 *'},
      					{from: '54 20 31 9 *', to: '57 20 31 9 *'},
      					{from: '0 21 31 9 *', to: '3 21 31 9 *'},
      					{from: '6 21 31 9 *', to: '9 21 31 9 *'},
      					{from: '12 21 31 9 *', to: '15 21 31 9 *'},
      					{from: '18 21 31 9 *', to: '21 21 31 9 *'},
      					{from: '24 21 31 9 *', to: '27 21 31 9 *'},
      					{from: '30 21 31 9 *', to: '33 21 31 9 *'},
      					{from: '36 21 31 9 *', to: '39 21 31 9 *'},
      					{from: '42 21 31 9 *', to: '45 21 31 9 *'},
      					{from: '48 21 31 9 *', to: '51 21 31 9 *'},
      					{from: '54 21 31 9 *', to: '57 21 31 9 *'},
      					{from: '0 22 31 9 *', to: '3 22 31 9 *'},
      					{from: '6 22 31 9 *', to: '9 22 31 9 *'},
      					{from: '12 22 31 9 *', to: '15 22 31 9 *'},
      					{from: '18 22 31 9 *', to: '21 22 31 9 *'},
      					{from: '24 22 31 9 *', to: '27 22 31 9 *'},
      					{from: '30 22 31 9 *', to: '33 22 31 9 *'},
      					{from: '36 22 31 9 *', to: '39 22 31 9 *'},
      					{from: '42 22 31 9 *', to: '45 22 31 9 *'},
      					{from: '48 22 31 9 *', to: '51 22 31 9 *'},
      					{from: '54 22 31 9 *', to: '57 22 31 9 *'},
      				]
      			}
      		},
      Basically it plays a random video in the background of the mirror every 6 minutes from 06:00 to 23. :)
      

      I hope this gives some ideas how to do stuff… :)

      posted in Requests
      SnilleS
      Snille
    • RE: MMM-homeassistant-sensors no icons after MM upgrade to 2.19.0

      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! :)

      posted in Troubleshooting
      SnilleS
      Snille
    • RE: MMM-homeassistant-sensors no icons after MM upgrade to 2.19.0

      @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=5b341e663bd99335792031e6f0129db5502c3eddfc4e297f70bdbfbc284a528e
      

      For 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=562f09c026b6a8a87de4dc0ed7bfe5273e23429c1fb152be3597c37cf1b6d2d0
      

      I get nothing… :)
      So, something is not working more now… :)

      posted in Troubleshooting
      SnilleS
      Snille
    • RE: MMM-homeassistant-sensors no icons after MM upgrade to 2.19.0

      @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…
      a21a719e-2cf0-4177-9ecb-49a91dc51829-image.png
      But I get no errors in the console now… Hmm…

      posted in Troubleshooting
      SnilleS
      Snille
    • RE: MMM-homeassistant-sensors no icons after MM upgrade to 2.19.0

      @sdetweil Correct, it’s the cors error:
      c994e8de-8164-4307-b93e-ec340e8a13e7-image.png

      posted in Troubleshooting
      SnilleS
      Snille
    • 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:
      7b611947-8372-41db-8c97-2bb910460c2a-image.png

      Mirror:
      8065e500-7d12-4899-8b3e-b95d327e6e97-image.png

      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? :)

      posted in Troubleshooting
      SnilleS
      Snille
    • 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… :)

      posted in Troubleshooting
      SnilleS
      Snille
    • 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!

      posted in Troubleshooting
      SnilleS
      Snille
    • 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. :)

      posted in Troubleshooting
      SnilleS
      Snille
    • 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"
      		}]
      	],
      },
      
      posted in Troubleshooting
      SnilleS
      Snille
    • 1
    • 2
    • 3
    • 4
    • 5
    • 26
    • 27
    • 2 / 27