@jonspraggins it should be \n and not /n :)
Read the statement by Michael Teeuw here.
ashishtank
@ashishtank
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: How to add modules. For absolute beginners.
@fsne04 Here it checks for the position value (edited my answer above).
-
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
@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'; }
-
RE: MMM-MercedesMe
@matt216 Can you check if request package is installed ? you can do so with below command
npm install request --save
-
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.
-
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.
-
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 ?
-
RE: MMM-MercedesMe
@pyrophoenix Let me know if changing the scope solves the issue. I will update the documentation accordingly.
-
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.