12345678910111213141516171819202122232425 |
- // retrieveAllDevices()
- [{"n":"Light Switch", "rt":["oic.d.light"], "sn":"2b32e152-3756-4fb6-b3f2-d8db7aafe39f", "state":"on-line"}]
- [{"n":"Light Switch", "rt":["oic.d.light"], "sn":"2b32e152-3756-4fb6-b3f2-d8db7aafe39f", "state":"on-line"},
- {"n":"Television","rt":["oic.d.tv"], "sn":"2cd8e585-ef21-4fd1-7958-6ca7e54adcce","state":"off-line"}]
- // retrieveAllResources()
- [{"n":"Light Switch", "uri":"/light", "rt":["oic.r.switch.binary"], "if":"RW"},
- {"n":"Dimming Control","uri":"/dimming","rt":["oic.r.light.dimming"], "if":"RW"},
- {"n":"Energy Consumption", "uri":"/EnergyConsumptionResURI", "rt": ["oic.r.energy.consumption"], "if":"S"},
- {"n":"Color Temperature", "uri":"/ColourTemperatureResURI", "rt": ["oic.r.colour.colourtemperature"], "if":"A"}]
- // doGetResourceProperties(in String device_uuid, in String resource_uri)
- {"n":"Light Switch", "value":true}
- {"n":"Dimming Control","dimmingSetting":100,"range":100,"step":10}
- {"n":"Energy Consumption","power":200.1,"energy":3500.4}
- {"n":"Color Temperature", "ct":457, "range":1000, "step":1}
- // doPostResourceProperties(in String device_uuid, in String resource_uri, in String prop_data)
- Param : prop_data = { "power" : true, "level" : 100 } or { "value" : true } or { "dimmingSetting" : 50}
- // void onResultReceived(int result_code, String result_data)
- {"tid":"3481704581734918", "sn":"15ba3c25-8cdd-41f8-6f9e-fe49105dce0a", "uri":"/light", "res_type":"POST", "res_data":{"n":"Light Switch","value":false}}
|