Feature #665


Add support for getting device state.

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

Command Processing
Target version:
Start date:
15 Aug 2018
Due date:
% Done:


Estimated time:
02 - High


This is a command like: "Are the lights on in the office?"

This causes a command to be sent to imrest that causes it to retrieve state data from the "office" lightsw. The return values is the state value which Jarvis must "read out loud."

This requires changes to:
  1. Jarvis: send command and speak response
  2. imrest: accept command and query correct device - this probably needs to be a generic format that can be easily forwarded to the correct device.

The command is synchronous, that is, the request to imrest will not complete until the request by imrest to lightsw responds. There may need to be timeouts set on this, however.

This command must be used to verify that the response from the device node can be properly deciphered by imrest, which must translate it into a response to Jarvis.

Actions #1

Updated by Hammel over 4 years ago

  • % Done changed from 0 to 10
This design is wrong. I just need to have Jarvis read the state data from the device selected. This means
  1. from the voice command, identify the description: "office"
  2. Find that description from monitor configurations.
  3. Use that monitor address to search the current device list.
  4. "Say" the state of each device that matches the device name: "light switch". This may need to count the number of matching devices or something instead of saying it for each device.

So there is no need to query the monitor for this information because we always have an updated view of the devices due to the TimerTask running in Jarvis now.

Actions #2

Updated by Hammel over 4 years ago

  • Status changed from New to Closed
  • % Done changed from 10 to 100

This is now implemented and was tested while fixing RM #671. When you ask for "jarvis office states" you get back the number of devices in the office and how many are enabled and disabled. There is probably room for improvement here (I haven't verified what happens when you ask "Jarvis are the lights on in the office?", eg) but this is good enough for now.

Tested, committed and pushed.

Closing issue.


Also available in: Atom PDF