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
#22
Hi, use a scheduled script that polls the data as often as needed
Code:
local zb = require('applibs.zigbee')

local ieee = 'f4ce36e12b9esa24'
local res, err = zb.cmdsync('getnamedattributes', ieee, 'HaElectricalMeasurement', {'RmsVoltage'})
log(res)
log(err)
if res then
  local rmsVoltage = res.RmsVoltage
  grp.checkwrite('37/1/3', rmsVoltage) -- 37/1/3 your group address
end

res, err = zb.cmdsync('getrawattribute', ieee, 0xFEE7, 0x0010)
log(res)
log(err)

local total_active_energy = res

if total_active_energy then
  total_active_energy = total_active_energy / 1000 -- to get kWh
  grp.checkwrite('37/1/4', total_active_energy) -- float value
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 - 02.07.2025, 06:18
RE: Zigbee integration - by Alexander - 02.07.2025, 07:17
RE: Zigbee integration - by RomansP - 02.07.2025, 09:48
RE: Zigbee integration - by Alexander - 02.07.2025, 11:07
RE: Zigbee integration - by RomansP - 02.07.2025, 11:56
RE: Zigbee integration - by Alexander - 02.07.2025, 12:12
RE: Zigbee integration - by Alexander - 02.07.2025, 14:27
RE: Zigbee integration - by RomansP - Yesterday, 08:44

Forum Jump: