Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"auto" for PIR chip selection fails #158

Open
qistoph opened this issue Jan 6, 2025 · 1 comment
Open

"auto" for PIR chip selection fails #158

qistoph opened this issue Jan 6, 2025 · 1 comment
Labels
Available on next Release Coded on dev brach bug Something isn't working

Comments

@qistoph
Copy link

qistoph commented Jan 6, 2025

On the dev branch my MagicMirror is unable to auto detect the GPIO pin.

### SYSTEM:   manufacturer: Raspberry Pi Foundation; model: Raspberry Pi 3 Model B Plus Rev 1.3; virtual: false
### OS:       platform: linux; distro: Raspbian GNU/Linux; release: 11; arch: arm; kernel: 6.1.21-v7+
### VERSIONS: electron: 32.2.7; used node: 20.18.1; installed node: 20.18.1; npm: 10.8.2; pm2: 5.4.3
### OTHER:    timeZone: Europe/Amsterdam; ELECTRON_ENABLE_GPU: undefined

Relevant config:

    {
      module: "MMM-Pir",
      position: "top_left",
      repository: "https://github.com/bugsounet/MMM-Pir",
      config: {
        Display: {
          timeout: 120000,
        },
        Pir: {
          gpio: 22
        }
      }
    },

Error:

[ERROR] [MMM-Pir] [LIB] [PIR] [GPIOD] No Chip Found!

Specifying the chip ID 0 also returns this error. Only configuring chip: "pinctrl-bcm2835" fixes the issue and shows

[LOG] [MMM-Pir] [LIB] [PIR] [GPIOD] - Manual - Found chip 0: pinctrl-bcm2835

On the master branch my config worked fine and logged:

[LOG] [MMM-Pir] [LIB] [PIR] [GPIOD] Found chip 0: pinctrl-bcm2835

@bugsounet
Copy link
Owner

Hi, just fixed with this commit

0|MagicMirror  | [2025-01-06 23:52:59.736] [LOG]   [MMM-Pir] [LIB] [PIR] Mode 0 Selected (gpiod library) 
0|MagicMirror  | [2025-01-06 23:52:59.747] [LOG]   [MMM-Pir] [LIB] [PIR] [GPIOD] Check chip 0: pinctrl-rp1 
0|MagicMirror  | [2025-01-06 23:52:59.748] [LOG]   [MMM-Pir] [LIB] [PIR] [GPIOD] - Auto - Found chip 0: pinctrl-rp1

Thanks for this report

@bugsounet bugsounet added bug Something isn't working Available on next Release Coded on dev brach labels Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Available on next Release Coded on dev brach bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants