Philips TV VD

Diskussioner runt hur den tänkta funktionaliteten nås

Moderator: elf98

bobkelso_527
Wannabe
Inlägg: 15
Blev medlem: 20 sep 2016, 10:35
Ort: Hjo

Philips TV VD

Inlägg av bobkelso_527 » 05 okt 2016, 01:32

Hej,
Tänkte dela min Philips VD om någon skulle vara intresserad. Modell:Cinema 21:9 Gold Series. Ambilight:en funkar inte korrekt.

Kod: Markera allt

{"name":"Philips TV","type":"virtual_device","properties":{"deviceIcon":11,"currentIcon":"0","log":"","logTemp":"","mainLoop":"","ui.slider_3_0.value":0,"ui.slider_3_2.value":2,"visible":"true","rows":[{"type":"button","elements":[{"id":1,"lua":true,"waitForResponse":false,"caption":"ON/OFF","name":"Button11","empty":false,"msg":"TV = Net.FHttp(\"10.0.1.12\",1925)\n--fibaro:log(\"Checking if TV is Online\")\n--fibaro:sleep(400)\nresponse, status, errorCode = TV:GET(\"/1/audio/volume\")\n--fibaro:log(response)\nif not (response == nill) then\nvolume = json.decode(response)\nif volume.muted == true then\nfibaro:log(\"muted\");\nend","buttonIcon":11,"favourite":false,"main":true}]},{"type":"button","elements":[{"id":2,"lua":true,"waitForResponse":false,"caption":"HDMI 1","name":"Button21","empty":false,"msg":"TV = Net.FHttp(\"10.0.1.12\",1925)\njsonString = {id=\"hdmi1\"}\njsonTable = json.encode(jsonString)\nfibaro:log(jsonTable)\nresponse, status, errorCode = TV:POST(\"/1/sources/current?callback=\", jsonTable )\nfibaro:log(response)\nif errorCode == 0\nthen\nfibaro:log(status)\nelse\nfibaro:log(\"error\")\nend","buttonIcon":0,"favourite":false,"main":false},{"id":3,"lua":true,"waitForResponse":false,"caption":"HDMI 2","name":"Button22","empty":false,"msg":"TV = Net.FHttp(\"10.0.1.12\",1925)\njsonString = {id=\"hdmi2\"}\njsonTable = json.encode(jsonString)\nfibaro:log(jsonTable)\nresponse, status, errorCode = TV:POST(\"/1/sources/current?callback=\", jsonTable )\nfibaro:log(response)\nif errorCode == 0\nthen\nfibaro:log(status)\nelse\nfibaro:log(\"error\")\nend","buttonIcon":0,"favourite":false,"main":false},{"id":4,"lua":true,"waitForResponse":false,"caption":"HDMI 3","name":"Button23","empty":false,"msg":"TV = Net.FHttp(\"10.0.1.12\",1925)\njsonString = {id=\"hdmi3\"}\njsonTable = json.encode(jsonString)\nfibaro:log(jsonTable)\nresponse, status, errorCode = TV:POST(\"/1/sources/current?callback=\", jsonTable )\nfibaro:log(response)\nif errorCode == 0\nthen\nfibaro:log(status)\nelse\nfibaro:log(\"error\")\nend","buttonIcon":0,"favourite":false,"main":false}]},{"type":"button","elements":[{"id":5,"lua":true,"waitForResponse":false,"caption":"TV","name":"Button61","empty":false,"msg":"TV = Net.FHttp(\"10.0.1.12\",1925)\njsonString = {id=\"tv\"}\njsonTable = json.encode(jsonString)\nfibaro:log(jsonTable)\nresponse, status, errorCode = TV:POST(\"/1/sources/current?callback=\", jsonTable )\nfibaro:log(response)\nif errorCode == 0\nthen\nfibaro:log(status)\nelse\nfibaro:log(\"error\")\nend","buttonIcon":0,"favourite":false,"main":false},{"id":6,"lua":true,"waitForResponse":false,"caption":"VGA","name":"Button62","empty":false,"msg":"TV = Net.FHttp(\"10.0.1.12\",1925)\njsonString = {id=\"vga\"}\njsonTable = json.encode(jsonString)\nfibaro:log(jsonTable)\nresponse, status, errorCode = TV:POST(\"/1/sources/current?callback=\", jsonTable )\nfibaro:log(response)\nif errorCode == 0\nthen\nfibaro:log(status)\nelse\nfibaro:log(\"error\")\nend","buttonIcon":0,"favourite":false,"main":false},{"id":7,"lua":true,"waitForResponse":false,"caption":"HDMI S","name":"Button63","empty":false,"msg":"TV = Net.FHttp(\"10.0.1.12\",1925)\njsonString = {id=\"hdmiside\"}\njsonTable = json.encode(jsonString)\nfibaro:log(jsonTable)\nresponse, status, errorCode = TV:POST(\"/1/sources/current?callback=\", jsonTable )\nfibaro:log(response)\nif errorCode == 0\nthen\nfibaro:log(status)\nelse\nfibaro:log(\"error\")\nend","buttonIcon":0,"favourite":false,"main":false}]},{"type":"slider","elements":[{"id":8,"lua":true,"waitForResponse":false,"caption":"Volume","name":"slider_3_2","msg":"TV = Net.FHttp(\"10.0.1.12\",1925)\njsonString = {current=_sliderValue_}\njsonTable = json.encode(jsonString)\nfibaro:log(jsonTable)\nresponse, status, errorCode = TV:POST(\"/1/audio/volume?callback=\", jsonTable )\nfibaro:log(response)\nif errorCode == 0\nthen\nfibaro:log(status)\nelse\nfibaro:log(\"error\")\nend","buttonIcon":0,"value":2,"favourite":false,"main":false}]},{"type":"button","elements":[{"id":9,"lua":true,"waitForResponse":false,"caption":"1","name":"Button31","empty":false,"msg":"TV = Net.FHttp(\"10.0.1.12\",1925)\njsonString = {key=\"Digit1\"}\njsonTable = json.encode(jsonString)\nfibaro:log(jsonTable)\nresponse, status, errorCode = TV:POST(\"/1/input/key?callback=\", jsonTable )\nfibaro:log(response)\nif errorCode == 0\nthen\nfibaro:log(status)\nelse\nfibaro:log(\"error\")\nend","buttonIcon":0,"favourite":false,"main":false},{"id":10,"lua":true,"waitForResponse":false,"caption":"2","name":"Button32","empty":false,"msg":"TV = Net.FHttp(\"10.0.1.12\",1925)\njsonString = {key=\"Digit2\"}\njsonTable = json.encode(jsonString)\nfibaro:log(jsonTable)\nresponse, status, errorCode = TV:POST(\"/1/input/key?callback=\", jsonTable )\nfibaro:log(response)\nif errorCode == 0\nthen\nfibaro:log(status)\nelse\nfibaro:log(\"error\")\nend","buttonIcon":0,"favourite":false,"main":false},{"id":11,"lua":true,"waitForResponse":false,"caption":"3","name":"Button33","empty":false,"msg":"TV = Net.FHttp(\"10.0.1.12\",1925)\njsonString = {key=\"Digit3\"}\njsonTable = json.encode(jsonString)\nfibaro:log(jsonTable)\nresponse, status, errorCode = TV:POST(\"/1/input/key?callback=\", jsonTable )\nfibaro:log(response)\nif errorCode == 0\nthen\nfibaro:log(status)\nelse\nfibaro:log(\"error\")\nend","buttonIcon":0,"favourite":false,"main":false}]},{"type":"button","elements":[{"id":12,"lua":true,"waitForResponse":false,"caption":"4","name":"Button41","empty":false,"msg":"TV = Net.FHttp(\"10.0.1.12\",1925)\njsonString = {key=\"Digit4\"}\njsonTable = json.encode(jsonString)\nfibaro:log(jsonTable)\nresponse, status, errorCode = TV:POST(\"/1/input/key?callback=\", jsonTable )\nfibaro:log(response)\nif errorCode == 0\nthen\nfibaro:log(status)\nelse\nfibaro:log(\"error\")\nend","buttonIcon":0,"favourite":false,"main":false},{"id":13,"lua":true,"waitForResponse":false,"caption":"5","name":"Button42","empty":false,"msg":"TV = Net.FHttp(\"10.0.1.12\",1925)\njsonString = {key=\"Digit5\"}\njsonTable = json.encode(jsonString)\nfibaro:log(jsonTable)\nresponse, status, errorCode = TV:POST(\"/1/input/key?callback=\", jsonTable )\nfibaro:log(response)\nif errorCode == 0\nthen\nfibaro:log(status)\nelse\nfibaro:log(\"error\")\nend","buttonIcon":0,"favourite":false,"main":false},{"id":14,"lua":true,"waitForResponse":false,"caption":"3","name":"Button43","empty":false,"msg":"TV = Net.FHttp(\"10.0.1.12\",1925)\njsonString = {key=\"Digit6\"}\njsonTable = json.encode(jsonString)\nfibaro:log(jsonTable)\nresponse, status, errorCode = TV:POST(\"/1/input/key?callback=\", jsonTable )\nfibaro:log(response)\nif errorCode == 0\nthen\nfibaro:log(status)\nelse\nfibaro:log(\"error\")\nend","buttonIcon":0,"favourite":false,"main":false}]},{"type":"button","elements":[{"id":15,"lua":true,"waitForResponse":false,"caption":"7","name":"Button51","empty":false,"msg":"TV = Net.FHttp(\"10.0.1.12\",1925)\njsonString = {key=\"Digit7\"}\njsonTable = json.encode(jsonString)\nfibaro:log(jsonTable)\nresponse, status, errorCode = TV:POST(\"/1/input/key?callback=\", jsonTable )\nfibaro:log(response)\nif errorCode == 0\nthen\nfibaro:log(status)\nelse\nfibaro:log(\"error\")\nend","buttonIcon":0,"favourite":false,"main":false},{"id":16,"lua":true,"waitForResponse":false,"caption":"2","name":"Button52","empty":false,"msg":"TV = Net.FHttp(\"10.0.1.12\",1925)\njsonString = {key=\"Digit8\"}\njsonTable = json.encode(jsonString)\nfibaro:log(jsonTable)\nresponse, status, errorCode = TV:POST(\"/1/input/key?callback=\", jsonTable )\nfibaro:log(response)\nif errorCode == 0\nthen\nfibaro:log(status)\nelse\nfibaro:log(\"error\")\nend","buttonIcon":0,"favourite":false,"main":false},{"id":17,"lua":true,"waitForResponse":false,"caption":"9","name":"Button53","empty":false,"msg":"TV = Net.FHttp(\"10.0.1.12\",1925)\njsonString = {key=\"Digit9\"}\njsonTable = json.encode(jsonString)\nfibaro:log(jsonTable)\nresponse, status, errorCode = TV:POST(\"/1/input/key?callback=\", jsonTable )\nfibaro:log(response)\nif errorCode == 0\nthen\nfibaro:log(status)\nelse\nfibaro:log(\"error\")\nend","buttonIcon":0,"favourite":false,"main":false}]},{"type":"button","elements":[{"id":18,"lua":true,"waitForResponse":false,"caption":"Home","name":"Button71","empty":false,"msg":"TV = Net.FHttp(\"10.0.1.12\",1925)\njsonString = {key=\"Home\"}\njsonTable = json.encode(jsonString)\nfibaro:log(jsonTable)\nresponse, status, errorCode = TV:POST(\"/1/input/key?callback=\", jsonTable )\nfibaro:log(response)\nif errorCode == 0\nthen\nfibaro:log(status)\nelse\nfibaro:log(\"error\")\nend","buttonIcon":0,"favourite":false,"main":false}]},{"type":"button","elements":[{"id":19,"lua":true,"waitForResponse":false,"caption":"AmbilightOnOff","name":"Button81","empty":false,"msg":"TV = Net.FHttp(\"10.0.1.12\",1925)\njsonString = {key=\"AmbilightOnOff\"}\njsonTable = json.encode(jsonString)\nfibaro:log(jsonTable)\nresponse, status, errorCode = TV:POST(\"/1/input/key?callback=\", jsonTable )\nfibaro:log(response)\nif errorCode == 0\nthen\nfibaro:log(status)\nelse\nfibaro:log(\"error\")\nend","buttonIcon":0,"favourite":false,"main":false}]},{"type":"button","elements":[{"id":20,"lua":true,"waitForResponse":false,"caption":"Blue","name":"Button91","empty":false,"msg":"TV = Net.FHttp(\"10.0.1.12\",1925)\njsonString = {key=\"BlueColour\"}\njsonTable = json.encode(jsonString)\nfibaro:log(jsonTable)\nresponse, status, errorCode = TV:POST(\"/1/input/key?callback=\", jsonTable )\nfibaro:log(response)\nif errorCode == 0\nthen\nfibaro:log(status)\nelse\nfibaro:log(\"error\")\nend","buttonIcon":0,"favourite":false,"main":false},{"id":21,"lua":true,"waitForResponse":false,"caption":"Red","name":"Button92","empty":false,"msg":"TV = Net.FHttp(\"10.0.1.12\",1925)\njsonString = {key=\"RedColour\"}\njsonTable = json.encode(jsonString)\nfibaro:log(jsonTable)\nresponse, status, errorCode = TV:POST(\"/1/input/key?callback=\", jsonTable )\nfibaro:log(response)\nif errorCode == 0\nthen\nfibaro:log(status)\nelse\nfibaro:log(\"error\")\nend","buttonIcon":0,"favourite":false,"main":false},{"id":22,"lua":true,"waitForResponse":false,"caption":"Yellow","name":"Button93","empty":false,"msg":"TV = Net.FHttp(\"10.0.1.12\",1925)\njsonString = {key=\"YellowColour\"}\njsonTable = json.encode(jsonString)\nfibaro:log(jsonTable)\nresponse, status, errorCode = TV:POST(\"/1/input/key?callback=\", jsonTable )\nfibaro:log(response)\nif errorCode == 0\nthen\nfibaro:log(status)\nelse\nfibaro:log(\"error\")\nend","buttonIcon":0,"favourite":false,"main":false},{"id":23,"lua":true,"waitForResponse":false,"caption":"Gren","name":"Button94","empty":false,"msg":"TV = Net.FHttp(\"10.0.1.12\",1925)\njsonString = {key=\"GreenColour\"}\njsonTable = json.encode(jsonString)\nfibaro:log(jsonTable)\nresponse, status, errorCode = TV:POST(\"/1/input/key?callback=\", jsonTable )\nfibaro:log(response)\nif errorCode == 0\nthen\nfibaro:log(status)\nelse\nfibaro:log(\"error\")\nend","buttonIcon":0,"favourite":false,"main":false}]},{"type":"button","elements":[{"id":24,"lua":true,"waitForResponse":false,"caption":"Mute","name":"Button101","empty":false,"msg":"TV = Net.FHttp(\"10.0.1.12\",1925)\njsonString = {key=\"Mute\"}\njsonTable = json.encode(jsonString)\nfibaro:log(jsonTable)\nresponse, status, errorCode = TV:POST(\"/1/input/key?callback=\", jsonTable )\nfibaro:log(response)\nif errorCode == 0\nthen\nfibaro:log(status)\nelse\nfibaro:log(\"error\")\nend","buttonIcon":0,"favourite":false,"main":false},{"id":25,"lua":true,"waitForResponse":false,"caption":"Options","name":"Button102","empty":false,"msg":"TV = Net.FHttp(\"10.0.1.12\",1925)\njsonString = {key=\"Options\"}\njsonTable = json.encode(jsonString)\nfibaro:log(jsonTable)\nresponse, status, errorCode = TV:POST(\"/1/input/key?callback=\", jsonTable )\nfibaro:log(response)\nif errorCode == 0\nthen\nfibaro:log(status)\nelse\nfibaro:log(\"error\")\nend","buttonIcon":0,"favourite":false,"main":false},{"id":26,"lua":true,"waitForResponse":false,"caption":"Viewmode","name":"Button103","empty":false,"msg":"TV = Net.FHttp(\"10.0.1.12\",1925)\njsonString = {key=\"Viewmode\"}\njsonTable = json.encode(jsonString)\nfibaro:log(jsonTable)\nresponse, status, errorCode = TV:POST(\"/1/input/key?callback=\", jsonTable )\nfibaro:log(response)\nif errorCode == 0\nthen\nfibaro:log(status)\nelse\nfibaro:log(\"error\")\nend","buttonIcon":0,"favourite":false,"main":false}]},{"type":"button","elements":[{"id":27,"lua":true,"waitForResponse":false,"caption":"internal","name":"Button121","empty":false,"msg":"TV = Net.FHttp(\"10.0.1.12\",1925)\njsonString = {key=\"internal\"}\njsonTable = json.encode(jsonString)\nfibaro:log(jsonTable)\nresponse, status, errorCode = TV:POST(\"/1/ambilight/mode?callback=\", jsonTable )\nfibaro:log(response)\nif errorCode == 0\nthen\nfibaro:log(status)\nelse\nfibaro:log(\"error\")\nend","buttonIcon":0,"favourite":false,"main":false},{"id":28,"lua":true,"waitForResponse":false,"caption":"manual","name":"Button122","empty":false,"msg":"TV = Net.FHttp(\"10.0.1.12\",1925)\njsonString = {key=\"manual\"}\njsonTable = json.encode(jsonString)\nfibaro:log(jsonTable)\nresponse, status, errorCode = TV:POST(\"/1/ambilight/mode?callback=\", jsonTable )\nfibaro:log(response)\nif errorCode == 0\nthen\nfibaro:log(status)\nelse\nfibaro:log(\"error\")\nend","buttonIcon":0,"favourite":false,"main":false}]},{"type":"button","elements":[{"id":29,"lua":true,"waitForResponse":false,"caption":"1","name":"Button131","empty":false,"msg":"TV = Net.FHttp(\"10.0.1.12\",1925)\njsonString = {key=\"left\"}\njsonTable = json.encode(jsonString)\nfibaro:log(jsonTable)\nresponse, status, errorCode = TV:POST(\"/1/ambilight/cached?callback=\", jsonTable )\nfibaro:log(response)\nif errorCode == 0\nthen\nfibaro:log(status)\nelse\nfibaro:log(\"error\")\nend","buttonIcon":0,"favourite":false,"main":false},{"id":30,"lua":true,"waitForResponse":false,"caption":"2","name":"Button132","empty":false,"msg":"TV = Net.FHttp(\"10.0.1.12\",1925)\njsonString = {key=\"layerx \"r\": 100,\"g\": 210,\"b\": 30\"}\njsonTable = json.encode(jsonString)\nfibaro:log(jsonTable)\nresponse, status, errorCode = TV:POST(\"/1/ambilight/cached?callback=\", jsonTable )\nfibaro:log(response)\nif errorCode == 0\nthen\nfibaro:log(status)\nelse\nfibaro:log(\"error\")\nend","buttonIcon":0,"favourite":false,"main":false},{"id":31,"lua":true,"waitForResponse":false,"caption":"3","name":"Button133","empty":false,"msg":"runcommand = \"echo '{ \"command\": \"layerx\", \"color\": [255,255,255], \"priority\": 100 }' | nc 10.0.1.12 1925\"","buttonIcon":0,"favourite":false,"main":false}]}]},"actions":{"pressButton":1,"setSlider":2,"setProperty":2}}
Användarvisningsbild
ekensweden
Tar hemautomation på allvar
Inlägg: 104
Blev medlem: 08 apr 2013, 20:56
Ort: HALMSTAD
Kontakt:

Re: Philips TV VD

Inlägg av ekensweden » 13 feb 2017, 22:16

Hej behöver lite hjälp med denna text hur får man in den i Fibaron
Tacksam för svar
Skriv svar