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

    Posts

    Recent Best Controversial
    • RE: MMM-PIR-Sensor-Lite modification

      Yes, but this used to work previously. I suspect that none of the commands are working (even if no error message is returned). I attempted other commands, and they also do not seem to work. For example, I tried to change HDMI inputs, and the monitor remains at the same input. I think I need to determine if I can get ANY HDMI CEC command to work at all. It seems to be a missing step somewhere…

      posted in Troubleshooting
      F
      Freddy_boy
    • RE: MMM-PIR-Sensor-Lite modification

      I have also tried:
      sudo echo ‘standby 0.0.0.0’ | sudo cec-client -s -d 1

      but got the same result…

      posted in Troubleshooting
      F
      Freddy_boy
    • RE: MMM-PIR-Sensor-Lite modification

      Update: I’m not sure how it happened, but I believe that my monitor had the controls disabled. It is an LG monitor using Simplink, and when I enable it, I can now see the device:

      pi@raspberrypi:~ $ echo ‘scan’ | cec-client -s -d 1
      opening a connection to the CEC adapter…
      requesting CEC bus information …
      CEC bus information

      ===================
      device #0: TV
      address: 0.0.0.0
      active source: yes
      vendor: LG
      osd string: TV
      CEC version: 1.3a
      power status: on
      language: eng

      device #1: Recorder 1
      address: 1.0.0.0
      active source: no
      vendor: LG
      osd string: CECTester
      CEC version: 1.3a
      power status: on
      language: eng

      currently active source: TV (0)

      However, when I attempt to turn OFF the monitor using the CEC control commands, it doesn’t seem to work. The commands appear to be working (ie. no error messages returned), but the monitor remains ON when I issue the standby command. I also use the ‘power’ command to check the status of the monitor, and it confirms that it is ON.

      pi@raspberrypi:~ $ echo ‘pow 0.0.0.0’ | cec-client -s -d 1
      opening a connection to the CEC adapter…
      power status: on
      pi@raspberrypi:~ $ echo ‘standby 0.0.0.0’ | cec-client -s -d 1
      opening a connection to the CEC adapter…
      pi@raspberrypi:~ $ echo ‘pow 0.0.0.0’ | cec-client -s -d 1
      opening a connection to the CEC adapter…
      power status: on
      pi@raspberrypi:~ $

      posted in Troubleshooting
      F
      Freddy_boy
    • RE: MMM-PIR-Sensor-Lite modification

      From SSH connection:

      pi@raspberrypi:~ $ echo ‘scan’ | cec-client -s -d 1
      opening a connection to the CEC adapter…
      requesting CEC bus information …
      CEC bus information

      ===================
      device #1: Recorder 1
      address: 1.0.0.0
      active source: no
      vendor: Pulse Eight
      osd string: CECTester
      CEC version: 1.4
      power status: on
      language: eng

      currently active source: unknown (-1)
      pi@raspberrypi:~ $

      posted in Troubleshooting
      F
      Freddy_boy
    • RE: MMM-PIR-Sensor-Lite modification

      I attempted to run the CEC commands manually, but that doesn’t work. I just keep getting active source unknown error message. Unfortunately, I don’t have the original EXT-Screen module because I attempted to perform an update on the module, so I only have the updated module. Perhaps the updated module has updated code? But I don’t know where to look for the required commands. I’ve looked at the EXT-Screen.js file and the node_helper.js file and I don’t see anything that looks like a CEC command. Also, the files are difficult to view, as the entire code is written on a single line, so you need to search for text strings to find anything.

      posted in Troubleshooting
      F
      Freddy_boy
    • RE: MMM-PIR-Sensor-Lite modification

      Ok. I think I understand the strategy here. I will just need to figure out the proper HDMI CEC code that I need. Thanks. I’ll let you know how things progress…

      posted in Troubleshooting
      F
      Freddy_boy
    • MMM-PIR-Sensor-Lite modification

      Re: PIR problem

      I have also been experiencing similar problems with my PIR sensor since upgrading to Bullseye. After trying numerous modules, I inquired about suggestions for updated modules that have been known to work with Bullseye and posted a request in the forum (https://forum.magicmirror.builders/topic/17810/pir-sensor-for-raspbian-11). It seems that many have chosen to go with the MMM-PIR-Sensor-Lite module, so I will pose my question here.

      My PIR sensor appears to function properly and after the standby timeout, the HDMI output will turn off (I am using the ‘xrandr’ command type). However, this results in my monitor detecting a missing signal and it will put up a “No Signal” indication on the screen. Further, after a certain time, it will turn the monitor OFF, which requires that I need to push buttons in order to turn it back on again. My understanding is that I need to use HDMI CEC commands in order to instruct the monitor to turn off, which will prevent the “No Signal” indication from appearing. This was a completely working feature in my Magic Mirror prior to upgrading to Bullseye.

      I used the EXT-Pir and EXT-Screen modules (https://wiki.bugsounet.fr/) in the past and they were able to accomplish the task. However, I don’t have enough skill to examine the code to determine how the commands are being sent to turn off my monitor. The EXT-Screen module simply required that I choose a mode (mode:4 - use HDMI CEC) in the configuration and it successfully controlled the monitor. What I would need is to have these commands implemented in a PIR sensor module, or I would need some guidance on how to implement these codes in the MMM-PIR-Sensor-Lite module.

      Any insight you might have would be appreciated…

      posted in Troubleshooting
      F
      Freddy_boy
    • RE: PIR Sensor for Raspbian 11

      Yes, I saw that suggestion to disable the GPU driver, and I have implemented it in my shell script (/home/pi/mm.sh). I was just wondering if it was ok, or am I just masking a real problem…

      I also have installed the HDMI CEC client previously. However, when I attempt to run the command to identify the device, I don’t get any results.

      pi@raspberrypi:~/MagicMirror $ echo ‘scan’ | cec-client -s -d 1
      opening a connection to the CEC adapter…
      ERROR: [ 656] CLinuxCECAdapterCommunication::Write - ioctl CEC_TRANSMIT failed - tx_status=00 errno=64
      ERROR: [ 656] CLinuxCECAdapterCommunication::Write - ioctl CEC_TRANSMIT failed - tx_status=00 errno=64
      ERROR: [ 942] CLinuxCECAdapterCommunication::Write - ioctl CEC_TRANSMIT failed - tx_status=00 errno=64
      ERROR: [ 942] CLinuxCECAdapterCommunication::Write - ioctl CEC_TRANSMIT failed - tx_status=00 errno=64
      requesting CEC bus information …
      ERROR: [ 1800] CLinuxCECAdapterCommunication::Write - ioctl CEC_TRANSMIT failed - tx_status=00 errno=64
      ERROR: [ 1800] CLinuxCECAdapterCommunication::Write - ioctl CEC_TRANSMIT failed - tx_status=00 errno=64
      ERROR: [ 1800] CLinuxCECAdapterCommunication::Write - ioctl CEC_TRANSMIT failed - tx_status=00 errno=64
      ERROR: [ 1800] CLinuxCECAdapterCommunication::Write - ioctl CEC_TRANSMIT failed - tx_status=00 errno=64
      ERROR: [ 1801] CLinuxCECAdapterCommunication::Write - ioctl CEC_TRANSMIT failed - tx_status=00 errno=64
      ERROR: [ 1801] CLinuxCECAdapterCommunication::Write - ioctl CEC_TRANSMIT failed - tx_status=00 errno=64
      ERROR: [ 1801] CLinuxCECAdapterCommunication::Write - ioctl CEC_TRANSMIT failed - tx_status=00 errno=64
      ERROR: [ 1801] CLinuxCECAdapterCommunication::Write - ioctl CEC_TRANSMIT failed - tx_status=00 errno=64
      ERROR: [ 1801] CLinuxCECAdapterCommunication::Write - ioctl CEC_TRANSMIT failed - tx_status=00 errno=64
      ERROR: [ 1801] CLinuxCECAdapterCommunication::Write - ioctl CEC_TRANSMIT failed - tx_status=00 errno=64
      ERROR: [ 1801] CLinuxCECAdapterCommunication::Write - ioctl CEC_TRANSMIT failed - tx_status=00 errno=64
      ERROR: [ 1801] CLinuxCECAdapterCommunication::Write - ioctl CEC_TRANSMIT failed - tx_status=00 errno=64
      CEC bus information

      ===================
      device #1: Recorder 1
      address: 1.0.0.0
      active source: no
      vendor: Pulse Eight
      osd string: CECTester
      CEC version: 1.4
      power status: on
      language: eng

      currently active source: unknown (-1)
      ERROR: [ 1801] CLinuxCECAdapterCommunication::Write - ioctl CEC_TRANSMIT failed - tx_status=00 errno=64
      ERROR: [ 1801] CLinuxCECAdapterCommunication::Write - ioctl CEC_TRANSMIT failed - tx_status=00 errno=64
      ERROR: [ 1801] CLinuxCECAdapterCommunication::Write - ioctl CEC_TRANSMIT failed - tx_status=00 errno=64
      ERROR: [ 1801] CLinuxCECAdapterCommunication::Write - ioctl CEC_TRANSMIT failed - tx_status=00 errno=64
      ERROR: [ 1801] CLinuxCECAdapterCommunication::Write - ioctl CEC_TRANSMIT failed - tx_status=00 errno=64
      ERROR: [ 1801] CLinuxCECAdapterCommunication::Write - ioctl CEC_TRANSMIT failed - tx_status=00 errno=64
      ERROR: [ 1801] CLinuxCECAdapterCommunication::Write - ioctl CEC_TRANSMIT failed - tx_status=00 errno=64
      ERROR: [ 1801] CLinuxCECAdapterCommunication::Write - ioctl CEC_TRANSMIT failed - tx_status=00 errno=64
      ERROR: [ 1801] CLinuxCECAdapterCommunication::Write - ioctl CEC_TRANSMIT failed - tx_status=00 errno=64
      ERROR: [ 1801] CLinuxCECAdapterCommunication::Write - ioctl CEC_TRANSMIT failed - tx_status=00 errno=64
      ERROR: [ 1801] CLinuxCECAdapterCommunication::Write - ioctl CEC_TRANSMIT failed - tx_status=00 errno=64
      ERROR: [ 1801] CLinuxCECAdapterCommunication::Write - ioctl CEC_TRANSMIT failed - tx_status=00 errno=64
      ERROR: [ 1801] CLinuxCECAdapterCommunication::Write - ioctl CEC_TRANSMIT failed - tx_status=00 errno=64
      ERROR: [ 1801] CLinuxCECAdapterCommunication::Write - ioctl CEC_TRANSMIT failed - tx_status=00 errno=64
      ERROR: [ 1802] CLinuxCECAdapterCommunication::Write - ioctl CEC_TRANSMIT failed - tx_status=00 errno=64
      ERROR: [ 1802] CLinuxCECAdapterCommunication::Write - ioctl CEC_TRANSMIT failed - tx_status=00 errno=64
      ERROR: [ 1802] CLinuxCECAdapterCommunication::Write - ioctl CEC_TRANSMIT failed - tx_status=00 errno=64
      ERROR: [ 1802] CLinuxCECAdapterCommunication::Write - ioctl CEC_TRANSMIT failed - tx_status=00 errno=64
      pi@raspberrypi:~/MagicMirror $

      posted in Requests
      F
      Freddy_boy
    • PIR Sensor for Raspbian 11

      I’ve been searching for a solution to my issue for a few days now, but I can’t seem to find one. I am trying to implement a PIR sensor with my Magic Mirror. I’ve had my Magic Mirror since 2021, and it’s been working fine… until now. I recently upgraded to Raspbian 11 Bullseye, and I have since determined that it no longer supports ‘tvservice’ or ‘vcgencmd’. I learned that it uses ‘xrandr’ now, which resulted in a problem with the previous module I was using (EXT-Pir and EXT-Screen from https://github.com/bugsounet?tab=repositories). In an attempt to upgrade my previous modules, I have discovered that it would require implementing a couple of additional modules which I didn’t really require. I would need to install MMM-GoogleAssistant and Gateway in order to continue using these modules. Basically, I have a very simple requirement so I would prefer to use less code to accomplish this.

      I found a couple of modules that used ‘xrandr’. I first installed the MMM-PIR-Sensor-Lite module (https://github.com/grenagit/MMM-PIR-Sensor-Lite), which appeared to work but, I soon discovered that it did not appear to support HDMI CEC mode. When it turned off the HDMI, I would get a “No Signal” message from my monitor. Further, if it remained in this state long enough, I would have to intervene with button pushing on the monitor in order to restore my screens. I could verify that the Magic Mirror was running by using VNC Viewer to see what was going on (ie. my monitor remained black, while VNC showed me that the Magic Mirror application was running).

      So, I attempted to look for another PIR module that supports HDMI CEC but I haven’t been able to find one. I also tried Tom Hirshberger’s MMM-GPIO-Notifications, and MMM-Screen-Powersave-Notification, but that yielded the same results.

      One observation that I’ve made is that I am seeing an error message on starting the Magic Mirror:
      MESA-LOADER: failed to retrieve device information

      But, from what I’ve read, this may be expected as it is a reference to loading some video files related to the older drivers (I assume tvservice or vcgencmd?). Here are my version numbers:

      Magic Mirror: 2.23.0
      node: 17.9.0
      OS: Raspbian 11 (bullseye arm)
      npm: 8.5.5
      Raspberry Pi 4B

      Here is a log from the start for my Magic Mirror:

      magicmirror@2.23.0 start
      DISPLAY=“${DISPLAY:=:0}” ./node_modules/.bin/electron js/electron.js

      [25.05.2023 13:13.46.897] [LOG] Starting MagicMirror: v2.23.0
      [25.05.2023 13:13.46.904] [LOG] Loading config …
      [25.05.2023 13:13.46.908] [DEBUG] config template file not exists, no envsubst
      [25.05.2023 13:13.46.914] [LOG] Loading module helpers …
      [25.05.2023 13:13.46.916] [LOG] No helper found for module: alert.
      [25.05.2023 13:13.46.934] [LOG] Initializing new module helper …
      [25.05.2023 13:13.46.935] [LOG] Module helper loaded: updatenotification
      [25.05.2023 13:13.46.936] [LOG] No helper found for module: clock.
      [25.05.2023 13:13.47.185] [LOG] Initializing new module helper …
      [25.05.2023 13:13.47.186] [LOG] Module helper loaded: calendar
      [25.05.2023 13:13.47.187] [LOG] No helper found for module: calendar_monthly.
      [25.05.2023 13:13.47.190] [LOG] Initializing new module helper …
      [25.05.2023 13:13.47.191] [LOG] Module helper loaded: MMM-PIR-Sensor-Lite
      [25.05.2023 13:13.47.206] [LOG] Initializing new module helper …
      [25.05.2023 13:13.47.207] [LOG] Module helper loaded: MMM-Weather
      [25.05.2023 13:13.47.297] [LOG] Initializing new module helper …
      [25.05.2023 13:13.47.297] [LOG] Module helper loaded: MMM-Tools
      [25.05.2023 13:13.47.318] [LOG] Initializing new module helper …
      [25.05.2023 13:13.47.318] [LOG] Module helper loaded: newsfeed
      [25.05.2023 13:13.47.319] [LOG] All module helpers loaded.
      [25.05.2023 13:13.47.337] [LOG] Starting server on port 8080 …
      [25.05.2023 13:13.47.598] [LOG] Server started …
      [25.05.2023 13:13.47.600] [LOG] Connecting socket for: updatenotification
      [25.05.2023 13:13.47.601] [LOG] Starting module helper: updatenotification
      [25.05.2023 13:13.47.601] [LOG] Connecting socket for: calendar
      [25.05.2023 13:13.47.602] [LOG] Starting node helper for: calendar
      [25.05.2023 13:13.47.603] [LOG] Connecting socket for: MMM-PIR-Sensor-Lite
      [25.05.2023 13:13.47.603] [LOG] Connecting socket for: MMM-Weather
      [25.05.2023 13:13.47.605] [LOG] Connecting socket for: MMM-Tools
      [25.05.2023 13:13.47.609] [LOG] [Tools] MMM-Tools Version: 2.1.7
      [25.05.2023 13:13.47.611] [LOG] Connecting socket for: newsfeed
      [25.05.2023 13:13.47.612] [LOG] Starting node helper for: newsfeed
      [25.05.2023 13:13.47.613] [LOG] Sockets connected & modules started …
      [25.05.2023 13:13.47.648] [LOG] Launching application.
      MESA-LOADER: failed to retrieve device information
      MESA-LOADER: failed to retrieve device information
      MESA-LOADER: failed to retrieve device information
      MESA-LOADER: failed to open kms_swrast: /usr/lib/dri/kms_swrast_dri.so: cannot open shared object file: Permission denied (search paths /usr/lib/arm-linux-gnueabihf/dri:$${ORIGIN}/dri:/usr/lib/dri)
      failed to load driver: kms_swrast
      MESA-LOADER: failed to open swrast: /usr/lib/dri/swrast_dri.so: cannot open shared object file: Permission denied (search paths /usr/lib/arm-linux-gnueabihf/dri:$${ORIGIN}/dri:/usr/lib/dri)
      failed to load swrast driver
      [25.05.2023 13:13.51.006] [LOG] Create new calendarfetcher for url: http://www.calendarlabs.com/ical-calendar/ics/39/Canada_Holidays.ics - Interval: 30000
      [25.05.2023 13:13.51.164] [LOG] Create new newsfetcher for url: https://rss.cbc.ca/lineup/canada.xml - Interval: 300000
      [25.05.2023 13:13.51.172] [LOG] Create new newsfetcher for url: https://rss.cbc.ca/lineup/canada-toronto.xml - Interval: 300000
      [25.05.2023 13:13.51.180] [LOG] Create new newsfetcher for url: https://rss.cbc.ca/lineup/sports-nhl.xml - Interval: 300000
      [25.05.2023 13:13.51.186] [LOG] [WEATHER] MMM-WEATHER Version: 1.0.6
      [25.05.2023 13:13.51.194] [INFO] Checking git for module: calendar_monthly
      [25.05.2023 13:13.51.256] [INFO] Checking git for module: MMM-PIR-Sensor-Lite
      [25.05.2023 13:13.51.298] [INFO] Checking git for module: MMM-Weather
      [25.05.2023 13:13.51.393] [INFO] Checking git for module: MMM-Tools
      [25.05.2023 13:13.51.475] [INFO] Checking git for module: MagicMirror
      [25.05.2023 13:13.52.967] [INFO] Calendar-Fetcher: Broadcasting 119 events.
      [25.05.2023 13:13.53.297] [INFO] Newsfeed-Fetcher: Broadcasting 20 items.
      [25.05.2023 13:13.53.549] [INFO] Calendar-Fetcher: Broadcasting 8 events.
      [25.05.2023 13:13.59.798] [INFO] Newsfeed-Fetcher: Broadcasting 20 items.
      [25.05.2023 13:13.59.904] [INFO] Newsfeed-Fetcher: Broadcasting 30 items.

      Most of the solutions that I’ve found were created years ago and they will not work with the latest version of the OS. And the newer ones don’t seem to provide a solution for HDMI CEC control.

      So my question is, “Is there a PIR sensor module that works with Raspbian 11 and supports HDMI CEC?”. Thanks in advance.

      posted in Requests
      F
      Freddy_boy
    • RE: New PIR sensor problem

      @mz-ber
      Yes, that did it! I didn’t install the EXT-Pir module. Fixed. Thanks very much!

      posted in Troubleshooting
      F
      Freddy_boy
    • 1
    • 2
    • 3
    • 4
    • 3 / 4