Creating a New Device in ARTIK cloud

Getting the Device Token

Generate the device token, device token is used for further interaction between the ARTIK Module and ARTIK Cloud.

Take ARTIK Cloud Light as example:
Record down the User ID, DEVICE ID, DEVICE TOKEN for later usage.

Creating Rules

Refer to this Link to create two rules, the logic is as below,
if ARTIK Cloud Switch state is true, then send to ARTIK Cloud Light the action setOn‌
if ARTIK Cloud Switch state is false, then send to send to ARTIK Cloud Light the action setOff‌.

Alternatively, can follow this document, use REST API to create rules.
Below JS code create the rule when Switch is false, send to ARTIK Cloud Light the action setOff‌, similarly can create another rule to send to ARTIK Cloud Light the action setOn‌.