Skip to content
  • Home
  • Recent
  • Tags
  • 0 Unread 0
  • Categories
  • Unreplied
  • Popular
  • GitHub
  • Docu
  • Hilfe
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
ioBroker Logo

Community Forum

donate donate
  1. ioBroker Community Home
  2. Deutsch
  3. Tester
  4. Test Adapter Philips-TV v0.2.x

NEWS

  • Jahresrückblick 2025 – unser neuer Blogbeitrag ist online! ✨
    BluefoxB
    Bluefox
    17
    1
    3.1k

  • Neuer Blogbeitrag: Monatsrückblick - Dezember 2025 🎄
    BluefoxB
    Bluefox
    13
    1
    1.1k

  • Weihnachtsangebot 2025! 🎄
    BluefoxB
    Bluefox
    25
    1
    2.4k

Test Adapter Philips-TV v0.2.x

Scheduled Pinned Locked Moved Tester
philipsphilips tv
550 Posts 84 Posters 152.9k Views 48 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • AlCalzoneA Offline
    AlCalzoneA Offline
    AlCalzone
    Developer
    wrote on last edited by
    #190

    ` > No connection to host 192.168.178.66

    philips-tv.0 2018-11-24 17:57:10.705 debug connection is DEAD. Reason: [undefined] Error: ETIMEDOUT `
    Stimmt die IP-Adresse in den Einstellungen?

    Warum `sudo` böse ist: https://forum.iobroker.net/post/17109

    1 Reply Last reply
    0
    • J Offline
      J Offline
      JuTuBuL
      wrote on last edited by
      #191

      Jup, ich kann mich ja auch mit der ip im Browser einwählen

      1 Reply Last reply
      0
      • J Offline
        J Offline
        JuTuBuL
        wrote on last edited by
        #192

        Ich glaube ich weiß warum, irgendwie kann ich den TV nicht vom Raspberry PI (Terminal) anpingen aber von einem anderen Gerät schon. Komisch ist nur, dass ich vom Pi zb mein Handy anpingen kann.

        Meine Sonoffs erreiche ich ja auch mit dem PI.

        Mmmh irgendwo ist da was faul.

        Edit:

        Es war doch simpler als gedacht, ein sudo apt-get update sowie ein sudo apt-get upgrade, haben das Problem behoben.

        Frage

        Wie kann ich jetzt das Ambilight steuern?

        Wie ist das mit der Lautstärke, wenn ich den TV mit Lautsprecher und Easy-Connect verbunden habe?

        Vielen Dank für den tollen Adapter

        1 Reply Last reply
        0
        • A Offline
          A Offline
          Andi.Ess.71
          wrote on last edited by
          #193

          Hallo Leute,

          ich habe ein anderes Problem mit meinem Philips TV (denke, passt aber ebenfalls in den Thread).

          Der Fernseher Philips 55OLED803) ist permanent vom Pi anpingbar. Auch wenn ich den Fernseher <u>ausgeschaltet</u> habe.

          Auch über den PING-Adapter und TR-064-Adapter wird "true" gemeldet.

          Wie kann man das ändern? Weiss jemand Rat?

          Danke und Gruß,

          Andi

          1 Reply Last reply
          0
          • S Offline
            S Offline
            Stormbringer
            wrote on last edited by
            #194

            Hilfe Al :oops:

            Ich habe einen Ambilight mit V6.

            Nach ewigen hin und her habe ich es geschafft mit dem Python Skript den Fernseher zu pairen und Passwort und User rauszufinden.

            Dein Skript habe ich auch durchlaufen lassen (kam kein Fehler im Log).

            Adapter bleibt trotzdem gelb. Komischerweise zeigt er bei den Objekten das an

            [urlBildschirmfoto 2018-12-23 um 01.53.26.png]

            Und, erfreulicherweise, ist auch bei den Objekten im Adapter was drinnen. Aber wenn ich z. B. Mute anwähle kommt im Log auf Silly:

            ` > philips-tv.0 2018-12-23 01:56:27.874 debug system.adapter.admin.0: logging true

            philips-tv.0 2018-12-23 01:56:27.874 silly inMem message *.logging system.adapter.admin.0.logging

            philips-tv.0 2018-12-23 01:52:55.073 debug system.adapter.admin.0: logging false

            philips-tv.0 2018-12-23 01:52:55.073 silly inMem message *.logging system.adapter.admin.0.logging val=false, ack=true, ts=1545526375068, q=0, from=system.adapter.admin.0, lc=1545526375068

            philips-tv.0 2018-12-23 01:50:03.187 error Error handling state change philips-tv.0.pressKey => Mute: 404 - "\n\n <title>Status page</title>\n\n\n

            philips-tv.0 2018-12-23 01:50:03.162 debug state with id philips-tv.0.pressKey updated: ack=false; val=Mute

            philips-tv.0 2018-12-23 01:50:03.154 silly inMem message philips-tv.0.* philips-tv.0.pressKey val=Mute, ack=false, ts=1545526203148, q=0, from=system.adapter.admin.0, lc=1545526203148

            philips-tv.0 2018-12-23 01:48:03.099 info starting. Version 0.2.0 in /opt/iobroker/node_modules/iobroker.philips-tv, node: v8.12.0 `

            Bzw. könnte mir jemand sagen ob man mit dem Adapter direkt Ambilight (letzter Modus) und Ambi und Hue ein- und ausschalten kann. Bräuchte den Philips Adapter nur deswegen, weil das mit dem Harmony Adapter relativ unzuverlässig funktioniert.
            2548_bildschirmfoto_2018-12-23_um_01.53.26.png

            Angaben zur Installation: JS Controller 5.0.12, npm 9.6.7, node 18.17.1, auf einem Intel NUC mit Ubuntu 22.04

            1 Reply Last reply
            0
            • AlCalzoneA Offline
              AlCalzoneA Offline
              AlCalzone
              Developer
              wrote on last edited by
              #195

              @Andi.Ess.71:

              Der Fernseher Philips 55OLED803) ist permanent vom Pi anpingbar. Auch wenn ich den Fernseher <u>ausgeschaltet</u> habe. `

              Ist bei mir teilweise auch so… Ich glaube der Fernseher ist nicht vollständig ausgeschaltet auch wenn er "aus" ist.

              Gesendet von unterwegs

              Warum `sudo` böse ist: https://forum.iobroker.net/post/17109

              1 Reply Last reply
              0
              • B Offline
                B Offline
                Buddinski88
                wrote on last edited by
                #196

                Hallöchen zusammen,

                danke erstmal für die Mühen :-)

                Hab eben den Adapter aus GitHub installiert und direkt die IP-Adresse eingetragen (ist vom Host pingbar) und leider bleibt der Adapter auf gelb.

                Der Aufruf des TVs liefert folgende Infos (Api 6.1)

                ! {"notifyChange":"http","menulanguage":"German","name":"55POS9002/12","country":"Germany","serialnumber_encrypted":"u9fUvUq7i+VpA8InZyY9Z+iunRUC+dy4A+xpPBr8aC4=\n","model_encrypted":"wI6hSPXu5k+R/Rwf9OgLAzWtermaBGPPjoSExnuADtU=\n","deviceid_encrypted":"2he9GZhRX0c47vnshx6TnUAadeahpd4qrO02wTrc9w8=\n","nettvversion":"8.0.0","epgsource":"one","api_version":{"Major":6,"Minor":1,"Patch":0},"featuring":{"jsonfeatures":{"editfavorites":["TVChannels","SatChannels"],"recordings":["List","Schedule","Manage"],"ambilight":["LoungeLight","Hue","Ambilight"],"menuitems":["Setup_Menu"],"textentry":["context_based","initial_string_available","editor_info_available"],"applications":["TV_Apps","TV_Games","TV_Settings"],"pointer":["not_available"],"inputkey":["key"],"activities":["intent"],"channels":["preset_string"],"mappings":["server_mapping"]},"systemfeatures":{"tvtype":"consumer","content":["dmr","pvr"],"tvsearch":"intent","pairing_type":"digest_auth_pairing","secured_transport":"true","companion_screen":"true"}}}

                Das Log zeigt eigentlich gar nichts an:

                ! philips-tv.0 2018-12-31 12:20:45.989 info starting. Version 0.2.0 in /opt/iobroker/node_modules/iobroker.philips-tv, node: v8.15.0
                ! philips-tv.0 2018-12-31 12:18:45.483 info starting. Version 0.2.0 in /opt/iobroker/node_modules/iobroker.philips-tv, node: v8.15.0
                ! philips-tv.0 2018-12-31 12:18:38.211 info starting. Version 0.2.0 in /opt/iobroker/node_modules/iobroker.philips-tv, node: v8.15.0
                ! philips-tv.0 2018-12-31 12:12:30.061 info starting. Version 0.2.0 in /opt/iobroker/node_modules/iobroker.philips-tv, node: v8.15.0
                ! philips-tv.0 2018-12-31 12:11:31.730 info starting. Version 0.2.0 in /opt/iobroker/node_modules/iobroker.philips-tv, node: v8.15.0

                Kann mir jemand weiterhelfen und sagen wie ich die Verbindung hergestellt bekomme?

                Viele Grüße und Danke,

                Bastian

                1 Reply Last reply
                0
                • B Offline
                  B Offline
                  Buddinski88
                  wrote on last edited by
                  #197

                  Niemand da der mir helfen kann? :?

                  1 Reply Last reply
                  0
                  • B Offline
                    B Offline
                    Buddinski88
                    wrote on last edited by
                    #198

                    Hallo @AlCalzone ,

                    darf ich fragen ob die Entwicklung des Adapters noch mal weiter geht oder wird es an der Stelle keine Neuerungen mehr geben?
                    Ich würde ihn sehr gerne verwenden, aber bekomme ihn leider nicht zum laufen.

                    Würde mich über eine Rückmeldung sehr freuen.

                    Viele Dank und Grüße
                    Bastian

                    AlCalzoneA 1 Reply Last reply
                    0
                    • B Buddinski88

                      Hallo @AlCalzone ,

                      darf ich fragen ob die Entwicklung des Adapters noch mal weiter geht oder wird es an der Stelle keine Neuerungen mehr geben?
                      Ich würde ihn sehr gerne verwenden, aber bekomme ihn leider nicht zum laufen.

                      Würde mich über eine Rückmeldung sehr freuen.

                      Viele Dank und Grüße
                      Bastian

                      AlCalzoneA Offline
                      AlCalzoneA Offline
                      AlCalzone
                      Developer
                      wrote on last edited by
                      #199

                      @Buddinski88 Ich habe derzeit nicht viel Zeit und andere Prioritäten. Habe ihn nicht vergessen, aber komme kurzfristig nicht zur Weiterentwicklung.

                      Warum `sudo` böse ist: https://forum.iobroker.net/post/17109

                      sigi234S 1 Reply Last reply
                      0
                      • AlCalzoneA AlCalzone

                        @Buddinski88 Ich habe derzeit nicht viel Zeit und andere Prioritäten. Habe ihn nicht vergessen, aber komme kurzfristig nicht zur Weiterentwicklung.

                        sigi234S Online
                        sigi234S Online
                        sigi234
                        Forum Testing Most Active
                        wrote on last edited by
                        #200

                        @AlCalzone
                        Ist ok, bin aber auch noch interessiert...........

                        Bitte benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat.
                        Immer Daten sichern!

                        1 Reply Last reply
                        0
                        • S Offline
                          S Offline
                          Stormbringer
                          wrote on last edited by
                          #201

                          Falls es euch zwischenzeitlich weiterhilft bis der Adapter fertig ist... Mit dem HAM Adapter klappt die Ansteuerung inzwischen gut.

                          https://forum.iobroker.net/topic/20585/gelöst-installationsfehler-ham-adapter-philips-tv-plug-in/11

                          Viel ansteuern kann man nicht. Aber Ambilightstatus abfragen und an und ausschalten geht prima.

                          Auf Linuxebene könnte man nach dem pairing auch noch mit CURL Befehle arbeiten und die Kommandos von der API direkt ansprechen. Kenne mich damit leider selber nicht aus, habe nur ein paar von einem Arbeitskollegen bekommen. Tastendrucke und Ambi und Hue per CURL ansteuern bekomme ich aber leider noch immer nicht zum Laufen. Ist hier jemand der sich zufällig damit auskennt? 😉 Dann könnte man die Wartezeit bis Al wieder mehr Zeit hat besser ûberbrücken 😉

                          Aber nochmal vielen Dank Al, dass du den Adapter noch auf dem Schirm hast und für die bereits geleistete Arbeit.

                          Angaben zur Installation: JS Controller 5.0.12, npm 9.6.7, node 18.17.1, auf einem Intel NUC mit Ubuntu 22.04

                          1 Reply Last reply
                          0
                          • MicM Offline
                            MicM Offline
                            Mic
                            Developer
                            wrote on last edited by Mic
                            #202

                            Hi zusammen,

                            eine Erfolgsmeldung:
                            Ich habe einen Philips 65PUS7303 (2018er Modell) - API-Version 6.1 lt Aufruf von http://x.x.x.x:1925/system

                            Ich bin wie folgt vorgegangen:

                            • https://github.com/AlCalzone/ioBroker.philips-tv/tarball/api-v5+v6 über Katze installiert und dann manuell hochgeladen
                            • User/Passwort generiert lt. Vorgehensweise von https://github.com/nstrelow/ha_philips_2016
                            • User/Passwort per Script hinzugefügt: https://forum.iobroker.net/post/128997 (AlCalzone 4. Feb. 2018, 12:54)

                            Adapter grün und läuft! :relaxed:
                            Über Datenpunkt philips-tv.0.pressKey kann ich schon mal Fernseher in Standby versetzen und wieder aufwecken, weiteres werde ich testen.
                            Vielen Dank an @AlCalzone für die bisherige Arbeit!

                            //////////////
                            Edit:
                            Hier noch ein wertvoller Link: https://community.openhab.org/t/philips-tv-2016-binding/64579/61
                            Mit den curl-Befehlen kann ich u.a. erfolgreich das Ambilight ausschalten und einschalten (= # setting Ambilight to FOLLOW_VIDEO).

                            1 Reply Last reply
                            1
                            • AlCalzoneA Offline
                              AlCalzoneA Offline
                              AlCalzone
                              Developer
                              wrote on last edited by
                              #203

                              Top, das klingt gut. Ich hoffe ich komme demnächst mal dazu das fertig zu stellen. Habe mir deinen Beitrag als Lesezeichen gemerkt.

                              Warum `sudo` böse ist: https://forum.iobroker.net/post/17109

                              1 Reply Last reply
                              1
                              • R Offline
                                R Offline
                                Ratze
                                wrote on last edited by
                                #204

                                Selber habe ich weder den Adapter zum laufen gebracht (steht auf gelb) noch das Python Script
                                um User und Passwort vom meinem PUS7101 auszulesen.
                                Problem ist schon eingegrenzt (Visual Studio / C++)

                                Aber in der Zwischenzeit habe ich etwas interessantes entdeckt...
                                Da stellt jemand eine Python Script zur Verfügung mit MQTT support
                                Da es aber auf meiner Windows-Kiste schon mit Python Probleme bei den Requirements gibt,
                                kann ich die Funktion nzw. das Script nicht testen.

                                Quelle: https://github.com/eslavnov/pylips

                                Ein Auszug...
                                "Pylips is a Python tool to control Philips TVs (2015+) through their reverse-engineered API.

                                Supports both Android and non-Android TVs
                                80 built-in commands + support for custom "GET" and "POST" requests to the API
                                All commands work on TVs with API version 6, most of them also work for API version 5
                                Full control of Ambilight including color, brightness, mode and 'Ambilight + Hue'
                                Allows sending TV status updates and receiving commands over MQTT
                                The current version of the API does not allow switching input sources anymore (?), use this tool instead (Android TVs only)."

                                1 Reply Last reply
                                1
                                • MicM Offline
                                  MicM Offline
                                  Mic
                                  Developer
                                  wrote on last edited by Mic
                                  #205

                                  Danke @Ratze!
                                  Interessant hierbei -- sicherlich auch für @AlCalzone -- ist auch die inoffizielle API-Referenz des Programmierers:
                                  https://github.com/eslavnov/Pylips/wiki

                                  Teste ich gerade mit exec und curl und läuft sehr gut, hier ein JavaScript-Beispiel:

                                  [ EDIT: überarbeitetes Script siehe unten ]

                                  1 Reply Last reply
                                  0
                                  • MicM Offline
                                    MicM Offline
                                    Mic
                                    Developer
                                    wrote on last edited by Mic
                                    #206

                                    Hier noch ein Update meines Test-Scripts. Es legt einen Datenpunkt unter "javascript.0.PhilipsTV.MyScript" an, womit man den Philips-TV steuern kann. Eingebaut ist auch Einschalten von Netflix, Kodi und YouTube. Sicherlich einfach in den Adapter integrierbar :-)

                                    /*******************************************************************************
                                     * ---------------------------
                                     * Philips TV Script for ioBroker
                                     * ----------------------------------------------------
                                     * Version: 0.2
                                     * Autor: Mic
                                     * ----------------------------------------------------
                                     * Documentation:
                                     *  - Unofficial Philips TV API Reference: https://github.com/eslavnov/pylips/wiki
                                     *  - Some Info: https://community.openhab.org/t/philips-tv-2016-binding/64579/61
                                     *  - Python Script with MQTT support: https://github.com/eslavnov/pylips
                                     *  - ioBroker Philips TV Adapter: https://forum.iobroker.net/topic/8791/aufruf-philips-tv-v0-1-0-testen
                                     ******************************************************************************/
                                    
                                    /*******************************************************************************
                                     * Settings
                                     *******************************************************************************/
                                    // Pfad, unter dem die Objekte angelegt werden.
                                    const STATE_PATH = 'javascript.0.PhilipsTV.MyScript.';
                                    
                                    // Generate User/Password: see https://github.com/nstrelow/ha_philips_2016
                                    const PHILIPS_USER = 'xxxxxxxxxxxxxxxxxxxxxx';
                                    const PHILIPS_PASS = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
                                    
                                    // URL, change IP address accordingly (and you may also need to change port, see for example https://github.com/eslavnov/pylips)
                                    const PHILIPS_URL = 'https://xxx.xxx.xxx.xxx:1926/6/';
                                    
                                    const LOG_DEBUG = false;
                                    
                                    
                                    /*******************************************************************************
                                     * Expert Settings
                                     *******************************************************************************/
                                    // Hier definieren wir die einzelnen Commands. 
                                    let pCommands = [];
                                    //        0.Command Name                       1.Path              2. curl Command      
                                    pCommands['Cmd: Ambilight Off']             = ['ambilight/power',   '{"power":"Off"}'];
                                    pCommands['Cmd: Ambilight On']              = ['ambilight/power',   '{"power":"On"}'];
                                    pCommands['Cmd: Ambilight On Video Standard'] = ['ambilight/currentconfiguration',   '{"styleName":"FOLLOW_VIDEO","isExpert":false,"menuSetting":"STANDARD"}'];
                                    pCommands['Cmd: Ambilight On Video Immersive'] = ['ambilight/currentconfiguration',   '{"styleName":"FOLLOW_VIDEO","isExpert":false,"menuSetting":"IMMERSIVE"}'];
                                    pCommands['Cmd: Ambilight On Video Natural'] = ['ambilight/currentconfiguration',   '{"styleName":"FOLLOW_VIDEO","isExpert":false,"menuSetting":"NATURAL"}'];
                                    pCommands['Cmd: Ambilight On Video Vivid'] = ['ambilight/currentconfiguration',   '{"styleName":"FOLLOW_VIDEO","isExpert":false,"menuSetting":"VIVID"}'];
                                    pCommands['Cmd: Ambilight On Video Game'] = ['ambilight/currentconfiguration',   '{"styleName":"FOLLOW_VIDEO","isExpert":false,"menuSetting":"GAME"}'];
                                    pCommands['Cmd: Ambilight On Video Comfort'] = ['ambilight/currentconfiguration',   '{"styleName":"FOLLOW_VIDEO","isExpert":false,"menuSetting":"COMFORT"}'];
                                    pCommands['Cmd: Ambilight On Video Relax'] = ['ambilight/currentconfiguration',   '{"styleName":"FOLLOW_VIDEO","isExpert":false,"menuSetting":"RELAX"}'];
                                    pCommands['Launch: Netflix'] = ['activities/launch',   '{"id":"com.netflix.ninja","order":0,"intent":{"action":"Intent{act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 pkg=com.netflix.ninja }","component":{"packageName":"com.netflix.ninja","className":"com.netflix.ninja.MainActivity"}},"label":"Netflix"}'];
                                    pCommands['Launch: Kodi'] = ['activities/launch',   '{"id":"org.xbmc.kodi","order":0,"intent":{"action":"Intent{act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 pkg=org.xbmc.kodi }","component":{"packageName":"org.xbmc.kodi","className":"org.xbmc.kodi.Splash"}},"label":"Kodi"}'];
                                    pCommands['Launch: YouTube'] = ['activities/launch',   '{"id":"com.google.android.apps.youtube.tv.activity.ShellActivity-com.google.android.youtube.tv","order":0,"intent":{"action":"Intent{act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 pkg=com.google.android.youtube.tv cmp=com.google.android.youtube.tv/com.google.android.apps.youtube.tv.activity.ShellActivity }","component":{"packageName":"com.google.android.youtube.tv","className":"com.google.android.apps.youtube.tv.activity.ShellActivity"}},"label":"YouTube"}'];
                                    pCommands['Key: Adjust']  = ['input/key',   '{"key":"Adjust"}'];
                                    pCommands['Key: AmbilightOnOff']  = ['input/key',   '{"key":"AmbilightOnOff"}'];
                                    pCommands['Key: Back']  = ['input/key',   '{"key":"Back"}'];
                                    pCommands['Key: BlueColour']  = ['input/key',   '{"key":"BlueColour"}'];
                                    pCommands['Key: ChannelStepDown']  = ['input/key',   '{"key":"ChannelStepDown"}'];
                                    pCommands['Key: ChannelStepUp']  = ['input/key',   '{"key":"ChannelStepUp"}'];
                                    pCommands['Key: Confirm']  = ['input/key',   '{"key":"Confirm"}'];
                                    pCommands['Key: CursorDown']  = ['input/key',   '{"key":"CursorDown"}'];
                                    pCommands['Key: CursorLeft']  = ['input/key',   '{"key":"CursorLeft"}'];
                                    pCommands['Key: CursorRight']  = ['input/key',   '{"key":"CursorRight"}'];
                                    pCommands['Key: CursorUp']  = ['input/key',   '{"key":"CursorUp"}'];
                                    pCommands['Key: Digit0']  = ['input/key',   '{"key":"Digit0"}'];
                                    pCommands['Key: Digit1']  = ['input/key',   '{"key":"Digit1"}'];
                                    pCommands['Key: Digit2']  = ['input/key',   '{"key":"Digit2"}'];
                                    pCommands['Key: Digit3']  = ['input/key',   '{"key":"Digit3"}'];
                                    pCommands['Key: Digit4']  = ['input/key',   '{"key":"Digit4"}'];
                                    pCommands['Key: Digit5']  = ['input/key',   '{"key":"Digit5"}'];
                                    pCommands['Key: Digit6']  = ['input/key',   '{"key":"Digit6"}'];
                                    pCommands['Key: Digit7']  = ['input/key',   '{"key":"Digit7"}'];
                                    pCommands['Key: Digit8']  = ['input/key',   '{"key":"Digit8"}'];
                                    pCommands['Key: Digit9']  = ['input/key',   '{"key":"Digit9"}'];
                                    pCommands['Key: Dot']  = ['input/key',   '{"key":"Dot"}'];
                                    pCommands['Key: FastForward']  = ['input/key',   '{"key":"FastForward"}'];
                                    pCommands['Key: Find']  = ['input/key',   '{"key":"Find"}'];
                                    pCommands['Key: GreenColour']  = ['input/key',   '{"key":"GreenColour"}'];
                                    pCommands['Key: Home']  = ['input/key',   '{"key":"Home"}'];
                                    pCommands['Key: Info']  = ['input/key',   '{"key":"Info"}'];
                                    pCommands['Key: Mute']  = ['input/key',   '{"key":"Mute"}'];
                                    pCommands['Key: Next']  = ['input/key',   '{"key":"Next"}'];
                                    pCommands['Key: Online']  = ['input/key',   '{"key":"Online"}'];
                                    pCommands['Key: Options']  = ['input/key',   '{"key":"Options"}'];
                                    pCommands['Key: Pause']  = ['input/key',   '{"key":"Pause"}'];
                                    pCommands['Key: Play']  = ['input/key',   '{"key":"Play"}'];
                                    pCommands['Key: PlayPause']  = ['input/key',   '{"key":"PlayPause"}'];
                                    pCommands['Key: Previous']  = ['input/key',   '{"key":"Previous"}'];
                                    pCommands['Key: Record']  = ['input/key',   '{"key":"Record"}'];
                                    pCommands['Key: RedColour']  = ['input/key',   '{"key":"RedColour"}'];
                                    pCommands['Key: Rewind']  = ['input/key',   '{"key":"Rewind"}'];
                                    pCommands['Key: Source']  = ['input/key',   '{"key":"Source"}'];
                                    pCommands['Key: Standby']  = ['input/key',   '{"key":"Standby"}'];
                                    pCommands['Key: Stop']  = ['input/key',   '{"key":"Stop"}'];
                                    pCommands['Key: Subtitle']  = ['input/key',   '{"key":"Subtitle"}'];
                                    pCommands['Key: Teletext']  = ['input/key',   '{"key":"Teletext"}'];
                                    pCommands['Key: Viewmode']  = ['input/key',   '{"key":"Viewmode"}'];
                                    pCommands['Key: VolumeDown']  = ['input/key',   '{"key":"VolumeDown"}'];
                                    pCommands['Key: VolumeUp']  = ['input/key',   '{"key":"VolumeUp"}'];
                                    pCommands['Key: WatchTV']  = ['input/key',   '{"key":"WatchTV"}'];
                                    pCommands['Key: YellowColour']  = ['input/key',   '{"key":"YellowColour"}'];
                                    
                                    
                                    /*******************************************************************************
                                     * Ab hier nichts mehr ändern / Stop editing here!
                                     ******************************************************************************/
                                    
                                    
                                    /*******************************************************************************
                                     * Initiale Function
                                     *******************************************************************************/
                                    init();
                                    function init() {
                                        
                                        // 1. Create states
                                        createScriptStates();
                                    
                                        // 2. Schedule
                                        on({id: STATE_PATH + 'Command', change:'any'}, function (obj) {
                                            doExec(obj.state.val);
                                        });
                                    }
                                    
                                    function doExec(id) {
                                        if (id in pCommands) { // Check if Key exists and typed correctly - https://stackoverflow.com/questions/1098040/checking-if-a-key-exists-in-a-javascript-object
                                            var exec = require('child_process').exec;
                                            var args = "-X POST --digest --insecure -u " + PHILIPS_USER + ":" + PHILIPS_PASS + " -d '" + pCommands[id][1] + "' " + PHILIPS_URL + pCommands[id][0];
                                            exec('curl ' + args, function (error, stdout, stderr) {
                                                if (LOG_DEBUG) log('stdout: ' + stdout);
                                                if (LOG_DEBUG) log('stderr: ' + stderr);
                                                if (error !== null) {
                                                    log('exec error: ' + error);
                                                }
                                            });
                                        } else if(id == '') {
                                            // do nothing, will be empty if script is initally started or user did not select value
                                        } else {
                                            log('Wrong command provided to Philips TV: [' + id + ']', 'warn');
                                        }
                                    }
                                    
                                    function createScriptStates() {
                                        // create drop-down list
                                        let dropdown = '';
                                        for (let lpEntry of Object.keys(pCommands)) {   // 'special' loop here to get the keys
                                            dropdown += '"' + lpEntry + '":"' + lpEntry + '",'; // fill JSON string
                                        }
                                        dropdown = dropdown.substr(0, dropdown.length-1); // remove last comma ","
                                        dropdown = '{' + dropdown + '}'; // finalize JSON string
                                        let dropdownJSON = JSON.parse(dropdown); // convert to JSON
                                        // Create state. Force is set to true, so we will always update the states if e.g. configuration in this script changed.
                                        createState(STATE_PATH + 'Command', '', true, {
                                            'name':'Command', 
                                            'type':'string', 
                                            'read':false, 
                                            'write':true, 
                                            'role':'value', 
                                            'states': dropdownJSON
                                        });
                                    }
                                    
                                    

                                    Achtung:

                                    Update: aktuelles Script siehe auf Github.

                                    S B 2 Replies Last reply
                                    1
                                    • MicM Mic

                                      Hier noch ein Update meines Test-Scripts. Es legt einen Datenpunkt unter "javascript.0.PhilipsTV.MyScript" an, womit man den Philips-TV steuern kann. Eingebaut ist auch Einschalten von Netflix, Kodi und YouTube. Sicherlich einfach in den Adapter integrierbar :-)

                                      /*******************************************************************************
                                       * ---------------------------
                                       * Philips TV Script for ioBroker
                                       * ----------------------------------------------------
                                       * Version: 0.2
                                       * Autor: Mic
                                       * ----------------------------------------------------
                                       * Documentation:
                                       *  - Unofficial Philips TV API Reference: https://github.com/eslavnov/pylips/wiki
                                       *  - Some Info: https://community.openhab.org/t/philips-tv-2016-binding/64579/61
                                       *  - Python Script with MQTT support: https://github.com/eslavnov/pylips
                                       *  - ioBroker Philips TV Adapter: https://forum.iobroker.net/topic/8791/aufruf-philips-tv-v0-1-0-testen
                                       ******************************************************************************/
                                      
                                      /*******************************************************************************
                                       * Settings
                                       *******************************************************************************/
                                      // Pfad, unter dem die Objekte angelegt werden.
                                      const STATE_PATH = 'javascript.0.PhilipsTV.MyScript.';
                                      
                                      // Generate User/Password: see https://github.com/nstrelow/ha_philips_2016
                                      const PHILIPS_USER = 'xxxxxxxxxxxxxxxxxxxxxx';
                                      const PHILIPS_PASS = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
                                      
                                      // URL, change IP address accordingly (and you may also need to change port, see for example https://github.com/eslavnov/pylips)
                                      const PHILIPS_URL = 'https://xxx.xxx.xxx.xxx:1926/6/';
                                      
                                      const LOG_DEBUG = false;
                                      
                                      
                                      /*******************************************************************************
                                       * Expert Settings
                                       *******************************************************************************/
                                      // Hier definieren wir die einzelnen Commands. 
                                      let pCommands = [];
                                      //        0.Command Name                       1.Path              2. curl Command      
                                      pCommands['Cmd: Ambilight Off']             = ['ambilight/power',   '{"power":"Off"}'];
                                      pCommands['Cmd: Ambilight On']              = ['ambilight/power',   '{"power":"On"}'];
                                      pCommands['Cmd: Ambilight On Video Standard'] = ['ambilight/currentconfiguration',   '{"styleName":"FOLLOW_VIDEO","isExpert":false,"menuSetting":"STANDARD"}'];
                                      pCommands['Cmd: Ambilight On Video Immersive'] = ['ambilight/currentconfiguration',   '{"styleName":"FOLLOW_VIDEO","isExpert":false,"menuSetting":"IMMERSIVE"}'];
                                      pCommands['Cmd: Ambilight On Video Natural'] = ['ambilight/currentconfiguration',   '{"styleName":"FOLLOW_VIDEO","isExpert":false,"menuSetting":"NATURAL"}'];
                                      pCommands['Cmd: Ambilight On Video Vivid'] = ['ambilight/currentconfiguration',   '{"styleName":"FOLLOW_VIDEO","isExpert":false,"menuSetting":"VIVID"}'];
                                      pCommands['Cmd: Ambilight On Video Game'] = ['ambilight/currentconfiguration',   '{"styleName":"FOLLOW_VIDEO","isExpert":false,"menuSetting":"GAME"}'];
                                      pCommands['Cmd: Ambilight On Video Comfort'] = ['ambilight/currentconfiguration',   '{"styleName":"FOLLOW_VIDEO","isExpert":false,"menuSetting":"COMFORT"}'];
                                      pCommands['Cmd: Ambilight On Video Relax'] = ['ambilight/currentconfiguration',   '{"styleName":"FOLLOW_VIDEO","isExpert":false,"menuSetting":"RELAX"}'];
                                      pCommands['Launch: Netflix'] = ['activities/launch',   '{"id":"com.netflix.ninja","order":0,"intent":{"action":"Intent{act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 pkg=com.netflix.ninja }","component":{"packageName":"com.netflix.ninja","className":"com.netflix.ninja.MainActivity"}},"label":"Netflix"}'];
                                      pCommands['Launch: Kodi'] = ['activities/launch',   '{"id":"org.xbmc.kodi","order":0,"intent":{"action":"Intent{act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 pkg=org.xbmc.kodi }","component":{"packageName":"org.xbmc.kodi","className":"org.xbmc.kodi.Splash"}},"label":"Kodi"}'];
                                      pCommands['Launch: YouTube'] = ['activities/launch',   '{"id":"com.google.android.apps.youtube.tv.activity.ShellActivity-com.google.android.youtube.tv","order":0,"intent":{"action":"Intent{act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 pkg=com.google.android.youtube.tv cmp=com.google.android.youtube.tv/com.google.android.apps.youtube.tv.activity.ShellActivity }","component":{"packageName":"com.google.android.youtube.tv","className":"com.google.android.apps.youtube.tv.activity.ShellActivity"}},"label":"YouTube"}'];
                                      pCommands['Key: Adjust']  = ['input/key',   '{"key":"Adjust"}'];
                                      pCommands['Key: AmbilightOnOff']  = ['input/key',   '{"key":"AmbilightOnOff"}'];
                                      pCommands['Key: Back']  = ['input/key',   '{"key":"Back"}'];
                                      pCommands['Key: BlueColour']  = ['input/key',   '{"key":"BlueColour"}'];
                                      pCommands['Key: ChannelStepDown']  = ['input/key',   '{"key":"ChannelStepDown"}'];
                                      pCommands['Key: ChannelStepUp']  = ['input/key',   '{"key":"ChannelStepUp"}'];
                                      pCommands['Key: Confirm']  = ['input/key',   '{"key":"Confirm"}'];
                                      pCommands['Key: CursorDown']  = ['input/key',   '{"key":"CursorDown"}'];
                                      pCommands['Key: CursorLeft']  = ['input/key',   '{"key":"CursorLeft"}'];
                                      pCommands['Key: CursorRight']  = ['input/key',   '{"key":"CursorRight"}'];
                                      pCommands['Key: CursorUp']  = ['input/key',   '{"key":"CursorUp"}'];
                                      pCommands['Key: Digit0']  = ['input/key',   '{"key":"Digit0"}'];
                                      pCommands['Key: Digit1']  = ['input/key',   '{"key":"Digit1"}'];
                                      pCommands['Key: Digit2']  = ['input/key',   '{"key":"Digit2"}'];
                                      pCommands['Key: Digit3']  = ['input/key',   '{"key":"Digit3"}'];
                                      pCommands['Key: Digit4']  = ['input/key',   '{"key":"Digit4"}'];
                                      pCommands['Key: Digit5']  = ['input/key',   '{"key":"Digit5"}'];
                                      pCommands['Key: Digit6']  = ['input/key',   '{"key":"Digit6"}'];
                                      pCommands['Key: Digit7']  = ['input/key',   '{"key":"Digit7"}'];
                                      pCommands['Key: Digit8']  = ['input/key',   '{"key":"Digit8"}'];
                                      pCommands['Key: Digit9']  = ['input/key',   '{"key":"Digit9"}'];
                                      pCommands['Key: Dot']  = ['input/key',   '{"key":"Dot"}'];
                                      pCommands['Key: FastForward']  = ['input/key',   '{"key":"FastForward"}'];
                                      pCommands['Key: Find']  = ['input/key',   '{"key":"Find"}'];
                                      pCommands['Key: GreenColour']  = ['input/key',   '{"key":"GreenColour"}'];
                                      pCommands['Key: Home']  = ['input/key',   '{"key":"Home"}'];
                                      pCommands['Key: Info']  = ['input/key',   '{"key":"Info"}'];
                                      pCommands['Key: Mute']  = ['input/key',   '{"key":"Mute"}'];
                                      pCommands['Key: Next']  = ['input/key',   '{"key":"Next"}'];
                                      pCommands['Key: Online']  = ['input/key',   '{"key":"Online"}'];
                                      pCommands['Key: Options']  = ['input/key',   '{"key":"Options"}'];
                                      pCommands['Key: Pause']  = ['input/key',   '{"key":"Pause"}'];
                                      pCommands['Key: Play']  = ['input/key',   '{"key":"Play"}'];
                                      pCommands['Key: PlayPause']  = ['input/key',   '{"key":"PlayPause"}'];
                                      pCommands['Key: Previous']  = ['input/key',   '{"key":"Previous"}'];
                                      pCommands['Key: Record']  = ['input/key',   '{"key":"Record"}'];
                                      pCommands['Key: RedColour']  = ['input/key',   '{"key":"RedColour"}'];
                                      pCommands['Key: Rewind']  = ['input/key',   '{"key":"Rewind"}'];
                                      pCommands['Key: Source']  = ['input/key',   '{"key":"Source"}'];
                                      pCommands['Key: Standby']  = ['input/key',   '{"key":"Standby"}'];
                                      pCommands['Key: Stop']  = ['input/key',   '{"key":"Stop"}'];
                                      pCommands['Key: Subtitle']  = ['input/key',   '{"key":"Subtitle"}'];
                                      pCommands['Key: Teletext']  = ['input/key',   '{"key":"Teletext"}'];
                                      pCommands['Key: Viewmode']  = ['input/key',   '{"key":"Viewmode"}'];
                                      pCommands['Key: VolumeDown']  = ['input/key',   '{"key":"VolumeDown"}'];
                                      pCommands['Key: VolumeUp']  = ['input/key',   '{"key":"VolumeUp"}'];
                                      pCommands['Key: WatchTV']  = ['input/key',   '{"key":"WatchTV"}'];
                                      pCommands['Key: YellowColour']  = ['input/key',   '{"key":"YellowColour"}'];
                                      
                                      
                                      /*******************************************************************************
                                       * Ab hier nichts mehr ändern / Stop editing here!
                                       ******************************************************************************/
                                      
                                      
                                      /*******************************************************************************
                                       * Initiale Function
                                       *******************************************************************************/
                                      init();
                                      function init() {
                                          
                                          // 1. Create states
                                          createScriptStates();
                                      
                                          // 2. Schedule
                                          on({id: STATE_PATH + 'Command', change:'any'}, function (obj) {
                                              doExec(obj.state.val);
                                          });
                                      }
                                      
                                      function doExec(id) {
                                          if (id in pCommands) { // Check if Key exists and typed correctly - https://stackoverflow.com/questions/1098040/checking-if-a-key-exists-in-a-javascript-object
                                              var exec = require('child_process').exec;
                                              var args = "-X POST --digest --insecure -u " + PHILIPS_USER + ":" + PHILIPS_PASS + " -d '" + pCommands[id][1] + "' " + PHILIPS_URL + pCommands[id][0];
                                              exec('curl ' + args, function (error, stdout, stderr) {
                                                  if (LOG_DEBUG) log('stdout: ' + stdout);
                                                  if (LOG_DEBUG) log('stderr: ' + stderr);
                                                  if (error !== null) {
                                                      log('exec error: ' + error);
                                                  }
                                              });
                                          } else if(id == '') {
                                              // do nothing, will be empty if script is initally started or user did not select value
                                          } else {
                                              log('Wrong command provided to Philips TV: [' + id + ']', 'warn');
                                          }
                                      }
                                      
                                      function createScriptStates() {
                                          // create drop-down list
                                          let dropdown = '';
                                          for (let lpEntry of Object.keys(pCommands)) {   // 'special' loop here to get the keys
                                              dropdown += '"' + lpEntry + '":"' + lpEntry + '",'; // fill JSON string
                                          }
                                          dropdown = dropdown.substr(0, dropdown.length-1); // remove last comma ","
                                          dropdown = '{' + dropdown + '}'; // finalize JSON string
                                          let dropdownJSON = JSON.parse(dropdown); // convert to JSON
                                          // Create state. Force is set to true, so we will always update the states if e.g. configuration in this script changed.
                                          createState(STATE_PATH + 'Command', '', true, {
                                              'name':'Command', 
                                              'type':'string', 
                                              'read':false, 
                                              'write':true, 
                                              'role':'value', 
                                              'states': dropdownJSON
                                          });
                                      }
                                      
                                      

                                      Achtung:

                                      Update: aktuelles Script siehe auf Github.

                                      S Offline
                                      S Offline
                                      Stormbringer
                                      wrote on last edited by
                                      #207

                                      @Mic
                                      Mit dem Skript habe ich auch schon experimentiert. Nur leider waren meine Linux Kenntnisse zu schwach um es zum laufen zu bekommen. Ich löse das aus und einschalten vom Ambilight jetzt per CURL Befehl. Kennst du dich zufällig damit auch aus und weißt wie der richtige Befehl geht um Ambi und Hue aus und einzuschalten?

                                      Grundlage war die Seite

                                      https://gist.github.com/marcelrv/ee9a7cf97c227d069e4ee88d26691019

                                      Angaben zur Installation: JS Controller 5.0.12, npm 9.6.7, node 18.17.1, auf einem Intel NUC mit Ubuntu 22.04

                                      1 Reply Last reply
                                      0
                                      • MicM Offline
                                        MicM Offline
                                        Mic
                                        Developer
                                        wrote on last edited by
                                        #208

                                        @Stormbringer
                                        Das macht mein Script (siehe oben), dort ist curl integriert, das per JavaScript über ioBroker ausgeführt wird. Wo hast Du da denn Fragen?

                                        S 1 Reply Last reply
                                        0
                                        • MicM Mic

                                          @Stormbringer
                                          Das macht mein Script (siehe oben), dort ist curl integriert, das per JavaScript über ioBroker ausgeführt wird. Wo hast Du da denn Fragen?

                                          S Offline
                                          S Offline
                                          Stormbringer
                                          wrote on last edited by
                                          #209

                                          @Mic ich hab Probleme das Pylips zum Laufen zu bringen. Ich steuere daher alles mit CURL Befehle aber der CURL Befehl für Ambi und Hue bekomm ich nicht hin.. Weißt du was ich mein?

                                          Angaben zur Installation: JS Controller 5.0.12, npm 9.6.7, node 18.17.1, auf einem Intel NUC mit Ubuntu 22.04

                                          MicM 1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          Support us

                                          ioBroker
                                          Community Adapters
                                          Donate

                                          726

                                          Online

                                          32.7k

                                          Users

                                          82.3k

                                          Topics

                                          1.3m

                                          Posts
                                          Community
                                          Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen | Einwilligungseinstellungen
                                          ioBroker Community 2014-2025
                                          logo
                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Home
                                          • Recent
                                          • Tags
                                          • Unread 0
                                          • Categories
                                          • Unreplied
                                          • Popular
                                          • GitHub
                                          • Docu
                                          • Hilfe