Project

General

Profile

Actions

Feature #674

closed

Add support for requesting device state change

Added by Hammel over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Immediate
Assignee:
Category:
Software
Target version:
Start date:
02 Sep 2018
Due date:
% Done:

100%

Estimated time:
Severity:
01 - Critical

Description

This is the monitor->iot comm issue.

The monitor must query the deviceSet() function in the iot device.

The iot device must return new state data.

The monitor must update the iot's state data.


Related issues

Related to Jarvis - Feature #673: Add support for requesting device state changeClosedHammel02 Sep 2018

Actions
Actions #1

Updated by Hammel over 5 years ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 10
  • Severity changed from 03 - Medium to 01 - Critical

This is the /set API for the sensor. It will work similar to /query in the IoT device. But it also sets the device state. The API returns 200 on success or 401 if the request can't be verified. On success the sensor sends back it's updated configuration data which the monitor will use to replace the old data (just like with getDevices).

The monitor does not iterate over all paired devices. It must know which one it wants to contact. This is handled by having the API use POST /set/device with the uuid encrypted in the JSON body.

Actions #2

Updated by Hammel over 5 years ago

  • % Done changed from 10 to 20

Code for monitor and IoT are written but not tested.

Easiest way to test this is to add the Jarvis command. See RM #673.

Actions #3

Updated by Hammel over 5 years ago

  • % Done changed from 20 to 30

Jarvis command is ready. Now I can do a full integration test.

Actions #4

Updated by Hammel over 5 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 30 to 100

Wow. That was surprisingly close to perfect on the first try. After minor adjustments, the code in imrest and in the IoT device code (imlightsw) now properly handles the device state change requests. All over AES encrypted channels. Very cool.

All updates to Jarvis, imrest and imlightsw have been tested on real hardware (the LED goes on and off now on voice command!), committed and pushed upstream.

Closing issue.

Actions

Also available in: Atom PDF