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 library
#2
Full status read is done in the user UI part so it cannot be called from scripts. You can read attributes like LocalTemperature via a script:
Code:
zb = require('applibs.zigbee')

addr = '0123456789abcdef'
cluster = 0x0201 -- HvacThermostat
attrs = { 'LocalTemperature' }

res, err = zb.cmdsync('getnamedattributes', addr, cluster, attrs)
log(res, err)

if type(res) == 'table' and res.LocalTemperature then
  temperature = res.LocalTemperature / 100
  log(temperature)
end
Reply


Messages In This Thread
ZigBee library - by CristianAgata - 13.09.2023, 10:57
RE: ZigBee library - by admin - 13.09.2023, 11:56
RE: ZigBee library - by CristianAgata - 14.09.2023, 13:42
RE: ZigBee library - by CristianAgata - 13.09.2023, 12:14
RE: ZigBee library - by admin - 15.09.2023, 05:14
RE: ZigBee library - by Zen - 15.09.2023, 10:55
RE: ZigBee library - by admin - 15.09.2023, 13:40

Forum Jump: