Lokal LEDVANCE kontrol

3 min read 10 hours ago
Published on Jan 14, 2025 This response is partially generated with the help of AI. It may contain inaccuracies.

Table of Contents

Introduction

This tutorial will guide you through the process of integrating LEDVANCE lamps with Home Assistant using LocalTuya. By following these steps, you will be able to control your LEDVANCE lamps locally, resulting in faster response times. The process involves installing Python, additional modules, and configuring Home Assistant for local control.

Step 1: Install Python and Required Modules

  1. Install Python 3.10:

    • Download Python from the Microsoft Store or Python's official website.
    • Ensure to add Python to your system PATH during installation.
  2. Install Additional Modules:

    • Open a command prompt and run the following commands:
      pip install requests
      pip install pycryptodome
      pip install tinytuya
      
    • Install LocalTuya and pyscript via HACS (Home Assistant Community Store).

Step 2: Download Required Software from GitHub

  1. Access GitHub Repository:

  2. Extract and Prepare:

    • Extract the downloaded ZIP file to a folder on your computer.

Step 3: Retrieve Local Keys for LEDVANCE Lamps

  1. Use TinyTuya:
    • Run the TinyTuya script to get local keys for your LEDVANCE lamps.
    • Follow the instructions provided in the TinyTuya documentation to retrieve the necessary keys.

Step 4: Configure LocalTuya in Home Assistant

  1. Add LocalTuya Integration:

    • In Home Assistant, navigate to Configuration > Integrations.
    • Search for LocalTuya and follow the prompts to set it up.
  2. Create Lamp Entities:

    • After setting up LocalTuya, create entities for your LEDVANCE lamps.
    • Input the local keys obtained in the previous step when prompted.

Step 5: Find Values for LocalTuya with TinyTuya

  1. Use TinyTuya to Discover Values:
    • Utilize the TinyTuya tool to discover values and commands for your lamps.
    • Make a note of any relevant command values that you will use in Home Assistant.

Step 6: Test Your Lamp in Home Assistant

  1. Control Your Lamp:
    • From the Home Assistant dashboard, test the functionality of your lamps.
    • Ensure that the lamps respond quickly to your commands.

Step 7: Install Pyscript via HACS

  1. Add Pyscript:
    • In HACS, search for Pyscript and install it.
    • Follow any additional setup instructions provided in HACS.

Step 8: Install SyncLocalKeys

  1. Install SyncLocalKeys:
    • Download and install the SyncLocalKeys script from the appropriate GitHub repository.
    • Make sure it is configured correctly to sync your local keys.

Step 9: Test SyncLocalKeys

  1. Run SyncLocalKeys:
    • Execute the SyncLocalKeys script to ensure that the keys are correctly synchronized.
    • Check Home Assistant to confirm that the lamps are functioning as expected.

Conclusion

By following these steps, you can successfully integrate LEDVANCE lamps with Home Assistant for local control. This setup allows for quick responses to your commands, enhancing your smart home experience. For further customization, explore additional features and automations available in Home Assistant. If you encounter issues, refer back to the relevant sections for troubleshooting tips.