Skip to content

Commit

Permalink
Minor updates + clarification.
Browse files Browse the repository at this point in the history
  • Loading branch information
suborb committed Dec 31, 2016
1 parent 5882eae commit 061607c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
# philips_android_tv
Tools to control Philips 2016 Android TVs

The API is I suspect the same as JointSpace (http://jointspace.sourceforge.net/) with the following
The API is roughly the same as JointSpace (http://jointspace.sourceforge.net/) with the following
differences:

* Uses HTTPS over port 1926
* Uses /6/ instead of /1/ as the API path
* All calls have to have digest auth to be successful
* An initial pairing to determine the user/pass is required
* Channel and Source methods aren't available

Channel status and changes are performed using a different protocol that isn't described here.

The tool here will do the initial pairing. The credentials can then be used in a standard way
(digest) in other tools.
14 changes: 14 additions & 0 deletions philips.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ def get_command(config):
print(r.json())


def post_command(config):
r = requests.post("https://" + config['address'] + ":1926/" + config['path'], json=config['body'], verify=False,auth=HTTPDigestAuth(config['device_id'], config['auth_key']))
print(r)


def main():
config={}
Expand Down Expand Up @@ -97,9 +101,19 @@ def main():
config['path'] = "6/powerstate"
config['path'] = "6/ambilight/currentconfiguration"
config['path'] = "6/channeldb/tv/channelLists/all"
config['path'] = "6/system/epgsource"
config['path'] = "6/system"
config['path'] = "6/system/storage"
config['path'] = "6/system/timestamp"
config['path'] = "6/menuitems/settings/structure"
config['path'] = "6/ambilight/cached"

get_command(config)

if args.command == "standby":
config['path'] = "6/input/key"
config['body'] = { "key" : "Standby" }
post_command(config)

main()

Expand Down

0 comments on commit 061607c

Please sign in to comment.