Skip to content
This repository was archived by the owner on Aug 27, 2022. It is now read-only.

More Hardwarebuttons for Photobooth #164

Closed
Hubert-73 opened this issue Dec 31, 2020 · 9 comments · Fixed by PhotoboothProject/photobooth#185
Closed

More Hardwarebuttons for Photobooth #164

Hubert-73 opened this issue Dec 31, 2020 · 9 comments · Fixed by PhotoboothProject/photobooth#185
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@Hubert-73
Copy link

I would like to make the following suggestion:

Please integrate the option to select multiple buttons. For example: single photo, collage, print, etc.

@Hubert-73 Hubert-73 added the enhancement New feature or request label Dec 31, 2020
@lasolco
Copy link

lasolco commented Jan 3, 2021

I have a same idea. I will create a script...

@jacques42
Copy link
Collaborator

@lasolco would you mind to check how to make this enhancement in the src/js/remote_buzzer.js script ? @Hubert-73 currently is using this script and it should be fairly straight forward to add monitoring for two more RPIO pins. The collage trigger via a separate PIN should be simple to add in, along with a logic to disable long-press for collage if a second button is connected. Notificaion via io messaging is already implemented.

A third PIN monitoring for Print should also be feasible, yet this will require to enhance core.js as to trigger print currently is not support via the io client / server flow.

I am currently working a pretty comprehensive re-write of the admin panel, configuration files and translations of panel content and manual, hence lack time to work on this one already now. But once that admin panel work is done I am more than happy to engage, I do like the feature idea a lot.

@jacques42
Copy link
Collaborator

Bump. More people are asking for additional HW buttons, I.e to allow a clean Raspi shutdown.

@lasolco
Copy link

lasolco commented Jan 23, 2021

Hi,
I suggest the following style. I'm sorry, I didn't integrated it in your code. I just created a new Python File, which is always started in runtime. In my opinion, it is much more easy and flexible. So you can also create shortcuts or buttons for shutdown and everything else.

Please use the attached script.... writing it down here doesn't work

**`# -- coding: utf-8 --

from RPi import GPIO
from datetime import datetime
import os, time, uinput
 
GPIO.setwarnings(False) # Ignore warning for now
GPIO.setmode(GPIO.BCM) 
 
GPIOPinF = 16
GPIOPinD = 12
 
GPIO.setup(GPIOPinD, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)
GPIO.setup(GPIOPinF, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)
 
try:
    while True:
        time.sleep(0.05)
        input_stateF = GPIO.input(GPIOPinF)
        if input_stateF == True:
            with uinput.Device([uinput.KEY_PAGEUP]) as device:
             time.sleep(0.5)
             device.emit_combo([uinput.KEY_PAGEUP])
             time.sleep(2)
        input_stateD = GPIO.input(GPIOPinD)
        if input_stateD == True:
            with uinput.Device([uinput.KEY_PAGEDOWN]) as device:
             time.sleep(0.5)
             device.emit_combo([uinput.KEY_PAGEDOWN])
             time.sleep(2)
except:
    GPIO.cleanup()

**

#pyhton script to run on every startup

crontab -e

paste entry at the end

@reboot python /home/pi/mypfad.py &

Beste Grüße

@lasolco
Copy link

lasolco commented Jan 23, 2021

Danke für das Editieren. Ich war gerade selbst dabei :D

@jacques42
Copy link
Collaborator

This feature will start become available in PB3 as part of Remote Buzzer.

@andi34 andi34 added this to the 3.0.0 milestone Feb 28, 2021
@jacques42 jacques42 removed the low label Mar 7, 2021
@jacques42
Copy link
Collaborator

v3 now implements separate buttons for picture, collage and shutdown. Also v3 implements a rotary encoder control - this one is extremly nice, one can operate PB with literally one knob / button.

Next buttons will be "print" and "QR code".

@jacques42
Copy link
Collaborator

jacques42 commented Mar 8, 2021

Hardware button support for PRINT added - PR #202

@jacques42
Copy link
Collaborator

PR #221 adds Rotary support for Delete button. Please read the notes for required admin panel settings

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
4 participants