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

    Posts

    Recent Best Controversial
    • RE: Toothbrush integration

      Wow that was really fast!

      Testing your script brought me to 2 problems:

      testing brushTimer.js in the console worked for detecting the brush but did never stop, also not after 32 sec!

      including your module into the MM i got an error message upon activating the brush:

      “noble warning: unknown handle 64 disconnected!”
      “scanning was started. Everything is working fine.”

      this two message’s i get upon every activation, so the MM show always SEARCHING…

      any suggestions?

      posted in Requests
      D
      dfuerst
    • RE: Toothbrush integration

      maybe contacting oralB via the developer program homepage ( https://developer.oralb.com/ ) could be helpful. there might be a support team helping developers creating new apps for their brush

      posted in Requests
      D
      dfuerst
    • RE: Toothbrush integration

      should we go back to the “low level approach”?

      as i understand you can instantly determine if there is a certain brush(matching the macaddress via the config) within the bluetooth range upon activation of these.
      any interruption of brushing is detected, 20 sec or so too late of course i know, when the brush goes offline again.
      so can we start a stopwatch (let’s say at the center position) upon detection, stopping when not detecting the brush anymore and reseting to 00:00 after 2min followed by vanishing the stopwatch.
      i know that this wouldn’t be very accurate, but better then nothing. giving the user a feel for the time
      and for a pro like you i guess this would be very easy to develop.
      examples for start/stop/reset timers are quiet a lot available in the web.

      how do you think about

      posted in Requests
      D
      dfuerst
    • RE: Bluetooth connections with noble

      maybe using hcitool with the syntax for pairing a device before would solve this issue, have you tried that?
      as far as i understand the rpi3 bluetooth is on, at startup, but you have to pair the devices every startup, unless you use hcitool with the corresponding syntax for direct pairing within your .js

      posted in Development
      D
      dfuerst
    • RE: Toothbrush integration

      exciting.
      you get everything needed for a really high quality piece of module.

      battery level
      brushing mode
      brushing time
      pressure
      quadrant
      smiley

      i am a bit concerned about the user readout. (Do you think it might be possible to determine which of eg. 3 brushes is presently used?)

      posted in Requests
      D
      dfuerst
    • RE: Toothbrush integration

      not in the mmmbutton folder of course

      posted in Requests
      D
      dfuerst
    • RE: Toothbrush integration

      try :

      cd ~/MagicMirror/modules/MMM-Button
      sudo npm rebuild --runtime=electron --target=1.4.6 --disturl=https://atom.io/download/atom-shell --abi=50
      
      posted in Requests
      D
      dfuerst
    • RE: Toothbrush integration

      @SvenSommer
      hi. nice to know that someone else (with programming skills) is interested too.

      ohh yes . ‘hcitool con’ is not perfect, first activation of the toothbrush is very accurate but as you mentioned any interruption is detected unreliably, and late.

      your problem sounds like the “white screen” issue of mmm-button, so maybe rebuilding/downgrading your electron version might help. (see the forum for this issue)

      as you can see in the posts above there is an API by OralB. At the end using it would give the highest quality of input/output. as you can also read between the lines i dont know enough about coding stuff, so i went for the low level approach via mmm-networkscanner and to integrate thereafter a simple stopwatch.

      Any help is highly welcome.

      posted in Requests
      D
      dfuerst
    • RE: Toothbrush integration

      ok integrated “hcitool con”, because of the very fast response,
      had to alter the parsing of NetworkScanner.
      i think i got the parsing, but networkscanner says NO DEVICES
      when i “console.log(macAddresses)” , at the end of node_helper script i get during MM in console :

      MMM-NetworkScanner received SCAN_NETWORK
      MMM-NetworkScanner is scanning for mac addresses
      [ ‘E0:E5:CF:FC:4D:8C’ ]                             
      

      shouldn’t this “macAddresses parse” be understand by NetworkScanner? What am i missing here?

      nodehelper script is as follows:

       scanNetwork: function() {
              console.log(this.name + " is scanning for mac addresses");
      
              var self = this;
              var arp = sudo(['hcitool', 'con']);
              var buffer = '';
              var errstream = '';
      
              arp.stdout.on('data', function (data) {
                  buffer += data;
              });
      
              arp.stderr.on('data', function (data) {
                  errstream += data;
              });
      
              arp.on('error', function (err) {
                  errstream += err;
              });
      
              arp.on('close', function (code) {
                  if (code !== 0) {
                      console.log(self.name + " received an error running arp-scan: " + code + " - " + errstream);
                      return;
                  }
                  //Parse the response
                  var rows = buffer.split('\n');
                  var macAddresses = [];
      
                  // HCI-TOOL SCAN table
                  for (var i = 1; i < rows.length; i++) {
                      var cells = rows[i].split(' ').filter(String);
                      if (cells[2] && macAddresses.indexOf(cells[2].toUpperCase()) === -1) {
                          macAddresses.push(cells[2].toUpperCase());
                      }
                  }
      
                  self.sendSocketNotification('MAC_ADDRESSES', macAddresses);
      	    console.log(macAddresses);
              });
      
          }
      

      Note from admin: Please use Markdown on code snippets for easier reading!

      posted in Requests
      D
      dfuerst
    • RE: Toothbrush integration

      Hi again.
      Trying to modify ianperrin’s MMM-NetworkScanner to check wether the toothbrush is connected or not!
      after pairing the brush in Raspbian it is autodetected without any delay , both availability and absensence are shown instantly.

      the plan is to detect the brush and then show a timer starting at 00:00 on the mirror, counting as long as the brush is connected. lets say: scan every 3 sec. if detect show the timer and start counting, if the brush is not detected anymore stop counting until redetection, is the brush not detected for more than 20 sec reset the timer to 00:00 and dont show it anymore

      As i mentioned, i m a noob in coding.
      i have found the command to check if an bluetoothdevice is connected : ‘hcitool con’
      but wasn’t able to use this command in the Networkscanner, i guess because of the space between ‘hcitool’ and ‘con’

      using the command manually looks as follows:(first with brush off, then with brush on)

      pi@raspberrypi:~/MagicMirror $ hcitool con
      Connections:
      pi@raspberrypi:~/MagicMirror $ hcitool con
      Connections:
      	< Unknown E0:E5:CF:FC:4D:8C handle 64 state 1 lm MASTER 
      pi@raspberrypi:~/MagicMirror $ 
      

      unsure how i can integrate this command into the MMM-Networkscanner??? and check the MAC !!! help please


      Note from admin: Please use Markdown on code snippets for easier reading!

      posted in Requests
      D
      dfuerst
    • Toothbrush integration

      Hi.
      I’m using my mirror in the bathroom. My kids and i do use Braun Oral-B electric toothbrushes, these brushes are quite popular and connectable to android or ios. We presently use the included small display’s for pressure and time control but the api should provide much more, battery level, history and so on.
      Unluckily i am a complete noob in coding.

      So if anyone is interested in developing a module for MM i would definitly support him as far as i can.
      Maybe there are others also interested in an integration.

      https://developer.oralb.com there is the api/sdk avbl

      posted in Requests
      D
      dfuerst
    • RE: Where are you from?

      AUSTRIA, EU

      posted in General Discussion
      D
      dfuerst
    • RE: Development MMM-OEBB Austrian Railway Info

      hi i am using the “localtransport” 3rd party module, if you enter the correct station name (zB xxxxx Hbf, xxxxx Hst,…) it works like a charm for austrian train connections.
      just to be honest, i have never checked if any railway delay is shown via this module, so there is a little bit of uncertainity about what you want and you ll get!
      But it definitively shows you your OEBB departures !

      posted in Development
      D
      dfuerst
    • 1 / 1