{"action":"created","issue":{"url":"https://api.github.com/repos/dresden-elektronik/deconz-rest-plugin/issues/575","repository_url":"https://api.github.com/repos/dresden-elektronik/deconz-rest-plugin","labels_url":"https://api.github.com/repos/dresden-elektronik/deconz-rest-plugin/issues/575/labels{/name}","comments_url":"https://api.github.com/repos/dresden-elektronik/deconz-rest-plugin/issues/575/comments","events_url":"https://api.github.com/repos/dresden-elektronik/deconz-rest-plugin/issues/575/events","html_url":"https://github.com/dresden-elektronik/deconz-rest-plugin/issues/575","id":320158080,"number":575,"title":"[Help] Mesh with Hue + Xiaomi Mains Devices","user":{"login":"saurabh984","id":9077653,"avatar_url":"https://avatars3.githubusercontent.com/u/9077653?v=4","gravatar_id":"","url":"https://api.github.com/users/saurabh984","html_url":"https://github.com/saurabh984","followers_url":"https://api.github.com/users/saurabh984/followers","following_url":"https://api.github.com/users/saurabh984/following{/other_user}","gists_url":"https://api.github.com/users/saurabh984/gists{/gist_id}","starred_url":"https://api.github.com/users/saurabh984/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saurabh984/subscriptions","organizations_url":"https://api.github.com/users/saurabh984/orgs","repos_url":"https://api.github.com/users/saurabh984/repos","events_url":"https://api.github.com/users/saurabh984/events{/privacy}","received_events_url":"https://api.github.com/users/saurabh984/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-05-04T05:33:26Z","updated_at":"2018-05-13T08:37:08Z","closed_at":"2018-05-05T06:58:20Z","author_association":"NONE","body":"Hi,\r\n\r\nI have just bought both RaspBee and ConBee and was planning on replacing my Hue Hub and Xiaomi Gateway with just one RaspBee. \r\n\r\nBefore I go ahead and reset about 60 devices I wanted to ask if the mesh will work OK with Hue and Xiaomi Devices on the same RaspBee network?\r\n\r\nAlso, how stable would this be as I don’t have any wall switches. All have been replaced by either Hue Dimmers or Xiaomi Wireless Wall Switch (Battery Powered)?"},"comment":{"url":"https://api.github.com/repos/dresden-elektronik/deconz-rest-plugin/issues/comments/388610664","html_url":"https://github.com/dresden-elektronik/deconz-rest-plugin/issues/575#issuecomment-388610664","issue_url":"https://api.github.com/repos/dresden-elektronik/deconz-rest-plugin/issues/575","id":388610664,"user":{"login":"ebaauw","id":22179355,"avatar_url":"https://avatars0.githubusercontent.com/u/22179355?v=4","gravatar_id":"","url":"https://api.github.com/users/ebaauw","html_url":"https://github.com/ebaauw","followers_url":"https://api.github.com/users/ebaauw/followers","following_url":"https://api.github.com/users/ebaauw/following{/other_user}","gists_url":"https://api.github.com/users/ebaauw/gists{/gist_id}","starred_url":"https://api.github.com/users/ebaauw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ebaauw/subscriptions","organizations_url":"https://api.github.com/users/ebaauw/orgs","repos_url":"https://api.github.com/users/ebaauw/repos","events_url":"https://api.github.com/users/ebaauw/events{/privacy}","received_events_url":"https://api.github.com/users/ebaauw/received_events","type":"User","site_admin":false},"created_at":"2018-05-13T08:37:08Z","updated_at":"2018-05-13T08:37:08Z","author_association":"CONTRIBUTOR","body":"> How do I connect the Hue Dimmer Switch so it can be used even if deCONZ is down? I'm guessing both the light and the dimmer will need to be paired to RaspBee right?\r\n\r\nYes.  Don’t touchlink the switch with the light, or they will drop off the RaspBee network.  Simply add the lights to the group deCONZ has created for the dimmer.\r\n\r\n> Does RaspBee still functions as a co-ordinator even if deCONZ is not running?\r\n\r\nI don’t think so, but, frankly, I don’t know how much of that functionality is in the RaspBee firmware and how much is in the deCONZ core software.  Note that the coordinator function is needed only to add new devices to the network.  I think you’re asking about the gateway function (which provides the REST API and processes the rules, schedules, etc.).  This is provided by the REST API plugin, and is active only when deCONZ is running.\r\n\r\nThe word “pairing” is a bit confusing here.  To my understanding, whe pairing a device to a gateway or hub, the following happens:\r\n1. The device joins the ZigBee network, created by the ZigBee coordinator (typically your RaspBee or Hue bridge).  I.e. the coordinator shares the network key with the device;\r\n2. The gateway (typically the coordinator) creates REST resources for the device;\r\n3. The configurator (again, typically the coordinator) configures the device, in particular it sets up bindings with other devices or groups, where the device needs to send its commands and reports.\r\n\r\nWhen touchlinking a remote to a light, the remote creates an ad-hoc ZigBee network, and executes steps 1 and 3.\r\n\r\nTypically, sensors and switches operate in two different ways:\r\n1. They issue commands to control lights.  Obviously, they need the right bindings to know where (which lights and/or groups) to send the command to, but other than the initial configuration, they operate standalone; or\r\n2. They issue reports about what events have happened.  Sometimes, they need the right bindings where to send the reports to, and reporting configuration when (on what conditions) and how often to send reports, sometimes (typically Xiaomi) they just send the reports to the coordinator from whom they got the network key.  It’s then up to the recipients of the reports (typically the gateway) to issue commands to the lights and groups, based on these reports.  This is where the gateway rules come into play.\r\n\r\nAs far as I understand, ZigBee was designed originally for devices to send commands (1).  This way, the network runs independently from a central gateway, which is needed only for configuring the network.  Moving into the consumer space, with the introduction of ZigBee Light Link, Philips and others introduced devices to send reports (2).  This offers more functionality, at the expense of also needing the gateway to run the network.\r\n\r\nWhen paired with the Hue bridge, the Hue sensors and switches issues reports (2).  When touchlinked with a light, the Hue dimmer switch issues commands (1).  IKEA devices issue commands (1).  Xiaomi devices issue reports (2).  \r\nWe found that the Hue dimmer switch actually does both at the same time, i.e. on a button action, it issues a command (1) to control lights _and_ it issues a report (2) what button action was done.\r\n\r\nBy default, the deCONZ REST API plugin creates a group for devices that issue commands (1), and binds the device to that group.  By adding lights to this group (typically in Phoscon or in the old web app), you can modify the behaviour of the device (or rather of your lights).  Note that this won’t work for devices that only send reports (2), like the Xiaomi switches - you need gateway rules to use these.\r\n\r\nTo enable rules for devices that issue commands (1), the deCONZ REST API plugin eavesdrops on the commands, and reverse engineers these into events (which might then be translated into (other) commands by rules).  This works automatically for group commands; when the device issues commands to single devices only (IKEA dimmer), a binding with the gateway needs to be setup.\r\n\r\n"}}
{"actor":{"display_login":"ebaauw"}}