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

    Posts

    Recent Best Controversial
    • My new Magic Mirror

      Hi Team,

      After a couple months of playing around and testing different setups. I can show you what I’ve managed to put together.

      HW wise:

      • Raspberry Pi 4
      • Raspberry Camera
      • USB Mic
      • WM8960 Audio Board + speakers
      • Fan
      • Radar Sensor RCWL 0516 (movement to activate the display)
      • AOC 22B2H screen
      • MirrorView 4mm Glass from Glas-star.de
      • Humidity/Temperature Sensor DHT-11 (to measure room temp/humidity)

      Modules:

      • MMM-Strava
      • MMM-Face-Reco-DNN
      • MMM-Spotify
      • MMM-PIR-Sensor
      • MMM-Carousel
      • MMM-COVID19-AMPEL
      • MMM-Chart (data from http://opensensemap.org)
      • MMM-GoogleAssistant
      • MMM-MicVolume (mic deactivated until Face-Reco gets a positive detection, this disables the google assistant - for privacy)
      • mmm-systemtemperature
      • MMM-WiFiPassword

      Extras

      • Airplay
      • pi-fan-controller

      Here are a few pics:

      ABD1ACAB-79DC-450F-BD34-0CEFEE133FC3_1_105_c.jpeg

      F1CF7BE4-A35A-416C-9054-345ADBC3C292_1_105_c.jpeg

      9AD1E214-E31B-4A3F-B101-A673413391C0_1_105_c.jpeg

      Open issues:
      The camera has problems recognising through the glass, the image is too dark. It works… but it requires to a lamp to be on. I haven’t found a way to play with the amount of time it takes for the photo to be taken. The raspistill command does it automatically, but the Face-Reco module doesn’t allow an option for it that I can tell

      posted in Show your Mirror
      P
      pablousavilla
    • RE: My new Magic Mirror

      Thanks @MyMirror

      Sure, its a dirty hack as Im not a programmer, but it works.

      1. You need to download the data you want from a sensor, to do that, go to the site, select which sensor and data would you like to have and instead of clicking download, right click and copy the link, it would look something like this:
        Options selected: 24hrs data, 10 Minute Value, Arithmetic average, Temperature sensor -> https://api.opensensemap.org//statistics/descriptive?boxid=5b1421ce4cd32e00193f0983&columns=lat,lon,boxName,boxId,unit&download=true&format=csv&from-date=2021-01-03T10:36:32.413Z&operation=arithmeticMean&phenomenon=Temperatur&to-date=2021-01-04T10:36:32.413Z&window=10m

      You can later automate this process using wget and changing the date variables in that string

      1. The file is a csv file that needs to be changed to json in a format that looks like this:
        [[“DateTime1”, Value1 ], [“DateTime2”, Value2], … ]

      There is many python examples on how to do the conversion, but what I found is that they dont return the same format. For example: https://medium.com/@hannah15198/convert-csv-to-json-with-python-b8899c722f6d

      The output looks instead something like this:
      {
      “DateTime1”: “Value1”,
      “DateTime2”: “Value2”,
      …
      }

      1. So I take that and apply some command line to replace, move, etc… WIth the above format, you could use this:

      grep -v ‘“”’| sed ‘s/"temperatur_20/["20/g’ | sed ‘s/T/ /g’ | sed ‘s/Z"/"/g’ | sed ‘s/",/],/g’ |sed ‘s/": “/”, /g’ | sed ‘s/{/[/g’ | sed ‘s/}/]/g’ |grep 20 | head -c-3

      Dont forget to add the first and last [ ]

      1. And then you need to enable apache and copy to a location where MMM-Chart can find it

      This should do it. I hope it works for you!

      Cheers

      posted in Show your Mirror
      P
      pablousavilla
    • 1 / 1