MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord
    1. Home
    2. jason02
    J
    • Profile
    • Following 0
    • Followers 0
    • Topics 3
    • Posts 6
    • Best 0
    • Controversial 0
    • Groups 0

    jason02

    @jason02

    0
    Reputation
    376
    Profile views
    6
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    jason02 Unfollow Follow

    Latest posts made by jason02

    • RE: Alexyak Camera module displaying orange screen

      Note: When I run the project in ./serveronly mode and run magic mirror in chrome, the camera works just fine. I guess I need to figure out a way to enable the webcam for electron.

      posted in Troubleshooting
      J
      jason02
    • Alexyak Camera module displaying orange screen

      Hi,

      For demonstration purposes, I would like to run magic mirror on pc. I would like to use the webcam that is integrated in the pc(instead of the seperate USB camera).

      Whenever I enable the video feed, an orange screen is displayed. I believe this has something to do with an access error for the camera? Any idea of how I can get this to work with the integrated camera with my laptop?

      posted in Troubleshooting
      J
      jason02
    • RE: Need help sending a notification after a click event

      Thanks for your input, I modified it a bit to get the result I wanted! Works like a charm!

      getDom: function() {
      	var wrapper = document.createElement("div");
      	var button = document.createElement("div");
      	var text = document.createElement("span");
      	var hidden = true;		
      	button.className = "hide-toggle";
      	text.innerHTML = this.config.caption;
      	text.addEventListener("click", () => this.sendNotification("BUTTON_PRESSED", {}));
        button.appendChild(text);
        wrapper.appendChild(button);
      	return wrapper;
      }
      
      posted in Troubleshooting
      J
      jason02
    • RE: Need help sending a notification after a click event

      Actually this isn’t a button connected to the gpio of the raspberry. This is literally a button displayed on the screen of the raspberry pi

      posted in Troubleshooting
      J
      jason02
    • Need help sending a notification after a click event

      Hi All,

      I have a button on my magic mirror. When I click the button, I want it to send a notification to another module so that it can perform an action.

      Here’s a snippet of what I have so far, sorry if i’m way off, not really great at javascript :S

      getDom: function() {
      	var wrapper = document.createElement("div");
      	var button = document.createElement("div");	
              var text = document.createElement("span");	
               text.innerHTML = 'click me';
              button.appendChild(text);
      	wrapper.appendChild(button);
      
      	$(button).on("click", function(){
                            this.sendNotification("BUTTON_PRESSED", {});
      	});
                   return wrapper;
                  }
           });
      

      When I execute this code, I get an error, ‘this.sendNotification is not a function’. So obviously I’m trying to call that function when it is not in scope. But I don’t really know of another way to wire up the button click to the send notification function. Any ideas anyone?

      Thanks!

      posted in Troubleshooting
      J
      jason02
    • Possible to enable mouse cursor on screen?

      Hi, I’m planning to create a module to display a image carousel. The will be a left button on the left side of the screen and a right button on the right side of the screen. When a user clicks the left or right button, a new image is displayed in the center of the screen.

      The final version will most likely be touch enabled, but until then I would like to test out the button click events using a mouse for the time being. However the mouse/cursor seems disabled whenever I load the magic mirror. Is there anyway I can enable the mouse while using the magic mirror?

      posted in General Discussion
      J
      jason02