Services
The basic structure of the Dinkum code base.
Dinkum breaks Core into distinct systemd services:
audio
Audio playback using SDL2 mixer
Music streaming using VLC
Text to speech using Mimic 3
enclosure
Wi-Fi and pairing
gui
QML-based interface
intent
Intent registration and matching
Session management
hal
LED animations
Buttons and switches
Volume
messagebus
Websocket-based message broadcast
skills
Each skill is loaded and run individually by the skills service.
Skills have a
skill_id, which is always the name of their code directory (e.g.,alarm.mark2forskills/alarm.mark2).
voice
Microphone input, silence detection, speech to text
systemd units
Each Dinkum service is run as a systemd unit. The sdnotify Python package is used to inform systemd when the service has successfully started, and maintain a watchdog.
The scripts/generate-systemd-units.py script will write .service and .target files to /etc/systemd/system (sudo required). For example:
will start most of the default services and skills. The --service arguments have a priority number that controls the order the services will start. Higher numbers start later, and depend on the lower-numbered services. Skills will all start whenever services/skills is listed.
After generating systemd units, make sure to sudo systemctl daemon-reload and then you can sudo systemctl start dinkum.target
Logs
All logs go into journalctl, so they can be viewed in realtime with sudo journalctl -f -xe
You can also view individual service or skill logs:
sudo journalctl -f -u dinkum-audio.servicesudo journalctl -f -u dinkum-skill-homescreen.mark2.service
Leave off the -f to see the complete history of a service's log.
See dinkum* in /etc/systemd/system for available units. dinkum.target is the root unit.
Last updated