{"id":61,"date":"2015-12-13T15:03:12","date_gmt":"2015-12-13T13:03:12","guid":{"rendered":"https:\/\/amsd.go.ro\/wordpress\/?p=61"},"modified":"2021-09-07T11:25:29","modified_gmt":"2021-09-07T08:25:29","slug":"using-cec-client-utility","status":"publish","type":"post","link":"https:\/\/amsd.go.ro\/wordpress\/?p=61","title":{"rendered":"Using cec-client utility"},"content":{"rendered":"<p>I have compiled and built LibCEC library on Raspberry Pi and I got an working cec-client utility. I would like to use it for more than just turning on\/off the television, and this article has the purpose to gather standard and non standard commands to control one or many CEC devices.<\/p>\n<p>1) Scan devices with the following comand:<\/p>\n<pre>echo scan | cec-client -s -d 1<\/pre>\n<p>&nbsp;<\/p>\n<p>2) List known shortcuts by a cec-client utility:<\/p>\n<pre>echo h | cec-client -s -d 1<\/pre>\n<p>&nbsp;<\/p>\n<p>3) If the television and the device id 0 you can turn it on using the following command:<\/p>\n<pre><code>echo \"on 0\" | cec-client -s -d 1<br \/><\/code><\/pre>\n<p>&nbsp;<\/p>\n<p>4) Turn off the television with id 0 using this command:<\/p>\n<pre><code>echo \"standby 0\" | cec-client -s<\/code> -d 1<\/pre>\n<p>&nbsp;<\/p>\n<p>5) Swicth to the channel where the cec-client runs:<\/p>\n<pre>echo \"as\" | cec-client -s -d -1<\/pre>\n<p>&nbsp;<\/p>\n<p>6) List client and device details<\/p>\n<pre>cec-client -l<\/pre>\n<p>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have compiled and built LibCEC library on Raspberry Pi and I got an working cec-client utility. I would like to use it for more than just turning on\/off the television, and this article has the purpose to gather standard [&hellip;]<\/p>\n<div class=\"link-more\"><a href=\"https:\/\/amsd.go.ro\/wordpress\/?p=61#more-61\" class=\"more-link\">Continue reading &#10142; <span class=\"screen-reader-text\">Using cec-client utility<\/span><\/a><\/div>","protected":false},"author":6,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[8,10,7,12],"class_list":["post-61","post","type-post","status-publish","format-standard","hentry","category-technology","tag-ps_20","tag-ps_32","tag-ps_55","tag-ps_17"],"_links":{"self":[{"href":"https:\/\/amsd.go.ro\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/61","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/amsd.go.ro\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/amsd.go.ro\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/amsd.go.ro\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/amsd.go.ro\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=61"}],"version-history":[{"count":1,"href":"https:\/\/amsd.go.ro\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/61\/revisions"}],"predecessor-version":[{"id":180,"href":"https:\/\/amsd.go.ro\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/61\/revisions\/180"}],"wp:attachment":[{"href":"https:\/\/amsd.go.ro\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=61"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/amsd.go.ro\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=61"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/amsd.go.ro\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=61"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}