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

    Posts

    Recent Best Controversial
    • RE: Ring Doorbell / Alarm Module

      there is MMM-RTSPStream which might fit your needs

      posted in Requests
      M
      maxbachmann
    • RE: Microphone advise for PI2 & voice control

      Yeah i know that benchmark (using that speech recognition with my mirror already) :) (newer reapeakers not included there yet they definetly perform a lot better with background music as they use the xvf3000 resulting in them nearly completely removing the background music from any samples)
      When I saw it it was used in a small robot with speech recognition and it absolutely failed with a distance over around 1 m, but it was on a hackathon so maybe it was just the background noise causing problems.
      @dvbit it just sends all four channels to the pc aswell? or does it already create just one channel out of the four?

      posted in Hardware
      M
      maxbachmann
    • RE: how to make magic mirror like him that can interact and stuff?can someone teach me?im new to this...please help

      Well first off this is a Smart mirror, but not based on MM2. This is why it is probably hard to get the same result (no judgement which way is “better”). However some parts should be quite easy to realise in MM2 aswell:

      1. for the touch you could for example use a IR Frame --> make sure you take a glas mirror and no acrylic because acrylic can scratch a lot easier which might be bad when using touch (at least from what I have heard)

      2. The “pages” (first page with the clock ect and second page with the apps) you can realise using Pages to show/hide modules together with a page indicator in the bottom
        https://github.com/edward-shen/MMM-pages
        https://github.com/edward-shen/MMM-page-indicator

      3. on the first page clock, weather and a basic music player there are several MM modules already you can choose one you like.

      volume control stuff, keyboard and the single apps do not really exist in this way yet as far as I know. So you would need to create those yourself. However there are already a couple of modules that do parts of the stuff for example modules to show photos or IR frame could be used for the online stuff you want to show.
      Hope I could give you a small explanation on whats possible “out of the box” and what ou would need to implement yourself. Guess with tips on how to implement those features someone else can help you more since I am not that experienced with javascript and CSS I usually use C++ and Qt when I need some GUI stuff :smiling_face_with_open_mouth_cold_sweat:

      posted in General Discussion
      M
      maxbachmann
    • RE: Microphone advise for PI2 & voice control

      @richland007 I am not familar with the ps eye (I know a couple people using it where it works way worse then the respeaker 2 mic hat the moment your not close to the mic, but I only saw the ps eye in action in a quite noisy environment once, which is definetly not the normal case at home)

      I personally use the respeaker 4mic hat for the pi (25$) and the respeaker mic array v2 (70$)(pretty awesome but definetly overkill for you)

      The 4 mic array always inputs with 4 separate channels the mic array v2 has two different firmwares one only outputs the processed audio channel the other one outputs the input of the 4 mics, the processed audio channel and the music you play with the array which gets used for the AEC)
      The 2 mic hat (10$) is already quite good and I guess it just streams the 2 channels aswell.

      get the index

      import pyaudio
      
      p = pyaudio.PyAudio()
      info = p.get_host_api_info_by_index(0)
      numdevices = info.get('deviceCount')
      
      for i in range(0, numdevices):
              if (p.get_device_info_by_host_api_device_index(0, i).get('maxInputChannels')) > 0:
                  print "Input Device id ", i, " - ", p.get_device_info_by_host_api_device_index(0, i).get('name')
      

      thats the output when executing

      Input Device id  2  -  ReSpeaker 4 Mic Array (UAC1.0): USB Audio (hw:1,0)
      
      import pyaudio
      import wave
      
      RESPEAKER_RATE = 16000
      RESPEAKER_CHANNELS = 6 # change base on firmwares, 1_channel_firmware.bin as 1 or 6_channels_firmware.bin as 6
      RESPEAKER_WIDTH = 2
      # run getDeviceInfo.py to get index
      RESPEAKER_INDEX = 2  # refer to input device id
      CHUNK = 1024
      RECORD_SECONDS = 5
      WAVE_OUTPUT_FILENAME = "output.wav"
      
      p = pyaudio.PyAudio()
      
      stream = p.open(
                  rate=RESPEAKER_RATE,
                  format=p.get_format_from_width(RESPEAKER_WIDTH),
                  channels=RESPEAKER_CHANNELS,
                  input=True,
                  input_device_index=RESPEAKER_INDEX,)
      
      print("* recording")
      
      frames = []
      
      for i in range(0, int(RESPEAKER_RATE / CHUNK * RECORD_SECONDS)):
          data = stream.read(CHUNK)
          frames.append(data)
      
      print("* done recording")
      
      stream.stop_stream()
      stream.close()
      p.terminate()
      
      wf = wave.open(WAVE_OUTPUT_FILENAME, 'wb')
      wf.setnchannels(RESPEAKER_CHANNELS)
      wf.setsampwidth(p.get_sample_size(p.get_format_from_width(RESPEAKER_WIDTH)))
      wf.setframerate(RESPEAKER_RATE)
      wf.writeframes(b''.join(frames))
      wf.close()
      

      Thats a code example of respeaker on how two get the channels in python with the mic array v2, but I guess it should work similar with other mic arrays

      posted in Hardware
      M
      maxbachmann
    • RE: RGB light changing during day

      In case you already have a pi laying around next to the LED’s you can obviously use it. Otherwise I would tend to a microcontroller like the ESP32 or a arduino (since it already has quite some examples online and is less expensive and power hungry than a pi)

      Since it is really just time based. You can basically just check the time (on pi just use system time with a microcontroller a RTC would be the way to go) and then just change the RGB LED color. So in general you just need to check some examples depending on which platform you use, but on neither of them it will be complicated, just search for a example using the same RGB Led type.
      You can obviously use it with MQTT like in @Charley 's example. Although when you really just want to change the color time based and do not want to change the times and color shemes all the time I don’t think MQTT akes much sence

      posted in Requests
      M
      maxbachmann
    • RE: omxplayer overlay

      When not included by default I will definetly do not have it. Will try it when I am home later today.

      And yes I am confused whats the difference aswell. Especially because I can absolutely use omxplayer with a local file from the shell

      posted in Development
      M
      maxbachmann
    • RE: omxplayer overlay

      wait they screwed electron even more??
      What the heck is wrong with them I am already super annoyed they still use no hardware acceleration for videos

      posted in Development
      M
      maxbachmann
    • RE: Speaker dependent voice recognition

      @Gooral yes snowboy might already help, since the hotwords are trained with 3 examples of one person, so only quite similar voices get detected (but will not work when the voices are quite similar)

      another possiblity you might want to check out (did not try it myself yet) is
      https://github.com/Adirockzz95/Piwho

      posted in Requests
      M
      maxbachmann
    • RE: omxplayer overlay

      Hm no I did not downgrade electron. I am really not that deap in the topic, but why does electron stop omxplayer from working? (at least in my case omxplayer still works, although it kind of does not work with local files for me for whatever reason)

      posted in Development
      M
      maxbachmann
    • RE: omxplayer overlay

      ty I will try it

      Ok I tried. Your first config worked perfectly fine when I tried and it showed me the video. However when I just swapped the url with a file path the way you said in your last post the omxplayer does not open it

      posted in Development
      M
      maxbachmann
    • 1 / 1