{"_id":"55a500e8750a9a23005332b9","__v":3,"project":"55a47338e75ca60d00a3932f","category":{"_id":"55a47339e75ca60d00a39333","pages":["55a47339e75ca60d00a39335","55a4f5bb02b09d1900d00aac","55a4fbc002b09d1900d00ab9","55a500e8750a9a23005332b9","55a502a02e70c02500380514","55b686bef8105a2f00c352f7","55e99120461e2a390050f254","55e9919ca7ca823900ad54b1","55e996d17f564237001d5bad","55e99a1a8b72bb3700b1d5fb","55e99cb5461e2a390050f283"],"project":"55a47338e75ca60d00a3932f","__v":11,"version":"55a47338e75ca60d00a39332","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-07-14T02:26:01.272Z","from_sync":false,"order":1,"slug":"documentation","title":"Documentation"},"editedParams2":true,"editedParams":true,"user":"55a4f13d02b09d1900d00a9f","version":{"_id":"55a47338e75ca60d00a39332","project":"55a47338e75ca60d00a3932f","__v":8,"createdAt":"2015-07-14T02:26:00.724Z","releaseDate":"2015-07-14T02:26:00.724Z","categories":["55a47339e75ca60d00a39333","55a4fb7e1a5f991700a940f0","55a6702b80c8a30d00b32684","55a6703b80c8a30d00b32685","55a6ea5516d20b1900ed8f53","55b23ad2329f363900fbc92f","55b23b0a329f363900fbc932","55b2426a0e11590d008f7950"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-07-14T12:30:32.109Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[{"name":"","code":"curl -X POST https://make.lono.io/api/v1/devices/:deviceId/zones/:zoneId/on?token=[auth token]","language":"shell"},{"code":"// Assuming you've connected to the Lono Cloud and created a device named device:\n// device.set_zone(zone_id, state, callback)\ndevice.set_zone(0, true, function(err, body) {\n  console.log(err, body);\n});","language":"javascript"},{"code":"# Assuming you've connected to the Lono Cloud and created a device named device:\n# device.set_zone(zone_id, state)\ndevice.set_zone(0, true)","language":"ruby"},{"code":"# Assuming you've connected to the Lono Cloud and created a device named device:\n# device.set_zone(zone_id, state)\ndevice.set_zone(0, true)","language":"python"}]},"method":"post","results":{"codes":[{"language":"json","code":"{\"name\": \"success.turnonzone\"}","name":"","status":200},{"status":400,"language":"json","code":"{\"name\": \"error.turnonzone\"}","name":""}]},"settings":"","auth":"required","params":[{"_id":"55a501d7ec735f37000fc6cf","ref":"","in":"body","required":true,"desc":"Your Lono ID","default":"","type":"string","name":":deviceId"},{"_id":"55a501d7ec735f37000fc6ce","ref":"","in":"body","required":true,"desc":"The zone you are looking to affect. Note that zones are zero based, so to turn on zone 1 on your Lono you'd pass a 0 here.","default":"","type":"int","name":":zoneId"}],"url":"/devices/:deviceId/zones/:zoneId/on"},"isReference":false,"order":0,"body":"### Permission to use this feature\nIn applications, to provide use of any feature, you can use the scope `write` - think of it like a wildcard. However, in production applications, it's recommended that developers instead specify their scopes explicitly.\n\nThe scope for this feature is `zone:manual:on`.","excerpt":"","slug":"turn-on-a-zone","type":"endpoint","title":"Turn On a Zone"}

postTurn On a Zone


Definition

{{ api_url }}{{ page_api_url }}

Parameters

Body Params

deviceId:
required
string
Your Lono ID
zoneId:
required
integer
The zone you are looking to affect. Note that zones are zero based, so to turn on zone 1 on your Lono you'd pass a 0 here.

Examples


Result Format


Documentation

### Permission to use this feature In applications, to provide use of any feature, you can use the scope `write` - think of it like a wildcard. However, in production applications, it's recommended that developers instead specify their scopes explicitly. The scope for this feature is `zone:manual:on`.

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}