@lucas781 very nice! great work!
Read the statement by Michael Teeuw here.
Posts
-
RE: disable the header in the Weather Forecast module
@brooksa which weather module and what do you mean by header? do you have a screen shot?
-
RE: Uncaught TypeError: this.sendNotification is not a function at HTMLParagraphElement.
@emrhssla said in Uncaught TypeError: this.sendNotification is not a function at HTMLParagraphElement.:
the word ‘this’ has a defined meaning… context of THIS object at the time of execution.
the issue is that at that moment in time the code is inside the eventhandler, NOT your module. (the routine that did the addEventListener() ended minutes ago) so it has its OWN ‘this’ context… there are three ways to get back to the module context
-
declare a global variable (self) and use that so the execution processor knows what you want, watch out, global variables are global, names may collide across modules…
-
use a different function declaration () => {} instead of function(){}… tells the execution processor to use the surrounding context …these are called Arrow functions… Arrow functions do not have their own ‘this’
BUT you need to pass params on the function call to get access to the element where the event happened -
use the bind() operator to add the outer module context to the event context
function(){}.bind({inner_varname:outer_varname)… .bind({module_this:this})
elem.addEventListener(“click”,
function(){
elem.innerHTML = “TEST2”
this.sendNotification(‘CHANGE_POSITIONS’,
modules = {
‘clock’:{
visible: ‘true’,
position: ‘top_left’,
},
}
)
}
)you will have to research these and decide how to do it… each has a different implementation and code maintenance impact
-
-
RE: MMM-MQTTScreenOnOff - alternative to PIR
@rkorell leave the pir sensor there, just use the other. disable one module, add the other.
i have a zigbee sensor on my office wall, and at the end of the hall and on the fireplace, they control my
office desk light, hall light, and lights over the kitchen island
all collected by zigbee2mqtt which feeds mqtt into home assistant
all running in docker containers.my mirror visibility is controlled by camera motion today, but now that i have the hall sensor, i can move to ha automations
fun stuff
-
RE: How to reload a module..
i don’t think there is any way to reload a module. that happens one time at startup. the module would have to allow loading a different video itself somehow
-
RE: My Look Ahead board
@ankonaskiff17 said in My Look Ahead board:
I can tell you PM2 RESTART MM is seared in to my brain.
if u are only changing the css/browser side, ctrl-r will reload the screen without restart
f5 if you are on the developers window side… no restart required -
RE: Issue with bottom bar, newsfeed module and top margin.
@Brandenborg while I don’t have the solution, you can see the calculated css by opening the developers window, ctrl-shift-i on the keyboard, select the tab labeled ‘elements’ and navigate thru the web page content.
as u select each element, on the right is a window with the css selectors used (top most parent at the bottom)
-
RE: Can't get MM to start, says it can't find electron, then electron won't start
@jmartin1009 from the MagicMirror folder do
cd config copy config.js.sample config.js cd ..Then restart mirror
-
RE: Default Modules
@n21brown open an issue on the magicmirror github site so someone can track it.
if you are a programmer, and want to contribute the fix as u care about it, then fork the repo, and make changes, then submit a pull request back. we are all volunteers on this project
and if u are not a programmer, maybe its a new challenge?
-
RE: Can't install / Error with NPM / Electron not found
cool… can u mark your issue as solved
-
RE: Docker and custom.css
@technofab
docker takes a --volume=source:dest or a --mount src=,dest= to map a local folder/file into the container at a particular file system locationso, as this container wants the custom.css at /opt/magic_mirror/css/custom.css
the parm on docker run would be
--volume=local_path_to_custom_css:/opt/magic_mirror/css/custom.cssnotice the : between the source and dest
in a Windows environment where : also appears in driveletter:\path
u must use the --mount type parameter -
RE: Hello Lucy: got Sleep
@mash55 Yes, Mykle changed it for his setup to use the dpms commands…
you will have to uncomment the lines u need and comment out the exec('xset dpms…) commands just before each
we have an update waiting on some MMM-Voice changes that makes this more configurable…
-
RE: How to update the master branch?
@frans said in How to update the master branch?:
git config --global user.email “you@example.com”
git config --global user.name “Your Name”type those commands, add your email and name
git doesn’t allow anonymous actions -
RE: organization of the text next to the icon.
@iorifly i don’t think u can change this with CSS… i would have to see how the author formatted the data… suspect he used a table structure, if so you would have to change the code
also, it is always nice if u tell us the module that is generating the content
-
RE: Hello Lucy: got Sleep
@mykle1 said in Hello Lucy: got Sleep:
Facetious resposnse:
Well, why didn’t you fix it?I did in my fork! which I submitted back as PR, but we haven’t promoted it yet, cause waiting for MMM-Voice
-
RE: MMM-voice ugly hdmi banner
@dazza120 the tv is an energystar device. which will show the ugly no input screen until the energyStar timeout (15 minutes) and then power off…
that is what the HIDE setting on my MMM-SleepWake module does. it blanks the screen, instead of turn off the signal.
-
RE: Troubles updating to 2.6.0
@azuettel u are running a very old version of npm, 1.x
Should be v 6 at least.