@Chiumanfu I just realized that this will mess up the styles in you copied version of the module. You’ll need to do a search and replace in the copied version’s style sheet: in MMM-MyWeather.css
, replace all instances of MMM-MyWeather
with MMM-MyWeather2
.
Read the statement by Michael Teeuw here.
Posts made by j.e.f.f
-
RE: My display so far...
-
RE: Show/Hide my own module in combination with MMM-Facial-Recognition
For more context on this, in fact my understanding above is correct. I modified both MMM-Facial-Recognition and my own module to use a
lockString
option, and the module is showing and hiding as I expect / want now.However it doesn’t address my second question – could I have accomplished this without modifying MMM-Facial-Recognition?
-
RE: Facial Recognition - customize your mirror for every user!
@paviro I had a hard time getting this to play nicely with modules that show and hide themselves. I created a pull-request that addresses this:
https://github.com/paviro/MMM-Facial-Recognition/pull/48
Basically I added a
lockString
config option to each show and hide command, and when combined with another module that also uses alockString
the particular module is only visible when both have removed their respective lock strings.See here for details about visibility locking:
https://github.com/MichMich/MagicMirror/tree/develop/modulescheers!
-
Show/Hide my own module in combination with MMM-Facial-Recognition
Hello. I’ve written a module the hides itself when no data is currently available, otherwise it shows itself. I’m using the standard this.hide() / this.show() methods.
However things get messed up when I combine this with MMM-Facial-Recognition. I’ve read about using lockStrings to lock the module’s visibility, but as far as I understand it, I’d need the Facial Recognition module to supply a lock string upon sending the hide command as well as my own module to supply a lockString to itself upon hiding.
Essentially I want the following behaviour:
- My Module has no data, never show, even if called to be displayed by MMM-FR
- My module supplies a lockString to itself with its hide command
- module remains hidden regardless of what MMM-FR wants to do
- My module has data, but MMM-FR wants it hidden
- MMM-FR would need to supply a lock string with its hide command
- module remains hidden regardless of the fact that there is data
- My module has data AND MMM-FR wants it visible
- both call the show() method with their respective lockStrings, thereby removing both lockStrings from my module
- module is visible.
- Do I understand this correctly?
- Is there another way to get this behaviour without requiring a modification to MMM-Facial-Recognition? I can see myself running into this problem with some other show/hide modules, and I’d rather not have manage my own modified versions of others’ modules.
- My Module has no data, never show, even if called to be displayed by MMM-FR
-
RE: My display so far...
@RamblingGeekUk yeah. It logs in to your nest account via the API to get the current temp and state of the Nest.
-
RE: TESTERS WANTED - Multi-sport Scoreboard module
@d3r looks like I won’t be able to add MLS. Turns out there is no public API available, and I don’t really want to go down the route of scraping a web site. Still going to add NFL, and hopefully CFL (still looking for an API).
The good news, is that I’ve set this up to be modular. Adding sports is a fairly easy thing to do when an API becomes available. If MLS decides to make available an API, it’s maybe a couple of hour’s worth of effort to get it set up.
-
RE: TESTERS WANTED - Multi-sport Scoreboard module
OK Nearing a release candidate! I just pushed an update that includes the following:
- 6 available view styles to choose from (see screenshot below)
- header is now configured using the standard
header
parameter, no longer in theconfig
object. The old configOptionsshowHeader
andheaderText
no longer have any effect. If you don’t want a header, omit theheader
parameter (see sample config below). - a number of bug fixes
sample config
{ module: "MMM-MyScoreboard", position: "top_right", classes: "default everyone", header: "My Scoreboard", //specify header here now, omit if you don't want a header config: { showLeagueSeparators: true, colored: true, viewStyle: "mediumLogos", sports: [ { league: "NHL", teams: ["TOR", "PIT"] }, { league: "NBA", teams: ["TOR"] }, { league: "MLB", teams: ["TOR", "CHW", "NYY"] }, ] } },
view styles:
-
RE: My display so far...
@Chiumanfu I took a look at the way node_helper.js behaves for this module. It will take a considerable amount of re-engineering to get it to support multiple instances, and given that I am in the middle of a couple of other modules, I don’t think I’ll try to address this any time soon.
What you can do is instead of specifying two instances of the
MMM-MyWeather
module, make a copy of the module folder, name it, say,MMM-MyWeather2
. renameMMM-MyWeather.js
toMMM-MyWeather2.js
. Then modifyMMM-MyWeather2.js
and change the first line of code fromModule.register("MMM-MyWeather", {
to
Module.register("MMM-MyWeather2", {
Now you have two distinct modules that do exactly the same thing. Make a second entry in your config.js file for
MMM-MyWeather2
. That should give you exactly what you are looking for.The downside here is that you’ll need to redo the above steps if you ever update the module source code. I don’t see it changing all that much in the near future unless something breaks, so you should be good for a while.
-
RE: MMM-MyCommute
@joela85 ha! I should have thought to ask for your config. In any case, I’ve pushed an update that fixes the support for multiple instances of the module.
Of note is that you now configure the header in the standard way instead using the “headerText” and “showHeader” configurations. I thought I needed to do it this way when showing and hiding, but it turned out not be the case. So if your config looked like this before:
{ module: 'MMM-MyCommute', position: 'top_left', classes: 'default everyone', config: { showHeader: true, headerText: 'Traffic', ... } }
change it to this:
{ module: 'MMM-MyCommute', position: 'top_left', header: 'Traffic', classes: 'default everyone', config: { ... } }
If you don’t want a header, then just omit it.
Will be working on configs for limiting to Mon-Fri and windowing for individual destinations next.
-
RE: MMM-MyCommute
@Blackmirror I ran a test overnight and my module came back on when it should have. But I did realize there is a fundamental problem with how I’ve architected the data pull. Are you using two instances of this module? If so I’m thinking that may be causing problems and possibly yours. I’m going to write an update soon, and I’ll have you try again.