How paxapos/fiscalberry works
Fiscalberry is a networked print server: a client submits JSON commands, Fiscalberry translates them for the configured printer, and returns the printer response. Runtime entry points start the service and Socket.IO connection; device discovery and adoption/configuration support setup, while RabbitMQ provides a separate messaging and remote-error capability. Edges reflect the README and shown source references/calls; several implementation details, especially printer detection and UI behavior, were not sampled, so uncertain links are omitted.
Main entry points: ComandosHandler.py Command handler · service_controller.py Service controller · fiscalberry_sio.py Socket.IO server link · fiscalberry_app.py Kivy application
Components 21
Service runtime
- Service controller
src/fiscalberry/common/service_controller.py - Socket.IO server link
src/fiscalberry/common/fiscalberry_sio.py - Configuration
src/fiscalberry/common/Configberry.py
Print pipeline
- Command handler
src/fiscalberry/common/ComandosHandler.py - Fiscal drivers
src/fiscalberry/common/FiscalberryComandos.py - ESC/P commands
src/fiscalberry/common/EscPComandos.py
Device operations
- Device discovery
src/fiscalberry/common/discover.py - Printer detection
src/fiscalberry/common/printer_detector.py - Bluetooth printing
src/fiscalberry/common/bluetooth_printer.py - Printer error detection
src/fiscalberry/common/printer_error_detector.py - RabbitMQ process
src/fiscalberry/common/rabbitmq/process_handler.py - RabbitMQ consumer
src/fiscalberry/common/rabbitmq/consumer.py - Remote error publisher
src/fiscalberry/common/rabbitmq/error_publisher.py
Setup and management
- Kivy application
src/fiscalberry/ui/fiscalberry_app.py - Adoption screen
src/fiscalberry/ui/adopt_screen.py - Login screen
src/fiscalberry/ui/login_screen.py - JWT token manager
src/fiscalberry/common/token_manager.py
Other components
- JSON client
- Connected printer
- Printer response
- Fiscalberry backend
Connections 23
- JSON client → Socket.IO server link: sends JSON
- Socket.IO server link → Command handler: dispatches commands
src/fiscalberry/common/fiscalberry_sio.py - Command handler → Fiscal drivers: uses fiscal driver
src/fiscalberry/common/ComandosHandler.py - Command handler → ESC/P commands: uses ESC/P driver
src/fiscalberry/common/ComandosHandler.py - Fiscal drivers → Connected printer: prints commands
- ESC/P commands → Connected printer: prints commands
- Connected printer → Printer response: returns result
- Printer response → JSON client: replies via socket
- Service controller → Socket.IO server link: starts connection
src/fiscalberry/common/service_controller.py - Service controller → Device discovery: starts discovery
src/fiscalberry/common/service_controller.py - Device discovery → Printer detection: lists printers
src/fiscalberry/common/discover.py - Socket.IO server link → RabbitMQ process: starts consumer
src/fiscalberry/common/fiscalberry_sio.py - RabbitMQ process → RabbitMQ consumer: starts consumer
src/fiscalberry/common/rabbitmq/process_handler.py - Command handler → Printer error detection: analyzes responses
src/fiscalberry/common/ComandosHandler.py - Printer error detection → Remote error publisher: publishes errors
src/fiscalberry/common/printer_error_detector.py - Command handler → Remote error publisher: reports errors
src/fiscalberry/common/ComandosHandler.py - Kivy application → Service controller: starts services
src/fiscalberry/ui/fiscalberry_app.py - Kivy application → Adoption screen: uses screen
src/fiscalberry/ui/fiscalberry_app.py - Kivy application → Login screen: uses screen
src/fiscalberry/ui/fiscalberry_app.py - Login screen → JWT token manager: authenticates
src/fiscalberry/ui/login_screen.py - JWT token manager → Fiscalberry backend: requests login
src/fiscalberry/common/token_manager.py - Configuration → Device discovery: supplies settings
src/fiscalberry/common/discover.py - Configuration → Service controller: supplies settings
src/fiscalberry/common/service_controller.py