Add support for requesting device state change
|Status:||Closed||Start date:||02 Sep 2018|
|Target version:||Iron Man - 002 - MVP|
|Severity:||01 - Critical|
This is just a matter of adding a JarvisCmd (probably an extension to iot()) to send a state change to the monitor, which forwards the request and returns an updated status.
The monitor-iot comm will be tracked separately.
RM #673: Add support for requesting device state change to Jarvis.
Add concat method in utils for joining multiple string arrays.
Add setDevice method to Imwww to make it convenient to issue a state change command from Jarvis to specific devices.
Fix IoT method in JarvisCmd to better understand the difference between a simple query and a state change request.
Use a Java object for synchronization when disabling/enabling speech processing in Speech class.
Added Device class to provide pseudonyms for device types.
Add reference to Penn Treebank POS tag list in docs/notes.txt.
- Status changed from New to In Progress
- % Done changed from 0 to 10
This may be a little more work than originally envisioned. I have the stub in Jarvis to recognize an IoT command but it doesn't know what to do with it. Right now if I say
jarvis lights office
Jarvis will tell me how many lights it found and their states. But I need to tell it
jarvis lights office on
jarvis lights office enable
So it needs to know the difference between the query and the state command. On is an adverb and enable is a verb. So if we find a verb or an adverb we need to identify what we want to do with it. For now, these commands are sufficient because the query has no verbs or adverbs, but I'd eventually like to have it differentiate
Jarvis are the lights on in the office
Jarvis turn the lights on in the office
#3 Updated by Hammel about 1 month ago
- Status changed from In Progress to Closed
- % Done changed from 10 to 100
This is now implemented. Jarvis understands the difference between
Jarvis office lights
which is a query for the state of the lights and
Jarvis office lights on
which is a command to change the state of the lights in the office. It also understands "enabled, off and disabled".
That's good enough for the Maker Faire. Right now the lights don't change because the code in imrest is not on the hardware, so that's a different test. If the command is malformed going to the monitor (so far it looks okay and gets back a 404 response) then I'll open separate issues for fixing that.
Code pushed. Closing issue.