MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    1. Home
    2. kclemen
    3. Posts
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.
    K
    Offline
    • Profile
    • Following 0
    • Followers 1
    • Topics 9
    • Posts 53
    • Groups 0

    Posts

    Recent Best Controversial
    • RE: jumping of modules

      @tidus5, how do you mean with css?

      posted in Troubleshooting
      K
      kclemen
    • RE: jumping of modules

      I thought that version 2 of the mirror did not use jquery anymore?

      posted in Troubleshooting
      K
      kclemen
    • RE: jumping of modules

      Needed to change it to the following:

      hide: 100
      show: 7000

      This works for the first gesture “up”. If I repeat the same for going back to the first “page” the module flips for a second back to the lower position, before it fades away. Because the time is set to 7000 the fade becomes slow.

      Should I put a wait between hide and show? How?

      posted in Troubleshooting
      K
      kclemen
    • RE: jumping of modules

      The problem is that the second module comes in the screen before the first one is completely hided I geuss? Or what do you mean with the latency of the module?

      posted in Troubleshooting
      K
      kclemen
    • RE: jumping of modules

      @tidus5, No they have the same zone: position: ‘top_right’,

      posted in Troubleshooting
      K
      kclemen
    • RE: jumping of modules

      The code I’m using is in my “skywriter” module:

      Module.register("MMM-skywriter",{
      	
      	// Default module config.
      	defaults: {
      		gesture_up: 0,
      		gesture_right: 0,
      		
      	},
      
      	// Override socket notification handler.
      	socketNotificationReceived: function(notification, payload) {
      		if (notification === "gesture_observed"){
      			
      			console.log ("socketnotificationreceived.");
      		
      			//self.sendNotification(notification, payload);
      			
      			if (payload === "up"){
      				if (this.config.gesture_up == 0) {
      						
      						MM.getModules().withClass(this.config.defaultClass).exceptWithClass(this.config.everyoneClass).enumerate(function(module) {
      							module.hide(1000, function() {
      								Log.log(module.name + ' is hidden.');
      							});
      						});
      				
      						MM.getModules().withClass("class_up_1_show").enumerate(function(module) {
      							module.show(1000, function() {
      								Log.log(module.name + ' is shown.');
      							});
      						});
      						
      						this.config.gesture_up = this.config.gesture_up+1;
      						console.log (this.config.gesture_up);
      
      						console.log("gesture_up is nu 1");
      				}
      				else if (this.config.gesture_up == 1) {
      						this.config.gesture_up = this.config.gesture_up+1;
      						console.log (this.config.gesture_up)
      						console.log("gesture_up is nu 2");
      				}
      			}
      			else if (payload === "left"){
      				console.log("test - left");
      			}
      			else if (payload === "down") {
      				console.log("test - down");
      				
      				if (this.config.gesture_up == 1){
      					this.config.gesture_up = this.config.gesture_up-1;
      					
      					MM.getModules().withClass("class_up_1_show").enumerate(function(module) {
      						module.hide(1000, function() {
      							Log.log(module.name + ' is hidden by gesture.');
      						});
      					});
      					
      					MM.getModules().withClass(this.config.defaultClass).exceptWithClass(this.config.everyoneClass).enumerate(function(module) {
      							module.show(1000, function() {
      								
      								
      								
      								Log.log(module.name + ' is hidden.');
      							});
      						});
      					
      				}
      				else if (this.config.gesture_up == 2){
      					this.config.gesture_up = this.config.gesture_up-1;
      					console.log("gesture up is terug 1");
      				}
      			}
      		}
      	},
      	
      	notificationReceived: function(notification, payload, sender) {
      		if (notification === 'DOM_OBJECTS_CREATED') {
      			MM.getModules().exceptWithClass("default").enumerate(function(module) {
      				module.hide(1000, function() {
      					Log.log('Module is hidden.');
      				});
      			});
      		}
      	},
      	
      	start: function() {
      		this.current_user = null;
      		this.sendSocketNotification('CONFIG', this.config);
      		Log.info('Starting module: ' + this.name);
      	}
      	
      });
      
      posted in Troubleshooting
      K
      kclemen
    • jumping of modules

      Hi,

      When using the hide/show function the new function jumps from the bottom to the top.
      Rather difficult to explain, but I made a movie about it. Sorry for the moving around…

      Youtube, jumping of modules.

      What would be a solution to immediately show the new module on the top?

      posted in Troubleshooting
      K
      kclemen
    • Load url without showing

      Hi,

      I want to load a certain url to perform an action, but I do not want to show that page. What would be the best way to implement this? It should work within the Modules.

      http://xxx.xxx.xxx.xxx:port/EN/status.html?p0=playlist&p1=jump&p2=0&start=0&player=00%3A00%3A00%3A00%3A00%3A01

      posted in General Discussion
      K
      kclemen
    • RE: Header for module "hello world"

      Sorry, now that I see my post again: I did not insert the header tag in the correct module. (Shame shame)

      posted in Feature Requests
      K
      kclemen
    • RE: Header for module "hello world"

      @strawberry-3-141 , the problem is that inserting the “header” in the config file does not give the title !?

      My config:

      			module: "helloworld",
      			position: "top_right",
      			header: 'Muziekspelers',
      			classes: 'default everyone',		
      			config: {
      				text: "test" //height: 100vh;
      			}
      		},```
      posted in Feature Requests
      K
      kclemen
    • Header for module "hello world"

      I’m using the “hello world” module to setup an iframe to show the status of several parameters in my house. Now I would like to give this field a nice header, but this seems not to work like it should. My guess is that this is not scripted (yet)?

      posted in Feature Requests
      K
      kclemen
    • RE: Firefox: bottom inputfield is hidden

      @lolobyte and @bhepler, Don’t understand me wrong, I really appreciate your guys help. But Since this is the only website that is not behaving correctly, I would search for a fault in the website settings, instead of letting users change their own local pc settings?

      posted in Forum
      K
      kclemen
    • RE: skywriter - python to javascript

      This helps indeed for the error, thanks. But how to use it like I want? I mean, how can you do calculations within following up socketnotifications? It looks like with every gesture the this.config;gesture_up starts with the value 0.

      posted in Development
      K
      kclemen
    • RE: Firefox: bottom inputfield is hidden

      Change my zoom? As an user I normally should not make any adaptions to use a webpage?!

      posted in Forum
      K
      kclemen
    • RE: skywriter - python to javascript

      ok, for now the last question ;):

      Uncaught reference error: gesture_up is not defined. I understand what this means, but I can’t figure out why it says that :s

      	
      	// Default module config.
      	defaults: {
      		gesture_up: 0,
      		gesture_right: 0,
      		
      	},
      
      	// Override socket notification handler.
      	socketNotificationReceived: function(notification, payload) {
      		if (notification === "gesture_observed"){
      			const self = this;
      			
      			console.log ("socketnotificationreceived.");
      		
      			//self.sendNotification(notification, payload);
      			
      			if (payload === "up"){
      				
      				if (gesture_up == 0) {
      					
      					if (gesture_up == 0){
      						gesture_up = gesture_up+1;
      						
      						console.log("gesture_up is nu 1");
      
      posted in Development
      K
      kclemen
    • Firefox: bottom inputfield is hidden

      Dear,

      Everytime I want to post something on the forum the bottom of the input field is hidden. This is VERY annoying!! Can’t edit anything below the screen…

      alt text

      posted in Forum
      K
      kclemen
    • RE: skywriter - python to javascript

      @Jopyth said in skywriter - python to javascript:

      developer tools console in the browser (e.g. electron).

      Indeed, I want to see the output to verify the communication works.
      Could you elaborate some more about the developer tools console?

      ctrl + shift + i does the trick :)

      @Jopyth you are a HERO. Last 2 days working on it, antd the trick was that simple!

      posted in Development
      K
      kclemen
    • RE: skywriter - python to javascript

      Node helper:
      self.sendSocketNotification('gesture', message.gesture);

      script:

      Module.register("MMM-skywriter",{
      	
      	//	gesture_up: 0,
      	//	gesture_right: 0,	
      
      	// Override socket notification handler.
      	socketNotificationReceived: function(notification, payload) {
      			console.log ("socketnotificationreceived.")
      		if (payload === "up"){
      			console.log("test - up");
      		}
      		else if (payload === "left"){
      			console.log("test - left");
      		}
      		else if (payload === "down") {
      			console.log("test - down");
      		}
      } ```
      
      Why is there no ccommunication between the helper and the script?	}
      posted in Development
      K
      kclemen
    • RE: skywriter - python to javascript

      Ok, the script is performing without any errors at the moment.

      Would somebody be so kind to check why console.log(“payload.action is up”); is not executed in MMM-skywriter.js?

      I only get the message from node-helper.js : console.log(“[” + self.name + "] " + message.gesture);

      Files can be found here: https://github.com/Kclemen/MMM-skywriter

      posted in Development
      K
      kclemen
    • RE: skywriter - python to javascript

      Thanks for the input. Indeed this was the mistake.

      seems I’m missing still something. Now I get following error:

      TypeError: parser.close is not a function
      at SAXStream.openf1 (/home/pi/MagicMirror/node_modules/feedme/lib/xmlfeedparser.js:107:14)
      at emitOne (events.js:96:13)
      at SAXStream.emit (events.js:188:7)
      at Object.me._parser.(anonymous function) [as onopentag] (/home/pi/MagicMirror/node_modules/sax/lib/sax.js:258:17)
      at emit (/home/pi/MagicMirror/node_modules/sax/lib/sax.js:640:35)
      at emitNode (/home/pi/MagicMirror/node_modules/sax/lib/sax.js:645:5)
      at openTag (/home/pi/MagicMirror/node_modules/sax/lib/sax.js:841:5)
      at Object.write (/home/pi/MagicMirror/node_modules/sax/lib/sax.js:1404:13)
      at SAXStream.write (/home/pi/MagicMirror/node_modules/sax/lib/sax.js:239:18)
      at yoshi.write (/home/pi/MagicMirror/node_modules/feedme/lib/feedme.js:41:14)

      posted in Development
      K
      kclemen
    • 1 / 1