A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.
  • Bluetooth connectivity using Raspberry pi3

    1
    0 Votes
    1 Posts
    1k Views
    N
    Hello Everyone, Great to be a part of this community. A big thanks to all the contributors and developers. I built a custom module to connect Adafruit Bluetooth module nrf8001 with the MM2. I am not seeing anything on the mirror and can’t figure out the issue. Please find attached the module files: node_helper.js var nrfuart = require('./index.js'); module.exports = NodeHelper.create({ start: function () { console.log('BLE helper started ...'); }, socketNotificationReceived: function(notification, payload) { if (notification === 'TEMP') { console.log('Notification TEMP in ' + this.name + ' received'); this.sendNotificationTest(this.anotherFunction()); } else { console.log('ERRRRROR'); } }, sendNotificationTest:function(payload){ this.sendSocketNotification('TEMPER',payload); }, anotherFunction: function(){ nrfuart.discoverAll(function(ble_uart) { 'use strict'; ble_uart.on('disconnect', function() {}); ble_uart.connectAndSetup(function() { var writeCount = 0; ble_uart.readDeviceName(function(devName) {}); ble_uart.on('data', function(data) { var x = data.toString(); var con = x.substring(0,2); var dec = x.substring(2,4); con = con.concat('.'); con = con.concat(dec); console.log(con); return con; }); setInterval(function() {}, 3000); }); }); } }); index.js /* * Adafruit nRF8001 breakout in UART mode. This might also work for other * nRF8001 boards but has only been tested with the Adafruit board. */ var NobleDevice = require('noble-device'); var events = require('events'); var util = require('util'); var NRFUART_SERVICE_UUID = '6e400001b5a3f393e0a9e50e24dcca9e'; var NRFUART_NOTIFY_CHAR = '6e400003b5a3f393e0a9e50e24dcca9e'; var NRFUART_WRITE_CHAR = '6e400002b5a3f393e0a9e50e24dcca9e'; var nrfuart = function(peripheral) { // call nobles super constructor NobleDevice.call(this, peripheral); // setup or do anything else your module needs here }; // tell Noble about the service uuid(s) your peripheral advertises (optional) nrfuart.SCAN_UUIDS = [NRFUART_SERVICE_UUID]; util.inherits(nrfuart, events.EventEmitter); // and/or specify method to check peripheral (optional) nrfuart.is = function(peripheral) { 'use strict'; //return (peripheral.advertisement.localName === 'UART'); return true; }; // inherit noble device NobleDevice.Util.inherits(nrfuart, NobleDevice); // Receive data using the 'data' event. nrfuart.prototype.onData = function(data) { 'use strict'; this.emit("data", data); }; // Send data like this // nrfuart.write('Hello world!\r\n', function(){...}); // or this // nrfuart.write([0x02, 0x12, 0x34, 0x03], function(){...}); nrfuart.prototype.write = function(data, done) { 'use strict'; if (typeof data === 'string') { this.writeDataCharacteristic(NRFUART_SERVICE_UUID, NRFUART_WRITE_CHAR, new Buffer(data), done); } else { this.writeDataCharacteristic(NRFUART_SERVICE_UUID, NRFUART_WRITE_CHAR, data, done); } }; nrfuart.prototype.connectAndSetup = function(callback) { 'use strict'; var self = this; NobleDevice.prototype.connectAndSetup.call(self, function() { self.notifyCharacteristic(NRFUART_SERVICE_UUID, NRFUART_NOTIFY_CHAR, true, self.onData.bind(self), callback); }); }; // export device module.exports = nrfuart; bleEchoTst.js Module.register("bleEchoTst",{ temper: '999', defaults: { text: '100' }, start: function() { this.temper = this.config.text; this.sendSocketNotification('TEMP',this.config); }, socketNotificationReceived: function(notification,payload) { if(notification === 'TEMPER') { this.temper = payload; //this.temper = '999'; this.updateDom(); } }, // Override dom generator. getDom: function() { var wrapper = document.createElement("div"); wrapper.innerHTML = this.temper; return wrapper; } }); Any help is appreciated. Thanks
  • 0 Votes
    3 Posts
    2k Views
    D
    Super late reply, but thank you!
  • Face Recognition - File can't be opened for writing

    Solved
    8
    0 Votes
    8 Posts
    15k Views
    P
    @feuerball I didn’t understand what is the config I am having the same error
  • npm start dev doesn't work

    3
    0 Votes
    3 Posts
    5k Views
    romainR
    Oh ! Thanks !! It work
  • Disabled IPwhitelist

    2
    0 Votes
    2 Posts
    2k Views
    yawnsY
    Yes, just use ipWhitelist: [],
  • All of a sudden SSH is really lagging/slow.

    16
    0 Votes
    16 Posts
    11k Views
    SnilleS
    Just got myself a “core”-file again in the MM root. :) I’m now sure it’s because Electron is crashing. So, it’s probably a memory dump. Still don’t really know why Electron is crashing. It’s not crashing all the time. Just sometimes. But then, I do have lot’s of modules going… :)
  • Start MagicMirror without node serveronly

    node serveronly
    3
    0 Votes
    3 Posts
    2k Views
    D
    Thanks for your reply. I am running a Pi 3. node serveronly works fine and I am able to launch the magic mirror in Chromium, I just thought there was a more “elegant” solution to get it started. I will check out the tutorial. Thanks!
  • This topic is deleted!

    1
    0 Votes
    1 Posts
    18 Views
  • Magic Mirror on PI 3

    Solved pi 3 magic mirror
    7
    1
    0 Votes
    7 Posts
    4k Views
    yawnsY
    @akrishnan.j Great. Thanks for your feedback and enjoy your mirror :)
  • MMM-Mail - check more than one mail account?

    1
    0 Votes
    1 Posts
    1k Views
    ManmachineM
    @Pieps Hi, Is it possible to check more than one mail account? If yes Could you give a sample configuration?
  • 0 Votes
    2 Posts
    5k Views
    brobergB
    @xy86 you have to get in to the magic mirror folder first before you can run npm start Ie type cd MagicMirror And then npm start Or display=:0 npm start If you are running it via ssh
  • MMM-ModuleScheduler -----> MMM-Globe ?

    Solved
    2
    0 Votes
    2 Posts
    2k Views
    I
    @ironman_DK Solved : I forgot to write the module MMM-Globe in to MMM-ModuleScheduler in Config.JS, now everything is working.
  • messed up my config.. MM tells me to create a config file

    31
    0 Votes
    31 Posts
    24k Views
    yawnsY
    What are you installing PHP5 and apache2 for?
  • stumped newbe

    40
    0 Votes
    40 Posts
    24k Views
    Mykle1M
    @trader-dude Ha! I thought you forgot. Peace :beers:
  • AM/PM times shown even with timeFormat: 24,

    6
    0 Votes
    6 Posts
    4k Views
    R
    @Richard238 Is a knowed issue https://github.com/MichMich/MagicMirror/issues/776 If you can help with that go ahead with a Pull Request.
  • cant receive any email :(

    1
    0 Votes
    1 Posts
    1k Views
    P
    im using https://github.com/ronny3050/email-mirror but i cant recieve any email, here’s the actual error Email notifier error: { Error: Timed out while connecting to server at Timeout._onTimeout (/home/pi/MagicMirror/modules/email/node_modules/imap/lib/Connection.js:280:15) at ontimeout (timers.js:365:14) at tryOnTimeout (timers.js:237:5) at Timer.listOnTimeout (timers.js:207:5) source: ‘timeout’ }
  • MMM-Doomsday - remove space ?

    4
    1
    0 Votes
    4 Posts
    2k Views
    pjkoelemanP
    @ironman_DK When you want to learn something about CSS I use w3schools.com. When you want to have a look at the used styles start your MagicMirror with ‘npm start dev’ than you can see the used style off the modules.
  • MMM-Voice

    3
    0 Votes
    3 Posts
    2k Views
    P
    @strawberry-3.141 not really, it is at home/MagicMirror But when I run the bash I am at home/MagicMirror/modules/MMM-voice/installers
  • MMM-Traffic - make text lighter ?

    10
    1
    0 Votes
    10 Posts
    5k Views
    I
    @pjkoeleman ahh off course,I have done it, Thnak you for your help :-)
  • Magic mirror raspberry pi zero wireless??

    2
    0 Votes
    2 Posts
    2k Views
    Mykle1M
    @freya Your answer may be here https://forum.magicmirror.builders/topic/1183/how-i-got-my-magic-mirror-working-on-a-raspberry-pi-0-zero Copied from there: Setting up a WIFI connection. Although this might be common knowledge, I had to do some research to get my Pi accessible via SSH (we will talk about that later) to get the work done. Your first step will be to connect the Pi to the monitor and plug in your keyboard. When you power on your Pi a list of fancy words will appear and at some point you will be greeted with green letters and the ability to type, and so we will type like our lives depend on it! The first thing you want to type is: sudo nano /etc/wpa_supplicant/wpa_supplicant.conf This opens a document called ‘wpa_supplicant.conf’, basically the place where we can tell our Pi to connect to our WIFI. In this document we want to insert the following text: network={ ssid=“Your_wifi_name” psk=“Your_wifi_password” } Replace ‘Your_wifi_name’ with the name of your Wifi Network and replace ‘Your_wifi_password’ with your Wifi networks password. Make sure to match both the name and password exactly, including capital letters etc. Also keep the name/password surrounded with the "s, without these it won’t work. If you have multiple networks you want your Pi to be able to connect to, you can add the inserted text multiple times. I only tested it with 2 at the moment, and that seems to work just fine. When you’re done editting the file, press crtl+x to close the file, it will ask you if you want to save the changes you made, accept this by pressing ‘y’ and finally press enter to go back to your command line. At this point you can shut down your Pi by typing ‘sudo shutdown’ and waiting a minute.