Giter Club home page Giter Club logo

poketools's Introduction

@fdekeers' personal README

👋 Hello there, my name is François De Keersmaeker. I am currently a PhD student @ UCLouvain, Belgium. My research topic is, broadly, Smart Home network security. To find my research-related (public) repos, please visit my organization's page. I also have some personal projects on my personal profile.

Links

Some stats

GitHub Stats

GitHub Stats

GitHub Stats

poketools's People

Contributors

augustindelecluse avatar cdmckinley avatar fdekeers avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

cdmckinley

poketools's Issues

Arch Linux installation support/instructions

I recently got a new PC that shipped with Arch Linux and KDE desktop, and it's presently more convenient for me to use than my Debian-based Raspberry Pi.

I tried finding equivalent dependencies to install through pacman, but even being fairly new to Debian, I'm much more so to Arch.

If anyone has Arch/pacman experience, what dependencies would I need to install to make this work? I'm willing to try some tweaking of the scripts to make the program work, and having a better idea of what dependencies to use would be very helpful in that regard.

Thanks for reading, and I appreciate any amount of help provided!

Can't make it work (2 issues)

Hi!

I've been trying to get this to work for a couple hours already but I still wasn't able to get it to work.
The first issue that I am facing is that when I connect open the website from my capture card to see the video output in the browser (to see if it's actually working) while running the app, I get the following error:

Expression 'ret' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1736
Expression 'AlsaOpen( &alsaApi->baseHostApiRep, params, streamDir, &self->pcm )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1904
Expression 'PaAlsaStreamComponent_Initialize( &self->capture, alsaApi, inParams, StreamDirection_In, NULL != callback )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2171
Expression 'PaAlsaStream_Initialize( stream, alsaHostApi, inputParameters, outputParameters, sampleRate, framesPerBuffer, callback, streamFlags, userData )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2839
Traceback (most recent call last):
  File "/home/pi/Downloads/poketools/shiny_reset.py", line 101, in <module>
    is_shiny = record_and_check_shiny(FREQ, SHINY_AUDIO_FILE, REC_DURATION)
  File "/home/pi/Downloads/poketools/shiny_reset.py", line 40, in record_and_check_shiny
    game_recording = atf.record_game_sound(freq, recording_duration)
  File "/home/pi/Downloads/poketools/audio_template_finder.py", line 13, in record_game_sound
    recording = sd.rec(int(duration*freq), samplerate=freq, channels=1)
  File "/usr/local/lib/python3.9/dist-packages/sounddevice.py", line 274, in rec
    ctx.start_stream(InputStream, samplerate, ctx.input_channels,
  File "/usr/local/lib/python3.9/dist-packages/sounddevice.py", line 2576, in start_stream
    self.stream = StreamClass(samplerate=samplerate,
  File "/usr/local/lib/python3.9/dist-packages/sounddevice.py", line 1415, in __init__
    _StreamBase.__init__(self, kind='input', wrap_callback='array',
  File "/usr/local/lib/python3.9/dist-packages/sounddevice.py", line 892, in __init__
    _check(_lib.Pa_OpenStream(self._ptr, iparameters, oparameters,
  File "/usr/local/lib/python3.9/dist-packages/sounddevice.py", line 2741, in _check
    raise PortAudioError(errormsg, err)
sounddevice.PortAudioError: Error opening InputStream: Device unavailable [PaErrorCode -9985]

the above error appears after a few seconds, after I see the following (which is the other issue):
my switch has a thing where it checks if the software can be played before it opens the game, when I see the video output from my capture card, I see it being stuck in a low where it tries to open the game, and keeps spamming A, so it closes the popup to check if the game is playable, tries to start the game, closes popup, over and over.

Any fix for either of these?
Thanks in advance! :)

Shaymin script pauses while trying to reset

I tried using the Shaymin configuration, and when I'd expect it to choose 'Run' on the battle menu, the script doesn't do anything. The script doesn't stop, it just hangs. I'm wondering if @fdekeers or @augustindelecluse might know why this happens?

In better news, the reason I switched to Shaymin from Arceus is because the script managed to find me shiny Arceus, which I then caught! This is great because it confirms that the shiny-checking and corresponding script work well for that scenario.

If there's anything specific I can do to be of assistance with Shaymin, or other legendaries (excluding Dialga, Palkia, Uxie, and most found in Ramanas Park for the time being), let me know 😁

Audio recording timing, and Game Reset doesn't always work.

Hello,

I've cloned the repository locally, and have it mostly working for Arceus resets. The main issue I'm having is that the RESET_GAME macro doesn't always bring up the home menu. Is there a reliable fix for this?

Something else I had to do was adjust was the timing of the recording, and I don't know how to be sure that it will accurately notice a shiny. How does the audio recognition work? If the shiny sound effect plays during the recording, does the exact timing matter?

I'd also be happy to share my changes for Arceus, though I'd need to do some adjustment to let the program work with Arceus in addition to (as opposed to 'instead of') other scenarios. Let me know.

Threads and Formatting

Hi,

I've been running a branch of the refactored code merged with both my audio-input-device and arceus branches, and I'm noticing two errors in the command line. I believe they're related to the refactor, rather than my own changes, but I'm not entirely certain.

This is an example of both errors on the first run through:

Initiating a battle.
Exception in thread Thread-1:
Recording game sound...
Traceback (most recent call last):
  File "/usr/lib/python3.9/threading.py", line 954, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.9/threading.py", line 892, in run
    self._target(*self._args, **self._kwargs)
TypeError: utils.controller.Controller.busy_wait() argument after * must be an iterable, not int
Checking presence of shiny...
No shiny found. Reset n°1.

I believe the 'thread' error has to do with the threads being created and never closed (if that's the proper terminology). As for the other error, I've set the script to take REC_DURATION from each configuration in my arceus branch, which may or may not be related. It seems to be related to the busy_wait function, on the line 53, where self.macro(general.BUSY_WAIT.format(int(seconds * 5))) is called. I'm not sure what the exact problem or fix is though.

If you don't run into this error running your own code, let me know, and I'll see what I can do to to fix my code.

Thank you!

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.