A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.
  • [npm library] @bugsounet/governor

    1
    0 Votes
    1 Posts
    214 Views
    ?
    @bugsounet/governor I created this library if you want to set a CPU governor in your module. This library is very simplified and ready for use in your node_helper.js This library is used in MMM-Assistant2Display single node routine for setting you prefered CPU governor Installation npm install @bugsounet/governor Sample with governor contructor const Governor = require("@bugsounet/governor") this.config = { useCallback: true, sleeping: "powersave", working: "ondemand" } var debug = true this.governor = new Governor(this.config, callback, debug) this.governor.start() function callback(governor) { console.log(governor) } constructor of governor Governor(governorConfig, callback, debug) governorConfig {} useCallback- return callback confirmation (false by default) sleeping- set your prefered governor on sleeping mode working- set your prefered governor on working mode Available governor: conservative ondemand userspace powersave performance callback {} callback return object with status: { "actived" : true, "wanted" : "ondemand", "actual" : "ondemand", "error": null } actived: confirm with true if governor is set wanted: your wanted governor to set actual: your actual governor error: display error if detected debug if you want debuging information, just set to true Functions start() : start governor with working setting working(): start governor with working setting sleeping(): start governor with sleeping setting
  • [npm library] @bugsounet/pir

    1
    1 Votes
    1 Posts
    230 Views
    ?
    @bugsounet/pir I created this library if you want use a pir sensor in your module. This library is very simplified and ready for use in your node_helper.js This library is used in MMM-Assistant2Display single node routine for PIR sensor read Installation npm install @bugsounet/pir In the ending of installation, if you use electron you can do electron rebuild step. Do you want to execute electron rebuild ? [Y/n] Your choice: Sample with pir contructor const Pir = require("@bugsounet/pir") this.config = { gpio: 17, reverseValue: false } var debug= false this.pir = new Pir(this.config, callback, debug) this.pir.start() setTimeout(() => { this.pir.stop() } , 5000) function callback(status, err) { console.log("[PIR:CALLBACK] Status: " + status) if (err) console.log("[PIR:CALLBACK] " + err) } constructor of pir Pir(pirConfig, callback, debug) pirConfig {} gpio - BCM-number of the sensor pin. reverseValue - reverse presence detector value. callback (status,error) callback return with event status: PIR_INITIALIZED: Pir constructor is initialized PIR_STARTED: Pir start detection confirmation PIR_STOP: pir stop detection confirmation PIR_DETECTED: pir user presence detected PIR_ERROR: pir error callback error return with PIR_ERROR if error detected, it will return it with error value debug if you want debuging information, just set to true Functions start() : start pir stop() : force stop pir
  • [npm library] @bugsounet/snowboy

    1
    0 Votes
    1 Posts
    404 Views
    ?
    @bugsounet/snowboy I created this library if you want use snowboy in your module. This library is very simplified and ready for use in your node_helper.js This library is used in MMM-GoogleAssistant, MMM-Snowboy, MMM-AssistantMk2 Dependencies For listening keyword, you have to use a mic, so snowboy need some dependencies to use it sudo apt install libmagic-dev libatlas-base-dev sox libsox-fmt-all build-essential Installation npm install @bugsounet/snowboy In the ending of installation, if you use electron you can do electron rebuild step. Do you want to execute electron rebuild ? [Y/n] Your choice: Sample with new Snowboy contructor /** sample code for using snowboy library **/ /** @bugsounet **/ const Snowboy = require("@bugsounet/snowboy").Snowboy var config = { debug: true, snowboy: { audioGain: 2.0, Frontend: true, Model: "jarvis", Sensitivity: null }, micConfig: { recorder: "arecord", device: "plughw:1", }, } this.snowboy = new Snowboy(config.snowboy, config.micConfig, (detected) => { detect(detected) }, config.debug ) this.snowboy.init() this.snowboy.start() function detect(detected) { console.log("Make your script if " + detected + " is detected") } constructor of Snowboy Snowboy(snowboyConfig, micConfig, callback, debug) SnowboyConfig AudioGain - set the gain of mic. Usually you don’t need to set or adjust this value. Frontend - set pre-processing of hotword detection. When you use only snowboy and smart_mirror, false is better. But with other models, true is better to recognize. Model - set the name of your detector. Available: “smart_mirror”, “jarvis”, “computer”, “snowboy”, “subex”, “neo_ya”, “hey_extreme”, “view_glass” Sensitivity - Override default sensitivity value for applied model defined in Model. Value could be within a range from 0.0 to 1.0. Default sensitivity values for preconfigured models are: smart_mirror: 0.5 jarvis: 0.7 computer: 0.6 snowboy: 0.5 subex: 0.6 neo_ya: 0.7 hey_extreme: 0.6 view_glass: 0.7 alexa: 0.6 null will set default sensitivity. micConfig recorder - record program, rec, arecord, sox, parec is available. On RaspberryPi or some linux machines, arecord is better. On OSX, rec is better. If you prefer to use pulse audio, parec would be available also. device - recording device (microphone) name of your environment. (e.g. “plughw:1”) Find proper device name by yourself. (arecord -l will be help on Raspberry Pi or linux platform) callback if snowboy detect a keyword, it return it with his name debug if you want debuging information, just set to true Functions init() : initialize the constructor start() : start listening and waiting for your keyword stop() : force stop listening
  • Get Error "undefined symbol" in own module

    3
    0 Votes
    3 Posts
    1k Views
    S
    @bjorndegroot the last post was 2 years ago
  • Download CSV from MM Module

    download csv file
    3
    0 Votes
    3 Posts
    811 Views
    L
    Thank you @sdetweil. I will take a look at it Thanks Again
  • Hide/show module from another module

    4
    0 Votes
    4 Posts
    606 Views
    S
    @sergiozf you can pass a string as part of the hide, to prevent any other module from showing that does not provide that same string on show
  • MM crashes when I try to start my own module.

    Solved
    6
    0 Votes
    6 Posts
    1k Views
    S
    @vredevol getDom() MUST return AT LEAST an htmlElement add return document.createElement(‘div’) see my sample module https://github.com/sdetweil/SampleModule
  • Filter events on Calendar Module

    3
    0 Votes
    3 Posts
    1k Views
    A
    Where do you paste that code? config.js?
  • Monitor external program...

    5
    0 Votes
    5 Posts
    642 Views
    S
    start the external program with pm2, it will keep it running
  • Send socket notification to node helper on click?

    2
    0 Votes
    2 Posts
    408 Views
    ?
    @laszlocsaba imgObj.onclick = ()=> { this.sendSocketNotification("CLICKED", somePayload) } I think you might have some confusing with using this. If you are using ES6 style arrow function, you can easily bind.
  • My first written module

    12
    0 Votes
    12 Posts
    3k Views
    BKeyportB
    Ah, the heck with it. It’s released!
  • Send data from a local web page to a magic mirror module

    4
    0 Votes
    4 Posts
    739 Views
    S
    @sergiozf where is it getting the data from? Can it websocket send to mm module too? Use the node ws library https://www.npmjs.com/package/ws Listen and receive in the node helper. Send up to the module
  • How can i pass query / parameters from URL to module

    Solved
    12
    0 Votes
    12 Posts
    4k Views
    A
    Hi, testing completed, today i uploaded new release to github. MMM-Navigate - V1.3 released Regards AxLED
  • "Npm start" doesn't work

    17
    1
    0 Votes
    17 Posts
    4k Views
    M
    Mac mini…
  • 0 Votes
    1 Posts
    537 Views
    U
    Hi everybody! I currently have an event on my local MQTT server which provides me with the event that sun has risen or has set. This has different consequences around my house, specifically when the sun sets: curtains go down, ambiental lights go on (this last one obviously depending on whether we are home or not), staircase gets illuminated, etc. I have a magic monitor (on display here) which I want it to be coordinated as well: whenever the sun sets, the theme should set to be a dark theme, otherwise during the day it should be a white(ish) theme. I have currently overwritten some values in my CSS so that during the majority of the day it displays the light theme, but now I would like to go a step further and implement this so that after the sun sets, the screen is no longer so bright. Now comes my question: how would you begin to do this? Has anybody already done this before? Can I use some existing implementation to read out MQTT and perform an operation based on such an event? I can program comfortably (actually pretty new to nodejs!) but I’m just curious as to where to begin. Hopefully you can help me more. Thanks and greetings.
  • API for Map image

    3
    0 Votes
    3 Posts
    600 Views
    S
    @Temisola1 See https://forum.magicmirror.builders/topic/12376/mmm-tomtomtraffic
  • Module UI Design

    4
    0 Votes
    4 Posts
    1k Views
    S
    @Temisola1 what do you mean inherit the master? you don’t need to create any new tags… (the forum doesn’t like < , so I will skip it for this discussion) head fddfd /head body div p>some text table tr td td td /tr /div the part that starts with div, thru end div, you can insert into the wrapper div innerHtml head and body are controlled by MM there are default classes in ~/MagicMirror/css/main.css you can add more by adding them to ~/MagicMirror/css/custom.css you can also have a css file local to the module folder, and include it with the getStyles() method response (and those can be overridden in the custom.css) Give it a try, you’ll get it pretty quick
  • child_process won't execute

    13
    0 Votes
    13 Posts
    4k Views
    T
    Thank you all for all your wonderful suggestions. I’m able to run my python script successfully now. Thanks!
  • Module creation workflow - Newbie

    7
    0 Votes
    7 Posts
    1k Views
    T
    @sdetweil Amazing. Thank you.
  • Module development node_helper.js config loading

    4
    0 Votes
    4 Posts
    737 Views
    S
    @andyb2000 you did perfect!! glad u got it working u didn’t NEED to pass it, as this.my_control() worked, the ‘this’ pointer is correct inside the function…