Skip to content

Zigbee child devices do not have endpoints #2287

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 15 additions & 7 deletions drivers/SmartThings/zigbee-switch/src/zll-polling/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,22 @@ local device_lib = require "st.device"
local constants = require "st.zigbee.constants"
local clusters = require "st.zigbee.zcl.clusters"

local function zll_profile(opts, driver, device, zb_rx, ...)
local endpoint = device.zigbee_endpoints[device.fingerprinted_endpoint_id] or device.zigbee_endpoints[tostring(device.fingerprinted_endpoint_id)]
if (endpoint.profile_id == constants.ZLL_PROFILE_ID) then
local subdriver = require("zll-polling")
return true, subdriver
else
return false
local function zll_profile(opts, driver, device, ...)
if device ~= nil and device.network_type == device_lib.NETWORK_TYPE_ZIGBEE then
local endpoints = device.zigbee_endpoints
local fingerprinted_endpoint_id = device.fingerprinted_endpoint_id
if endpoints ~= nil and fingerprinted_endpoint_id ~= nil then
local endpoint = endpoints[fingerprinted_endpoint_id]
if endpoint == nil then
endpoint = endpoints[tostring(fingerprinted_endpoint_id)]
end
if endpoint ~= nil and endpoint.profile_id ~= nil and endpoint.profile_id == constants.ZLL_PROFILE_ID then
local subdriver = require("zll-polling")
return true, subdriver
end
end
end
return false
end

local function set_up_zll_polling(driver, device)
Expand Down
Loading