In this tutorial, you will learn how to install openHAB in QNAP Container Station and create a "Home automation" environment.

There are two part of this tutorial:

  • Basic installation

  • Advanced installation - connect with a Z-wave device


In Z-wave device, we take example by using "Aeotec Z-Stick Gen5"

 

[gallery columns="1" size="full" ids="2377"]

Basic installation

  • Create an "openHAB" container

    1. Open Container Station and click "Create"

    2. Search for "openHAB"

    3. Find the "openHAB" container and click "Install"[gallery size="full" columns="1" ids="2378"]

    4. Enter name for the container and click "Advanced Settings"[gallery columns="1" size="full" ids="2379"]

    5. In "Network", configure the Port Forwarding setting[gallery columns="1" size="full" ids="2381"]

    6. In "Shared Folders", configure the Volume from host settings as below:
      /openhab/addons : custom openHAB addons
      /openhab/conf : openHAB configs
      /openhab/userdata : openHAB userdata directory

      *Notes : You need create "addons","conf ","userdata" folders into anyone shared folder in File Station.

    7. Click "Create"[gallery size="full" columns="1" ids="2382"]

    8. In "Containers", you will see the openHAB container you have set up[gallery columns="2" size="full" ids="2383,2385"]




 

  • Go to openHAB



  1. Enter the URL followed by the port


Example:

HTTP - http://<Your IP>:18080/
HTTPS - https://<Your IP>:18443/

  1. The openHAB initial setup screen will be displayed. Choose "Standard". For more information on the setup process, refer to the openHAB website: https://docs.openhab.org/tutorials/beginner/1sttimesetup.html[gallery size="full" columns="1" ids="2386"]

  2. Choose "PAPER UI". The openHAB interface will be displayed[gallery size="full" columns="2" ids="2387,2388"]


Advanced installation - connect with a Z-wave device

 

  1. Connect a Z-wave dongle device

  2. Connect to your NAS using SSH (If your NAS restarts then you must follow step 2 to step 5 again)

  3. Enter "insmod /usr/local/modules/cdc-acm.ko"

  4. Find your Z-wave USB dongle device name and enter "ls -al /dev/tty*". Search for "/dev/ttyACM*" and the related device paths will be displayedFor example: "/dev/ttyACM0" will be the device path name of the Z-wave USB dongle.[gallery size="full" columns="1" ids="2389"]

  5. Enter "chmod 666 /dev/ttyACM0" to open read only authority (The blue strings will depend on your settings)

  6. Enter
    docker run --name=openhab-zwave \
    -p 18080:8080 -p 8443:8443 -p 5555:5555 \
    -v /share/Container/OpenHab/addons/:/openhab/addons \
    -v /share/Container/OpenHab/userdata/:/openhab/userdata \
    -v /share/Container/OpenHab/conf/:/openhab/conf \
    --device=/dev/ttyACM0 \
    --privileged \
    --tty \
    openhab/openhab:2.2.0-amd64-debian


  7. Open openHAB and go to "Add-ons". In "BINDINGS", search for "zwave" and click "INSTALL"[gallery columns="1" size="full" ids="2390"]

  8. Go to "Configuration" > "Things" and click[gallery columns="1" size="full" ids="2391"]

  9. Click "Z-Wave Binding"[gallery columns="1" size="full" ids="2392"]


 

  1. Click "Z-Wave Serial Controller"[gallery columns="1" size="full" ids="2393"]

  2. In "Serial Port", enter the device path name (refer to step 3) and click "Check"[gallery columns="1" size="full" ids="2394"]


 

  1. When connected, the status will display "ONLINE"[gallery columns="1" size="full" ids="2395"]


 

For more information, refer to the openHAB website:

https://docs.openhab.org/addons/bindings/zwave/readme.html

tttt 發表在 痞客邦 留言(0) 人氣()