@jonspraggins it should be \n and not /n
Best posts made by ashishtank
-
RE: /n not respected in mmm-compliments
-
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.
-
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)
-
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.
-
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
Two Dial
Download:
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
-
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' };
-
RE: Display a Picture from a website
@rxlDavid many modules are doing it. I am using MMM-EyeCandy for the same.
-
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>"],
–
Ashish -
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
After
Let me know how/if it works for you.
Latest posts made by 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.
-
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.
-
RE: MMM-MercedesMe
@pyrophoenix did you followed the step 3 correctly ? did you linked fuel status scope with app ? as shown in image below you should see
Fuel Status BYOCAR -
RE: MMM-MercedesMe
@pyrophoenix Hi Looks like you found the issue for me
the vehicle type right now i am checking is only Electric (default) and Diesel. I will improve the code to check for petrol as well but you can have a work around and can configure your vehicle type as
'diesel'
and it will work as api is same for diesel and petrol !getVehicleDataUrl: function (config) { ...... var vehicleStatus = 'electricvehicle'; switch (config.vehicleType.toLowerCase()) { case 'diesel': <----------------------------------------------------------------------------- vehicleStatus = 'fuelstatus'; ......
About my sample client id and secret in guide they are fine as I do not have a Car
and also that account and app are throw away account with out any real car linked to it.
Let me know if changing the config to diesel and restarting mirror solves the issue.
-
RE: MMM-MercedesMe
@pyrophoenix can you delete the tokens.json file in MercedesMe directory and then restart the mirror ? it should show you login button and then you should be able to login and get token. after that check if tokens.json file is created or not…
-
RE: MMM-MercedesMe
@pyrophoenix can you please restart the mirror and check if it works ? did you login to get the token ?
-
RE: MM in docker container
@blackeaglece You want to install MM in your own docker container ? or want to use MM as docker container ? there are already many MM docker container in docker registry. search this forum with docker and you will get help.
-
RE: Can't get module background to change
@memphismark said in Can't get module background to change:
background.color: rgb(255, 255, 255);
it should be as below, notice the - (dash) instead of . (dot)
background-color : rgb(255, 255, 255);