Skip to content

Instantly share code, notes, and snippets.

@crbyxwpzfl
Last active February 21, 2022 11:40
Show Gist options
  • Save crbyxwpzfl/a15fe3c87293cab5ef5592772fcb1479 to your computer and use it in GitHub Desktop.
Save crbyxwpzfl/a15fe3c87293cab5ef5592772fcb1479 to your computer and use it in GitHub Desktop.
pshilips tv api

use pylips to get authentiaction credentials

hue api

ACHTUNG escape json for win and linux is diferent

PLATZHALTER:

LAMPE 4 für dazwischen; 5 für vorn; 6 für hint; 7 für anlage
GRUPPE 0 für lampen&anlage; 3 für lampen
BRIDGE-INTERNAL_IP 192.168.xxx.xx über hue seite/ router/ googel halt

curls

curl -d  "{\"devicetype\":\"my_hue_app#laptop f\"}" -X POST http://<BRIDGE-INTERNAL-IP>/api                                #auth
curl -X GET http://192.168.xxx.xx/api/1SF1BTaLNOFwKzGaohpRC6jERzcZEsw3FDny5n8I/lights                                      #test
curl -d "{\"on\": true }" -X PUT http://192.168.178.84/api/1SF1BTaLNOFwKzGaohpRC6jERzcZEsw3FDny5n8I/lights/<LAMPE>/state   #single on/off
curl -d "{\"on\": false}" -X PUT http://192.168.178.84/api/1SF1BTaLNOFwKzGaohpRC6jERzcZEsw3FDny5n8I/groups/<GRUPPE>/action #gruppe on/off

tv api

paltzahlter

TV-IP 192.168.xxx.xx aus einstellungen

curls

curl -v -s -X POST -d "{"power":"On"}" http://192.168.xxx.xx:1925/6/ambilight/power

ambilight/currentconfiguration -d "{"styleName": "FOLLOW_COLOR", "isExpert": "true", "algorithm": "MANUAL_HUE", "colorSettings": { "color": { }, "colorDelta": { "hue": 180, "saturation": 50, "brightness": 50},"speed": 255}"

curl -X POST http://192.168.xxx.xx:1925/6/ambilight/cached -d "{"r": 100, "g": 210, "b": 30}"

ambilight/lounge -d "{"color":{"hue":155,"saturation":240,"brightness":180},"colordelta":{"hue":20,"saturation":25,"brightness":100},"speed":255,"mode":"Default"}"

ambilight/currentconfiguration -d "{"styleName": "FOLLOW_COLOR", "isExpert": "false", "menuSetting": "FRESH_NATURE", "stringValue": "Fresh Nature"}"

curl -X GET http://192.168.xxx.xx:1925/6/ambilight/power

python3 pylips.py --host %TV's_ip_address% --user %username% --pass %password% --command post --path menuitems/settings/current --body ^"{^"^"nodes^"^":[{^"^"nodeid^"^":2131230774}]}^"

menuitems/settings/current -d "{"nodes":[{"nodeid":2131230774}]}"

menuitems/settings/update -d "{"values":[{"value":{"Nodeid":2131230736, "data": {"selected_item":1}}}]}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment