|
| 1 | +Projector Control for Kodi |
| 2 | +========================== |
| 3 | +Service add-on to Kodi for controling projectors with an optional RESTful API. This is intended to be used on stand-alone media centers running Kodi. |
| 4 | + |
| 5 | +Features |
| 6 | +-------- |
| 7 | +* Power on, off and set input on the projector when kodi starts/exits and/or screensaver activates/deactivates |
| 8 | +* Automatically update library when projector is shut down |
| 9 | +* Do regular library updates as long as the projector is shut down |
| 10 | +* Power on, off or toggle projector using a REST API |
| 11 | +* Change input source of the projector using a REST API |
| 12 | + |
| 13 | +Requirements |
| 14 | +------------ |
| 15 | +* py-serial |
| 16 | +* bottle |
| 17 | +* A supported projector connected over serial interface |
| 18 | +* Kodi installation (only tested on Linux) |
| 19 | + |
| 20 | +Supported Projectors |
| 21 | +-------------------- |
| 22 | +It should be a trivial task to add support for more projectors with serial connections. However I can't test any new implementation |
| 23 | +without having a projector of that model. While I wouldn't mind if you send me |
| 24 | +projectors of different brands and models, you will probably find it cheaper to learn a little python and implement it yourself. |
| 25 | +PR:s are always welcome. |
| 26 | + |
| 27 | +That said; if you have a projector that you want support for, please create a github |
| 28 | +issue at https://github.com/fredrik-eriksson/kodi_projcontrol. At minimum the following information is required to implement |
| 29 | +support for a projector: |
| 30 | + |
| 31 | +* connection settings (baudrate, bytesize, parity and stopbits) |
| 32 | +* command syntax |
| 33 | +* response syntax (for both get and set commands) |
| 34 | +* how to verify projector is accepting commands (if possible) |
| 35 | +* how to detect and handle error-responses |
| 36 | + |
| 37 | +Below is a list of currently supported projectors |
| 38 | + |
| 39 | +Epson |
| 40 | +##### |
| 41 | +* TW3200 |
| 42 | +* PowerLite 820p |
| 43 | + |
| 44 | +InFocus |
| 45 | +####### |
| 46 | +* IN72/IN74/IN76 |
| 47 | + |
| 48 | +Acer |
| 49 | +#### |
| 50 | +* X1373WH |
| 51 | +* V7500 |
| 52 | + |
| 53 | +BenQ |
| 54 | +#### |
| 55 | +* M535 series |
| 56 | + |
| 57 | +Usage |
| 58 | +----- |
| 59 | +Copy repository to your Kodi addon directory (usually ~/.kodi/addons) and rename it to 'service.projcontrol'. |
| 60 | + |
| 61 | +REST API |
| 62 | +-------- |
| 63 | +Note if you use the REST API: the api provides absolutely no security; never enable it on untrusted network. |
| 64 | + |
| 65 | +After configuring and enabling the REST API from Kodi you can test it using curl |
| 66 | + |
| 67 | +.. code-block:: shell |
| 68 | +
|
| 69 | + # Check power status and input source |
| 70 | + $ curl http://10.37.37.13:6661/power |
| 71 | + { |
| 72 | + "power": true, |
| 73 | + "source": "HDMI1" |
| 74 | + } |
| 75 | + |
| 76 | + # Controlling power with POST request. Valid commands are "on", "off" or "toggle" |
| 77 | + $ curl -i -H "Content-Type: application/json" -X POST -d '"off"' http://10.37.37.13:6661/power |
| 78 | + HTTP/1.0 200 OK |
| 79 | + Content-Type: application/json |
| 80 | + Content-Length: 21 |
| 81 | + Server: Werkzeug/0.9.6 Python/2.7.9 |
| 82 | + Date: Mon, 09 Nov 2015 18:54:03 GMT |
| 83 | +
|
| 84 | + { |
| 85 | + "success": true |
| 86 | + } |
| 87 | + |
| 88 | + # Check valid input sources |
| 89 | + $ curl http://10.37.37.13:6661/source |
| 90 | + { |
| 91 | + "sources": [ |
| 92 | + "PC", |
| 93 | + "HDMI1", |
| 94 | + "Component - YCbCr", |
| 95 | + "HDMI2", |
| 96 | + "Component - YPbPr", |
| 97 | + "Video", |
| 98 | + "S-Video", |
| 99 | + "Component", |
| 100 | + "Component - Auto", |
| 101 | + "RCA" |
| 102 | + ] |
| 103 | + } |
| 104 | + |
| 105 | + # Set input source |
| 106 | + $ curl -i -H "Content-Type: application/json" -X POST -d '"HDMI1"' http://10.37.37.13:6661/source |
| 107 | + HTTP/1.0 200 OK |
| 108 | + Content-Type: application/json |
| 109 | + Content-Length: 21 |
| 110 | + Server: Werkzeug/0.9.6 Python/2.7.9 |
| 111 | + Date: Mon, 09 Nov 2015 18:54:03 GMT |
| 112 | +
|
| 113 | + { |
| 114 | + "success": true |
| 115 | + } |
0 commit comments