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

    ashishtank

    @ashishtank

    Module Developer
    15
    Reputation
    99
    Profile views
    141
    Posts
    1
    Followers
    0
    Following
    Joined
    Last Online

    ashishtank Unfollow Follow
    Module Developer

    Best posts made by ashishtank

    • RE: /n not respected in mmm-compliments

      @jonspraggins it should be \n and not /n :)

      posted in Troubleshooting
      A
      ashishtank
    • RE: Two way mirror shop in Netherlands (near Leiden)

      @George Thank you for mentioning it might helpful to others. Mine was cheaper while bigger in size. I paid ~80 euro for 72.5X42 cm mirror with smoothen(not polished) edges.

      posted in Hardware
      A
      ashishtank
    • RE: Multiple Modules of the Same Type, Change Width of One Instance Only

      @tylerj714 if you are not changing the modules in config (including their order) frequently then you can use ID selector of css. Check the ID of the instance in dev tools you want to change and then use it in custom.css. i.e.

      #module_11_MMM-OpenWeatherMapForecast  {
        width: 500px;
      }
      

      here # is id selector or check if you can play with nth-of-type selector ( I could not get this working)

      posted in Custom CSS
      A
      ashishtank
    • RE: Force a module refresh - not the entire page

      @majdzik84 If I understood you correctly, you want to send message to Magic Mirror when sensor value change in home assistant and it should refresh the MMM-HomeAssistant-Sensors module, so you see updated value of sensor over there ?

      It should be doable with MMM-Remove-control same way as you are sending alert. I have not installed the remote control module and MMM-HomeAssistant-Sensors so can’t test the code my self but you can do below.

      • Add below code in MMM-homeassistant-sensors.js
      notificationReceived: function (notification, payload, sender) {
      		if (notification === "REFRESHHOMEASSISTANT") {
      			this.getStats();
      		} 
      },
      
      • Do not forget the , after } in last line else it will break the module
      • Restart the mirror
      • From your browser open http://192.168.2.200:8080/api/module/MMM-homeassistant-sensors or http://192.168.2.200:8080/api/module/homeassistantsensors if first url does not work
      • If you see REFRESHHOMEASSISTANT in response then remote control knows new action on HA module
      • Now you can send command from HA to refresh the module using http://192.168.2.200:8080/api/module/homeassistantsensors/refreshhomeassistant (url should be in lowercase and also MMM- and - are removed in api path)

      As I can not test it and things I have suggested above are based on my code review of both the modules. you might need to adjust one or more things. but in theory it should work.

      Let me know how (or if) it works.

      posted in Requests
      A
      ashishtank
    • MMM-MercedesMe

      Description:

      This module is to show Mercedes vehicle’s fuel/electric charge and available range on Magic Mirror. Multiple instance (cars) are supported with different display style.

      Screenshots:

      Single Dial
      Single dial

      Two Dial
      Two dial

      Download:

      Download MercedesMe

      Your suggestions/feedback and pull requests are welcome :)

      Thanks:

      • Thanks to this forum and community to make this wonderful framework.
      • Jerry P for testing this module on live car data

      Version 1.0.0

      • Charging/Fuel Status
      • Available range
      posted in Transport
      A
      ashishtank
    • RE: How to add modules. For absolute beginners.

      @fsne04 if you check the code of MMM-Screent cast @ https://github.com/kevinatown/MMM-Screencast/blob/master/constants.js then there is no position which supports fullscreen_below.

      you need to set one of the below value as per documentation of the module

      const POSITIONS = {
        bottomRight: 'bottomRight',
        bottomCenter: 'bottomCenter',
        bottomLeft: 'bottomLeft',
        center: 'center', 
        topRight: 'topRight',
        topCenter: 'topCenter',
        topLeft: 'topLeft',
        top_bar: 'topRight',
        top_left: 'topLeft',
        top_center: 'topCenter',
        top_right: 'topRight',
        upper_third: 'topRight',
        middle_center: 'center',
        lower_third: 'bottomCenter',
        bottom_left: 'bottomLeft',
        bottom_center: 'bottomCenter',
        bottom_right: 'bottomRight',
        bottom_bar: 'bottomCenter'
      };
      
      posted in Troubleshooting
      A
      ashishtank
    • RE: Display a Picture from a website

      @rxlDavid many modules are doing it. I am using MMM-EyeCandy for the same.

      posted in Requests
      A
      ashishtank
    • RE: default compliments

      @MrDondoT said in default compliments:

      < font color=‘red’ >hello sweety< font >

      It is possible but you need to change the current module code as well, right now it is creating text node but to support html text code needs to be changed as below

      for (var part of parts) {
      			// create a text element for each part
      			//compliment.appendChild(document.createTextNode(part)); //Comment this line
      			compliment.innerHTML += part;  //Add this line
      			// add a break `
      			compliment.appendChild(document.createElement("BR"));
      		}
      

      Result should be as below if your compliments are like below

      evening: ["Wow, you look hot!", "You look nice!", "Hi, <i>sexy!</i>","< font color='red'>hello sweety< /font>"],
      

      77f53b06-9495-47b1-98a7-a4939e08be30-image.png

      b0215eac-63f0-43ed-ab2d-7775b1f4de16-image.png

      –
      Ashish

      posted in Troubleshooting
      A
      ashishtank
    • RE: How to add modules. For absolute beginners.

      @fsne04 Here it checks for the position value (edited my answer above).

      7c8840e0-041d-40fb-bf8c-2bf5e47bef31-image.png

      8e2d4b3d-f498-4d22-9d7b-3c3649c4718b-image.png

      posted in Troubleshooting
      A
      ashishtank
    • RE: MMM-Globe

      @foxy25 to make globe transparent there are two changes required.

      • Module div’s background color
      • Globe canvas itself have black color as background.

      First one can be easily doable with css but to make globe transparent you will need to change the code as well. Do below to make globe transperent.

      • In custom.css add below css
      .globe
      {
      	background-color: unset;
      }
      
      • in modules\MMM-Globe\encom-globe.js file find below line and change it to.

      from

      this.renderer = new THREE.WebGLRenderer( { antialias: true } );
      

      to

      this.renderer = new THREE.WebGLRenderer( { antialias: true, alpha: true } );
      

      below is output

      Before

      dde6476f-f02b-48b9-aa2c-f60c4bead58a-image.png

      After
      0214ddbf-09fe-4ba8-9528-ea96ed28ea7c-image.png

      Let me know how/if it works for you.

      posted in Entertainment
      A
      ashishtank

    Latest posts made by ashishtank

    • RE: MMM-MercedesMe

      @matt216 did you set the vehicleType correctly in config. is the config variable in correct case ?

      switch (config.vehicleType.toLowerCase()) { <--- error on this line.
           case 'diesel':
             vehicleStatus = 'fuelstatus';
         }
      
      posted in Transport
      A
      ashishtank
    • RE: MMM-MercedesMe

      @matt216 Can you check if request package is installed ? you can do so with below command

      npm install request --save
      
      posted in Transport
      A
      ashishtank
    • RE: Display random gif from folder

      @fillilutten You are welcome :)

      posted in Requests
      A
      ashishtank
    • RE: Magic Mirror!

      @tikkisean Really nice !

      posted in Show your Mirror
      A
      ashishtank
    • RE: MMM-MercedesMe

      @rogers0072002 As per logs it looks like you have not added scope or token is not valid can you delete the tokens.json file and try login again ? make sure you have linked right scope (electric or fuel) in the Mercedes app.

      posted in Transport
      A
      ashishtank
    • RE: MMM-MercedesMe

      @andreas-heins looks like you are missing Step 7 from https://github.com/ashishtank/MMM-MercedesMe documentation. Please check, also which version of Magic Mirror are you using ? there are breaking changes in v2.15 in MM core and issue i have not fixed for my module yet.

      posted in Transport
      A
      ashishtank
    • RE: MMM-MercedesMe

      @andreas-heins Is your configuration correct ? if you have already logged in then it will not display login screen and will directly get token. Did you check if tokens.json file is created and updated after authentication ?

      posted in Transport
      A
      ashishtank
    • RE: MMM-MercedesMe

      @pyrophoenix Let me know if changing the scope solves the issue. I will update the documentation accordingly.

      posted in Transport
      A
      ashishtank
    • RE: MMM-MercedesMe

      @pyrophoenix things looks correct, http://localhost:8080/MMM_MercedesMe/callback is important other localhost urls in callback are optional. I have sent you PM what we can do next.

      posted in Transport
      A
      ashishtank
    • RE: MMM-MercedesMe

      @pyrophoenix Can you delete the app in Mercedes dev portal and create new one with correct scope ? also delete tokens.json file and restart the mirror. I think it is some caching issue.

      posted in Transport
      A
      ashishtank