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

jchenaud

@jchenaud

0
Reputation
614
Profile views
20
Posts
0
Followers
0
Following
Joined Jul 24, 2018, 8:13 AM
Last Online Oct 1, 2018, 9:54 AM

jchenaud Unfollow Follow

Latest posts made by jchenaud

  • RE: MMM-Fitbit

    @jchenaud said in MMM-Fitbit:

    e i have make something fail

    hey for new user i have find the probleme
    replace this.config.update_interval*60*1000);
    by

    this.config.update_interval*1000);
    
    posted in Health
    J
    jchenaud
    Aug 23, 2018, 9:13 AM
  • RE: MMM-Fitbit

    awesome !!!

    just one think : update dont work : i have update_interval: 60 but my data never change (i have make a synchronization on my charg2 on my phone and my data are on net )
    for update i need relaunch my MM
    maybe i have make something fail

    posted in Health
    J
    jchenaud
    Aug 23, 2018, 6:05 AM
  • RE: Anyone face problem with MMM-EmbedYoutube module

    hi ! thk for modul.
    i have just one problem : i need to make definition lower because my Pi go slowly with video how i am suppose to do ?

    posted in Troubleshooting
    J
    jchenaud
    Aug 22, 2018, 9:42 AM
  • RE: error loop

    @Sean you are awesome !!!
    my module almost work

    just one problem i need to give a position in config. i think i have miss something

    Module.register("MMM-keylogger",{
    	defaults: {
    		 updateInterval:  1500,
    	},
    
    	notificationReceived: function(noti, payload, sender) {
    		Log.log(`notif : ${noti}`);
    		switch(noti) {
    		  case 'MODULE_DOM_CREATED':
    			this.initMyDOM()
    			break
    		}
    	  },
    	  initMyDOM: function() {
    		var wrapper = document.createElement("div")
    		wrapper.id = "myDOM"
    		var container = document.body
    		container.appendChild(wrapper)
    		Log.log(`init DOM `);
    		var timer = setInterval(()=>{
    			var d = document.getElementById("myDOM")
    			d.innerHTML =  this.dataFile
    		Log.log(`key : ${d.innerHTML} , ${this.dataFile} `);
    			if(d.innerHTML){
    				switch(d.innerHTML) {
    					case "Right":
    					this.sendNotification("PAGE_INCREMENT");
    						break;
    					case "Left" :
    					this.sendNotification("PAGE_DECREMENT");
    						break;
    					default:
    					Log.log(`key : ${d.innerHTML} pressed but not assigned`);
    				}
    				this.sendSocketNotification("Clear_key")
    			}
    			
    			}, 1500)
    	},
    
    	start: function(){
            console.log(this.name + " has started...!!!!!!");
    		this.sendSocketNotification("START", this.config);
    	},
    
    	socketNotificationReceived: function(notification, payload) {
    		if(notification === "KEY_P"){
    			this.dataFile = payload;
    			// this.updateDom();
            }
    	},
    

    if i don’t give position on config its don’t work ! if i have understand what you have say. this is suppose to work

    other question : one of my other module have subitly stop to work and make same error but in this module in need position and update with Miror display. so my question is : this is possible this modification have impact on other module ?

    posted in Development
    J
    jchenaud
    Aug 20, 2018, 7:06 AM
  • RE: error loop

    thk i will try :)

    posted in Development
    J
    jchenaud
    Aug 17, 2018, 2:57 PM
  • RE: error loop

    @sean
    thk for explain. i will try something different to get.getDom().

    have you an idea for appendChild error ?

    posted in Development
    J
    jchenaud
    Aug 17, 2018, 2:20 PM
  • RE: error loop

    @Sean

    thanks you have suppress the first error on screen-shot
    but my modul write something on screen and i don’t want that but its can be cool for debug

    posted in Development
    J
    jchenaud
    Aug 17, 2018, 1:30 PM
  • RE: error loop

    @doublet
    i am not sure to understand

    if i remove my module i have one error (i correct after if i can)

    but the looping are ok

    my module

    Module.register("MMM-keylogger",{
    	curentPage: -1,
    	defaults: {
    		updateInterval:  1000,
    	},
    
    	start: function(){
            console.log(this.name + " has started...!!!!!!");
    		this.sendSocketNotification("START", this.config);
    	},
    
    	socketNotificationReceived: function(notification, payload) {
    		if(notification === "KEY_P"){
    			this.dataFile = payload;
    			this.updateDom();
            }
    	},
    
    	getDom: function(){
    		var wrapper = document.createElement("div");
    		wrapper.innerHTML = this.dataFile
    			if(this.dataFile){
    				switch(wrapper.innerHTML) {
    					case "Right":
    					this.sendNotification("PAGE_INCREMENT");
    						break;
    					case "Left" :
    					this.sendNotification("PAGE_DECREMENT");
    						break;
    					default:
    					Log.log(`key : ${wrapper.innerHTML} pressed but not assigned`);
    				}
    				this.sendSocketNotification("Clear_key")
    			}
    			return wrapper;
    	},
    
    });
    
    const NodeHelper = require("node_helper");
    const fs= require("fs");
    
    module.exports = NodeHelper.create({
    //here comes the part of the nodehelper after the 3 dots as posted above
    
    	socketNotificationReceived: function(notification, payload) {
    		if(notification === "START"){
    			this.config = payload;
    			this.readData();
        			setInterval(() => {
            			this.readData();
        			}, this.config.updateInterval);
    		}
    		if(notification === "Clear_key")
    		{
    			fs.open('Key_pres.txt', 'r+', function(err, fd) {
    				if (err) {
    				   return console.error(err);
    				}
    				fs.ftruncate(fd, function(err){
    					if (err){
    					   console.log(err);
    					}
    					console.log("supose to trucate");
    				})
    			});
    	}
    	},
    
    	readData: function(){
    		fs.readFile("Key_pres.txt", "utf8", (err, data) => {
    			if (err) throw err;
    		   this.sendSocketNotification("KEY_P", data);
       })		
    	}
    });
    

    i have no warning of no declare class or something like that on VS

    sorry but i beginner with organisation of MM

    thanks for your rapidity :)

    posted in Development
    J
    jchenaud
    Aug 17, 2018, 12:04 PM
  • error loop

    first of all hello :)

    i make my module and i have 2 looping error but she is not located on my code
    alt text

    do you have idea?
    thk for your attention

    posted in Development
    J
    jchenaud
    Aug 17, 2018, 11:15 AM
  • RE: MMM-KeyBindings: Control your mirror with Amazon Fire Stick Remote and Generic Keyboard Inputs

    hey i remake all process but nothing new . i am alone in this case ?

    just my log when all looks ok

     MagicMirror git:(master) ✗ npm start
    
    > magicmirror@2.4.1 start /home/pi/MagicMirror
    > sh run-start.sh
    
    Starting MagicMirror: v2.4.1
    Loading config ...
    Loading module helpers ...
    No helper found for module: alert.
    Initializing new module helper ...
    Module helper loaded: updatenotification
    No helper found for module: clock.
    No helper found for module: compliments.
    Initializing new module helper ...
    Module helper loaded: newsfeed
    No helper found for module: MMM-EyeCandy.
    Initializing new module helper ...
    Module helper loaded: Print_text_from_txt
    Initializing new module helper ...
    Module helper loaded: MMM-kalliope
    Initializing new module helper ...
    Module helper loaded: MMM-KeyBindings
    No helper found for module: MMM-pages.
    All module helpers loaded.
    Starting server on port 8080 ... 
    Server started ...
    Connecting socket for: updatenotification
    Connecting socket for: newsfeed
    Starting module: newsfeed
    Connecting socket for: Print_text_from_txt
    Starting module helper: Print_text_from_txt
    Connecting socket for: MMM-kalliope
    MMM-kalliope is started
    Connecting socket for: MMM-KeyBindings
    MMM-KeyBindings helper has started...
    Sockets connected & modules started ...
    Launching application.
    Create new news fetcher for url: https://www.tdg.ch/rss_ticker.html - Interval: 300000
    MMM-kalliope received a socket notification: CONNECT - Payload: null
    
    
    
    posted in Utilities
    J
    jchenaud
    Aug 15, 2018, 12:43 PM
Enjoying MagicMirror? Please consider a donation!
MagicMirror created by Michael Teeuw.
Forum managed by Sam, technical setup by Karsten.
This forum is using NodeBB as its core | Contributors
Contact | Privacy Policy