Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
blocks:zigbee [2019-03-18 19:53]
admin created
blocks:zigbee [2023-07-18 11:06] (current)
melvin [Using DeConz in Headless Mode]
Line 26: Line 26:
 ===== Controller ===== ===== Controller =====
  
-Many manufacturers tends to have their own controllers, working primarily with their products. An example here is the [[https://www2.meethue.com/en-us/p/hue-bridge/046677458478|Philips HUE Bridge]]. Sometimes, such a controller can also work with other brands' zigbee products, but bot always. +Many manufacturers tends to have their own controllers, working primarily with their products. An example here is the [[https://www2.meethue.com/en-us/p/hue-bridge/046677458478|Philips HUE Bridge]]. Sometimes, such a controller can also work with other brands' zigbee products, but not always. 
  
 Another option is to use a controller from an independent company, specializing in this kind of products. Such a controller often works with a wide variety of zigbee products, since they're in the business of selling the controller itself, rather than their own brand of lamps. Another option is to use a controller from an independent company, specializing in this kind of products. Such a controller often works with a wide variety of zigbee products, since they're in the business of selling the controller itself, rather than their own brand of lamps.
Line 62: Line 62:
   - Log in using the password specified during the controller installation.   - Log in using the password specified during the controller installation.
   - If requested, configure the ConBee USB transceiver. Make sure it uses the latest firmware version. If not, an option will appear allowing you to update it (requires an internet connection).   - If requested, configure the ConBee USB transceiver. Make sure it uses the latest firmware version. If not, an option will appear allowing you to update it (requires an internet connection).
 +
 +:!: In some cases, logging in using //localhost// may fail to accept your password. If you run into this problem, then use the actual IP address of the computer instead of //localhost//.
  
 {{ :blocks:zigbee:phoscongateway1.jpg?nolink |}} {{ :blocks:zigbee:phoscongateway1.jpg?nolink |}}
  
   - Click the "hamburger menu" in the top left corner and choose "Lights" (see illustration below)    - Click the "hamburger menu" in the top left corner and choose "Lights" (see illustration below) 
-  - Connect and turn on a lamp. 
   - Click "Add new lights".   - Click "Add new lights".
 +  - Connect or turn on on a lamp.
  
 {{ :blocks:zigbee:phosconaddlight.jpg?nolink |}} {{ :blocks:zigbee:phosconaddlight.jpg?nolink |}}
  
-The controller will now search for the new light, adding it to the list, as shown below. In some cases. you may need to move the light close to the ConBee transceiver for it to join in.+The controller will now search for the new light, adding it to the list, as shown below. In some cases. you may need to move the light close to the transceiver for it to be found.
  
-{{ :blocks:zigbee:phosconaddlight2.jpg?nolink |}}+{{ :blocks:zigbee:phosconaddlight3.jpg?nolink |}}
  
 If the lamp or plug has been used with another gateway before, or was bought with a preconfigured remote control, it is already locked to that controller, and needs to be reset in order to add it the new network. The procedure for resetting a zigbee device varies, but here are some common methods: If the lamp or plug has been used with another gateway before, or was bought with a preconfigured remote control, it is already locked to that controller, and needs to be reset in order to add it the new network. The procedure for resetting a zigbee device varies, but here are some common methods:
  
   * An IKEA lamp can be reset by turning its power on/off rapidly six times in a row. It will then blink briefly to indicate it has been reset.     * An IKEA lamp can be reset by turning its power on/off rapidly six times in a row. It will then blink briefly to indicate it has been reset.  
-  * A Philips HUE light can be reset by pressing the ON and OFF button on a hue remote for about 15 seconds, as shown in [[https://youtu.be/qvlEAELiJKs|this video]].+  * A Philips HUE light can be reset by pressing the ON and OFF button on a hue remote for about 15 seconds, as shown in [[https://youtu.be/qvlEAELiJKs|this video]]. Do the reset cycle while searching for new Lights in Phoscon for easy adoption
   * Most plugs have a small button that can be used to manually turn the plug on and off. Keeping this button pressed for several seconds performs a reset. A flashing light on the plug indicates it's ready to be adopted into a new network.   * Most plugs have a small button that can be used to manually turn the plug on and off. Keeping this button pressed for several seconds performs a reset. A flashing light on the plug indicates it's ready to be adopted into a new network.
  
-:!: If the above doesn't work for your device, search the manufacturers website for the term "reset" or "factory reset".+:!: Even if the lamp is factory reset, you may still need to power it up while the search is running. If the above doesn't work for your device, search the manufacturers website for the term "reset" or "factory reset". 
  
 Give the lamp a meaningful name, which will later be used to program it from Blocks. Give the lamp a meaningful name, which will later be used to program it from Blocks.
  
 {{ :blocks:zigbee:phosconnamelight.jpg?nolink |}} {{ :blocks:zigbee:phosconnamelight.jpg?nolink |}}
- 
 ==== Arranging Devices into Groups ==== ==== Arranging Devices into Groups ====
  
Line 101: Line 103:
 ===== Installing the Blocks DeConz Driver ===== ===== Installing the Blocks DeConz Driver =====
  
-Download the DeConz driver from the [[https://github.com/pixilab/blocks-script|driver repository]], along with the latest version of the [[https://int.pixilab.se/docs/blocks/drivers/concepts#using_a_device_driver|support files]] for your Blocks server.+Download the DeConz driver from the [[https://github.com/pixilab/blocks-script|driver repository]], along with the latest version of the [[blocks:drivers:concepts#using_a_device_driver|support files]] for your Blocks server.
  
-If your server isn't set up to [[https://int.pixilab.se/docs/blocks/drivers/troubleshooting#reloading_changes_automatically|automatically load]] new drivers, you need to restart your server to make the driver available.+If your server isn't set up to [[blocks:drivers:troubleshooting#reloading_changes_automatically|automatically load]] new drivers, you need to restart your server to make the driver available.
  
 ==== Configuring the DeConz Device ==== ==== Configuring the DeConz Device ====
Line 114: Line 116:
 As an additional security measure, the driver needs to be authorized to communicate with the DeConz controller program. Until this is done, no commands will be accepted. Proper authentication is indicated by the //authorized// property of the DeConz Device becoming true. You can monitor this by adding an indicator to a panel, connected to the //authorized// property. As an additional security measure, the driver needs to be authorized to communicate with the DeConz controller program. Until this is done, no commands will be accepted. Proper authentication is indicated by the //authorized// property of the DeConz Device becoming true. You can monitor this by adding an indicator to a panel, connected to the //authorized// property.
  
-To authorize the driver, do as follows:+To authorize the driver, do as follows while Blocks is connected to the gateway with the DeConz driver active:
  
   - In PhosCon web UI, click the hamburger menu in the top left hand corner and choose Gateway.   - In PhosCon web UI, click the hamburger menu in the top left hand corner and choose Gateway.
Line 186: Line 188:
 ===== Using DeConz in Headless Mode ===== ===== Using DeConz in Headless Mode =====
  
-While running the DeConz controller GUI, as described above, is useful for initial tests, a more robust way is to run it as a headless service. This can be accomplished by enabling the //deconz.service// system daemon. Use [[https://int.pixilab.se/docs/blocks/server/advanced_server_configuration#introducing_webmin|webmin]] to enable and start this service, or use the Linux terminal command //systemctl//.+While running the DeConz controller GUI, as described above, is useful for initial tests, a more robust way is to run it as a headless service. This can be accomplished by enabling the //deconz.service// system daemon. Use [[blocks:server:advanced_server_configuration:webmin|webmin]] to enable and start this service, or use the Linux terminal command //systemctl//. 
 + 
 +Alternatively, to be able to access the deconz GUI, launch deconz using a //user service// instead, similar to how Blocks is launched. To do so, put the following into file "/home/pixi-server/.config/systemd/user/deconz-gui.service": 
 + 
 +<code> 
 +[Unit] 
 +Description=deCONZ: ZigBee gateway -- GUI/REST API 
 +Wants=deconz-init.service deconz-update.service 
 +After=default.target 
 + 
 +[Service] 
 +Environment="DISPLAY=:0" 
 +ExecStart=/usr/bin/deCONZ --http-port=9080 
 +Restart=on-failure 
 +StartLimitIntervalSec=0 
 +RestartSec=30 
 + 
 +[Install] 
 +WantedBy=default.target 
 +</code> 
 + 
 +Then start the service with the following terminal command under the pixi-server user: 
 +<code> 
 +systemctl --user enable --now deconz-gui 
 +</code> 
 +