{"slug": "ps5-hdmi-libcec-commands", "title": "PS5 HDMI libcec commands", "summary": "This article provides a guide on using a Raspberry Pi 4 to send HDMI-CEC commands to a PlayStation 5 via the `/dev/cec1` interface. The commands allow users to turn the PS5 on and off, check its power status, and simulate controller inputs like D-pad navigation and button presses. The functionality of certain commands, such as powering on from rest mode, depends on specific PS5 HDMI settings like \"Power off Link.\"", "body_md": "PS5_CEC_example.sh\n\n      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.\n      \nLearn more about bidirectional Unicode characters\n\n \n    Show hidden characters\n\n# Note\n\n# I am using Raspberry pi 4 to send CEC commands\n\n# /dev/cec1 is pi's second HDMI port\n\n# '4' is PS5 address that TV assigned, change if you need\n\n# Turn on PS5 (You need to enable \"Power off Link\" at PS5 HDMI settings to turn on from rest mode)\n\ncec-ctl -d /dev/cec1 --to 4 --user-control-pressed ui-cmd=power-on-function\n\n# Turn on PS5 from rest mode (When you didn't enable \"Power off Link\" at PS5 HDMI settings)\n\ncec-ctl -d /dev/cec1 --to 4 --user-control-pressed ui-cmd=power-toggle-function\n\n# Put in rest mode (You need to enable \"Power off Link\" at PS5 HDMI settings)\n\ncec-ctl -d /dev/cec1 --to 4 --standby\n\n# Query PS5 power status\n\ncec-ctl -d /dev/cec1 --to 4 --give-device-power-status\n\n# Returns: on (0x00) or standby (0x01)\n\n# X button (confirm/select)\n\ncec-ctl -d /dev/cec1 --to 4 --user-control-pressed ui-cmd=select\n\n# O button (back/cancel)\n\ncec-ctl -d /dev/cec1 --to 4 --user-control-pressed ui-cmd=back\n\n# D-Pad Navigation\n\ncec-ctl -d /dev/cec1 --to 4 --user-control-pressed ui-cmd=up\n\ncec-ctl -d /dev/cec1 --to 4 --user-control-pressed ui-cmd=down\n\ncec-ctl -d /dev/cec1 --to 4 --user-control-pressed ui-cmd=left\n\ncec-ctl -d /dev/cec1 --to 4 --user-control-pressed ui-cmd=right\n\n# PS button\n\ncec-ctl -d /dev/cec1 --to 4 --user-control-pressed ui-cmd=device-root-menu", "url": "https://wpnews.pro/news/ps5-hdmi-libcec-commands", "canonical_source": "https://gist.github.com/Gezine/a0a6e4748df084b8092b256e34539019", "published_at": "2025-09-20 11:36:35+00:00", "updated_at": "2026-05-23 00:06:28.765199+00:00", "lang": "en", "topics": ["hardware"], "entities": ["PS5", "Raspberry Pi", "HDMI", "CEC"], "alternates": {"html": "https://wpnews.pro/news/ps5-hdmi-libcec-commands", "markdown": "https://wpnews.pro/news/ps5-hdmi-libcec-commands.md", "text": "https://wpnews.pro/news/ps5-hdmi-libcec-commands.txt", "jsonld": "https://wpnews.pro/news/ps5-hdmi-libcec-commands.jsonld"}}