Actuating siren and switches

Actuate sirens or switches by sending a JSON payload to the device. Using the REST/HTTP endpoint type, this payload should be a PUT request to http://<device-ip>:<http-port>/device

When using AWS IoT, the Konnected device will subcribe to the MQTT topic konnected/DEVICE_ID/switch where DEVICE_ID is the 12-character MAC address of the device.

Examples

Turn on a siren

{"pin":8, "state":1}

Actuate a momentary switch for 1 second

{"pin":8, "state":1, "momentary":1000}

Beep/blink three times

{"pin":8, "state":1, "momentary":65, "times":3, "pause":55}

Response

When using the REST/HTTP method and a state change is successful, Konnected will respond with a 200 status code and a JSON message indicating the new state.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.