REST API Plugin to control ZigBee lights like Philips Hue and dresden elektroniks wireless electronic ballasts
C C++ Other
Permalink
Failed to load latest commit information.
.gitignore Ignore .qmake.stash, created under RaspBian Stretch. Oct 8, 2017
LICENSE.txt Fix license file to BSD Clause-3 license Jul 28, 2017
README.md README.md: Use version 2.04.99 Dec 16, 2017
atmel_wsndemo_sensor.cpp Initial commit of all V2_03 files Mar 19, 2016
authentification.cpp Lower api error debug level Dec 7, 2017
bindings.cpp Support binding table reading only for dresden elektronik devices (2) Oct 10, 2017
bindings.h More attribute reporting config Aug 27, 2017
change_channel.cpp Save zigbeechannel in db after channel change Dec 14, 2017
colorspace.cpp Fix various app crashed related to resource system May 18, 2017
colorspace.h Added Rgb2xy function to colorspace class Feb 22, 2017
connectivity.cpp Initial commit of all V2_03 files Mar 19, 2016
connectivity.h Initial commit of all V2_03 files Mar 19, 2016
database.cpp Clear Auths when reseting gateway Dec 6, 2017
de_otau.cpp Improve reporting and binding configuration for end-devices (wip) Aug 19, 2017
de_web.pro Merge remote-tracking branch 'ebaauw/master' Dec 15, 2017
de_web_plugin.cpp Xiaomi wall switches, see #356 Jan 14, 2018
de_web_plugin.h Require deCONZ library version 1.5.0 Nov 5, 2017
de_web_plugin_private.h Code cleanup Jan 4, 2018
de_web_widget.cpp Cleanup REST API plugin widget and display install code Sep 10, 2017
de_web_widget.h Cleanup REST API plugin widget and display install code Sep 10, 2017
de_web_widget.ui Cleanup REST API plugin widget and display install code Sep 10, 2017
discovery.cpp Check HTTP proxy 'via' when proxy address isn't valid yet Dec 15, 2017
event.cpp Support id() method for RGroup resources used in rules Oct 22, 2017
event.h Refactor rules handling based on events (experimental) Sep 2, 2017
event_queue.cpp Refactor rules handling based on events (experimental) Sep 2, 2017
firmware_update.cpp Put device detection in config Nov 20, 2017
gateway.cpp Code cleanup Jan 4, 2018
gateway.h Cascade On/Off for IKEA Trådfri remote Jan 4, 2018
gateway_scanner.cpp Refactor gateway scanner, use UPnP and /api/config results Nov 20, 2017
gateway_scanner.h Refactor gateway scanner, use UPnP and /api/config results Nov 20, 2017
group.cpp Implement group state.all_on. Dec 15, 2017
group.h Support group type and class attributes, refactor group id generation Oct 29, 2017
group_info.cpp Improve scene handling, use unicast add scene commands instead of sto… Sep 18, 2016
group_info.h Improve scene handling, use unicast add scene commands instead of sto… Sep 18, 2016
gw_uuid.cpp Initial commit of all V2_03 files Mar 19, 2016
ias_zone.cpp Set sensor->durationDue for IAS sensors and occupancy cluster attribu… Sep 23, 2017
ikea-ota-download.py Add IKEA OTA download script Aug 11, 2017
json.cpp Fix UTF8 JSON output (Qt 4.8) Sep 27, 2016
json.h add plugin content and update LICENSE Jul 23, 2013
light_node.cpp Add hue, sat, x and y attributes only to supported lights. Dec 10, 2017
light_node.h Use ResourceItems (name, type, modelid) for sensors and lights Nov 21, 2017
permitJoin.cpp Optimize database writes Jun 27, 2017
poll_manager.cpp Improve initial setup time for lights (1) Dec 7, 2017
poll_manager.h Improve delayed polling after unicast requests Oct 28, 2017
reset_device.cpp Refactor lights to use resource system to support websocket events (1) May 8, 2017
resource.cpp Use int16 for temperature instead of int32 (see #292) Nov 29, 2017
resource.h Fix heap corruptions due ResourceItem string allocations Nov 24, 2017
resourcelinks.cpp Add /resourcelinks REST API Jul 18, 2017
resourcelinks.h Add /resourcelinks REST API Jul 18, 2017
rest_configuration.cpp Include resourcelinks in full state (issue #256) Dec 15, 2017
rest_gateways.cpp Refactor gateway scanner, use UPnP and /api/config results Nov 20, 2017
rest_groups.cpp Implement group state.all_on. Dec 15, 2017
rest_lights.cpp Use ResourceItems (name, type, modelid) for sensors and lights Nov 21, 2017
rest_node_base.cpp Speedup initial polling of reporting lights after device announce Oct 7, 2017
rest_node_base.h Speedup initial polling of reporting lights after device announce Oct 7, 2017
rest_resourcelinks.cpp Fix return empty resoucelinks object when deleted ones are still present Jul 23, 2017
rest_rules.cpp Improve binding queue debug prints Dec 8, 2017
rest_schedules.cpp Silence some rule and schedule debug prints Dec 8, 2017
rest_sensors.cpp Expose event.sensor.id in addition to event.id Dec 15, 2017
rest_touchlink.cpp Refactor lights to use resource system to support websocket events (1) May 8, 2017
rest_userparameter.cpp Support PATCH method for userparameters Jul 24, 2017
rule.cpp Instant trigger for rules based on sensor and resource events Jul 26, 2017
rule.h Refactor rules handling based on events (experimental) Sep 2, 2017
scene.cpp Fix in the store scene API (2) Aug 29, 2017
scene.h Fix in the store scene API (2) Aug 29, 2017
sensor.cpp ubisys dimmer buttonevents Jan 4, 2018
sensor.h Use ResourceItems (name, type, modelid) for sensors and lights Nov 21, 2017
sqlite3.c add plugin content and update LICENSE Jul 23, 2013
sqlite3.h add plugin content and update LICENSE Jul 23, 2013
upnp.cpp Use QUrl to dissect UPnP location Nov 20, 2017
websocket_server.cpp Flush websocket after each message Nov 18, 2017
websocket_server.h Refactor websocket signal handling (error, disconnected) Nov 4, 2017
zcl_tasks.cpp Use group cast method to setup scene transition time Oct 7, 2017

README.md

Introduction

The deCONZ REST plugin provides a REST API to access ZigBee Home Automation (ZHA) and ZigBee Light Link (ZLL) lights, switches and sensors like the dresden elektronik Wireless Light Control system, IKEA TRÅDFRI and Philips Hue.

As hardware the RaspBee ZigBee Shield for Raspberry Pi or a ConBee USB dongle is used to directly communicate with the ZigBee devices.

To learn more about the REST API itself please visit the REST API Documentation page.

Phoscon App Beta

The Phoscon App is the successor of the current WebApp (Wireless Light Control), it's browser based too and in open beta state, for more information and screenshots check out:

https://www.dresden-elektronik.de/funktechnik/solutions/wireless-light-control/phoscon-app?L=1

Development updates are posted here:

https://github.com/dresden-elektronik/phoscon-app-beta

Installation

Supported platforms
  • Raspbian Jessie
  • Raspbian Stretch

Raspbian Wheezy and Qt4 is no longer maintained.

Install deCONZ

  1. Download deCONZ package

     wget http://www.dresden-elektronik.de/rpi/deconz/beta/deconz-2.04.99-qt5.deb
    
  2. Install deCONZ package

     sudo dpkg -i deconz-2.04.99-qt5.deb
    

Important this step might print some errors that's ok and will be fixed in the next step.

  1. Install missing dependencies

     sudo apt update
     sudo apt install -f
    
Install deCONZ development package (optional)

The deCONZ package already contains the REST API plugin, the development package is only needed if you wan't to modify the plugin or try the latest commits from master branch.

  1. Download deCONZ development package

     wget http://www.dresden-elektronik.de/rpi/deconz-dev/deconz-dev-2.04.99.deb
    
  2. Install deCONZ development package

     sudo dpkg -i deconz-dev-2.04.99.deb
    
  3. Install missing dependencies

     sudo apt update
     sudo apt install -f
    
Get and compile the plugin
  1. Checkout the repository

     git clone https://github.com/dresden-elektronik/deconz-rest-plugin.git
    
  2. Checkout related version tag

     cd deconz-rest-plugin
     git checkout -b mybranch V2_04_99
    
  3. Compile the plugin

     qmake && make -j2
    

Note On Raspberry Pi 1 use qmake && make

  1. Replace original plugin

     sudo cp ../libde_rest_plugin.so /usr/share/deCONZ/plugins
    

Headless support

The beta version contains a systemd script, which allows deCONZ to run without a X11 server.

Note The service does not yet support deCONZ updates via WebApp, therefore these must be installed manually. A further systemd script will handle updates in future versions.

  1. Enable the service at boot time
$ sudo systemctl enable deconz
  1. Disable X11 deCONZ autostart script

The dresden elektronik Raspbian sd-card image contains a autostart script for X11 which should be removed.

$ rm -f /home/pi/.config/autostart/deCONZ.desktop

Software requirements

  • Raspbian Jessie or Raspbian Stretch with Qt5

Important The serial port must be configured as follows to allow communication with the RaspBee.

$ sudo raspi-config

() Interfacting Options > Serial

    * Would you like a login shell accessible over serial?
      > No
    * Would you like the serial port hardware to be enabled?
      > Yes

After changing the settings reboot the Raspberry Pi.

Hardware requirements

  • Raspberry Pi 1, 2 or 3
  • RaspBee ZigBee Shield for Raspberry Pi
  • ConBee USB dongle for Raspberry Pi and PC

3rd party libraries

The following libraries are used by the plugin:

License

The plugin is available as open source and licensed under the BSD (3-Clause) license.