{"id":1827,"date":"2021-01-04T19:12:28","date_gmt":"2021-01-04T19:12:28","guid":{"rendered":"https:\/\/rolig.dk\/?p=1827"},"modified":"2021-01-30T22:59:35","modified_gmt":"2021-01-30T22:59:35","slug":"link-lights-and-remote-directly-in-deconz","status":"publish","type":"post","link":"https:\/\/rolig.dk\/?p=1827","title":{"rendered":"Link lights and remote directly in Deconz"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">If you not want to be depended of your deconz zigbee gateway is up and running all the time to get your lights working, then keep on reading&#8230;&#8230;<br>In this blog post I will show you how to set that up in deconz \/ Conbee 2. This article is inspired from this <a href=\"https:\/\/storck.io\/posts\/pair-tradfri-remote-to-deconz-raspbee-conbee\/?fbclid=IwAR18rCroFJzp-iHIo_SuncF3TUw-xiD240qLCCyGi2mHLxgKcM0bb3Wickw\">site<\/a>. But it was not straight forward for me. So this is the reason for this post.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I&#8217;m running deconz on a raspbeyy pi and a conbee 2 zigbee stick connected. I already have my lights and remotes paired in deconz. So instead of going to each light and pair the remote manually, then you can follow this approach.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The first thing we need is to get access to the deconz api. To get that, we need to get an access token.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In chrome you can install an app called &#8220;Postman&#8221;. Go to the chrome apps store -&gt; search for &#8220;postman&#8221; and install it.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"811\" height=\"287\" src=\"https:\/\/rolig.dk\/wp-content\/uploads\/2021\/01\/image.png\" alt=\"\" class=\"wp-image-1834\" srcset=\"https:\/\/rolig.dk\/wp-content\/uploads\/2021\/01\/image.png 811w, https:\/\/rolig.dk\/wp-content\/uploads\/2021\/01\/image-300x106.png 300w, https:\/\/rolig.dk\/wp-content\/uploads\/2021\/01\/image-768x272.png 768w\" sizes=\"auto, (max-width: 811px) 100vw, 811px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">We need to prepare <strong>Postman<\/strong>. Enter the following tings, <strong>but DONT CLICK SNED YET<\/strong>.<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Run &#8220;Postman&#8221;<\/li><li>Enter the <strong>IP address of your deconz \/api<\/strong>. Ex &#8220;192.168.0.50\/api&#8221;.<\/li><li>Set the query to <strong>POST<\/strong><\/li><li>Click <strong>RAW<\/strong><\/li><li>Enter <strong>{ &#8220;devicetype&#8221;: &#8220;MY APPLICATION NAME&#8221; }<\/strong>, where <strong>MY APPLICATION NAME<\/strong> is a name of your own choich.<\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"293\" src=\"https:\/\/rolig.dk\/wp-content\/uploads\/2021\/01\/image-6-1024x293.png\" alt=\"\" class=\"wp-image-1843\" srcset=\"https:\/\/rolig.dk\/wp-content\/uploads\/2021\/01\/image-6-1024x293.png 1024w, https:\/\/rolig.dk\/wp-content\/uploads\/2021\/01\/image-6-300x86.png 300w, https:\/\/rolig.dk\/wp-content\/uploads\/2021\/01\/image-6-768x220.png 768w, https:\/\/rolig.dk\/wp-content\/uploads\/2021\/01\/image-6.png 1297w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Log into the phoscon website, ex http:\/\/192.168.0.50\/pwa\/login.html, and click on the tree lines:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"280\" height=\"226\" src=\"https:\/\/rolig.dk\/wp-content\/uploads\/2021\/01\/image-7.png\" alt=\"\" class=\"wp-image-1844\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Then click <strong>Gateway<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"273\" height=\"234\" src=\"https:\/\/rolig.dk\/wp-content\/uploads\/2021\/01\/image-8.png\" alt=\"\" class=\"wp-image-1845\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Click <strong>Advanced<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"411\" height=\"208\" src=\"https:\/\/rolig.dk\/wp-content\/uploads\/2021\/01\/image-9.png\" alt=\"\" class=\"wp-image-1847\" srcset=\"https:\/\/rolig.dk\/wp-content\/uploads\/2021\/01\/image-9.png 411w, https:\/\/rolig.dk\/wp-content\/uploads\/2021\/01\/image-9-300x152.png 300w\" sizes=\"auto, (max-width: 411px) 100vw, 411px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Click <strong>Authenticate app<\/strong>. This will give you 60 secounds to fire off the command in postman.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"629\" height=\"409\" src=\"https:\/\/rolig.dk\/wp-content\/uploads\/2021\/01\/image-10.png\" alt=\"\" class=\"wp-image-1848\" srcset=\"https:\/\/rolig.dk\/wp-content\/uploads\/2021\/01\/image-10.png 629w, https:\/\/rolig.dk\/wp-content\/uploads\/2021\/01\/image-10-300x195.png 300w\" sizes=\"auto, (max-width: 629px) 100vw, 629px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Go back to the postman chrome app and click <strong>Send<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"293\" src=\"https:\/\/rolig.dk\/wp-content\/uploads\/2021\/01\/image-11-1024x293.png\" alt=\"\" class=\"wp-image-1849\" srcset=\"https:\/\/rolig.dk\/wp-content\/uploads\/2021\/01\/image-11-1024x293.png 1024w, https:\/\/rolig.dk\/wp-content\/uploads\/2021\/01\/image-11-300x86.png 300w, https:\/\/rolig.dk\/wp-content\/uploads\/2021\/01\/image-11-768x220.png 768w, https:\/\/rolig.dk\/wp-content\/uploads\/2021\/01\/image-11.png 1297w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">You will not get the token that you need to continue:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"505\" height=\"215\" src=\"https:\/\/rolig.dk\/wp-content\/uploads\/2021\/01\/image-12.png\" alt=\"\" class=\"wp-image-1850\" srcset=\"https:\/\/rolig.dk\/wp-content\/uploads\/2021\/01\/image-12.png 505w, https:\/\/rolig.dk\/wp-content\/uploads\/2021\/01\/image-12-300x128.png 300w\" sizes=\"auto, (max-width: 505px) 100vw, 505px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Open a new tab in your browser and paste this into the address bar:<br>http:\/\/&lt;deconz hostname&gt;\/api\/&lt;user token&gt;\/groups  -&gt;<br>http:\/\/192.168.0.50\/api\/0123456789abc36\/groups<br>If you are using deconz in home assistant you will need to add port 40850 to the url. Ex:  http:\/\/192.168.0.50:40850\/api\/0123456789abc36\/groups <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Then you will get all the groups on your deconz:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"593\" height=\"594\" src=\"https:\/\/rolig.dk\/wp-content\/uploads\/2021\/01\/image-13.png\" alt=\"\" class=\"wp-image-1853\" srcset=\"https:\/\/rolig.dk\/wp-content\/uploads\/2021\/01\/image-13.png 593w, https:\/\/rolig.dk\/wp-content\/uploads\/2021\/01\/image-13-300x300.png 300w, https:\/\/rolig.dk\/wp-content\/uploads\/2021\/01\/image-13-150x150.png 150w, https:\/\/rolig.dk\/wp-content\/uploads\/2021\/01\/image-13-225x225.png 225w\" sizes=\"auto, (max-width: 593px) 100vw, 593px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">You need to find the <strong>ID (1)<\/strong> for the remote that you want to pair directly with the light. You can do that by the <strong>name (2)<\/strong> or the <strong>uniqueid (3)<\/strong>. If you have more then one remote, then you have to use the <strong>uniqueid<\/strong>, because the name is properly the same for all your remotes. (At least it was for me). You can find that in the application &#8220;Hue essentials&#8221; for iOS and Android. Find your remote under &#8220;<strong>Devices<\/strong>&#8221; -&gt; click on the remote -&gt; <strong>Click &#8230;<\/strong> -&gt; &#8220;<strong>details<\/strong>&#8221; -&gt; look at the &#8220;<strong>Unique ID<\/strong>&#8221; section. Then you can search for it on the webpage.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I will not cover other option in Hue Essentials in this blog post.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"593\" height=\"594\" src=\"https:\/\/rolig.dk\/wp-content\/uploads\/2021\/01\/image-14.png\" alt=\"\" class=\"wp-image-1854\" srcset=\"https:\/\/rolig.dk\/wp-content\/uploads\/2021\/01\/image-14.png 593w, https:\/\/rolig.dk\/wp-content\/uploads\/2021\/01\/image-14-300x300.png 300w, https:\/\/rolig.dk\/wp-content\/uploads\/2021\/01\/image-14-150x150.png 150w, https:\/\/rolig.dk\/wp-content\/uploads\/2021\/01\/image-14-225x225.png 225w\" sizes=\"auto, (max-width: 593px) 100vw, 593px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Now that you have the ID for your remote. Then open a VNC connection to the deconz application. You can do that by downloading a VNC viewer -&gt; make a new connection:<br>Address:  192.168.0.50 (IP address of your deconz)<br>User: pi<br>Password: raspbeegw (Default password. if you created another one, use that)<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"624\" height=\"622\" src=\"https:\/\/rolig.dk\/wp-content\/uploads\/2021\/01\/image-15.png\" alt=\"\" class=\"wp-image-1859\" srcset=\"https:\/\/rolig.dk\/wp-content\/uploads\/2021\/01\/image-15.png 624w, https:\/\/rolig.dk\/wp-content\/uploads\/2021\/01\/image-15-300x300.png 300w, https:\/\/rolig.dk\/wp-content\/uploads\/2021\/01\/image-15-150x150.png 150w, https:\/\/rolig.dk\/wp-content\/uploads\/2021\/01\/image-15-225x225.png 225w\" sizes=\"auto, (max-width: 624px) 100vw, 624px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Now that you have a connection open to deconz, find that light that you want to pair with the remote -> click on the right . on the light -> click on &#8220;0004 Groups&#8221;.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"628\" height=\"398\" src=\"https:\/\/rolig.dk\/wp-content\/uploads\/2021\/01\/image-17.png\" alt=\"\" class=\"wp-image-1862\" srcset=\"https:\/\/rolig.dk\/wp-content\/uploads\/2021\/01\/image-17.png 628w, https:\/\/rolig.dk\/wp-content\/uploads\/2021\/01\/image-17-300x190.png 300w\" sizes=\"auto, (max-width: 628px) 100vw, 628px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Click on the &#8220;Cluster Info&#8221; at the bottom in the gray windows to the left. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"283\" height=\"759\" src=\"https:\/\/rolig.dk\/wp-content\/uploads\/2021\/01\/image-18.png\" alt=\"\" class=\"wp-image-1864\" srcset=\"https:\/\/rolig.dk\/wp-content\/uploads\/2021\/01\/image-18.png 283w, https:\/\/rolig.dk\/wp-content\/uploads\/2021\/01\/image-18-112x300.png 112w\" sizes=\"auto, (max-width: 283px) 100vw, 283px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Find the HEX number for the ID of your group. In this example the ID was 1, so the HEX will be 0x1. You then add the HEX number in the &#8220;<strong>Group ID<\/strong>&#8221; box -&gt; Click <strong>exec<\/strong>. Then you will get a confirmation if it was successful.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"286\" height=\"291\" src=\"https:\/\/rolig.dk\/wp-content\/uploads\/2021\/01\/image-19.png\" alt=\"\" class=\"wp-image-1866\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">After you have paired the remote, you can login to deconz and see the link between the remote and the light:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"262\" height=\"855\" src=\"https:\/\/rolig.dk\/wp-content\/uploads\/2021\/01\/image-20.png\" alt=\"\" class=\"wp-image-1881\" srcset=\"https:\/\/rolig.dk\/wp-content\/uploads\/2021\/01\/image-20.png 262w, https:\/\/rolig.dk\/wp-content\/uploads\/2021\/01\/image-20-92x300.png 92w\" sizes=\"auto, (max-width: 262px) 100vw, 262px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">If you want to change\/remove or add lights to the group, then you can do it in the deconz webinterface. You don&#8217;t have to do it via VNC.<br>Only the group with at least on light have to be created via VNC, after that you can managed it in the deconz webinterface.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now try to power of the deconz box and test if your switch still can turn on and off the light.<br>This will ONLY work if you are using the default bottom layout of the Ikea remote. If you have programed the bottoms to control other things, then it will start to act strange.<br><s>Please remember that it will use the default layout of the remote. So if you are using a Ikea remote and have customized that in deconz, then it will revert back to the default bottom layout<\/s>. And that also goes for <a href=\"https:\/\/wiki.iptables.dk\/ZigBee_til_FUGA_kontakter\">Per Mejdal Rasmussen custom remote<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Hope this guide will get you started to make sure that you light always work, even thought if the deconz zigbee gateway is down. (And that always happens when you are not at home. So the WAF is way down :-))<\/p>\n<a class=\"synved-social-button synved-social-button-share synved-social-size-48 synved-social-resolution-single synved-social-provider-twitter nolightbox\" data-provider=\"twitter\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Twitter\" href=\"https:\/\/twitter.com\/intent\/tweet?url=https%3A%2F%2Frolig.dk%2Findex.php%3Frest_route%3D%252Fwp%252Fv2%252Fposts%252F1827&amp;text=Hey%20check%20this%20out\" style=\"font-size: 0px;width:48px;height:48px;margin:0;margin-bottom:5px;margin-right:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"twitter\" title=\"Share on Twitter\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"48\" height=\"48\" style=\"display: inline;width:48px;height:48px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/rolig.dk\/wp-content\/plugins\/social-media-feather\/synved-social\/addons\/extra-icons\/image\/social\/circle\/96x96\/twitter.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-48 synved-social-resolution-single synved-social-provider-linkedin nolightbox\" data-provider=\"linkedin\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Linkedin\" href=\"https:\/\/www.linkedin.com\/shareArticle?mini=true&amp;url=https%3A%2F%2Frolig.dk%2Findex.php%3Frest_route%3D%252Fwp%252Fv2%252Fposts%252F1827&amp;title=Link%20lights%20and%20remote%20directly%20in%20Deconz\" style=\"font-size: 0px;width:48px;height:48px;margin:0;margin-bottom:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"linkedin\" title=\"Share on Linkedin\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"48\" height=\"48\" style=\"display: inline;width:48px;height:48px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/rolig.dk\/wp-content\/plugins\/social-media-feather\/synved-social\/addons\/extra-icons\/image\/social\/circle\/96x96\/linkedin.png\" \/><\/a>","protected":false},"excerpt":{"rendered":"<p>If you not want to be depended of your deconz zigbee gateway is up and running all the time to get your lights working, then keep on reading&#8230;&#8230;In this blog post I will show you how to set that up in deconz \/ Conbee 2. This article is inspired from this site. But it was [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[6],"tags":[],"class_list":["post-1827","post","type-post","status-publish","format-standard","hentry","category-smart-home"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/rolig.dk\/index.php?rest_route=\/wp\/v2\/posts\/1827","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rolig.dk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rolig.dk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rolig.dk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rolig.dk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1827"}],"version-history":[{"count":0,"href":"https:\/\/rolig.dk\/index.php?rest_route=\/wp\/v2\/posts\/1827\/revisions"}],"wp:attachment":[{"href":"https:\/\/rolig.dk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1827"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rolig.dk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1827"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rolig.dk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1827"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}