My Open API project AppId: 1511454599032094720b62d1 (Korea region, open-kr).
Use case: controlling my own H2 wall switch 3 channels from a custom home voice assistant, account-authorization mode on open-kr.aqara.com.
Currently query.resource.info {model: lumi.switch.agl006} returns and query.resource.value / write.resource.device return 302 âall resource not openâ.
Thanks @JohnD! spec.query.trait works - I can read the OnOff state of my H2 switch channels (model lumi.switch.agl006, endpoints 2/3/4, functionCode Output, traitCode OnOff).
But spec.write.trait does NOT actuate. It returns code:0 (top-level AND per-item), but the response item shows value:null and the device state never changes (verified by reading back several seconds later; I tried value as bool true, int 1, and string â1â). spec.write.command with commandCode Toggle returns 403.
My request body:
{âintentâ:âspec.write.traitâ,âdataâ:{âtraitsâ:[{âdeviceIdâ:âlumi.54ef441001705a3aâ,âendpointIdâ:2,âfunctionCodeâ:âOutputâ,âtraitCodeâ:âOnOffâ,âvalueâ:true}]}}
Read works on the same project/token, so auth is fine. What is needed to actually WRITE/control the trait - a specific permission/scope, a different value format, or another step? (Account-authorization mode, Korea region, DEMO project.) Thank you!
Could you please post the response from spec.query.specdevice.config? And possibly also the response from spec.query.qlinkmodel.config (retrieved using the model). Please use the forumâs preformatted text feature for the output.
Unfortunately, I donât have the Light Switch H2 myself, only the H2 Shutter Switch, and that one doesnât have functionCode Output, traitCode OnOff. Also, I unfortunately canât find the agl006 under âadd virtual equipmentâ in the developer portal.