Goal is to get SmartThings zigbee button working with Home Assistant first. Then, Wyze Sense sensors. Conbee II will be the zigbee coordinator (aka gateway, aka hub).
Use Windows PC to update firmware and set 2.4GHz channel. Download GCFFlasher and deConz.
GCFFlasher.exe install error:
The code execution cannot proceed because FTD2XX.dll was not found. Reinstalling the program may fix this problem.
So skip for now and install deConz for Win. Connect Conbee II. deConz app says frequency band is 2400 – 2483.5MHz.
Ensure status is “Not in Network”, else click “Leave”. Click icon for “Network Preferences”, top-center. Device type = Coordinator with Channel Mask 15.
Metageek diagram:
Don’t untick current channel, but rather tick channel 20 checkbox then “Save”, “Done”. Close deConz. Restart deConz. Verify channel is 20.
Download firmware deCONZ_ConbeeII_0x26580700.bin.GCF
Download D2XX drivers 2.12.28 (x64). Copy ftd2xx.dll from “i386” folder of drivers to same folder as GCFFlasher.exe.
Open powershell shell, navigate to folder with GCFFlasher.
List devices:
.\GCFFlasher.exe -l
Shows “path” is COM3, but no firmware version info. Firmware ver is displayed when flashing.
Copy firmware file to same folder as GCFFlasher.exe. Flash:
PS D:\snapraid_protected\cloudbu-d-drive\hass_home_assistant\zigbee\conbee ii\flashtool\unzipped\GCFFlasher_V3_10> .\GCFFlasher.exe -d COM3 -f .\deCONZ_ConBeeII_0x26580700.bin.GCF GCFFlasher V3_10 (c) dresden elektronik ingenieurtechnik gmbh Reboot device COM3 (ConBee II) deCONZ firmware version 264A0700 action: update firmware after 6726 ms flashing 160930 bytes: |==============================| verify: . SUCCESS Wait 10 seconds until application starts PS D:\snapraid_protected\cloudbu-d-drive\hass_home_assistant\zigbee\conbee ii\flashtool\unzipped\GCFFlasher_V3_10>
Ran same command again to see expected version:
deCONZ firmware version 26580700
ubuntu
Move conbee II from Windows pc to ubuntu Home Assistant server.
Dresden Elektronik:
donn@fox:~$ sudo lsusb Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 004: ID 0c45:643f Microdia Dell Integrated HD Webcam Bus 001 Device 009: ID 1cf1:0030 Dresden Elektronik Bus 001 Device 007: ID 058f:9254 Alcor Micro Corp. Hub Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
This adds /dev/ttyACM0
crw-rw---- 1 root dialout 166, 0 Jun 17 18:42 /dev/ttyACM0
But, may be wiser to use /dev/serial/by-id/… device path (in case future usb devices cause ttyACM* to change):
donn@fox:~$ ls -l /dev/serial/by-id/ total 0 lrwxrwxrwx 1 root root 13 Jun 17 21:02 usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2213352-if00 -> ../../ttyACM0
dmesg:
[17705070.939956] usb 1-1.2.2: Manufacturer: dresden elektronik ingenieurtechnik GmbH [17705070.941393] cdc_acm 1-1.2.2:1.0: ttyACM0: USB ACM device [17705074.785091] usb 1-1.2.2: Manufacturer: dresden elektronik ingenieurtechnik GmbH [17705074.786219] cdc_acm 1-1.2.2:1.0: ttyACM0: USB ACM device
Add user to ‘dialout’ group:
donn@fox:~$ id donn uid=1000(donn) gid=1000(donn) groups=1000(donn),4(adm),20(dialout),24(cdrom),27(sudo),30(dip),46(plugdev),116(lpadmin),126(sambashare),999(docker),130(libvirt)
Enable ZHA in Home Asssistant (hass, hassio)
Web-ui: Configuration > Intergrations > “+” icon. Search for “ZHA”. See & install “Zigbee Home Automation”.
Unable to connect error:
Abort integration. Use Portainer to map device into the Home Assistant container.
“Duplicate/Edit”.
Then “Runtime & Resources” > “add device”:
Map the long device path (host) to /dev/ttyACM0 within the container:
Scroll up and “Deploy the container”. Confirm that you want to “Replace” the existing container. Wait for HA to restart. Try again to install the ZHA integration, but use /dev/ttyACM0 as the device path this time.
It’ll find it right away because we mapped the host’s device path to inside the container as /dev/ttyACM0:
This is HA 0.110.7
Saw a bunch of sensible “zha” logs in home-assistant.log
‘docker inspect’ output:
"Devices": [ { "PathOnHost": "/dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2213352-if00 ", "PathInContainer": "/dev/ttyACM0", "CgroupPermissions": "rwm" } ],
Was not prompted for zha database path; kinda expected it. Later, I found it in /config:
bash-5.0# ls -l /config/zigbee.db -rw-r--r-- 1 root root 77824 Jun 21 01:44 /config/zigbee.db
Enable “permit” mode
From the docs:
“To add new devices to the network, call the permit service on the zha domain. Do this by clicking the Service icon in Developer tools and typing zha.permit in the Service dropdown box. Next, follow the device instructions for adding, scanning or factory reset.”
Seen in home-assistant.log when I called the permit service:
2020-06-17 21:46:32 INFO (MainThread) [homeassistant.components.zha.api] Permitting joins for 60s
Power ON SmartThings button and tap the button a few times:
2020-06-17 21:48:50 INFO (MainThread) [homeassistant.components.zha.api] Permitting joins for 60s 2020-06-17 21:49:08 INFO (MainThread) [zigpy_deconz.zigbee.application] New device joined: 0x361f, 28:6d:97:01:02:03:04:05 2020-06-17 21:49:08 INFO (MainThread) [zigpy.application] Device 0x361f (28:6d:97:01:02:03:04:05) joined the network 2020-06-17 21:49:08 INFO (MainThread) [zigpy.device] [0x361f] Requesting 'Node Descriptor' 2020-06-17 21:49:09 INFO (MainThread) [zigpy.device] [0x361f] Node Descriptor: <Optional byte1=2 byte2=64 mac_capability_flags=128 manufacturer_code=4673 maximum_buffer_size=82 maximum_incoming_transfer_size=82 server_mask=11264 maximum_outgoing_transfer_size=82 descriptor_capability_field=0> 2020-06-17 21:49:09 INFO (MainThread) [zigpy.device] [0x361f] Discovering endpoints 2020-06-17 21:49:09 INFO (MainThread) [zigpy.device] [0x361f] Discovered endpoints: [1] 2020-06-17 21:49:09 INFO (MainThread) [zigpy.endpoint] [0x361f:1] Discovering endpoint information 2020-06-17 21:49:09 INFO (MainThread) [zigpy.endpoint] [0x361f:1] Discovered endpoint information: <Optional endpoint=1 profile=260 device_type=1026 device_version=0 input_clusters=[0, 1, 3, 32, 1026, 1280, 2821] output_clusters=[3, 25]> 2020-06-17 21:49:16 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.zha entity: binary_sensor.samjin_button_84e50d01_ias_zone 2020-06-17 21:49:16 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new sensor.zha entity: sensor.samjin_button_84e50d01_temperature 2020-06-17 21:49:16 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new sensor.zha entity: sensor.samjin_button_84e50d01_power
“samjin” button.
Entities:
Device info
HA web-ui > Configuration > Zigbee Home Automation. Click the device.
Events
Button press event: Developer Tools > Events. Listen to “zha_event”.
Single-tap:
Double-tap:
"command": "button_double",
Long-press event:
"command": "button_hold",
Check-in event. Might be useful as a heartbeat signal to ensure the button is really alive; and indirectly, the the quality of the zigbee network. The following is the value for msg.payload as displayed in Node Red:
Node Red
Use [events: all] node:
But filter to “zha_event”:
See the data using [debug] node:
{ "event_type":"zha_event", "topic":"zha_event", "payload":{ "event_type":"zha_event", "event":{ "device_ieee":"28:6d:97:01:02:03:04:05", "unique_id":"28:6d:97:01:02:03:04:05:1:0x0500", "endpoint_id":1, "cluster_id":1280, "command":"button_single", "args":{ "press_type":"single", "command_id":0, "args":[ 1, 0, 0, 0 ] } } }, "_msgid":"5f9be8c4.631308" }
Grafana
Grafana query, because SmartThings button has a temperature sensor inside:
According to grafana/influxdb, the SmartThings button is reporting its battery level (%) every 3 hours. But next day, changed to every 10 hours.
#