Skip to content

Commit

Permalink
Added support for entertainment api v2 (hue gradient strips) (#471)
Browse files Browse the repository at this point in the history
* added support for philips gradient light strip using v2 api

* added comments

* removed unused code

* added entertainment configuration id, fixed issue with identify

* fixed bridge discovery

* added identify logic for channels.

* Minor changes

* Update Philips Hue scheme

* Power on LED device before streaming Identify colors

* added identify to led layout right click

* Revert "added identify to led layout right click"

This reverts commit a3da48e.

* Blink

* Updated lights count to workaround lights and channel counts mismatch

* Fixes

* Update lang resources

* Do not override LEDs position before saving

* Fix: do not include philipshuev2 into Debug devices list

* Refactoring

* Clean-up schemes

---------

Co-authored-by: awawa-dev <mail4awawa@gmail.com>
Co-authored-by: Awawa <69086569+awawa-dev@users.noreply.github.com>
  • Loading branch information
3 people committed Feb 1, 2023
1 parent 6dfd477 commit 96617ba
Show file tree
Hide file tree
Showing 33 changed files with 1,101 additions and 176 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,5 @@ dependencies/bonjour
# Visual Studio 2015/2017/2019 cache/options directory
.vs/
CMakeSettings.json
cmake-build-debug
.idea
1 change: 1 addition & 0 deletions assets/webconfig/content/light_source.html
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,7 @@ <h4 class="card-title"><i class="fa fa-search fa-fw"></i><span data-i18n="conf_l
<div class="dropdown-menu dropdown-menu-sm" style="display: none;" id="creator-context-menu">
<a class="dropdown-item" href="#" id="CMD_MOVE"><i class="fa fa-arrows fa-fw"></i><span data-i18n="led_editor_context_move">Move</span></a>
<a class="dropdown-item" href="#" id="CMD_PROPERTIES"><i class="fa fa-edit fa-fw"></i><span data-i18n="led_editor_context_properties">Properties</span></a>
<a class="dropdown-item" href="#" id="CMD_IDENTIFY"><i class="fa fa-eye-slash fa-fw"></i><span data-i18n="led_editor_context_identify">Identify</span></a>
<a class="dropdown-item" href="#" id="CMD_ENABLE"><i class="fa fa-lightbulb-o fa-fw"></i><span id="cmd_dis_enable_text" data-i18n="led_editor_context_enable">Enable</span></a>
<a class="dropdown-item" href="#" id="CMD_DELETE"><i class="fa fa-remove fa-fw"></i><span data-i18n="led_editor_context_delete">Delete</span></a>
</div>
Expand Down
5 changes: 5 additions & 0 deletions assets/webconfig/i18n/cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,7 @@
"edt_dev_spec_gpioMap_title": "GPIO mapování",
"edt_dev_spec_gpioNumber_title": "Číslo GPIO",
"edt_dev_spec_groupId_title": "ID skupiny",
"edt_dev_spec_entertainmentConfigurationId_title": "ID konfigurace zábavy",
"edt_dev_spec_header_title": "Specifická nastavení",
"edt_dev_spec_interpolation_title": "Interpolace",
"edt_dev_spec_intervall_title": "Interval",
Expand Down Expand Up @@ -516,6 +517,7 @@
"edt_dev_spec_uid_title": "UID",
"edt_dev_spec_universe_title": "Vesmír",
"edt_dev_spec_useEntertainmentAPI_title": "Použijte Hue Entertainment API",
"edt_dev_spec_useEntertainmentAPIV2_title": "Použít rozhraní Hue Entertainment API V2 (přidává podporu pro světelné pruhy s přechodem odstínu)",
"edt_dev_spec_useOrbSmoothing_title": "Použijte vyhlazování koule",
"edt_dev_spec_useRgbwProtocol_title": "Použijte protokol RGBW",
"edt_dev_spec_username_title": "Uživatelské jméno",
Expand Down Expand Up @@ -886,6 +888,7 @@
"wiz_cololight_title": "Cololight Wizard",
"wiz_guideyou": "$1 vás provede nastavením. Stačí stisknout tlačítko!",
"wiz_hue_blinkblue": "Nechte ID $1 svítit modře",
"wiz_hue_identify": "Identifikovat",
"wiz_hue_clientkey": "Klíč klienta:",
"wiz_hue_create_user": "Vytvořit nového uživatele",
"wiz_hue_desc1": "Automaticky vyhledá Hue-Bridge, v případě, že jej nenajde, musíte zadat IP adresu a vpravo stisknout tlačítko pro opětovné načtení. Nyní potřebujete ID uživatele, pokud ho nemáte, vytvořte nové.",
Expand All @@ -903,6 +906,7 @@
"wiz_hue_e_title": "Průvodce zábavou Philips Hue",
"wiz_hue_e_use_group": "Použijte skupinu",
"wiz_hue_e_use_groupid": "Použijte ID skupiny $1",
"wiz_hue_e_use_entertainmentconfigurationid": "Použijte konfigurační ID $1",
"wiz_hue_failure_connection": "Časový limit: Stiskněte tlačítko přemostění do 30 sekund",
"wiz_hue_failure_ip": "Nenalezen žádný most, zadejte prosím platnou IP adresu",
"wiz_hue_failure_user": "Uživatel nebyl nalezen, vytvořte nového pomocí tlačítka níže nebo zadejte platné ID uživatele a stiskněte symbol „znovu načíst“.",
Expand Down Expand Up @@ -970,6 +974,7 @@
"edt_conf_stream_hardware_hue_title": "Hardwarové ovládání odstínu",
"edt_conf_stream_hardware_hue_expl": "Nastavte odstín hardwaru, pokud to zařízení podporuje, zkontrolujte protokoly (0 = zakázáno)",
"edt_dev_spec_awa_mode_title": "Vysokorychlostní sériový protokol AWA s kontrolou integrity dat (<a href='https://github.com/awawa-dev/HyperHDR/wiki/HyperSerial' style='color:red'>informace</a>)",
"led_editor_context_identify": "Identifikovat",
"conf_leds_layout_cl_lightPosBottomLeft14": "Dole: 0 - 25% zleva",
"conf_leds_layout_cl_lightPosBottomLeft12": "Dole: 25 - 50% zleva",
"conf_leds_layout_cl_lightPosBottomLeft34": "Dole: 50 - 75% zleva",
Expand Down
5 changes: 5 additions & 0 deletions assets/webconfig/i18n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,7 @@
"edt_dev_spec_gpioMap_title": "GPIO-Mapping",
"edt_dev_spec_gpioNumber_title": "GPIO-Nummer",
"edt_dev_spec_groupId_title": "Gruppen-ID",
"edt_dev_spec_entertainmentConfigurationId_title": "Unterhaltungskonfigurations-ID",
"edt_dev_spec_header_title": "Spezifische Einstellungen",
"edt_dev_spec_interpolation_title": "Interpolation",
"edt_dev_spec_intervall_title": "Intervall",
Expand Down Expand Up @@ -516,6 +517,7 @@
"edt_dev_spec_uid_title": "UID",
"edt_dev_spec_universe_title": "Universe",
"edt_dev_spec_useEntertainmentAPI_title": "Verwenden Sie die Hue Entertainment-API",
"edt_dev_spec_useEntertainmentAPIV2_title": "Verwenden Sie die Hue Entertainment API V2 (fügt Unterstützung für Lichtstreifen mit Farbverlauf hinzu)",
"edt_dev_spec_useOrbSmoothing_title": "Verwenden Sie die Kugelglättung",
"edt_dev_spec_useRgbwProtocol_title": "Verwenden Sie das RGBW-Protokoll",
"edt_dev_spec_username_title": "Nutzername",
Expand Down Expand Up @@ -886,6 +888,7 @@
"wiz_cololight_title": "Cololight-Assistent",
"wiz_guideyou": "Die $1 führt Sie durch die Einstellungen. Drücken Sie einfach den Knopf!",
"wiz_hue_blinkblue": "Lass ID $1 blau leuchten",
"wiz_hue_identify": "Identifizieren",
"wiz_hue_clientkey": "Kundenschlüssel:",
"wiz_hue_create_user": "Neuen Benutzer erstellen",
"wiz_hue_desc1": "Es sucht automatisch nach einer Hue-Bridge, falls es keine findet, müssen Sie die IP-Adresse angeben und den Reload-Button rechts drücken. Jetzt benötigen Sie eine Benutzer-ID, falls Sie noch keine haben, erstellen Sie eine neue.",
Expand All @@ -903,6 +906,7 @@
"wiz_hue_e_title": "Philips Hue Entertainment-Assistent",
"wiz_hue_e_use_group": "Gruppe verwenden",
"wiz_hue_e_use_groupid": "Verwenden Sie die Gruppen-ID $1",
"wiz_hue_e_use_entertainmentconfigurationid": "Verwenden Sie die Konfigurations-ID $1",
"wiz_hue_failure_connection": "Timeout: Bitte drücken Sie die Brückentaste innerhalb von 30 Sekunden",
"wiz_hue_failure_ip": "Keine Bridge gefunden, bitte geben Sie eine gültige IP-Adresse ein",
"wiz_hue_failure_user": "Benutzer nicht gefunden, erstellen Sie einen neuen mit der Schaltfläche unten oder geben Sie eine gültige Benutzer-ID ein und drücken Sie auf das Symbol \"Neu laden\".",
Expand Down Expand Up @@ -970,6 +974,7 @@
"edt_conf_stream_hardware_hue_title": "Hardware Farbtonsteuerung",
"edt_conf_stream_hardware_hue_expl": "Stellen Sie den Hardware-Farbton ein, wenn das Gerät dies unterstützt, überprüfen Sie die Protokolle (0=deaktiviert)",
"edt_dev_spec_awa_mode_title": "Serielles AWA-Hochgeschwindigkeitsprotokoll mit Datenintegritätsprüfung (<a href='https://github.com/awawa-dev/HyperHDR/wiki/HyperSerial' style='color:red'>info</a>)",
"led_editor_context_identify": "Identifizieren",
"conf_leds_layout_cl_lightPosBottomLeft14": "Unten: 0 - 25 % von links",
"conf_leds_layout_cl_lightPosBottomLeft12": "Unten: 25 - 50% von links",
"conf_leds_layout_cl_lightPosBottomLeft34": "Unten: 50 - 75% von links",
Expand Down
9 changes: 7 additions & 2 deletions assets/webconfig/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,7 @@
"edt_dev_spec_gpioMap_title": "GPIO mapping",
"edt_dev_spec_gpioNumber_title": "GPIO number",
"edt_dev_spec_groupId_title": "Group ID",
"edt_dev_spec_entertainmentConfigurationId_title": "Entertainment Configuration ID",
"edt_dev_spec_header_title": "Specific Settings",
"edt_dev_spec_interpolation_title": "Interpolation",
"edt_dev_spec_intervall_title": "Interval",
Expand Down Expand Up @@ -516,6 +517,7 @@
"edt_dev_spec_uid_title": "UID",
"edt_dev_spec_universe_title": "Universe",
"edt_dev_spec_useEntertainmentAPI_title": "Use Hue Entertainment API",
"edt_dev_spec_useEntertainmentAPIV2_title": "Use Hue Entertainment API V2 (Adds support for hue gradient light strips)",
"edt_dev_spec_useOrbSmoothing_title": "Use orb smoothing",
"edt_dev_spec_useRgbwProtocol_title": "Use RGBW protocol",
"edt_dev_spec_username_title": "Username",
Expand Down Expand Up @@ -886,6 +888,7 @@
"wiz_cololight_title": "Cololight Wizard",
"wiz_guideyou": "The $1 will guide you through the settings. Just press the button!",
"wiz_hue_blinkblue": "Let ID $1 light up blue",
"wiz_hue_identify": "Identify",
"wiz_hue_clientkey": "Clientkey:",
"wiz_hue_create_user": "Create new User",
"wiz_hue_desc1": "It searches automatically for a Hue-Bridge, in case it can't find one you need to provide the IP-address and push the reload button on the right. Now you need a user ID, if you don't have one create a new one.",
Expand All @@ -903,6 +906,7 @@
"wiz_hue_e_title": "Philips Hue Entertainment Wizard",
"wiz_hue_e_use_group": "Use group",
"wiz_hue_e_use_groupid": "Use group ID $1",
"wiz_hue_e_use_entertainmentconfigurationid": "Use configuration ID $1",
"wiz_hue_failure_connection": "Timeout: Please press the bridge button within the period of 30 seconds",
"wiz_hue_failure_ip": "No Bridge found, please type in a valid IP-Address",
"wiz_hue_failure_user": "User not found, create a new one with the button below or input a valid user id and press the \"reload\" symbol.",
Expand Down Expand Up @@ -1004,7 +1008,7 @@
"general_comp_HDR" : "HDR (global)",
"language_selector" : "Language",
"main_menu_dashboard_token" : "Overview",
"wiz_hue_intro2" : "<p style='color:red;'><b>PLEASE CONFIGURE THE ENTERTAINMENT GROUP IN THE PHILIPS HUE MOBILE APP FIRST</b></p>1 Create an Entertainment group in the Philips Hue App<br/>2 Check &rsquo;<i>Use Hue Entertainment API</i>&rsquo; option in HyperHDR before entering the wizard<br/>3 Run the wizard. You may have to reconnect to the Hue Bridge by clicking the button on the bridge when you are asked to. &rsquo;<i>Username</i>&rsquo; and &rsquo;<i>Clientkey</i>&rsquo; will be automatically discovered.",
"wiz_hue_intro2" : "<p style='color:red;'><b>PLEASE CONFIGURE THE ENTERTAINMENT GROUP IN THE PHILIPS HUE MOBILE APP FIRST</b></p>1 Create an Entertainment group in the Philips Hue App<br/>2 Check &rsquo;<i>Use Hue Entertainment API</i>&rsquo; option in HyperHDR before entering the wizard<br/>3 Also Check &rsquo;<i>Use Hue Entertainment API V2</i>&rsquo; option in HyperHDR to have hue gradient light strips support before entering the wizard. Note that if your bridge does not support this, it will fall back to V1.<br/>4 Run the wizard. You may have to reconnect to the Hue Bridge by clicking the button on the bridge when you are asked to. &rsquo;<i>Username</i>&rsquo; and &rsquo;<i>Clientkey</i>&rsquo; will be automatically discovered.",
"main_menu_streamer_token" : "Streamer",
"remote_optgroup_classicEffects" : "Classic effects",
"remote_optgroup_musicEffects" : "Music effects",
Expand Down Expand Up @@ -1190,5 +1194,6 @@
"conf_leds_layout_btn_zoom" : "Zoom",
"edt_serial_espHandshake" : "Esp8266/ESP32 handshake (<a href='https://github.com/awawa-dev/HyperHDR/wiki/HyperSerial' style='color:red'>info</a>)",
"edt_rpi_ws281x_driver" : "This driver is intended for advanced users and is <b>not recommended or supported</b> by the HyperHDR team. Please read the project FAQ section for reasons and don't ask us for help if you try to use it because it <b>revokes any support for your entire HyperHDR configuration</b>. Choose a better solution like HyperSerialEsp8266/HyperSerialESP32 (<a href='https://github.com/awawa-dev/HyperHDR/wiki/HyperSerial' style='color:red'>about</a>) or HyperSPI (<a href='https://github.com/awawa-dev/HyperSPI' style='color:red'>about</a>).",
"edt_dev_spec_awa_mode_title": "High speed serial AWA protocol with data integrity check (<a href='https://github.com/awawa-dev/HyperHDR/wiki/HyperSerial' style='color:red'>info</a>)"
"edt_dev_spec_awa_mode_title": "High speed serial AWA protocol with data integrity check (<a href='https://github.com/awawa-dev/HyperHDR/wiki/HyperSerial' style='color:red'>info</a>)",
"led_editor_context_identify": "Identify"
}
5 changes: 5 additions & 0 deletions assets/webconfig/i18n/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,7 @@
"edt_dev_spec_gpioMap_title": "Mapeo GPIO",
"edt_dev_spec_gpioNumber_title": "Número GPIO",
"edt_dev_spec_groupId_title": "Identificación del grupo",
"edt_dev_spec_entertainmentConfigurationId_title": "ID de configuración de entretenimiento",
"edt_dev_spec_header_title": "Configuraciones específicas",
"edt_dev_spec_interpolation_title": "Interpolación",
"edt_dev_spec_intervall_title": "Intervalo",
Expand Down Expand Up @@ -516,6 +517,7 @@
"edt_dev_spec_uid_title": "UID",
"edt_dev_spec_universe_title": "Universo",
"edt_dev_spec_useEntertainmentAPI_title": "Utilice la API de Hue Entertainment",
"edt_dev_spec_useEntertainmentAPIV2_title": "Use Hue Entertainment API V2 (agrega soporte para tiras de luz de gradiente de tono)",
"edt_dev_spec_useOrbSmoothing_title": "Usar suavizado de orbe",
"edt_dev_spec_useRgbwProtocol_title": "Utilice el protocolo RGBW",
"edt_dev_spec_username_title": "Nombre de usuario",
Expand Down Expand Up @@ -886,6 +888,7 @@
"wiz_cololight_title": "Asistente de Cololight",
"wiz_guideyou": "El $1 lo guiará a través de la configuración. ¡Solo presiona el botón!",
"wiz_hue_blinkblue": "Deje que el ID $1 se ilumine en azul",
"wiz_hue_identify": "Identificar",
"wiz_hue_clientkey": "Clave de cliente:",
"wiz_hue_create_user": "Crear nuevo usuario",
"wiz_hue_desc1": "Busca automáticamente un Hue-Bridge, en caso de que no pueda encontrar uno, debe proporcionar la dirección IP y presionar el botón de recarga a la derecha. Ahora necesita una identificación de usuario, si no tiene una, cree una nueva.",
Expand All @@ -903,6 +906,7 @@
"wiz_hue_e_title": "Asistente de entretenimiento de Philips Hue",
"wiz_hue_e_use_group": "Usar grupo",
"wiz_hue_e_use_groupid": "Usar ID de grupo $1",
"wiz_hue_e_use_entertainmentconfigurationid": "Usar ID de configuración $1",
"wiz_hue_failure_connection": "Tiempo de espera: presione el botón de puente dentro del período de 30 segundos",
"wiz_hue_failure_ip": "No se encontró ningún puente, ingrese una dirección IP válida",
"wiz_hue_failure_user": "Usuario no encontrado, cree uno nuevo con el botón de abajo o ingrese una identificación de usuario válida y presione el símbolo \"recargar\".",
Expand Down Expand Up @@ -970,6 +974,7 @@
"edt_conf_stream_hardware_hue_title": "Control de tono de hardware",
"edt_conf_stream_hardware_hue_expl": "Configure el tono del hardware si el dispositivo lo admite, verifique los registros (0 = deshabilitado)",
"edt_dev_spec_awa_mode_title": "Protocolo AWA serial de alta velocidad con verificación de integridad de datos (<a href='https://github.com/awawa-dev/HyperHDR/wiki/HyperSerial' style='color:red'>info</a>)",
"led_editor_context_identify": "Identificar",
"conf_leds_layout_cl_lightPosBottomLeft14": "Abajo: 0-25% desde la izquierda",
"conf_leds_layout_cl_lightPosBottomLeft12": "Abajo: 25 - 50% desde la izquierda",
"conf_leds_layout_cl_lightPosBottomLeft34": "Abajo: 50 - 75% desde la izquierda",
Expand Down
5 changes: 5 additions & 0 deletions assets/webconfig/i18n/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,7 @@
"edt_dev_spec_gpioMap_title": "Cartographie GPIO",
"edt_dev_spec_gpioNumber_title": "Numéro GPIO",
"edt_dev_spec_groupId_title": "Identifiant du groupe",
"edt_dev_spec_entertainmentConfigurationId_title": "ID de configuration de divertissement",
"edt_dev_spec_header_title": "Paramètres spécifiques",
"edt_dev_spec_interpolation_title": "Interpolation",
"edt_dev_spec_intervall_title": "Intervalle",
Expand Down Expand Up @@ -516,6 +517,7 @@
"edt_dev_spec_uid_title": "UID",
"edt_dev_spec_universe_title": "Univers",
"edt_dev_spec_useEntertainmentAPI_title": "Utiliser l'API Hue Entertainment",
"edt_dev_spec_useEntertainmentAPIV2_title": "Utiliser Hue Entertainment API V2 (ajoute la prise en charge des bandes lumineuses à dégradé de teinte)",
"edt_dev_spec_useOrbSmoothing_title": "Utiliser le lissage d'orbe",
"edt_dev_spec_useRgbwProtocol_title": "Utiliser le protocole RGBW",
"edt_dev_spec_username_title": "Nom d'utilisateur",
Expand Down Expand Up @@ -886,6 +888,7 @@
"wiz_cololight_title": "Assistant Cololight",
"wiz_guideyou": "Le $1 vous guidera à travers les réglages. Appuyez simplement sur le bouton !",
"wiz_hue_blinkblue": "Laissez ID $1 s'allumer en bleu",
"wiz_hue_identify": "Identité",
"wiz_hue_clientkey": "Clé client :",
"wiz_hue_create_user": "Créer un nouvel utilisateur",
"wiz_hue_desc1": "Il recherche automatiquement un Hue-Bridge, au cas où il n'en trouve pas, vous devez fournir l'adresse IP et appuyer sur le bouton de rechargement sur la droite. Maintenant, vous avez besoin d'un identifiant d'utilisateur, si vous n'en avez pas, créez-en un nouveau.",
Expand All @@ -903,6 +906,7 @@
"wiz_hue_e_title": "Assistant de divertissement Philips Hue",
"wiz_hue_e_use_group": "Utiliser le groupe",
"wiz_hue_e_use_groupid": "Utiliser l'ID de groupe $1",
"wiz_hue_e_use_entertainmentconfigurationid": "Utiliser l'ID de configuration $1",
"wiz_hue_failure_connection": "Délai d'attente : veuillez appuyer sur le bouton du pont dans un délai de 30 secondes",
"wiz_hue_failure_ip": "Aucun pont trouvé, veuillez saisir une adresse IP valide",
"wiz_hue_failure_user": "Utilisateur introuvable, créez-en un nouveau avec le bouton ci-dessous ou entrez un identifiant d'utilisateur valide et appuyez sur le symbole \"recharger\".",
Expand Down Expand Up @@ -970,6 +974,7 @@
"edt_conf_stream_hardware_hue_title": "Contrôle de la teinte matérielle",
"edt_conf_stream_hardware_hue_expl": "Définir la teinte du matériel si l'appareil le prend en charge, vérifier les journaux (0 = désactivé)",
"edt_dev_spec_awa_mode_title": "Protocole AWA série haute vitesse avec vérification de l'intégrité des données (<a href='https://github.com/awawa-dev/HyperHDR/wiki/HyperSerial' style='color:red'>info</a>)",
"led_editor_context_identify": "Identité",
"conf_leds_layout_cl_lightPosBottomLeft14": "Bas : 0 - 25 % à partir de la gauche",
"conf_leds_layout_cl_lightPosBottomLeft12": "Bas : 25 - 50 % à partir de la gauche",
"conf_leds_layout_cl_lightPosBottomLeft34": "Bas : 50 - 75 % de la gauche",
Expand Down
Loading

0 comments on commit 96617ba

Please sign in to comment.