Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not an issue. Only a question! #3

Closed
Robiv8 opened this issue Oct 25, 2018 · 18 comments
Closed

Not an issue. Only a question! #3

Robiv8 opened this issue Oct 25, 2018 · 18 comments
Labels
good first issue Good for newcomers

Comments

@Robiv8
Copy link

Robiv8 commented Oct 25, 2018

Hallo,
can you please publish a config.js example.
me and many other newbies have difficulties implementing this.

Sorry for posting here!

@Veldrovive
Copy link
Owner

Veldrovive commented Oct 25, 2018

No problem. Is there anything specific you want? Certain modules or behavior?
If there are any specific things you are confused about, this is the place to ask. I'll clarify anything.

@Robiv8
Copy link
Author

Robiv8 commented Oct 25, 2018

Thanks for answer,
Nothing special, but the config.js of your picture example would be ideal for getting started.
For a beginner, this is a bit confusing with the short example from the description.
Thank you

@Veldrovive
Copy link
Owner

Veldrovive commented Oct 25, 2018

I don't have my original config anymore, but here is a more up to date one with my favorite modules.
Imgur

var config = {
	address: "localhost", 
	port: 8081,
	ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"],

	language: "en",
	timeFormat: 24,
	units: "metric",

	modules: [
		{
			"module": "MMM-Page-Selector",
			"position": "top_center",
			"config": {
				"defaultPage": "main",
				"displayTitle": true,
				"selectPageNotif": [],
				"incrementPageNotif": [],
				"decrementPageNotif": []
			}
		},
		{
			"module": "alert",
			"pages": {"all": "top_bar"},
		},
		{
			"module": "MMM-Bob-Ross",
			"pages": {"main": "bottom_left"},
		},
		{
			"module": "clock",
			"pages": {"main": "top_right", "fun": "top_left"}
		},
		{
			"module": "weatherforecast",
			"pages": {"main": "bottom_right"},
			"config": {
				"locationID": "REMOVED",
				"appid": "REMOVED"
			}
		},
		{
			"module": "calendar",
			"header": "US Holidays",
			"pages": {"main": "top_left"},
			"config": {
				"calendars": [
					{
						"symbol": "calendar-check-o ",
						"url": "webcal://www.calendarlabs.com/templates/ical/US-Holidays.ics"
					}
				]
			}
		},
		{
			"module": "MMM-page-indicator",
			"pages": {"all": "bottom_center"},
		},
		{
			"module": "MMM-Lunartic",
			"pages": {"fun": "bottom_right"},
		},
		{
			"module": "MMM-Astronauts",
			"pages": {"fun": "bottom_left"},
		},
		{
			"module": "MMM-Reddit",
			"pages": {"fun": "top_right"},
			"config": {
				"subreddit": "earthporn",
				"displayType": "image",
				"imageQuality": "high",
				"count": 10,
				"show": 1,
				"width": 500,
				"showAll": true,
				"maxImageHeight": 300
			}
		},
		{
			"module": "MMM-Voice-Commands",
			"pages": {"all": "bottom_bar"},
			"config": {
				debug: true,
				"autoStart": true,
				"commands": {
					"Play video": "ROSS_PLAY_VIDEO",
					"Pause video": "ROSS_PAUSE_VIDEO",
					"Show picture": "ROSS_SHOW_IMAGE",
					"Unpause video": "ROSS_UNPAUSE_VIDEO",
					"New Picture": "ROSS_NEW_IMAGE",
					"test": function(){
						alert("Heard");
					}
				}
			}
		},
		{
			"module": "MMM-Cursor",
		}
	]

};

This one is a bit long and complicated so if you have any questions about it feel free to ask.

@Robiv8
Copy link
Author

Robiv8 commented Oct 25, 2018

woow
Many Thanks for this! Amazing
Now I can start to study how to build it up :-)

@Veldrovive
Copy link
Owner

Sounds good. Good luck with your mirror and feel free to send me any more questions.

@Robiv8
Copy link
Author

Robiv8 commented Oct 27, 2018

Thanks, yes I have 1 question.

as an an example

...
}
   "module": "calendar",
   "header": "US Holidays",
   "position": "top_right",
   "pages": {"main": "top_left"},
   "config": {
   "calendars":
},
...

I do not understand why "position": top_right but in "pages" it is top_left

@Veldrovive
Copy link
Owner

Veldrovive commented Oct 27, 2018

Note: Changes being merged in the next couple of days make it unnecessary to include a position prop. Just pages will work fine.

Ah, this can be a point of confusion. It stems from the fact that this module doesn't override magic mirror's method of rendering modules, it just extends it. In order for the module to be shown, a position prop must be set, but since page-selector moves and sets visibility before any modules actually show up on the screen, it doesn't matter what position is set to, only what position it is in on the specified pages.
In the case of the calendar module, when the mirror first starts, the magic mirror will place the module into the top_right position, but before you as the user see it, page-selector will move it into the top_left position since main is the default page for startup.

In summary, the "position" prop can be anything as long as it is there. What really matters is the "pages" prop and where the module is positioned inside that.
The only exception is if "pages" is set to "All" in which case the module will always appear in the position set by the "position" prop.

@Robiv8
Copy link
Author

Robiv8 commented Oct 28, 2018

Thank YOU very much for the explain.
Now i understand :-)

@DanielSchacht129
Copy link

hey i have a small question, i have installed MMM-Voice-Commands, MMM-Page-Selector and MMM-page-indicator. But it seems like they dont work properly, do i have to install any aditional voice libraries ?

@Veldrovive
Copy link
Owner

Ah, I'm almost certain I know what the issue is.
MMM-Voice-Commands is built off of annyang which doesn't work properly in electron so magic mirror has to be run in serveronly mode for the module to function correctly. I thought I had updated the readme to reflect that, but I guess not. I will do so now.
If that is not the issue then posting a log of error messages from the console would go a long way to us figuring out the issue.

@DanielSchacht129
Copy link

Thank you very much, now its working 👍

@Veldrovive Veldrovive added the good first issue Good for newcomers label Nov 10, 2018
@DanielSchacht129
Copy link

I have another problem. On all other pages except my main page my own css rules are not applied, is there a solution to my problem ?

@Veldrovive
Copy link
Owner

Do you mean that you have a custom.css file that only works on the default page?
If so, that is a very odd problem indeed. It may be a quirk of the underlying interaction between this module and magic mirror, or it may just be something small that can just be fixed through the config.
Either way, it would be useful to have both your config.js as well as your custom.css so I can see exactly what is going on.

@Veldrovive Veldrovive changed the title no an issue only a question! Not an issue. Only a question! Nov 25, 2018
@DanielSchacht129
Copy link

So the problem is, if I move the modules adapted in the css file to the home page, then the adaptations will work, but on all other pages unfortunately not anymore. I sent you my code by mail

@DanielSchacht129
Copy link

i am sorry that i bothered you. I found my bug myself, just a stupid bug in the css file

@Veldrovive
Copy link
Owner

Ah, I'm glad you solved your problem. CSS can be quite finicky.

@AchimKalthoff
Copy link

Please Help: On the first page I have all my standard modules, on the second page I habe only MMM-WordClock. But it dosen't work. Is there an problem with IFrame?

@Veldrovive
Copy link
Owner

Hey,
If you would, can you put this in a new issue? This is unrelated to the original topic.

I haven't run into any issues with IFrames. In order to debug this, I would need your config.js file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants