Ceci est une ancienne révision du document !
Table des matières
Allumer/Eteindre la TV
allumer via WIFI
activer le Wake On Lan sur la tv
MAC_ADDR=74:DF:BF:09:3D:CF wakeonlan $MAC_ADDR
éteindre via WIFI
Pour déterminer quel trafic permet d'éteindre, installation de “philips Telecommande” sur android et installation de “packet capture” sur android: https://play.google.com/store/apps/details?id=app.greyshirts.sslcapture&hl=fr
dans l'appli “philips Telecommande” , régler l'ip de la tv, puis appuyer sur le bouton off. le traffic capturé par “packet capture” est le suivant:
C'est une demande post HTTP sur le port 1925 qui permet donc d'éteindre la TV. Avec cette info, je trouve l'API: http://jointspace.sourceforge.net/projectdata/documentation/jasonApi/1/doc/API.html
Pour générer les requettes post, j'ai essayé avec python et wget mais la tv réponds “Service Unavailable”. Finalement, ça fonctionne avec curl: http://stackoverflow.com/questions/4797534/how-do-i-manually-fire-http-post-requests-with-firefox-or-chrome
Pour éteindre: http://jointspace.sourceforge.net/projectdata/documentation/jasonApi/1/doc/API-Method-input-key-POST.html
curl -i -X POST -H 'Content-Type: application/json' -d '{"key": "Standby"}' http://192.168.1.31:1925/1/input/key
Pour selectionner entrée HDMI 3: http://jointspace.sourceforge.net/projectdata/documentation/jasonApi/1/doc/API-Method-sources-current-POST.html
curl -i -X POST -H 'Content-Type: application/json' -d '{"id": "hdmi3"}' http://192.168.1.31:1925/1/sources/current
CEC
tentative infructueuse car nécessite matériel que je n'ai pas…
http://blog.endpoint.com/2012/11/using-cec-client-to-control-hdmi-devices.html
sudo apt-get install cec-utils cec-client --list-devices libCEC version: 3.0.1, compiled on Linux-3.13.0-77-generic ... , features: P8_USB, P8_detect, randr Found devices: NONE
il faut un adaptateur pour ajouter les signaux CEC au HDMI, car il n'est pas généré par la carte video: https://www.pulse-eight.com/p/104/usb-hdmi-cec-adapter
Why don't I already have it? Almost all graphics cards do not support CEC in any form, and others only in a limited form. This device allows Kodi and libCEC to access the CEC communications link and send and receive control messages.