In case anyone else is struggling with this, here’s what I did. I ended up installing parts of dinkum since it seems the message bus is part of that? I would have thought the sandbox image would work out of the box independently of dinkum, but I guess not. I am not a linux guy, nor do I fully understand everything about the mycroft architecture, but hopefully this will help people who are looking to get some use out of the mycroft hardware.
Instructions to get this working
I put dinkum in /usr/local/mycroft-dinkum
Update requirements:
/usr/local/mycroft-dinkum/shared/requirements/requirements.txt
pyxdg==0.27
SpeechRecognition
requests==2.27.1
mycroft-messagebus-client==0.9.4
sdnotify~=0.3.0
tornado~=6.1.0
beautifulsoup4~=4.10.0
dbus-next==0.2.3
lingua-franca==0.4.2
numpy
pysdl2==0.9.11
pysbd~=0.3.0
Create .venv
cd /usr/local/mycroft-dinkum/shared/
pip install .
Update your mycroft.conf
This should go in /home/pi/.config/mycroft.conf
I also stuck it in /etc/mycroft.conf
cuz I wasn’t sure which one was used.
{
"stt": {
"module": "mycroft"
},
"tts": {
"module": "mimic3_tts_plug",
"mimic3_tts_plug": {
"voice": "en_UK/apope_low",
"preloaded_cache": "/opt/mycroft/preloaded_cache/Mimic3"
}
},
// The mycroft-core messagebus websocket
"websocket": {
"host": "0.0.0.0",
"port": 8181,
"route": "/core",
"ssl": false
},
// The GUI messagebus websocket. Once port is created per connected GUI
"gui_websocket": {
"host": "0.0.0.0",
"base_port": 18181,
"route": "/gui",
"ssl": false
},
"enclosure": {
// Platform name
// Options: 'picroft', 'mycroft_mark_1'
// Override: SYSTEM (set by specific enclosures)
// "platform": "picroft",
// "platform_enclosure_path": "/etc/myenclosure/code.py",
// COMM params to the Arduino/faceplate
"port": "/dev/ttyAMA0",
"rate": 9600,
"timeout": 5.0,
// ??
"update": true,
// Run a self test at bootup?
"test": false
}
}
Set up systemd units
Reference: Services - Mycroft Mark II
The message bus is the one you need so you can control the fans and whatnot. Note: I didn’t want to install the rest of the services since I just wanted to use the hardware without the full mycroft setup. If you just want to control the fans and leds and buttons I think you just need the messagebus. I’m not sure if the enclosure is necessary.
cd /usr/local/mycroft-dinkum
sudo python scripts/generate-systemd-units.py --user pi --service 0 services/messagebus --service 1 services/hal --service 1 services/audio --service 1 services/gui --service 3 services/enclosure --venv-dir /usr/local/mycroft-dinkum/shared/.venv
then run
sudo systemctl daemon-reload
sudo systemctl start dinkum.target
sudo journalctl -f -u dinkum-messagebus.service
commands that should work:
mark2-volume 50
mark2-fan 50
mark2-leds 255,0,0,255,0,0
mark2-buttons