19.11.2024, 17:16
(18.11.2024, 17:04)Ozturker Wrote: Everything else is working properly
How can I investigate if there is data corruption or not?
This worked thank you. So it means there is no data corruption right? But what happened why did it change?
I am trying the get the rmscurrent from the smart switch but failing. Could you please guide me on this?
Code:
zb = require('applibs.zigbee.zigbee')
local address = '70b3d52b600a3f9c'
endpoint = 3
cluster = 0x0B04 --
attrs = { 254 , 69 ,17, 401 }
-- Get rmscurrent from HaElectricalMeasurement cluster
local res, err = zb.cmdsync('getrawattribute', address, cluster, 401)
-- Log the result or the error
if err then
log("Error retrieving rmscurrent: " .. err)
else
log("RMS Current: " .. tostring(res))
end
--[[
Manufacturer: _TZ3000_okaz9tjs
Model: TS011F
Firmware version: 500+TZSKT31BS102
Device type: Router
Power source: Mains
Receive when idle: Yes
Endpoint 1
Profile: 260
Input clusters
- Basic (0)
- OnOff (6)
- Identify (3)
- Groups (4)
- Scenes (5)
- 57345
- HaElectricalMeasurement (2820)
- SeMetering (1794)
Reported attributes
- calclevel: 254
- currentsummdelivered: 665
- haactivepower: 69
- onoff: true
- prevlevel: 254
- rmscurrent: 401
- rmsvoltage: 241
]]--