GithubHelp home page GithubHelp logo

certabo-lichess's People

Contributors

ahayden avatar haklein avatar ornicar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

certabo-lichess's Issues

can't promote pawn into Queen.

I found a problem here. It says DEBUG certabo trying to find user move in usb data and I can't turn the pawn into Queen.

2020-03-18 00:44:07,585 DEBUG certabo trying to find user move in usb data
2020-03-18 00:44:07,588 DEBUG codes Single move detected - g2g4
2020-03-18 00:44:07,588 DEBUG certabo firing event
2020-03-18 00:44:07,589 DEBUG certabo event signal received, pending moves: ['g2g4']
2020-03-18 00:44:07,589 INFO certabo-lichess our move: ['g2g4']
2020-03-18 00:44:07,589 DEBUG session request POST https://lichess.org/api/board/game/TyNLVcdt/move/g2g4 params=None data=None json=None
2020-03-18 00:44:07,592 DEBUG connectionpool Resetting dropped connection: lichess.org
2020-03-18 00:44:08,344 DEBUG connectionpool https://lichess.org:443 "POST /api/board/game/TyNLVcdt/move/g2g4 HTTP/1.1" 200 11
{'type': 'gameState', 'moves': 'd2d4 e7e6 b1c3 f8b4 c1d2 b8c6 e2e3 g8e7 g1f3 d7d5 f1b5 c8d7 e1g1 a7a6 b5a4 e8g8 f1e1 e7g6 e3e4 g6e7 e4d5 e6d5 a2a3 b4c3 d2c3 e7g6 a4b3 d7f5 f3e5 f5e6 e5g6 e6g4 f2f3 f7g6 f3g4 f8f4 h2h3 d8h4 b3d5 g8f8 d5c6 h4f2 g1h2 a8b8 c3b4 f8f7 e1e7 f7g8 c6d5 g8h8 d1e1 f2e1 a1e1 h7h6 e7e8 b8e8 e1e8 h8h7 d5b7 f4d4 e8e7 h6h5 g4h5 d4c4 h5g6 h7h6 b4d2 h6g6 b7a6 g6f6 e7e2 c4c6 d2c3 f6g5 a6c8 c6g6 a3a4 g5h4 a4a5 h4g5 a5a6 g5h4 a6a7 g6g2 e2g2 g7g5 g2g4', 'wtime': datetime.datetime(1970, 1, 25, 20, 31, 23, 647000, tzinfo=datetime.timezone.utc), 'btime': datetime.datetime(1970, 1, 25, 20, 31, 23, 647000, tzinfo=datetime.timezone.utc), 'winc': datetime.datetime(1970, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), 'binc': datetime.datetime(1970, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), 'wdraw': False, 'bdraw': False, 'status': 'started'}
{'type': 'gameState', 'moves': 'd2d4 e7e6 b1c3 f8b4 c1d2 b8c6 e2e3 g8e7 g1f3 d7d5 f1b5 c8d7 e1g1 a7a6 b5a4 e8g8 f1e1 e7g6 e3e4 g6e7 e4d5 e6d5 a2a3 b4c3 d2c3 e7g6 a4b3 d7f5 f3e5 f5e6 e5g6 e6g4 f2f3 f7g6 f3g4 f8f4 h2h3 d8h4 b3d5 g8f8 d5c6 h4f2 g1h2 a8b8 c3b4 f8f7 e1e7 f7g8 c6d5 g8h8 d1e1 f2e1 a1e1 h7h6 e7e8 b8e8 e1e8 h8h7 d5b7 f4d4 e8e7 h6h5 g4h5 d4c4 h5g6 h7h6 b4d2 h6g6 b7a6 g6f6 e7e2 c4c6 d2c3 f6g5 a6c8 c6g6 a3a4 g5h4 a4a5 h4g5 a5a6 g5h4 a6a7 g6g2 e2g2 g7g5 g2g4 h4h5', 'wtime': datetime.datetime(1970, 1, 25, 20, 31, 23, 647000, tzinfo=datetime.timezone.utc), 'btime': datetime.datetime(1970, 1, 25, 20, 31, 23, 647000, tzinfo=datetime.timezone.utc), 'winc': datetime.datetime(1970, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), 'binc': datetime.datetime(1970, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), 'wdraw': False, 'bdraw': False, 'status': 'started'}
2020-03-18 00:44:10,231 INFO certabo-lichess it is our turn
2020-03-18 00:44:10,231 DEBUG certabo waiting for event signal
2020-03-18 00:44:19,404 DEBUG certabo trying to find user move in usb data
2020-03-18 00:44:19,409 DEBUG codes Unable to detect moves

Originally posted by @LETRA in #5 (comment)

Lichess. How close the connection?

Hi.
This is a question, not about certabo-lichess. Maybe you can help me. Im using berserk to manage the lichess api.
I want to cancel a seek i create. How i can do that? In the lichess api reference says this:

Keep the connection open to keep the seek active.

If the client closes the connection, the seek is canceled. This way, if the client terminates, the user won't be paired in a game they wouldn't play. When the seek is accepted, or expires, the server closes the connection.

But, how close the connection? Dont find anything, probably is too obvius and im ignorant. im using berserk.

Thanks!

Modul fcntl in Windows 10

Hi @haklein I'm trying to run certabo-lichess on a Windows 10 installation and I get the following error. Apparently the installation of the "fcntl" module is missing, but I think this module is not installable on windows.

I hope you are ok. Greetings from Spain.

C:\Program Files (x86)\certabo-lichess-master>pip3 install --user -r requirements.txt
Requirement already satisfied: pyserial>=3.4 in c:\users\letra\appdata\roaming\python\python38\site-packages (from -r requirements.txt (line 1)) (3.4)
Requirement already satisfied: requests~=2.20 in c:\users\letra\appdata\roaming\python\python38\site-packages (from -r requirements.txt (line 2)) (2.23.0)
Requirement already satisfied: ndjson~=0.2 in c:\users\letra\appdata\roaming\python\python38\site-packages (from -r requirements.txt (line 3)) (0.3.1)
Requirement already satisfied: deprecated~=1.2.7 in c:\users\letra\appdata\roaming\python\python38\site-packages (from -r requirements.txt (line 4)) (1.2.9)
Requirement already satisfied: python-chess==0.24.1 in c:\users\letra\appdata\roaming\python\python38\site-packages (from -r requirements.txt (line 5)) (0.24.1)
Requirement already satisfied: berserk>=0.8.0 in c:\users\letra\appdata\roaming\python\python38\site-packages (from -r requirements.txt (line 6)) (0.9.0)
Requirement already satisfied: appdirs in c:\users\letra\appdata\roaming\python\python38\site-packages (from -r requirements.txt (line 7)) (1.4.3)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\letra\appdata\roaming\python\python38\site-packages (from requests~=2.20->-r requirements.txt (line 2)) (2020.4.5.1)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in c:\users\letra\appdata\roaming\python\python38\site-packages (from requests~=2.20->-r requirements.txt (line 2)) (1.25.9)
Requirement already satisfied: chardet<4,>=3.0.2 in c:\users\letra\appdata\roaming\python\python38\site-packages (from requests~=2.20->-r requirements.txt (line 2)) (3.0.4)
Requirement already satisfied: idna<3,>=2.5 in c:\users\letra\appdata\roaming\python\python38\site-packages (from requests~=2.20->-r requirements.txt (line 2)) (2.9)
Requirement already satisfied: wrapt<2,>=1.10 in c:\users\letra\appdata\roaming\python\python38\site-packages (from deprecated~=1.2.7->-r requirements.txt (line 4)) (1.12.1)

C:\Program Files (x86)\certabo-lichess-master>certabo-lichess.py
Traceback (most recent call last):
  File "C:\Program Files (x86)\certabo-lichess-master\certabo-lichess.py", line 22, in <module>
    from certabo.certabo import CERTABO_DATA_PATH as CERTABO_DATA_PATH
  File "C:\Program Files (x86)\certabo-lichess-master\certabo\certabo.py", line 25, in <module>
    from certabo import serialreader
  File "C:\Program Files (x86)\certabo-lichess-master\certabo\serialreader.py", line 15, in <module>
    import fcntl
ModuleNotFoundError: No module named 'fcntl'

Installation in Linux

Hello @haklein. I hope you're okay. I am testing the application on Linux (Elementary OS last version) and I have a couple of problems. The first one is that it only recognizes the usb port if I launch the app with sudo. And when it runs it seems to be all right, but my movements are not transmitted to the game. My opponent's moves are, but mine are not. I've tried three times to create a new token with the option you indicate and I've also deleted from Lichess the setting required by the official Certabo app, but I can't get it to work as it did on Mac. The driver is loaded, the calibration is done, the board recognizes my moves, but Lichess doesn't see. Thank you in advance.

data path not created when it doesn't exist

Traceback (most recent call last):
File "./certabo-lichess.py", line 49, in
os.path.join(CERTABO_DATA_PATH, "certabo-lichess.log"), backupCount=12
File "/usr/lib/python3.7/logging/handlers.py", line 199, in init
BaseRotatingHandler.init(self, filename, 'a', encoding, delay)
File "/usr/lib/python3.7/logging/handlers.py", line 54, in init
logging.FileHandler.init(self, filename, mode, encoding, delay)
File "/usr/lib/python3.7/logging/init.py", line 1092, in init
StreamHandler.init(self, self._open())
File "/usr/lib/python3.7/logging/init.py", line 1121, in _open
return open(self.baseFilename, self.mode, encoding=self.encoding)
FileNotFoundError: [Errno 2] No such file or directory: '/home/pi/.local/share/GUI/certabo-lichess.log'

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.