![]() |
|
Integration with Zigbee - Printable Version +- Comfort Automation/ Security System Forums (https://www.comfortforums.com) +-- Forum: Software Applications (https://www.comfortforums.com/forum-4.html) +--- Forum: Comfort with Home Assistant (https://www.comfortforums.com/forum-143.html) +--- Thread: Integration with Zigbee (/thread-5612.html) |
- slychiu - 02-21-2025 This topic decsribes how to Connect Zigbee devices with Comfort Home Assistant, for example to map Zigbee Motion and Door/window sensors to Comfort Virtual InputsTo integrate with zigbee, a Zigbee USB stick can be used. We have tested the ZBT-1 by Home Assistant sold by Seeed Studio. ![]() With this device, it is no necessary to have another Zigbee controller in the network. Just paid other zigbee sensors and devices into the same network. We shall use as an example Sonoff SNZB-04P door/down switches from Sonoff. This video shows some of the affordable zigbee devices that cab be used with Home Assistant https://www.youtube.com/watch?v=fJrtlGhXyDU See one of the many youtube videos on how to set up Zigbee on Home Assistant https://www.youtube.com/watch?v=fHq2Bzrsnr8 - slychiu - 02-21-2025 Connect the ZBT-1 to one of the Rpi USB ports. You may see automatic disconvery of the ZBT-1 as shown below; ![]() ![]() or go to Settings > Devices & Services > Integrations, ADD Integration, and search for Zigbee. ![]() ![]() Next, Pick your firmware. select Zigbee ![]() select a serial Port. U the default settings if there is only 1 device ![]() ![]() Select Brand ![]() ![]() ![]() ![]() ![]() Next, add the Sonoff SNZB-04P door/window sensor. Press Add Device, and put the sensor into pairing mode y pressing the button on the device according to the instructions ![]() This may take several minutes. If pairing is successful, ![]() You should see the 2 devices ZBT-1 and SNZB-04P listed in Devices ![]() device info for SNZB-04P ![]() Next, create an automation to map the Door/Window sensor to a Virtual Input in Comfort. SA virtual Input must be configured by Comfort. It can be ny zone that is higher than 16, ie not on the main Comfort Board. In devices and Services, go to Automations and Add new Automation. In Trigger, search for State ![]() look for the entity \"when eWelink SNZB-04P Opening changes from Closed to Open\" ![]() This means when the door window sensor opens. Then Do: MQTT Publish Topic= comfort2mqtt/input12/set where input12 is an example of the virtual input number Payload = 1 ie virtual Input open save and assign a name to the automation eg Zigbee Kitchen Window Open ![]() This causes virtual Input 12 to open when the zigbee sensor opens Do the same for the zigbee door/window sensor closed, ![]() in Then Do, MQTT Publish Topic= comfort2mqtt/input12/set where input12 is an example of the virtual input number Payload = 0 ie virtual Input closed. This will cause the virtual input to be closed when the zigbe sensor changes from Open to Closed. Dont forget in File Editor, configuration.yaml, to add the virtual Zone eg - name: Kitchen Window unique_id: \"comfort2_input12\" state_topic: \"comfort2mqtt/input12\" availability_topic: \"comfort2mqtt/alarm/online\" value_template: \'{{ value_json.State }}\' json_attributes_topic: \"comfort2mqtt/input12\" json_attributes_template: \'{{ value_json | tojson }}\' payload_on: \"1\" payload_off: \"0\" payload_available: \"1\" payload_not_available: \"0\" device_class: windowafter this, restart Home Asistant |