This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Zigbee devices list from scripting
#1
Hello!
Is possible to get zigbee devices list via script?
I needed to get battery status from all wireless zigbee devices.
Reply
#2
Like this:
Code:
query = 'SELECT * FROM zb_devices WHERE batterylevel IS NOT NULL'
devs = db:getall(query)

for _, dev in ipairs(devs) do
  log(dev.name, dev.batterylevel)
end
Reply
#3
WOW, many thanks admin!!!
Reply


Forum Jump: