Provides system specific commands to OVOS for Mac OS. Creates fake ducking for OCP/ovos-media, barge-in volume adjustment, GUI button compatability, and allows for management of OVOS services.
Tested on Mac OS Sonoma 14.6.1, but should be valid for all currently supported Mac OS versions as of August 2024.
pip install PHAL-plugin-mac
Requires associated skill for volume-based voice commands:
- skill-ovos-volume
This plugin is not an Admin plugin, but in order for most of the system level commands to work, the user must be in the sudoers file. This can be done by running the following command in the terminal:
sudo vim /private/etc/sudoers.d/<username>
Replace with the username of the user running the OVOS instance.
Then add the following lines to the file:
<username> ALL=(ALL) NOPASSWD: /usr/sbin/systemsetup
<username> ALL=(ALL) NOPASSWD: /usr/sbin/shutdown
<username> ALL=(ALL) NOPASSWD: /usr/bin/sntp
<username> ALL=(ALL) NOPASSWD: /usr/bin/defaultsBe sure to replace <username> with the username of the user running the OVOS instance.
NOTE: Do this at your own risk. This is a security risk and should only be done if you understand the implications.
system.ntp.syncsystem.ssh.status,system.ssh.enable,system.ssh.disablesystem.reboot,system.shutdownsystem.configure.languagesystem.mycroft.service.restart
mycroft.volume.get,mycroft.volume.setmycroft.volume.increase,mycroft.volume.decreasemycroft.volume.mute,mycroft.volume.unmute,mycroft.volume.mute.toggle
Uses the canonical OVOS PHAL brightness namespace:
phal.brightness.control.get→ replies withphal.brightness.control.get.response{"brightness": 0..100}phal.brightness.control.set→{"brightness": 0..100}, replies withphal.brightness.control.set.confirmphal.brightness.control.sync→ re-emitsphal.brightness.control.get.responsephal.brightness.control.auto.dim.update→ no-op on macOS (auto-dim is OS-managed via System Settings → Lock Screen)
Optional dependency: macOS has no built-in command-line API for display brightness. To enable brightness handling, install the small Homebrew formula
brightness:brew install brightnessIf
brightnessis not onPATH, the plugin still loads and the brightness handlers become no-ops (a warning is logged on startup). All other functionality is unaffected.The screenshot location can be customised via the
screenshot_dirconfig key. The default is the XDG cache location ($XDG_CACHE_HOME/ovos/screenshots, falling back to~/.cache/ovos/screenshots) so the plugin behaves correctly when running as a background service.
These events are not yet part of the canonical OVOS message spec; they are provided here so Mac users can drive macOS appearance from skills:
system.display.dark_mode.get→ replies withsystem.display.dark_mode.get.response{"enabled": bool}system.display.dark_mode.set→{"enabled": bool}, replies with.set.confirm/.set.failedsystem.display.dark_mode.toggle→ flips current state, replies with.set.confirm/.set.failed
system.lock→ locks the screen (pmset displaysleepnow); replies withsystem.lock.confirm/system.lock.failedsystem.sleep→ sleeps the Mac (pmset sleepnow); replies withsystem.sleep.confirm/system.sleep.failedsystem.screenshot→ captures the full screen viascreencapture -x. Optional{"path": str}; defaults to~/Pictures/ovos-screenshot-<timestamp>.png. Replies withsystem.screenshot.complete{"path": str}/system.screenshot.failed
Oscillate Labs (@mikejgray)