diff --git a/.azure.yml b/.azure.yml index bb6f0c163..c0ae0d4fb 100644 --- a/.azure.yml +++ b/.azure.yml @@ -87,7 +87,6 @@ jobs: python -m pip install aqtinstall python -m aqt install -O c:\Qt 5.15.0 windows desktop win64_msvc2019_64 displayName: 'Install Qt 5.15.0' - # build process - bash: ./.ci/ci_build.sh env: diff --git a/.vscode/tasks.json b/.vscode/tasks.json index f0d5e0ae5..6bd2346eb 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -106,7 +106,7 @@ "type": "shell", "command": "${workspaceFolder}/build/bin/hyperiond -d", "windows": { - "command": "${workspaceFolder}/build/bin/Debug/hyperiond -d -c" + "command": "${workspaceFolder}/build/bin/Debug/hyperiond" }, "group": "build" }, @@ -115,7 +115,7 @@ "type": "shell", "command": "${workspaceFolder}/build/bin/hyperiond -d", "windows": { - "command": "${workspaceFolder}/build/bin/Release/hyperiond -d -c" + "command": "${workspaceFolder}/build/bin/Release/hyperiond" }, "group": "build" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 569a6a831..eb1b5fda5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,8 +13,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - An option to reset (delete) the database for the commandline has been added (#820) - Improve language selection usability (#812) - readded V4L2 Input method from old Hyperion (#825) -- Windows: Start Hyperion with a console window `hyperiond -c` (Or new start menu entry) (#860) - ### Changed - Updated dependency rpi_ws281x to latest upstream (#820) - Updated websocket-extensions (#826) diff --git a/CompileHowto.md b/CompileHowto.md index 04f3ecd89..8289e86af 100644 --- a/CompileHowto.md +++ b/CompileHowto.md @@ -40,7 +40,7 @@ wget -qN https://raw.github.com/hyperion-project/hyperion.ng/master/bin/scripts/ ``` sudo apt-get update -sudo apt-get install git cmake build-essential qtbase5-dev libqt5serialport5-dev libusb-1.0-0-dev python3-dev libxcb-util0-dev libxcb-randr0-dev libxrandr-dev libxrender-dev libavahi-core-dev libavahi-compat-libdnssd-dev libjpeg-dev libturbojpeg0-dev libqt5sql5-sqlite libssl-dev zlib1g-dev +sudo apt-get install git cmake build-essential qtbase5-dev libqt5serialport5-dev libusb-1.0-0-dev python3-dev libxrender-dev libavahi-core-dev libavahi-compat-libdnssd-dev libjpeg-dev libturbojpeg0-dev libqt5sql5-sqlite libssl-dev zlib1g-dev ``` **on RPI you need the videocore IV headers** @@ -82,7 +82,6 @@ We assume a 64bit Windows 7 or higher. Install the following - Open a console window and execute `pip install aqtinstall`. - Now we can download Qt to _C:\Qt_ `mkdir c:\Qt && aqt install -O c:\Qt 5.15.0 windows desktop win64_msvc2019_64` - [CMake (Windows win64-x64 Installer)](https://cmake.org/download/) (Check: Add to PATH) -- [Win64 OpenSSL v1.1.1g](https://slproweb.com/products/Win32OpenSSL.html) ([direct link](https://slproweb.com/download/Win64OpenSSL-1_1_1g.exe)) - [Visual Studio 2019 Build Tools](https://go.microsoft.com/fwlink/?linkid=840931) ([direct link](https://aka.ms/vs/16/release/vs_buildtools.exe)) - Select C++ Buildtools - On the right, just select `MSVC v142 VS 2019 C++ x64/x86-Buildtools` and latest `Windows 10 SDK`. Everything else is not needed. diff --git a/CrossCompileHowto.md b/CrossCompileHowto.md index e17f13d6a..ac71d5746 100644 --- a/CrossCompileHowto.md +++ b/CrossCompileHowto.md @@ -4,14 +4,14 @@ Use a clean Raspbian Stretch Lite (on target) and Ubuntu 18/19 (on host) to exec ## On the Target system (here Raspberry Pi) Install required additional packages. ``` -sudo apt-get install qtbase5-dev libqt5serialport5-dev libusb-1.0-0-dev python3-dev libxcb-util0-dev libxcb-randr0-dev libxrandr-dev libxrender-dev libavahi-core-dev libavahi-compat-libdnssd-dev libjpeg-dev libturbojpeg0-dev libqt5sql5-sqlite aptitude qt5-default rsync libssl-dev zlib1g-dev +sudo apt-get install qtbase5-dev libqt5serialport5-dev libusb-1.0-0-dev python3-dev libxrender-dev libavahi-core-dev libavahi-compat-libdnssd-dev libjpeg-dev libturbojpeg0-dev libqt5sql5-sqlite aptitude qt5-default rsync libssl-dev zlib1g-dev ``` ## On the Host system (here Ubuntu) Update the Ubuntu environment to the latest stage and install required additional packages. ``` sudo apt-get update sudo apt-get upgrade -sudo apt-get -qq -y install git rsync cmake build-essential qtbase5-dev libqt5serialport5-dev libusb-1.0-0-dev python3-dev libxcb-util0-dev libxcb-randr0-dev libxrandr-dev libxrender-dev libavahi-core-dev libavahi-compat-libdnssd-dev libjpeg-dev libturbojpeg0-dev libqt5sql5-sqlite libssl-dev zlib1g-dev +sudo apt-get -qq -y install git rsync cmake build-essential qtbase5-dev libqt5serialport5-dev libusb-1.0-0-dev python3-dev libxrender-dev libavahi-core-dev libavahi-compat-libdnssd-dev libjpeg-dev libturbojpeg0-dev libqt5sql5-sqlite libssl-dev zlib1g-dev ``` Refine the target IP or hostname, plus userID as required and set-up cross-compilation environment: diff --git a/README.md b/README.md index e5065dad6..8d2749e69 100644 --- a/README.md +++ b/README.md @@ -48,9 +48,6 @@ Covers these topics (WorkInProgress) [![Visit Documentation](https://img.shields.io/website?down_message=offline&label=Documentation%20%20&up_message=online&url=https%3A%2F%2Fdocs.hyperion-project.org)](https://docs.hyperion-project.org) -## Changelog -Released and unreleased changes at [Changelog.md](CHANGELOG.md) - ## Building See [CompileHowto](CompileHowto.md) and [CrossCompileHowto](CrossCompileHowto.md). diff --git a/assets/webconfig/i18n/cs.json b/assets/webconfig/i18n/cs.json index 96c269e32..f5e776351 100644 --- a/assets/webconfig/i18n/cs.json +++ b/assets/webconfig/i18n/cs.json @@ -316,13 +316,13 @@ "wiz_hue_failure_connection": "Časový limit: Stiskněte tlačítko Bridge v průběhu 30 sekund", "wiz_hue_failure_user": "Uživatel nebyl nalezen, vytvořte nový pomocí tlačítka níže nebo zadejte platné ID uživatele a stiskněte symbol „znovu načíst“.", "wiz_hue_press_link": "Prosím stiskněte tlačítko odkazu na Hue Bridge.", - "wiz_hue_ids_disabled": "Deaktivováno", - "wiz_hue_ids_entire": "Celý obrázek", "wiz_hue_noids": "Tento Hue Bridge nemá žárovky/lampy, předtím je spárujte s aplikací Hue Apps", - "wiz_hue_pos": "Poloha", "wiz_hue_searchb": "Hledání v Bridge ...", "wiz_hue_blinkblue": "Nechte ID $1 svítit modře", - "wiz_hue_ident": "Identifikovat", + "wiz_hue_disabled": "Deaktivováno", + "wiz_hue_entire": "Celý obrázek", + "wiz_pos": "Poloha", + "wiz_identify": "Identifikovat", "wiz_cc_title": "Průvodce kalibrací barev", "wiz_cc_intro1": "Tento průvodce vás provede kalibrací LED diod. Používáte-li Kodi, mohou být kalibrační obrázky a videa odesílány přímo na kodi bez dalších úkolů na vaší straně. Pokud tomu tak není, musíte tyto soubory sami stáhnout a použít je, pokud si to průvodce přeje.", "wiz_cc_kwebs": "Kodi webový server (IP:Port)", diff --git a/assets/webconfig/i18n/de.json b/assets/webconfig/i18n/de.json index ee803ee27..f8f832d1f 100644 --- a/assets/webconfig/i18n/de.json +++ b/assets/webconfig/i18n/de.json @@ -355,9 +355,9 @@ "InfoDialog_iswitch_title": "Hyperion switcher", "InfoDialog_iswitch_text": "Sollte in deinem lokalen Netzwerk Hyperion mehr als einmal laufen, kannst du hier zwischen den Web Konfigurationen hin und her schalten. Wähle dazu die Instanz unten aus und switche!", "wiz_wizavail": "Assistent verfügbar", - "wiz_guideyou": "Der $1 wird dich durch die Konfiguration leiten, drücke dazu einfach den Button!", + "wiz_guideyou": "Der $1 wird Dich durch die Konfiguration leiten, drücke dazu einfach den Button!", "wiz_rgb_title": "RGB Byte Reihenfolge Assistent", - "wiz_rgb_intro1": "Dieser Assisent wird dir dabei helfen die richtige Byte Reihenfolge für deine leds zu finden. Klicke auf Fortfahren um zu beginnen.", + "wiz_rgb_intro1": "Dieser Assisent wird Dir dabei helfen die richtige Byte Reihenfolge für deine leds zu finden. Klicke auf Fortfahren um zu beginnen.", "wiz_rgb_intro2": "Wann benötigt man diesen Assistenten? Zur Erstkonfiguration oder wenn deine LEDs zb rot leuchten sollten, sie aber blau oder grün sind.", "wiz_rgb_expl": "Der Farbpunkt ändert alle x Sekunden die Farbe (rot, grün), zur selben Zeit ändern deine LEDs die Farbe ebenfalls. Beantworte die Fragen unten, um deine RGB Byte Reihenfolge zu überprüfen/korrigieren.", "wiz_rgb_switchevery": "Ändere Farbe alle...", @@ -365,9 +365,9 @@ "wiz_rgb_qrend": "...rot ist?", "wiz_rgb_qgend": "...grün ist?", "wiz_hue_title": "Philips Hue Assistent", - "wiz_hue_intro1": "Dieser Assistent hilft dir bei der Konfiguration von Hyperion für Philips Hue. Zu den Funktionen zählen ein automatisches finden der Hue Bridge, einen neuen Benutzer erstellen, die einzelnen Lampen unterschiedlichen Bereichen im Bild zuzuordnen und weitere Einstellungen von Hyperion automatisch anzupassen. Kurz gesagt: Komplette Einrichtung mit ein paar Klicks.", + "wiz_hue_intro1": "Dieser Assistent hilft Dir bei der Konfiguration von Hyperion für Philips Hue. Zu den Funktionen zählen ein automatisches finden der Hue Bridge, einen neuen Benutzer erstellen, die einzelnen Lampen unterschiedlichen Bereichen im Bild zuzuordnen und weitere Einstellungen von Hyperion automatisch anzupassen. Kurz gesagt: Komplette Einrichtung mit ein paar Klicks.", "wiz_hue_desc1": "Es wird automatisch nach der Hue Bridge gesucht, solltest sie nicht gefunden werden, gebe die IP an und drücke den \"neu laden\" Button. Danach benötigst du eine gültige Benutzer ID, diese kann auch erstellt werden.", - "wiz_hue_desc2": "Nun kannst du auswählen, welche der Lampen (IDs) hinzugefügt werden sollen. Mit der Position wählst du aus, wo die jeweilige Lampe \"im Bild\" sitzen soll. Deaktivierte Lampen werden nicht hinzugefügt. Als Hilfe zur Identifizierung kannst du sie mit einem Klick auf den rechten Button kurz aufleuchten lassen.", + "wiz_hue_desc2": "Nun kannst Du auswählen, welche der Lampen (IDs) hinzugefügt werden sollen. Mit der Position wählst Du aus, wo die jeweilige Lampe \"im Bild\" sitzen soll. Deaktivierte Lampen werden nicht hinzugefügt. Als Hilfe zur Identifizierung kannst Du sie mit einem Klick auf den rechten Button kurz aufleuchten lassen.", "wiz_hue_ip": "Hue Bridge IP:", "wiz_hue_username": "Benutzer ID:", "wiz_hue_clientkey": "Clientkey:", @@ -376,13 +376,9 @@ "wiz_hue_failure_connection": "Zeitüberschreitung. Bitte drücke die Taste auf deiner Hue Bridge rechtzeitig", "wiz_hue_failure_user": "Benutzer ID wurde nicht gefunden, erstelle eine neue, indem du auf den nachfolgenden Button klickst, oder gib eine bereits registrierte an und klicke dann auf das \"neu laden\" Symbol.", "wiz_hue_press_link": "Bitte \"Link\" Taste auf der Hue Bridge drücken.", - "wiz_hue_ids_disabled": "Deaktiviert", - "wiz_hue_ids_entire": "Ganzes Bild", "wiz_hue_noids": "Diese Hue Bridge hat keine verbundenen Lampen, bitte verbinde diese zuerst mit deiner Hue Bridge (Nutze die Hue Apps dafür)", - "wiz_hue_pos": "Position/Status", "wiz_hue_searchb": "Suche nach Hue Bridge...", "wiz_hue_blinkblue": "Lasse ID $1 blau aufleuchten", - "wiz_hue_ident": "Identifiziere", "wiz_hue_e_create_user": "Neuen Benutzer und Clientkey erstellen", "wiz_hue_e_clientkey_needed": "Für die Verwendung der Entertainment API, ist ein zum Usernamen passender Clientkey erforderlich. Bitte einen vorhandenen eingeben oder über die Schaltflächen unten einen neuen erstellen.", "wiz_hue_e_use_groupid": "Gruppen ID $1 verwenden", @@ -396,6 +392,16 @@ "wiz_hue_e_desc2": "Nun kannst du die Entertainment Gruppe auswählen, welche die Lampen zur Verwendung mit Hyperion beinhaltet.", "wiz_hue_e_desc3": "Nun kannst du auswählen, mit welcher Position die jeweilige Lampe \"im Bild\" sitzen soll. Eine Vorauswahl der Position, wurde Anhand der konfigurierten Positionen der Lampen in der Entertainment Gruppe gewählt. Dies ist nur eine Empfehlung und kann beliebig angepasst werden. Als Hilfe zur Identifizierung kannst du sie mit einem Klick auf den rechten Button kurz aufleuchten lassen und die Auswahl zu verbessern.", "wiz_hue_e_use_group": "Gruppe verwenden", + "wiz_yeelight_title": "Yeelight Assistent", + "wiz_yeelight_intro1": "Dieser Assistent hilft Dir bei der Konfiguration von Hyperion für Yeelight. Zu den Funktionen zählen ein automatisches finden der Yeelights, die einzelnen Lampen unterschiedlichen Bereichen im Bild zuzuordnen und weitere Einstellungen von Hyperion automatisch anzupassen. Kurz gesagt: Komplette Einrichtung mit ein paar Klicks.", + "wiz_yeelight_desc2": "Nun kannst Du auswählen, welche der Lampen hinzugefügt werden sollen. Mit der Position wählst Du aus, wo die jeweilige Lampe \"im Bild\" sitzen soll. Deaktivierte Lampen werden nicht hinzugefügt. Als Hilfe zur Identifizierung kannst Du sie mit einem Klick auf den rechten Button kurz aufleuchten lassen.", + "wiz_yeelight_noLights": "Es wurden keine Yeelights gefunden! Bitte verbinde die Yeelights mit dem Netzwerk oder konfiguriere sie manuell.", + "wiz_yeelight_unsupported" : "Nicht Unterstützt", + "wiz_ids_disabled": "Deaktiviert", + "wiz_ids_entire": "Ganzes Bild", + "wiz_pos": "Position/Status", + "wiz_identify" : "Identifiziere", + "wiz_identify_light": "Identifiziere $1", "wiz_cc_title": "Farbkalibrierungs Assistent", "wiz_cc_intro1": "Der Assistent wird dich durch die Kalibrierung deiner LEDs leiten. Sofern du Kodi nutzt, können die Bilder und Testvideos direkt an Kodi geschickt werden. Andernfalls musst du das Material selbst herunterladen und anwenden.", "wiz_cc_kwebs": "Kodi Webserver (IP:Port)", @@ -438,7 +444,8 @@ "edt_dev_spec_orbIds_title": "Orb ID(s)", "edt_dev_spec_useOrbSmoothing_title": "Nutze Orb Glättung", "edt_dev_spec_targetIp_title": "Ziel IP", - "edt_dev_spec_targetIpHost_title": "Ziel IP/hostname", + "edt_dev_spec_targetIpHost_title": "Ziel IP/Rechnername", + "edt_dev_spec_networkDeviceName_title" : "Gerätename im Netzwerk", "edt_dev_spec_outputPath_title": "Ausgabepfad", "edt_dev_spec_delayAfterConnect_title": "Verzögerung nach Verbindung", "edt_dev_spec_FCsetConfig_title": "Wende fadecandy Konfiguration an", @@ -451,20 +458,33 @@ "edt_dev_spec_username_title": "Benutzername", "edt_dev_spec_lightid_title": "Lampen ID(s)", "edt_dev_spec_lightid_itemtitle": "ID", + "edt_dev_spec_lights_title" : "Lampe(n)", + "edt_dev_spec_lights_itemtitle" : "Lampe", + "edt_dev_spec_lights_name" : "Name", "edt_dev_spec_transistionTime_title": "Übergangszeit", "edt_dev_spec_blackLightsTimeout_title": "Signal Erkennung Timeout bei schwarz", + "edt_dev_spec_transistionTimeExtra_title" : "Extra Übergangszeit bei Schwarz", + "edt_dev_spec_transeffect_title" : "Übergangseffekt", + "edt_conf_enum_transeffect_smooth" : "Gleichmäßig", + "edt_conf_enum_transeffect_sudden" : "Sofort", + "edt_dev_spec_debugLevel_title" : "Debug Stufe", + "edt_conf_enum_dl_nodebug" : "Keine Debugausgabe", + "edt_conf_enum_dl_verbose1" : "Stufe 1", + "edt_conf_enum_dl_verbose2" : "Stufe 2", + "edt_conf_enum_dl_verbose3" : "Stufe 3", "edt_dev_spec_brightnessThreshold_title": "Signal Erkennung Helligkeitsminimum", "edt_dev_spec_switchOffOnBlack_title": "Aus bei schwarz", + "edt_dev_spec_switchOffOnbelowMinBrightness_title" : "Aus bei Minimum", "edt_dev_spec_brightnessFactor_title": "Helligkeitsfaktor", - "edt_dev_spec_brightnessMin_title": "Helligkeit minimum", - "edt_dev_spec_brightnessMax_title": "Helligkeit maximum", + "edt_dev_spec_brightnessMin_title": "Helligkeitsminimum", + "edt_dev_spec_brightnessMax_title": "Helligkeitsmaximum", "edt_dev_spec_sslReadTimeout_title" : "Streamer lese Timeout", "edt_dev_spec_sslHSTimeoutMin_title" : "Streamer Handshake minimum Timeout", "edt_dev_spec_sslHSTimeoutMax_title" : "Streamer Handshake maximum Timeout", "edt_dev_spec_verbose_title": "Logge alle Hue Commandos", "edt_dev_spec_debugStreamer_title": "Streamer Debugging", "edt_dev_spec_debugLevel_title": "Streamer Verbindung Debug Stufe", - "edt_dev_spec_restoreOriginalState_title" : "Lampen Originalzustand wiederherstellen", + "edt_dev_spec_restoreOriginalState_title" : "Bei Deaktivierung, Lampen Originalzustand wiederherstellen", "edt_dev_spec_useEntertainmentAPI_title": "Hue Entertainment API verwenden", "edt_dev_spec_ledType_title": "LED typ", "edt_dev_spec_uid_title": "UID", @@ -511,6 +531,7 @@ "edt_conf_enum_brg": "BRG", "edt_conf_enum_gbr": "GBR", "edt_conf_enum_grb": "GRB", + "edt_conf_enum_hsv" : "HSV", "edt_conf_enum_linear": "Linear", "edt_conf_enum_PAL": "PAL", "edt_conf_enum_NTSC": "NTSC", diff --git a/assets/webconfig/i18n/en.json b/assets/webconfig/i18n/en.json index 018279d1e..e34c61dad 100644 --- a/assets/webconfig/i18n/en.json +++ b/assets/webconfig/i18n/en.json @@ -376,13 +376,9 @@ "wiz_hue_failure_connection" : "Timeout: Please press the bridge button within the period of 30 seconds", "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.", "wiz_hue_press_link" : "Please press link button on the Hue Bridge.", - "wiz_hue_ids_disabled" : "Deactivated", - "wiz_hue_ids_entire" : "Whole picture", "wiz_hue_noids" : "This Hue bridge has no bulbs/stripes, please pair them before with the Hue Apps", - "wiz_hue_pos": "Position/State", "wiz_hue_searchb": "Searching for bridge...", "wiz_hue_blinkblue": "Let ID $1 light up blue", - "wiz_hue_ident" : "Identify", "wiz_hue_e_create_user" : "Create new User and clientkey", "wiz_hue_e_clientkey_needed": "A clientkey that matches the username is required to use the entertainment API. Please enter an existing one or use the button below to create a new one.", "wiz_hue_e_use_groupid": "Use group ID $1", @@ -396,6 +392,16 @@ "wiz_hue_e_desc2" : "Now choose your entertainment group, which has all your lights inside for use with Hyperion.", "wiz_hue_e_desc3": "Now you can choose in which position the respective lamp should be \"in the picture\". A preselection of the position was made based on the configured positions of the lights in the entertainment group. This is just a recommendation and can be customized as desired. You can therefore highlight them briefly by clicking on the right button to improve the selection.", "wiz_hue_e_use_group" : "Use group", + "wiz_yeelight_title" : "Yeelight Wizard", + "wiz_yeelight_intro1" : "This wizards configures Hyperion for the Yeelight system. Features are the Yeelighs' auto detection, setting each light to a specific position on your picture or disable it and tune the Hyperion settings automatically! So in short: All you need are some clicks and you are done!", + "wiz_yeelight_desc2" : "Now choose which lamps should be added. The position assigns the lamp to a specific position on your \"picture\". Disabled lamps won't be added. To identify single lamps press the button on the right.", + "wiz_yeelight_noLights": "No Yeelights found! Please get the lights connected to the network or configure them mannually.", + "wiz_yeelight_unsupported" : "Unsupported", + "wiz_pos": "Position/State", + "wiz_ids_disabled" : "Deactivated", + "wiz_ids_entire" : "Whole picture", + "wiz_identify" : "Identify", + "wiz_identify_light": "Identify $1", "wiz_cc_title" : "Colour calibration wizard", "wiz_cc_intro1" : "This wizard will guide you through your led calibration. If you are using Kodi, the calibration pictures and videos can be sent directly to it without further actions on your side. If not, you will need to download these files yourself and display them when the wizard needs you to adjust the setting.", "wiz_cc_kwebs" : "Kodi webserver (IP:Port)", @@ -438,7 +444,9 @@ "edt_dev_spec_orbIds_title" : "Orb ID(s)", "edt_dev_spec_useOrbSmoothing_title" : "Use orb smoothing", "edt_dev_spec_targetIp_title" : "Target IP", - "edt_dev_spec_targetIpHost_title" : "Target IP/hostname", + "edt_dev_spec_targetIpHost_title" : "Target IP/Hostname", + "edt_dev_spec_networkDeviceName_title" : "Network devicename", + "edt_dev_spec_networkDevicePort_title" : "Port", "edt_dev_spec_outputPath_title" : "Output path", "edt_dev_spec_delayAfterConnect_title" : "Delay after connect", "edt_dev_spec_FCsetConfig_title" : "Set fadecandy configuration", @@ -451,10 +459,23 @@ "edt_dev_spec_username_title" : "Username", "edt_dev_spec_lightid_title" : "Light ID(s)", "edt_dev_spec_lightid_itemtitle" : "ID", + "edt_dev_spec_lights_title" : "Light(s)", + "edt_dev_spec_lights_itemtitle" : "Light", + "edt_dev_spec_lights_name" : "Name", "edt_dev_spec_transistionTime_title" : "Transition time", "edt_dev_spec_blackLightsTimeout_title": "Signal detection timeout on black", + "edt_dev_spec_transistionTimeExtra_title" : "Extra time darkness", + "edt_dev_spec_transeffect_title" : "Transition effect", + "edt_conf_enum_transeffect_smooth" : "Smooth", + "edt_conf_enum_transeffect_sudden" : "Sudden", + "edt_dev_spec_debugLevel_title" : "Debug level", + "edt_conf_enum_dl_nodebug" : "No Debug output", + "edt_conf_enum_dl_verbose1" : "Verbosity level 1", + "edt_conf_enum_dl_verbose2" : "Verbosity level 2", + "edt_conf_enum_dl_verbose3" : "Verbosity level 3", "edt_dev_spec_brightnessThreshold_title": "Signal detection brightness minimum", "edt_dev_spec_switchOffOnBlack_title" : "Switch off on black", + "edt_dev_spec_switchOffOnbelowMinBrightness_title" : "Switch-off, below minimum", "edt_dev_spec_brightnessFactor_title" : "Brightness factor", "edt_dev_spec_brightnessMin_title": "Brightness minimum", "edt_dev_spec_brightnessMax_title": "Brightness maximum", @@ -464,7 +485,7 @@ "edt_dev_spec_verbose_title": "Log all Hue commands", "edt_dev_spec_debugStreamer_title": "Streamer Debug", "edt_dev_spec_debugLevel_title": "Streamer Connection Debug Level", - "edt_dev_spec_restoreOriginalState_title" : "Restore lights' original state", + "edt_dev_spec_restoreOriginalState_title" : "Restore lights' original state when disabled", "edt_dev_spec_useEntertainmentAPI_title": "Use Hue Entertainment API", "edt_dev_spec_ledType_title" : "LED Type", "edt_dev_spec_uid_title" : "UID", @@ -512,6 +533,7 @@ "edt_conf_enum_brg" : "BRG", "edt_conf_enum_gbr" : "GBR", "edt_conf_enum_grb" : "GRB", + "edt_conf_enum_hsv" : "HSV", "edt_conf_enum_linear" : "Linear", "edt_conf_enum_PAL" : "PAL", "edt_conf_enum_NTSC" : "NTSC", diff --git a/assets/webconfig/i18n/es.json b/assets/webconfig/i18n/es.json index cf9475b5f..e463d8048 100644 --- a/assets/webconfig/i18n/es.json +++ b/assets/webconfig/i18n/es.json @@ -316,13 +316,14 @@ "wiz_hue_failure_connection": "El tiempo de conexión expiró. Por favor, pulsa el botón a tiempo.", "wiz_hue_failure_user": "Usuario no encontrado, crea uno nuevo debajo o introduce un ID de usuario válido", "wiz_hue_press_link": "Por favor, presione el botón de enlace en el Puente de Matiz.", - "wiz_hue_ids_disabled": "Desactivado", - "wiz_hue_ids_entire": "Imagen completa", "wiz_hue_noids": "Este puente de Matiz no tiene bombillas/tiras, por favor, emparéjalos antes con las aplicaciones de Hue", - "wiz_hue_pos": "Posición/Estado", "wiz_hue_searchb": "Buscando el puente...", "wiz_hue_blinkblue": "Permite a ID $1 encender el azul", "wiz_hue_ident": "Identificar", + "wiz_ids_disabled": "Desactivado", + "wiz_ids_entire": "Imagen completa", + "wiz_pos": "Posición/Estado", + "wiz_identify": "Identificar", "wiz_cc_title": "Asistente de calibración de color", "wiz_cc_intro1": "Este asistente te guiará a través de la calibración led. Si estás utilizando Kodi, las imágenes de calibración y los videos se pueden enviar directamente a kodi sin más tareas de tu lado. Si no, necesitas descargar estos archivos tú mismo y aplicarlos, si el asistente lo desea.", "wiz_cc_kwebs": "Servidor web Kodi (IP:PUERTO)", diff --git a/assets/webconfig/i18n/it.json b/assets/webconfig/i18n/it.json index 70275db2e..c9ee39c8c 100644 --- a/assets/webconfig/i18n/it.json +++ b/assets/webconfig/i18n/it.json @@ -316,13 +316,13 @@ "wiz_hue_failure_connection": "Timeout: premi il bottone del bridge entro il periodo di 30 secondi", "wiz_hue_failure_user": "Utente non trovato, creane uno nuovo qui sotto o inserisci un id utente valido e premi il simbolo di \"ricarica\".", "wiz_hue_press_link": "Premi il bottone di collegamento sull'Hue Bridge.", - "wiz_hue_ids_disabled": "Disattiva", - "wiz_hue_ids_entire": "Immagine intera", "wiz_hue_noids": "questo Hue bridge non ha lampadine/strisce, prima associale con l'Hue App", - "wiz_hue_pos": "Posizione/Stato", "wiz_hue_searchb": "Cercando il bridge...", "wiz_hue_blinkblue": "ID $1 si illumina di blu", - "wiz_hue_ident": "Identifica", + "wiz_ids_disabled": "Disattiva", + "wiz_ids_entire": "Immagine intera", + "wiz_pos": "Posizione/Stato", + "wiz_identify" : "Identifica", "wiz_cc_title": "Assistente calibrazione colore", "wiz_cc_intro1": "Questo assistente ti guiderà attraverso la calibrazione dei tuoi led. Se stai usando Kodi, le immagini e i video di calibrazione possono essere mandati direttamente a Kodi senza altro lavoro da parte tua. Altrimenti devi scaricare questi file e applicarli tu stesso quando l'assistente necessita di regolare le impostazioni.", "wiz_cc_kwebs": "Webserver Kodi (IP:Porta)", diff --git a/assets/webconfig/i18n/sv.json b/assets/webconfig/i18n/sv.json index 5aa03e29e..ba75868ab 100644 --- a/assets/webconfig/i18n/sv.json +++ b/assets/webconfig/i18n/sv.json @@ -316,13 +316,13 @@ "wiz_hue_failure_connection": "Timeout: Tryck på bryggknappen inom 30 sekunder", "wiz_hue_failure_user": "Användaren hittades inte, skapa en ny med knappen nedan eller mata in ett giltigt användar-ID och tryck på \"ladda om\"", "wiz_hue_press_link": "Tryck på länkknappen på HUE-bryggan.", - "wiz_hue_ids_disabled": "Inaktiverad", - "wiz_hue_ids_entire": "Hela bilden", "wiz_hue_noids": "Denna Hue-brygga har inga LED-lampor/-tejp, vänligen koppla ihop dem med HUE-appen innan", - "wiz_hue_pos": "Position/Läge", "wiz_hue_searchb": "Letar efter brygga...", "wiz_hue_blinkblue": "Låt ID $1 lysa blått", - "wiz_hue_ident": "Identifiera", + "wiz_ids_disabled": "Inaktiverad", + "wiz_ids_entire": "Hela bilden", + "wiz_pos": "Position/Läge", + "wiz_identify": "Identifiera", "wiz_cc_title": "Färgkalibreringsguiden", "wiz_cc_intro1": "Den här guiden leder dig igenom din LED-kalibrering. Om du använder Kodi kan kalibreringsbilder och videoklipp skickas direkt utan ytterligare åtgärder från din sida. Om inte, måste du ladda ner dessa filer själv och visa dem när guiden vill justera inställningen.", "wiz_cc_kwebs": "Kodi webbserver (IP:Port)", diff --git a/assets/webconfig/js/content_leds.js b/assets/webconfig/js/content_leds.js old mode 100755 new mode 100644 index 5d3109140..5db3676f9 --- a/assets/webconfig/js/content_leds.js +++ b/assets/webconfig/js/content_leds.js @@ -489,7 +489,7 @@ $(document).ready(function() { $("#leddevices").off().on("change", function() { var generalOptions = window.serverSchema.properties.device; - // Modified schema entry "hardwareLedCount" in generalOptions to minimum LedCount + // Modified schema entry "hardwareLedCount" in generalOptions to minimum LedCount var ledType = $(this).val(); //philipshueentertainment backward fix @@ -535,6 +535,20 @@ $(document).ready(function() { }); $("#root_specificOptions_useEntertainmentAPI").trigger("change"); } +/* + else if(ledType == "wled") { + var ledWizardType = (this.checked) ? "wled" : ledType; + var data = { type: ledWizardType }; + var wled_title = 'wiz_wled_title'; + changeWizard(data, wled_title, startWizardWLED); + } +*/ + else if(ledType == "yeelight") { + var ledWizardType = (this.checked) ? "yeelight" : ledType; + var data = { type: ledWizardType }; + var yeelight_title = 'wiz_yeelight_title'; + changeWizard(data, yeelight_title, startWizardYeelight); + } function changeWizard(data, hint, fn) { $('#btn_wiz_holder').html("") @@ -551,7 +565,7 @@ $(document).ready(function() { var devRPiSPI = ['apa102', 'apa104', 'ws2801', 'lpd6803', 'lpd8806', 'p9813', 'sk6812spi', 'sk6822spi', 'ws2812spi']; var devRPiPWM = ['ws281x']; var devRPiGPIO = ['piblaster']; - var devNET = ['atmoorb', 'fadecandy', 'philipshue', 'nanoleaf', 'tinkerforge', 'tpm2net', 'udpe131', 'udpartnet', 'udph801', 'udpraw']; + var devNET = ['atmoorb', 'fadecandy', 'philipshue', 'nanoleaf', 'tinkerforge', 'tpm2net', 'udpe131', 'udpartnet', 'udph801', 'udpraw', 'wled', 'yeelight']; var devUSB = ['adalight', 'dmx', 'atmo', 'hyperionusbasp', 'lightpack', 'multilightpack', 'paintpack', 'rawhid', 'sedu', 'tpm2', 'karate']; var optArr = [[]]; diff --git a/assets/webconfig/js/hyperion.js b/assets/webconfig/js/hyperion.js index 79c6fc548..94cab0096 100644 --- a/assets/webconfig/js/hyperion.js +++ b/assets/webconfig/js/hyperion.js @@ -118,15 +118,19 @@ function initWebSocket() var response = JSON.parse(event.data); var success = response.success; var cmd = response.command; + var tan = response.tan if (success || typeof(success) == "undefined") { $(window.hyperion).trigger({type:"cmd-"+cmd, response:response}); } else { - var error = response.hasOwnProperty("error")? response.error : "unknown"; - $(window.hyperion).trigger({type:"error",reason:error}); - console.log("[window.websocket::onmessage] ",error) + // skip tan -1 error handling + if(tan != -1){ + var error = response.hasOwnProperty("error")? response.error : "unknown"; + $(window.hyperion).trigger({type:"error",reason:error}); + console.log("[window.websocket::onmessage] ",error) + } } } catch(exception_error) @@ -165,6 +169,53 @@ function sendToHyperion(command, subcommand, msg) window.websocket.send('{"command":"'+command+'", "tan":'+window.wsTan+subcommand+msg+'}'); } +// Send a json message to Hyperion and wait for a matching response +// A response matches, when command(+subcommand) of request and response is the same +// command: The string command +// subcommand: The optional string subcommand +// data: The json data as Object +// tan: The optional tan, default 1. If the tan is -1, we skip global response error handling +// Returns data of response or false if timeout +async function sendAsyncToHyperion (command, subcommand, data, tan = 1) { + let obj = { command, tan } + if (subcommand) {Object.assign(obj, {subcommand})} + if (data) { Object.assign(obj, data) } + + //if (process.env.DEV || sstore.getters['common/getDebugState']) console.log('SENDAS', obj) + return __sendAsync(obj) +} + +// Send a json message to Hyperion and wait for a matching response +// A response matches, when command(+subcommand) of request and response is the same +// Returns data of response or false if timeout +async function __sendAsync (data) { + return new Promise((resolve, reject) => { + let cmd = data.command + let subc = data.subcommand + let tan = data.tan; + if (subc) + cmd = `${cmd}-${subc}` + + let func = (e) => { + let rdata; + try { + rdata = JSON.parse(e.data) + } catch (error) { + console.error("[window.websocket::onmessage] ",error) + resolve(false) + } + if (rdata.command == cmd && rdata.tan == tan) { + window.websocket.removeEventListener('message', func) + resolve(rdata) + } + } + // after 7 sec we resolve false + setTimeout(() => { window.websocket.removeEventListener('message', func); resolve(false) }, 7000) + window.websocket.addEventListener('message', func) + window.websocket.send(JSON.stringify(data) + '\n') + }) +} + // ----------------------------------------------------------- // wrapped server commands @@ -396,3 +447,25 @@ function requestAdjustment(type, value, complete) else sendToHyperion("adjustment", "", '"adjustment": {"'+type+'": '+value+'}'); } + +async function requestLedDeviceDiscovery(type) +{ + let data = { ledDeviceType: type }; + + return sendAsyncToHyperion("leddevice", "discover", data, Math.floor(Math.random() * 1000) ); +} + +async function requestLedDeviceProperties(type, params) +{ + let data = { ledDeviceType: type, params: params }; + + return sendAsyncToHyperion("leddevice", "getProperties", data, Math.floor(Math.random() * 1000)); +} + +function requestLedDeviceIdentification(type, params) +{ + sendToHyperion("leddevice", "identify", '"ledDeviceType": "'+type+'","params": '+JSON.stringify(params)+''); + + //let data = {ledDeviceType: type, params: params}; + //sendToHyperion("leddevice", "identify", data ); +} diff --git a/assets/webconfig/js/wizard.js b/assets/webconfig/js/wizard.js index b019b5811..f7a6f33ac 100644 --- a/assets/webconfig/js/wizard.js +++ b/assets/webconfig/js/wizard.js @@ -514,7 +514,66 @@ function beginWizardCC() $('#btn_wizard_colorcalibration').off().on('click', startWizardCC); -//hue wizard +// Layout positions +var lightPosTop = {hmin: 0.15, hmax: 0.85, vmin: 0 , vmax: 0.2 }; +var lightPosTopLeft = {hmin: 0 , hmax: 0.15, vmin: 0 , vmax: 0.15}; +var lightPosTopRight = {hmin: 0.85, hmax: 1.0 , vmin: 0 , vmax: 0.15}; +var lightPosBottom = {hmin: 0.15, hmax: 0.85, vmin: 0.8 , vmax: 1.0 }; +var lightPosBottomLeft = {hmin: 0 , hmax: 0.15, vmin: 0.85, vmax: 1.0 }; +var lightPosBottomRight = {hmin: 0.85, hmax: 1.0 , vmin: 0.85, vmax: 1.0 }; +var lightPosLeft = {hmin: 0 , hmax: 0.15, vmin: 0.15, vmax: 0.85}; +var lightPosLeftTop = {hmin: 0 , hmax: 0.15, vmin: 0 , vmax: 0.5 }; +var lightPosLeftMiddle = {hmin: 0 , hmax: 0.15, vmin: 0.25, vmax: 0.75}; +var lightPosLeftBottom = {hmin: 0 , hmax: 0.15, vmin: 0.5 , vmax: 1.0 }; +var lightPosRight = {hmin: 0.85, hmax: 1.0 , vmin: 0.15, vmax: 0.85}; +var lightPosRightTop = {hmin: 0.85, hmax: 1.0 , vmin: 0 , vmax: 0.5 }; +var lightPosRightMiddle = {hmin: 0.85, hmax: 1.0 , vmin: 0.25, vmax: 0.75}; +var lightPosRightBottom = {hmin: 0.85, hmax: 1.0 , vmin: 0.5 , vmax: 1.0 }; +var lightPosEntire = {hmin: 0.0 , hmax: 1.0 , vmin: 0.0 , vmax: 1.0 }; + +function assignLightPos(id, pos, name) +{ + var i = null; + + if(pos === "top") + i = lightPosTop; + else if(pos === "topleft") + i = lightPosTopLeft; + else if(pos === "topright") + i = lightPosTopRight; + else if(pos === "bottom") + i = lightPosBottom; + else if(pos === "bottomleft") + i = lightPosBottomLeft; + else if(pos === "bottomright") + i = lightPosBottomRight; + else if(pos === "left") + i = lightPosLeft; + else if(pos === "lefttop") + i = lightPosLeftTop; + else if(pos === "leftmiddle") + i = lightPosLeftMiddle; + else if(pos === "leftbottom") + i = lightPosLeftBottom; + else if(pos === "right") + i = lightPosRight; + else if(pos === "righttop") + i = lightPosRightTop; + else if(pos === "rightmiddle") + i = lightPosRightMiddle; + else if(pos === "rightbottom") + i = lightPosRightBottom; + else + i = lightPosEntire; + + i.name = name; + return i; +} + +//**************************** +// Wizard Philips Hue +//**************************** + var hueIPs = []; var hueIPsinc = 0; var lightIDs = null; @@ -522,22 +581,6 @@ var groupIDs = null; var lightLocation = []; var groupLights = []; var groupLightsLocations = []; - -var huePosTop = {hmin: 0.15, hmax: 0.85, vmin: 0 , vmax: 0.2 }; -var huePosTopLeft = {hmin: 0 , hmax: 0.15, vmin: 0 , vmax: 0.15}; -var huePosTopRight = {hmin: 0.85, hmax: 1.0 , vmin: 0 , vmax: 0.15}; -var huePosBottom = {hmin: 0.15, hmax: 0.85, vmin: 0.8 , vmax: 1.0 }; -var huePosBottomLeft = {hmin: 0 , hmax: 0.15, vmin: 0.85, vmax: 1.0 }; -var huePosBottomRight = {hmin: 0.85, hmax: 1.0 , vmin: 0.85, vmax: 1.0 }; -var huePosLeft = {hmin: 0 , hmax: 0.15, vmin: 0.15, vmax: 0.85}; -var huePosLeftTop = {hmin: 0 , hmax: 0.15, vmin: 0 , vmax: 0.5 }; -var huePosLeftMiddle = {hmin: 0 , hmax: 0.15, vmin: 0.25, vmax: 0.75}; -var huePosLeftBottom = {hmin: 0 , hmax: 0.15, vmin: 0.5 , vmax: 1.0 }; -var huePosRight = {hmin: 0.85, hmax: 1.0 , vmin: 0.15, vmax: 0.85}; -var huePosRightTop = {hmin: 0.85, hmax: 1.0 , vmin: 0 , vmax: 0.5 }; -var huePosRightMiddle = {hmin: 0.85, hmax: 1.0 , vmin: 0.25, vmax: 0.75}; -var huePosRightBottom = {hmin: 0.85, hmax: 1.0 , vmin: 0.5 , vmax: 1.0 }; -var huePosEntire = {hmin: 0.0 , hmax: 1.0 , vmin: 0.0 , vmax: 1.0 }; var hueType = "philipshue"; function startWizardPhilipsHue(e) @@ -585,7 +628,7 @@ function startWizardPhilipsHue(e) $('#wizp2_body').append(''); } createTable("lidsh", "lidsb", "hue_ids_t"); - $('.lidsh').append(createTableRow([$.i18n('edt_dev_spec_lightid_title'),$.i18n('wiz_hue_pos'),$.i18n('wiz_hue_ident')], true)); + $('.lidsh').append(createTableRow([$.i18n('edt_dev_spec_lightid_title'),$.i18n('wiz_pos'),$.i18n('wiz_identify')], true)); $('#wizp2_footer').html(''); $('#wizp3_body').html(''+$.i18n('wiz_hue_press_link')+'


'); @@ -684,45 +727,6 @@ function checkUserResult(reply, usr) { } }; -function assignHuePos(id, pos) -{ - var i = null; - - if(pos == "top") - i = huePosTop; - else if(pos == "topleft") - i = huePosTopLeft; - else if(pos == "topright") - i = huePosTopRight; - else if(pos == "bottom") - i = huePosBottom; - else if(pos == "bottomleft") - i = huePosBottomLeft; - else if(pos == "bottomright") - i = huePosBottomRight; - else if(pos == "left") - i = huePosLeft; - else if(pos == "lefttop") - i = huePosLeftTop; - else if(pos == "leftmiddle") - i = huePosLeftMiddle; - else if(pos == "leftbottom") - i = huePosLeftBottom; - else if(pos == "right") - i = huePosRight; - else if(pos == "righttop") - i = huePosRightTop; - else if(pos == "rightmiddle") - i = huePosRightMiddle; - else if(pos == "rightbottom") - i = huePosRightBottom; - else - i = huePosEntire; - - i.name = lightIDs[id].name; - return i; -} - function identHueId(id, off, oState) { if(off !== true) @@ -751,6 +755,72 @@ function useGroupId(id) get_hue_lights(); } +async function discover_hue_bridges(){ + + const res = await requestLedDeviceDiscovery ('philipshue'); + + // TODO: error case unhandled + // res can be: false (timeout) or res.error (not found) + if(res && !res.error){ + const r = res.info + + // Process devices returned by discovery + console.log(r); + + if(r.devices.length == 0) + $('#wiz_hue_ipstate').html($.i18n('wiz_hue_failure_ip')); + else + { + for(const device of r.devices) + { + console.log("Device:", device); + + var ip = device.hostname + ":" + device.port; + console.log("Host:", ip); + + hueIPs.push({internalipaddress : ip}); + } + var usr = $('#user').val(); + if(usr != "") { + checkHueBridge(checkUserResult, usr); + } else { + checkHueBridge(checkBridgeResult); + } + } + } +} + +async function getProperties_hue_bridge(hostAddress, username, resourceFilter){ + + let params = { host: hostAddress, user: username, filter: resourceFilter}; + + const res = await requestLedDeviceProperties ('philipshue', params); + + // TODO: error case unhandled + // res can be: false (timeout) or res.error (not found) + if(res && !res.error){ + const r = res.info + + // Process properties returned + console.log(r); + } +} + +function identify_hue_device(hostAddress, username, id){ + + console.log("identify_hue_device"); + + let params = { host: hostAddress, user: username, lightId: id }; + + const res = requestLedDeviceIdentification ("philipshue", params); + // TODO: error case unhandled + // res can be: false (timeout) or res.error (not found) + if(res && !res.error){ + const r = res.info + console.log(r); + } +} + function getHueIPs(){ $('#wiz_hue_ipstate').html($.i18n('wiz_hue_searchb')); $.ajax({ @@ -795,7 +865,8 @@ function beginWizardHue() //check if ip is empty/reachable/search for bridge if(eV("output") == "") { - getHueIPs(); + //getHueIPs(); + discover_hue_bridges(); } else { @@ -810,8 +881,13 @@ function beginWizardHue() } $('#retry_bridge').off().on('click', function(){ - if($('#ip').val()!="") hueIPs.unshift({internalipaddress : $('#ip').val()}); - hueIPsinc = 0; + if($('#ip').val()!="") + { + hueIPs.unshift({internalipaddress : $('#ip').val()}) + hueIPsinc = 0; + } + else discover_hue_bridges(); + var usr = $('#user').val(); if(usr != "") { checkHueBridge(checkUserResult, usr); @@ -843,7 +919,7 @@ function beginWizardHue() if($('#hue_'+key).val() != "disabled") { finalLightIds.push(key); - var idx_content = assignHuePos(key, $('#hue_'+key).val()); + var idx_content = assignLightPos(key, $('#hue_'+key).val(), lightIDs[key].name); hueLedConfig.push(JSON.parse(JSON.stringify(idx_content))); } } @@ -860,7 +936,9 @@ function beginWizardHue() c.brightnessCompensation = 0; //device config - var d = sc.device; + + //Start with a clean configuration + var d = {}; d.output = $('#ip').val(); d.username = $('#user').val(); d.type = 'philipshue'; @@ -903,6 +981,9 @@ function beginWizardHue() //smoothing on sc.smoothing.enable = true; } + + window.serverConfig.device = d; + requestWriteConfig(sc, true); resetWizard(); }); @@ -1098,14 +1179,14 @@ function get_hue_lights(){ for(var opt in lightOptions) { var val = lightOptions[opt]; - var txt = (val != 'entire' && val != 'disabled') ? 'conf_leds_layout_cl_' : 'wiz_hue_ids_'; + var txt = (val != 'entire' && val != 'disabled') ? 'conf_leds_layout_cl_' : 'wiz_ids_'; options+= '