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 integration
#16
(Yesterday, 06:18)Daniel Wrote: It works with any imx6 version of LM

Ok, but I can't get the script to work. Are we supposed to add a user library for this?

Update: I always get the error message: "address must be a string or a number".

Here is my script:
Code:
local zb = require('applibs.zigbee')

local ieee = 'f4ce36e12b9esa24'
local cluster = 0x0B04
local endpoint = 10

local args = {
  ieee = ieee,
  endpoint = endpoint,
  cluster = cluster,
  attributes = { 'rmsvoltage' }
}

local res, err = zb.cmdsync('getnamedattributes', args)

if type(res) == 'table' then
  log('Zigbee-respons: ' .. json.encode(res)) 
  if res.rmsvoltage then
    log('Spenning (RMS): ' .. tostring(res.rmsvoltage) .. ' V')
  else
    log('Ingen rmsvoltage funnet i respons')
  end
else
  log('Feil ved lesing: ' .. tostring(err or 'ingen respons'))
end
Reply


Messages In This Thread
Zigbee integration - by Alexander - 07.12.2024, 08:03
RE: Zigbee integration - by CristianAgata - 08.12.2024, 13:55
RE: Zigbee integration - by Alexander - 30.06.2025, 09:24
RE: Zigbee integration - by Daniel - 09.12.2024, 08:37
RE: Zigbee integration - by jurmaster - 13.12.2024, 08:19
RE: Zigbee integration - by Daniel - 13.12.2024, 08:37
RE: Zigbee integration - by Daniel - 30.06.2025, 11:05
RE: Zigbee integration - by Alexander - 01.07.2025, 07:33
RE: Zigbee integration - by Daniel - 01.07.2025, 07:37
RE: Zigbee integration - by Alexander - 01.07.2025, 07:45
RE: Zigbee integration - by Daniel - 01.07.2025, 08:04
RE: Zigbee integration - by Alexander - 01.07.2025, 08:09
RE: Zigbee integration - by Daniel - 01.07.2025, 09:56
RE: Zigbee integration - by Alexander - 01.07.2025, 17:18
RE: Zigbee integration - by Daniel - Yesterday, 06:18
RE: Zigbee integration - by Alexander - Yesterday, 07:17
RE: Zigbee integration - by RomansP - Yesterday, 09:48
RE: Zigbee integration - by Alexander - Yesterday, 11:07
RE: Zigbee integration - by RomansP - Yesterday, 11:56
RE: Zigbee integration - by Alexander - Yesterday, 12:12
RE: Zigbee integration - by Alexander - Yesterday, 14:27

Forum Jump: