diff --git a/.travis.yml b/.travis.yml index ae9fe3945..f64a9c8d6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,12 @@ services: node_js: - "10" ++before_install: + - "echo '{\"experimental\": true}' | sudo tee /etc/docker/daemon.json" + - sudo apt update -y + - sudo apt install --only-upgrade docker-ce -y + - sudo service docker restart + install: - npm install diff --git a/.travis/docker.sh b/.travis/docker.sh index 15b046a9b..be93486a4 100755 --- a/.travis/docker.sh +++ b/.travis/docker.sh @@ -10,7 +10,7 @@ tag_push() { } build_and_push() { - docker build --build-arg COMMIT=$(git rev-parse --short HEAD) -t $DOCKER_USERNAME/zigbee2mqtt:$1 -f $2 . + docker build --platform=$3 --build-arg COMMIT=$(git rev-parse --short HEAD) -t $DOCKER_USERNAME/zigbee2mqtt:$1 -f $2 . docker push $DOCKER_USERNAME/zigbee2mqtt:$1 } @@ -23,9 +23,9 @@ then login # Push versioned images - build_and_push "$TRAVIS_TAG" docker/Dockerfile.amd64 - build_and_push "$TRAVIS_TAG-arm32v6" docker/Dockerfile.arm32v6 - build_and_push "$TRAVIS_TAG-arm64v8" docker/Dockerfile.arm64v8 + build_and_push "$TRAVIS_TAG" docker/Dockerfile.amd64 amd64 + build_and_push "$TRAVIS_TAG-arm32v6" docker/Dockerfile.arm32v6 arm + build_and_push "$TRAVIS_TAG-arm64v8" docker/Dockerfile.arm64v8 arm64 # Push latest images. tag_push "$TRAVIS_TAG-arm32v6" "arm32v6" @@ -35,9 +35,9 @@ elif [ "$TRAVIS_BRANCH" = "dev" -a "$TRAVIS_PULL_REQUEST" = "false" ] then echo "Updating docker images for dev branch!" login - build_and_push latest-dev docker/Dockerfile.amd64 - build_and_push arm32v6-dev docker/Dockerfile.arm32v6 - build_and_push arm64v8-dev docker/Dockerfile.arm64v8 + build_and_push latest-dev docker/Dockerfile.amd64 amd64 + build_and_push arm32v6-dev docker/Dockerfile.arm32v6 arm + build_and_push arm64v8-dev docker/Dockerfile.arm64v8 arm64 else echo "Not updating docker images, triggered by pull request or not on master/dev branch" fi diff --git a/docs/configuration/configuration.md b/docs/configuration/configuration.md index 9dcd6aab3..68496bc6f 100644 --- a/docs/configuration/configuration.md +++ b/docs/configuration/configuration.md @@ -7,7 +7,8 @@ The values shown are the default ones. # Required: Home Assistant integration (MQTT discovery) homeassistant: false -# Required: allow new devices to join +# Required: allow new devices to join. +# WARNING: Disable this after all devices have been paired! permit_join: true # Required: MQTT settings diff --git a/docs/getting_started/flashing_the_cc2531.md b/docs/getting_started/flashing_the_cc2531.md index e7c9eb7b7..76f1316df 100644 --- a/docs/getting_started/flashing_the_cc2531.md +++ b/docs/getting_started/flashing_the_cc2531.md @@ -19,10 +19,10 @@ The CC2531 USB stick needs to be flashed with a custom firmware. Credits to [@Frans-Willem](https://github.com/frans-Willem) for majority of instructions. 1. Install prerequisites for [CC-Tool](https://github.com/dashesy/cc-tool) using a package manager (e.g. [Homebrew](https://brew.sh/) for macOS) -> Ubuntu: dh-autoreconf, libusb-1.0, libboost-all-dev -> Fedora: dh-autoreconf, boost-devel, libusb1-devel -> Archlinux: dh-autoreconf, libusb, boost -> macOS: autoconf, automake, libusb, boost, pkgconfig, libtool +* Ubuntu: dh-autoreconf, libusb-1.0, libboost-all-dev +* Fedora: dh-autoreconf, boost-devel, libusb1-devel +* Archlinux: dh-autoreconf, libusb, boost +* macOS: brew install autoconf automake libusb boost pkgconfig libtool 2. Build cc-tool ```bash diff --git a/docs/getting_started/pairing_devices.md b/docs/getting_started/pairing_devices.md index f33c299ae..8a6724ec9 100644 --- a/docs/getting_started/pairing_devices.md +++ b/docs/getting_started/pairing_devices.md @@ -1,4 +1,5 @@ **IMPORTANT:** Before you start, make sure that `permit_join: true` is set in your `configuration.yaml`. Otherwise new devices cannot join the network! +It's equally important that `permit_join: false` is set in your `configuration.yaml` after initial setup is done to keep your Zigbee network safe and to avoid accidental joining of other Zigbee devices. Start by checking if your Zigbee device is supported, see [Supported devices](../information/supported_devices.md). diff --git a/docs/how_tos/how_to_connect_a_cc2530_coordinator_using_a_usb_to_serial_adapter.md b/docs/how_tos/how_to_connect_a_cc2530_coordinator_using_a_usb_to_serial_adapter.md new file mode 100644 index 000000000..41ff860eb --- /dev/null +++ b/docs/how_tos/how_to_connect_a_cc2530_coordinator_using_a_usb_to_serial_adapter.md @@ -0,0 +1,39 @@ +# How to connect a CC2530 coordinator using a USB to serial adapter + +## Confirmed working +This how-to has been confirmed working with the following CC2530 based devices: + +| Device| Image | +| --- | --- | +| **CC2530** | ![CC2530](../images/cc2530.jpg) | + +and the following USB to serial adapters: + +| Device| Image | +| --- | --- | +| **CP2102** | ![CP2102](../images/CP2102.png) | + +## Flashing the firmware +The required coordinator fimrware can be found here: [CC sniffer devices](../information/cc_sniffer_devices.md). + +## Connecting +Connect to CC2530 to the USB to serial adapter using the following mapping: + +| USB-Serial Adaper | CC2530 | +| :------------: |:---------------:| +| 3V3 | VCC | +| GND | GND | +| TXD | P02 | +| RXD | P03 | + +Now plug in the USB-to-serial adapter in your USB port. + +## Configuration +Add the following to your Zigbee2mqtt `configuration.yaml`: + +```yaml +advanced: + rtscts: false +``` + +and start Zigbee2mqtt, enjoy! \ No newline at end of file diff --git a/docs/how_tos/how_to_secure_network.md b/docs/how_tos/how_to_secure_network.md new file mode 100644 index 000000000..f9c342655 --- /dev/null +++ b/docs/how_tos/how_to_secure_network.md @@ -0,0 +1,16 @@ +# How to secure your Zigbee network +By default your Zigbee network isn't as secured as possible. The following settings are recommeded to apply to your configuration. + +## Disabled joining +To disable joining it's important that `permit_join: false` is set in your `configuration.yaml`. + +## Change Zigbee network encryption key +**Changing the key requires repairing of all devices!** + +Zigbee2mqtt uses a default encryption key. Therefore it is recommended to use a different one. To use a different encryption key add the following to you `configuration.yaml`: + +**Do not use the following key.** +``` +advanced: + network_key: [7, 3, 5, 7, 9, 11, 13, 15, 0, 2, 4, 6, 8, 11, 12, 13], +``` diff --git a/docs/images/CP2102.png b/docs/images/CP2102.png new file mode 100644 index 000000000..3748634aa Binary files /dev/null and b/docs/images/CP2102.png differ diff --git a/docs/index.md b/docs/index.md index 38d3c6789..4b4c2dd4c 100644 --- a/docs/index.md +++ b/docs/index.md @@ -27,6 +27,8 @@ Welcome to the Zigbee2mqtt documentation! * [How to support new devices on Hass.io](how_tos/how_to_support_new_devices_on_hassio.md) * [How to sniff Zigbee traffic](how_tos/how_to_sniff_zigbee_traffic.md) * [How to create a CC2530 router](how_tos/how_to_create_a_cc2530_router.md) +* [How to secure your Zigbee network](how_tos/how_to_secure_network.md) +* [How to connect a CC2530 coordinator using a USB to serial adapter](how_tos/how_to_connect_a_cc2530_coordinator_using_a_usb_to_serial_adapter.md) ### Information * [Supported devices](information/supported_devices.md)