pytradfri | IKEA Trådfri/Tradfri API

 by   home-assistant-libs Python Version: 13.0.0 License: MIT

kandi X-RAY | pytradfri Summary

kandi X-RAY | pytradfri Summary

pytradfri is a Python library typically used in Internet of Things (IoT), Raspberry Pi applications. pytradfri has no bugs, it has no vulnerabilities, it has build file available, it has a Permissive License and it has medium support. You can install using 'pip install pytradfri' or download it from GitHub, PyPI.

Python package to communicate with the IKEA Trådfri (Tradfri) ZigBee Gateway compatible with ZigBee Light Link products. By using this library you can communicate with the gateway and control IKEA's lights and wall plugs.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              pytradfri has a medium active ecosystem.
              It has 907 star(s) with 132 fork(s). There are 38 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 0 open issues and 158 have been closed. On average issues are closed in 21 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of pytradfri is 13.0.0

            kandi-Quality Quality

              pytradfri has 0 bugs and 0 code smells.

            kandi-Security Security

              pytradfri has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              pytradfri code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              pytradfri is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              pytradfri releases are available to install and integrate.
              Deployable package is available in PyPI.
              Build file is available. You can build the component from source.
              Installation instructions, examples and code snippets are available.
              It has 4129 lines of code, 401 functions and 54 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed pytradfri and discovered the below as its top functions. This is intended to give you an instant insight into pytradfri implemented functionality, and help decide if they suit your requirements.
            • The main entry point
            • Reset the protocol
            • Load a JSON file from a given file
            • Return a list of SmartTask objects
            • Shutdown the server
            • Get the protocol
            • Set Hue color
            • Set values for the light curve
            • Validate value
            • Set the HSB color
            • Validate the value
            • Set the dimmer
            • Set the light color
            • Load a JSON file
            • Set the transition time
            • Get gateway info
            • Set color temperature
            • Print all groups defined in the Gateway Gateway
            • Get the list of groups
            • Print all lamps
            • Print information about smart tasks
            • Set a color
            • Get the list of SmartTasks
            • Return the list of groups
            • Print all devices
            • Set the blind state
            • Print the endpoints in the gateway
            • Turn off
            • Sets the air control flag
            Get all kandi verified functions for this library.

            pytradfri Key Features

            No Key Features are available at this moment for pytradfri.

            pytradfri Examples and Code Snippets

            How do I add an hour to sunset time?
            Pythondot img1Lines of Code : 22dot img1License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            from pytradfri import Gateway
            from pytradfri.api.libcoap_api import APIFactory
            from pytradfri.util import load_json, save_json
            from time import sleep
            import requests
            import datetime
            import time
            import json
            from datetime import timedelta #T
            How do I add an hour to sunset time?
            Pythondot img2Lines of Code : 2dot img2License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            datetime.timedelta(hours=1)
            

            Community Discussions

            Trending Discussions on pytradfri

            QUESTION

            How do I add an hour to sunset time?
            Asked 2018-Dec-08 at 00:45

            I've got a Python script running that gets the sunset time, compares it with the time now and turns a light on if it's later.

            This gets run via a cron job every 15 minutes between certain times of the day so that it should cover the whole year.

            But what I'd like to do is stop it from turning the light on if it's more than, say, 1 hour after sunset.

            Why? I just went to bed at about 7.00pm as I had a migraine. The lights had come on at sunset. I turned them off. 15 minutes later, I realised my home automation plans were badly flawed as I was rudely awoken by 2 lights coming on suddenly :)

            This is the relevant bit of my code:

            ...

            ANSWER

            Answered 2018-Dec-07 at 09:04

            Remove the import timedelta and call

            Source https://stackoverflow.com/questions/53660340

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install pytradfri

            You might have to use superuser privileges (sudo) for some commands to work when installing. To use the library in a synchronous application, you first need to install libcoap using this script. Use examples/example_sync.py when testing this. For asynchronous applications you will need to install pytradfri[async], for instance using the requirements file: pip install pytradfri[async]. Please note that install might take considerable time on slow devices. Use examples/example_async.py when testing this. Security best practice is to not store the security code that is printed on the gateway permanently in your application. Please always use the PSK when communicating with the gateway.

            Support

            There is a Docker script available to bootstrap a dev environment. Run ./script/dev_docker and you will build and launch a container that is ready to go for both sync and async. After launching, follow the above instructions to test the library stand-alone. The working directory of the Docker image is /usr/src/app. The checked out version of this repo is added there and installed as a Python dependency for easy development and testing. When you want to use the latest stable version from pip, you only have to change to another working directory.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            Install
          • PyPI

            pip install pytradfri

          • CLONE
          • HTTPS

            https://github.com/home-assistant-libs/pytradfri.git

          • CLI

            gh repo clone home-assistant-libs/pytradfri

          • sshUrl

            git@github.com:home-assistant-libs/pytradfri.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Consider Popular Python Libraries

            public-apis

            by public-apis

            system-design-primer

            by donnemartin

            Python

            by TheAlgorithms

            Python-100-Days

            by jackfrued

            youtube-dl

            by ytdl-org

            Try Top Libraries by home-assistant-libs

            pychromecast

            by home-assistant-libsPython

            netdisco

            by home-assistant-libsPython

            python-matter-server

            by home-assistant-libsPython

            zwave-js-server-python

            by home-assistant-libsPython

            aiohue

            by home-assistant-libsPython