pytradfri | IKEA Trådfri/Tradfri API
kandi X-RAY | pytradfri Summary
kandi X-RAY | pytradfri Summary
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
Top functions reviewed by kandi - BETA
- 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
pytradfri Key Features
pytradfri Examples and Code Snippets
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
Community Discussions
Trending Discussions on pytradfri
QUESTION
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:04Remove the import timedelta
and call
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install pytradfri
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page