Giter VIP home page Giter VIP logo

Comments (2)

Exitras avatar Exitras commented on June 20, 2024 1

Hi again,
here is the line of code that works within a plugin:

pygame.event.post(pygame.event.Event(pygame.USEREVENT + 1, capture = 1, printer = 0, button= app.buttons.capture))

Gope it helps!

from pibooth.

srvoets avatar srvoets commented on June 20, 2024

Hi, I created a plugin to connect pibooth via API to other systems and it works like a charm! I would now also love to trigger taking a picture directly from the plugin based on certain conditions such as time (for example take a picture every 30 minutes to prevent the flash from going into standby).

It should be a single picture (not 4 pictures) and the process after taking the picture should be the default process (the system should ask for prints after the picture has been taken).

I'm rather new to Python and my current attempt did not work (I know this code would not run at all, its mainly about the last two lines).

import pygame import pibooth

def state_wait_do(app): if timer.is_timeout(): #or any other condition capture_event = pygame.event.Event(pygame.KEYDOWN, key=pygame.K_p) # Assuming 'p' is the capture key pygame.event.post(capture_event)

It always says something like: "An error occured: event object has no attribute capture"

Did any of you manage to take a picture directly from a plugin? If yes, would you please share the code or correct mine?

Cheers, Exitras

Have you posted this plugin anywhere? I would like to make a button that when pressed can snap a photo from a security camera in Frigate/Home assistant, and then process it in pibooth and upload to google album.

Can I accomplish this with your plugin?

from pibooth.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.