Skip to content

A wrapper around pytradfri to publish it into a WebSocket API to allow forwarding COAP observation notifications to clients in realtime.

Notifications You must be signed in to change notification settings

MiniMeOSc/pyTradfriWS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

pyTradfriWS

This is a wrapper around pytradfri that publishes it as a WebSockets API. It observes all devices and groups on the IKEA Trådfri Gateway, remembers them in an internal list, sends it to a client that connects and as a device changes status, it updates the client in realtime.

Requirements

  • IKEA Trådfri Gateway
  • Python 3.4+
  • pytradfri (Python API that wraps up gateway objects and IO using...)
  • aiocoap (native Python COAP library with support for DTLS using...)
  • tinydtls-cython (Python wrapper for tinydtls in Cython)
  • websockets (WebSocket implementation in Python 3)

Features

  • Querying a list of the following items configured in the gateway:
    • Devices
      • Lamps
      • Remote Controls
      • Motion Sensors
    • Groups
  • Querying the status of the items
    • On/Off
    • Brightness
    • Battery level
    • Names

Not yet supported

  • Querying moods / scenes
  • Executing tasks (turning lights on/off, dimming)

Other TODOs:

  • Improving code
  • Offering configuration
  • Handling connection losses (i.e. currently a restart of the script is required if a connection loss to the gateway occurs)

Note: This is my first Python project. So bear with me please for the crude code or help me improve it 😉.

About

A wrapper around pytradfri to publish it into a WebSocket API to allow forwarding COAP observation notifications to clients in realtime.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published