XOR

XOR is a smart plug that can be controlled by the Toto game engine. Once it is provisioned for your Repository it can be controlled via trigger.

xor xor

Payload definition

XOR supports two modes: morse and raw.

Morse

Just put the string you want to be encoded as morse code in double quotes.

Example

Use the device plugged into the XOR as a morse code output device and show the word “game”:

"game"

Raw

This is a json structure that explicitly defines when to XOR should turn on and of. It is a sequence of commands where you define the state - the plug is on or off - via a boolean value and an optional number of milliseconds the device will wait until continue processing.

Examples

Switch on the device plugged into the XOR:

[{state:true}]

Switch off the device plugged into the XOR:

[{state:false}]

XOR is switch on for 5 seconds and then switched off:

[{state:true,pause:5000},{state:false}]

A simple blinking sequence could look like this:

[
   {state:true, pause:500},
   {state:false, pause:500},
   {state:true, pause:500},
   {state:false, pause:500},
   {state:true, pause:500},
   {state:false, pause:500},
   {state:true, pause:500},
   {state:false}
]

Provisioning

In order to use the XOR it needs to be provisioned.

Configure

Plug the XOR into a power plug and press the one big button in the front within 10 seconds. This will start the device in the configuration mode and it opens a captive portal. Connect your computer into the WiFi the device opens. The SSID is written on the device and is something like TOTO_AS_ITEAD_ followed by a eight digit number. The password for the Wifi network will be provided by us.

Once you are connected, the captive portal should open automatically.

xor

Click on Configure WiFi (No Scan). The scan for available networks will start. In the next screen you can choose an available network.

Then you can select a wireless network and its SSID will automatically be filled in the SSID field.

xor

name description
SSID SSID of your WiFi.
password Password of your WiFi.
key Key of the TotoObject (please see the section objects > provisioning).
secret Secret of the TotoObject (please see the objects > provisioning).
host Server the device should connect to (usually api.toto.io).

Test

Once you saved your settings the device should restart and be ready to operate.

To test it, plug something into the XOR for example a lamp and go to the section objects of your repository and select your object. Add a trigger at the bottom of the screen and add a payload (see examples above) and click on send at the very bottom to send a the trigger you just defined.