Coder Social home page Coder Social logo

No display about mmm-selfieshot HOT 5 CLOSED

brianhepler avatar brianhepler commented on July 24, 2024
No display

from mmm-selfieshot.

Comments (5)

BrianHepler avatar BrianHepler commented on July 24, 2024

Hmm. Curious. Could you please send me the portion of your config.js for MMM-Selfieshot? I want to try and duplicate your issue.

from mmm-selfieshot.

BrianHepler avatar BrianHepler commented on July 24, 2024

Yeah I found something. I'm on it.

from mmm-selfieshot.

BrianHepler avatar BrianHepler commented on July 24, 2024

It's entirely possible that you're attempting to trigger the selfie before the MagicMirror has finished laying out all of the modules. Looking at the code, that line is trying to find the DIV object with the SELFIE id value and it's coming up zilch.

The solution here is to delay your notification until after your module receives the DOM_OBJECTS_CREATED notification. Additionally, I'll put in some checks to make sure that it errors gracefully if it receives a notification too early.

Also, I found an error where if you include a location for the module but don't tell it to put the touch button in place, it crashes. Thanks for pointing me at that general area. Now I have to go fix that.

from mmm-selfieshot.

BrianHepler avatar BrianHepler commented on July 24, 2024

Example code:

notificationReceived: function(noti, payload, sender) {
	if (noti == "DOM_OBJECTS_CREATED") {
		this.sendNotification("SELFIE_SHOOT", 
                     {
                          option: {
                               shootCountdown: 1,
                               displayResult: false,
                               playShutter: false,
                               displayCountdown: false,
                           }
                      }
              );
        }
}

from mmm-selfieshot.

BrianHepler avatar BrianHepler commented on July 24, 2024

If you're still having problems, feel free to reopen the issue.

from mmm-selfieshot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.