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

    JohnGalt

    @JohnGalt

    17
    Reputation
    17
    Profile views
    163
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    JohnGalt Unfollow Follow
    • RE: AHT20 Humidity + Temperature Sensor

      @rkorell + @sdetweil - Thanks for the support. I think I have fixed this for myself by adapting an existing module (“MMM-Temperature”, // https://github.com/Tom-Hirschberger/MMM-Temperature).

      That module calls scripts for various sensors to capture the data. I was able to adapt an existing script for use with this sensor, so I think I am good for now.

      posted in Requests
      J
      JohnGalt
    • RE: Pollen module

      @joey – Yes, it is still working for me.

      As a cross-check I just visited several websites that purport to track pollen levels, and verified the module appears to be reporting relatively the same pollen levels. Each site appears to have its own scale and they don’t all appear to measure the same pollen particles - so direct comparison is difficult - but the MagicMirror module appears to be working.

      For reference, following is the config I use for this module:

      {module: "MMM-Pollen", // https://github.com/vincep5/MMM-Pollen  
         disabled: false, position: "top_right", header: "Pollen Forecast",
         config: {
         updateInterval: 5 * 60 * 60 * 1000, // every 5 hours
         zip_code: "xxxxx" }
       },
      

      I hope this helps.

      posted in Requests
      J
      JohnGalt
    • RE: The typical beginner question

      @UncleRoger – +1 on having a separate Magic Mirror instance for development (“dev instance”)! I have a small virtual machine running Magic Mirror where I can try out changes or new modules without disturbing my main instance. I don’t bother with a monitor, just display it on my desktop.

      posted in Hardware
      J
      JohnGalt
    • RE: Black Screen with some modules + linux-armv Error

      @bkeyport and Sam: thanks for the inputs. I went through my logs and the referenced thread, and now do have DynamicWeather working. Much appreciated!

      posted in Troubleshooting
      J
      JohnGalt
    • RE: AHT20 Humidity + Temperature Sensor

      @rkorell Yes, I can describe how I arrived at a resolution for my particular problem - which was to replace DHTxx sensors with the more accurate AHT20 temperature and humidity sensors.

      Caveat: I do not necessarily recommend this for the average person though, because I did not find Magic Mirror modules that natively support this sensor, and as a result had to make changes outside of the config.js and custom.css files. As usual, this puts me at risk of something breaking when the module is updated.

      The module being used (MMM-Temperature - found at https://github.com/Tom-Hirschberger/MMM-Temperature) utilizes python scripts to capture the data from the sensor. While the module is quite complete, with script support for many sensors, I did create a new script in order to use this particular sensor.

      The sensor is supported by Adafruit (https://learn.adafruit.com/adafruit-aht20/python-circuitpython), with instructions to install various adafruit libraries including adafruit-ahtx0 (sudo pip3 install adafruit-circuitpython-ahtx0).

      Using those libraries, your script needs to include the following instructions:

      import board
      import adafruit_ahtx0
      sensor = adafruit_ahtx0.AHTx0(board.I2C())
      

      One of the existing scripts supports I2C sensors using the Adafruit libraries, so it looked like a good candidate to use as a model. See htu21:

      #!/usr/bin/env python3
      #pip3 install adafruit-circuitpython-htu21d
      import board
      from adafruit_htu21d import HTU21D
      import json
      
      result = {}
      try:
          # Create sensor object, communicating over the board's default I2C bus
          i2c = board.I2C()  # uses board.SCL and board.SDA
          sensor = HTU21D(i2c)
          result["temperature_c"] = sensor.temperature
          result["humidity"] = sensor.relative_humidity
          result["temperature_f"] = (result["temperature_c"]*1.8) + 32
          result["error"] = False
      except:
          result["temperature_c"] = 0.0
          result["humidity"] = 0.0
          result["temperature_f"] = (result["temperature_c"]*1.8) + 32
          result["error"] = True
      
      print(json.dumps(result))
      

      My resulting script is aht20:

      #!/usr/bin/env python3
      # aht20: Modeled on htu21 
      # pip3 install adafruit-circuitpython-htu21d
      # pip3 install adafruit-circuitpython-ahtx0
      import board
      import adafruit_ahtx0
      import json
      
      result = {}
      try:
          # Create sensor object, communicating over the board's default I2C bus
          i2c = board.I2C()  # uses board.SCL and board.SDA
          # sensor = HTU21D(i2c)
          sensor = adafruit_ahtx0.AHTx0(board.I2C())
          result["temperature_c"] = sensor.temperature
          result["humidity"] = sensor.relative_humidity
          result["temperature_f"] = (result["temperature_c"]*1.8) + 32
          result["error"] = False
      except:
          result["temperature_c"] = 0.0
          result["humidity"] = 0.0
          result["temperature_f"] = (result["temperature_c"]*1.8) + 32
          result["error"] = True
      
      print(json.dumps(result))
      

      This module is now displaying the temperature and humidity from the sensor directly connected it it. Now all I have to do is figure out the complicated css and get it to look like the other modules on my Magic Mirror.

      Barring any objections, I will mark this as solved.

      posted in Requests
      J
      JohnGalt
    • RE: Temperature/humidity on Magic Mirror

      @sdetweil Thanks, Sam. I may take a look at that Ecobee API and/or the charting. The Ecobee is currently not in use in my new house, but this may give me the added incentive to get going on that. Thanks again.

      posted in General Discussion
      J
      JohnGalt
    • RE: Upgrade errors?

      @sdetweil - Thanks, the log file is on its way to you…

      posted in Troubleshooting
      J
      JohnGalt
    • RE: AHT20 Humidity + Temperature Sensor

      @rkorell – My pleasure.

      posted in Requests
      J
      JohnGalt
    • RE: one call api open weather

      @KristjanESPERANTO - am I misreading or does MMM-OpenWeatherMapForecast appear on both the first and last list? THANKS for the thorough review!

      posted in General Discussion
      J
      JohnGalt
    • RE: Upgrade errors?

      @sdetweil - Thanks for the help here and offline. My problem is solved, and for the sake of others following is the resolution.

      Problem: MagicMirror install script outputs node.js errors on new RaspbianOS install running under VirtualBox.

      Diagnosis [by sdetweil]: “so, the problem is that the intel raspian is a hybrid, x86_64 kernel with a i386 user runtime.
      and they stopped making a nodejs for i386 after node 12”

      Solution: Rebuilt the virtual machine using Ubuntu instead of RaspbianOS. [I’m sure any Debian or other Linux distribution would work just fine…]

      Thanks again - I can now use this as a dev machine and spare myself the risks associated with fiddling with the production machine!

      posted in Troubleshooting
      J
      JohnGalt
    • RE: VM Disk Full - 50 GiB in 4 months

      @sdetweil – Yes, I did.

      The output I pasted included 2 runs. The first returned an access error as expected. The 2nd run says ‘not a minidump file’.

      I guess I confused things by pasting all that. Sorry.

      posted in Troubleshooting
      J
      JohnGalt
    • RE: VM Disk Full - 50 GiB in 4 months

      @sdetweil – OK, well… The program DID install (I was surprised , given what has been happening…). This resulted in an error. I specified that large file we identified earlier. Do let me know if I did the wrong thing. See results below.

      While you are looking at this, I am going to fire up the other, older VM that also crashed and see if there is similar evidence there that might shed light.

      JohnGalt@MM-Dev-VM:~/MagicMirror$ sudo  npm install -g electron-minidump
      [sudo] password for JohnGalt:
      
      added 29 packages in 34s
      
      1 package is looking for funding
        run `npm fund` for details
      npm notice
      npm notice New major version of npm available! 10.9.4 -> 12.0.2
      npm notice Changelog: https://github.com/npm/cli/releases/tag/v12.0.2
      npm notice To update run: npm install -g npm@12.0.2
      npm notice
      JohnGalt@MM-Dev-VM:~/MagicMirror$ electron-minidump -f /var/lib/apport/coredump/core._home_al_MagicMirror_node_modules_electron_dist_electron.1000.f1d1264a-f2d2-4a44-8b27-e2f3182e030f.380943.121091464
      Error: EACCES: permission denied, open '/var/lib/apport/coredump/core._home_al_MagicMirror_node_modules_electron_dist_electron.1000.f1d1264a-f2d2-4a44-8b27-e2f3182e030f.380943.121091464'
          at async Object.open (node:internal/fs/promises:641:25)
          at async electronMinidump (/usr/local/lib/node_modules/electron-minidump/index.js:11:14) {
        errno: -13,
        code: 'EACCES',
        syscall: 'open',
        path: '/var/lib/apport/coredump/core._home_al_MagicMirror_node_modules_electron_dist_electron.1000.f1d1264a-f2d2-4a44-8b27-e2f3182e030f.380943.121091464'
      }
      JohnGalt@MM-Dev-VM:~/MagicMirror$ sudo electron-minidump -f /var/lib/apport/coredump/core._home_al_MagicMirror_node_modules_electron_dist_electron.1000.f1d1264a-f2d2-4a44-8b27-e2f3182e030f.380943.121091464
      Not a minidump file (MDMP header not found): /var/lib/apport/coredump/core._home_al_MagicMirror_node_modules_electron_dist_electron.1000.f1d1264a-f2d2-4a44-8b27-e2f3182e030f.380943.121091464
      JohnGalt@MM-Dev-VM:~/MagicMirror$
      
      posted in Troubleshooting
      J
      JohnGalt
    • RE: VM Disk Full - 50 GiB in 4 months

      @sdetweil

      JohnGalt@MM-Dev-VM:~/MagicMirror$ grep version package.json
              "version": "2.35.0",
      JohnGalt@MM-Dev-VM:~/MagicMirror$ grep version node_modules/electron/package.json
        "version": "41.2.0"
      
      posted in Troubleshooting
      J
      JohnGalt
    • RE: VM Disk Full - 50 GiB in 4 months

      @sdetweil

      Well, there’s this under /var/lib/apport/coredump:

      Name:
      core._home_al_MagicMirror_node_modules_electron_dist_electron.1000.f1d1264a-f2d2-4a44-8b27-e2f3182e030f.380943.121091464

      Size:
      40,486,436,864

      posted in Troubleshooting
      J
      JohnGalt
    • RE: VM Disk Full - 50 GiB in 4 months

      is that file [just] a record of the dump[s]?

      Put differently, would it be safe to delete the file or directory?

      [Edit]: On further recollection - this appears to be happening only on the two VMs running MM, and not on the two Raspberry Pis that I have MM running on.

      Does this represent a clue as to what is happening?

      posted in Troubleshooting
      J
      JohnGalt
    • RE: VM Disk Full - 50 GiB in 4 months

      @sdetweil – true. I’m not sure I know to find that out…

      posted in Troubleshooting
      J
      JohnGalt
    • RE: VM Disk Full - 50 GiB in 4 months

      @sdetweil – I will do that. I was just down the rabbit hole, using df. It looks like a huge amount is taken up by /var/lib/apport/coredump. See below:

      JohnGalt@MM-Dev-VM:~/.pm2/logs$ df -h
      Filesystem      Size  Used Avail Use% Mounted on
      tmpfs           794M  1.1M  793M   1% /run
      /dev/sda2        49G   49G     0 100% /
      tmpfs           3.9G     0  3.9G   0% /dev/shm
      tmpfs           5.0M     0  5.0M   0% /run/lock
      efivarfs         56K   27K   25K  52% /sys/firmware/efi/efivars
      /dev/sda1       300M  7.8M  292M   3% /boot/efi
      tmpfs           794M   92K  794M   1% /run/user/1000
      JohnGalt@MM-Dev-VM:~/.pm2/logs$ cd ..
      JohnGalt@MM-Dev-VM:~/.pm2$ cd ..
      JohnGalt@MM-Dev-VM:~$ sudo du -h --max-depth=1 /var | sort -h | tail -n 10
      4.0K    /var/metrics
      4.0K    /var/opt
      28K     /var/crash
      40K     /var/spool
      68K     /var/tmp
      5.4M    /var/backups
      49M     /var/cache
      617M    /var/log
      39G     /var
      39G     /var/lib
      JohnGalt@MM-Dev-VM:~$ sudo du -h --max-depth=1 /var/lib | sort -h | tail -n 10
      772K    /var/lib/systemd
      2.0M    /var/lib/fwupd
      3.8M    /var/lib/command-not-found
      4.2M    /var/lib/aspell
      7.5M    /var/lib/ubuntu-advantage
      40M     /var/lib/swcatalog
      92M     /var/lib/dpkg
      276M    /var/lib/apt
      38G     /var/lib/apport
      39G     /var/lib
      JohnGalt@MM-Dev-VM:~$ sudo du -h --max-depth=1 /var/lib/apport | sort -h | tail -n 10
      38G     /var/lib/apport
      38G     /var/lib/apport/coredump
      JohnGalt@MM-Dev-VM:~$ sudo du -h --max-depth=1 /var/lib/apport/coredump | sort -h | tail -n 10
      38G     /var/lib/apport/coredump
      JohnGalt@MM-Dev-VM:~$
      
      posted in Troubleshooting
      J
      JohnGalt
    • RE: VM Disk Full - 50 GiB in 4 months

      @sdetweil – Thanks, Sam. It looks like that won’t work - for the same reason as above. I need to give this some more thought… I can’t be the first person to encounter this issue. See below for the output of trying to install ncdu:

      JohnGalt@MM-Dev-VM:~/.pm2/logs$ sudo apt install ncdu
      Reading package lists... Done
      Building dependency tree... Done
      Reading state information... Done
      The following NEW packages will be installed:
        ncdu
      0 upgraded, 1 newly installed, 0 to remove and 33 not upgraded.
      Need to get 50.7 kB of archives.
      After this operation, 117 kB of additional disk space will be used.
      E: You don't have enough free space in /var/cache/apt/archives/.
      JohnGalt@MM-Dev-VM:~/.pm2/logs$
      
      posted in Troubleshooting
      J
      JohnGalt
    • RE: VM Disk Full - 50 GiB in 4 months

      @sdetweil – Thanks Sam. See below for the output of the file sizes there.

      JohnGalt@MM-Dev-VM:~/.pm2/logs$ ls -laF
      total 32988
      drwxrwxr-x 2 al al     4096 Apr 12 11:24 ./
      drwxrwxr-x 5 al al     4096 Aug 19 12:09 ../
      -rw-rw-r-- 1 al al 27348992 Aug 17 23:33 MagicMirror-error.log
      -rw-rw-r-- 1 al al  6413424 Aug 17 23:27 MagicMirror-out.log
      
      posted in Troubleshooting
      J
      JohnGalt
    • VM Disk Full - 50 GiB in 4 months

      Query: What would cause a MagicMirror installed on a VM to fill up the 50 GiB VM virtual disk over 4 months?

      I have an instance of MagicMirror installed in a Linux VM running under TrueNAS, which is mostly used to try out modules, configurations or layouts without disturbing the main MagicMirror. When I went to look at it yesterday I found the VM running, but not MM. PM2 status did not show it running, and it would [re]start. MagicMirror is the only thing installed on the VM, and running modules were newsfeed and default weather [5 instances],

      Some searching tells me the virtual disk of 50 GiB is full! I have expanded the virtual disk size [resized the zvol], but am unable to extend the partition and filesystem as I get an error. I think it was along the lines of “you don’t have enough free space in /var/cache/apt/archives”.

      At this point it appeared the best route would be to just build a new VM and install MM, but when I went to start making notes to record what I was doing - I found this same thing happened some months ago. The current VM is an upsized VM that similarly locked up.

      Since starting over will not apparently solve the underlying root cause, I need some help. Thanks in advance.

      posted in Troubleshooting
      J
      JohnGalt