I notice sometimes I get the previous voice command written to the log… Looks to be either my fault or openhab internals.
Previous command is “1”, current command is “hello cats”.
You can see in the logs the command that was passed in was “hello cats”
2018-02-04 15:55:45.743 [DEBUG] [org.eclipse.jetty.server.HttpInput ] - HttpInputOverHTTP@742cb8de[c=0,q=1,[0]=Content@6011a452{HeapByteBufferR@33ca5514[p=272,l=282,c=8192,r=10]={POST /rest/items/...khttp/3.6.0\r\n\r\n<<<hello cats>>>Range: bytes=0-\r\n...\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00}},s=STREAM] addContent Content@6011a452{HeapByteBufferR@33ca5514[p=272,l=282,c=8192,r=10]={POST /rest/items/...khttp/3.6.0\r\n\r\n<<<hello cats>>>Range: bytes=0-\r\n...\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00}}
But what was logged is 1.
2018-02-04 15:55:46.161 [INFO ] [pse.smarthome.model.script.Voice.Rec] - VoiceCommand received 1
Test Code
rule "Voice control"
when
Item VoiceCommand received command
then
var String command = VoiceCommand.state.toString.toLowerCase
logInfo("Voice.Rec","VoiceCommand received "+command)
say(command)
logInfo("TTS_1", command)
end
LOGS
2018-02-04 15:55:45.740 [DEBUG] [org.eclipse.jetty.server.HttpInput ] - HttpInputOverHTTP@4f99d2ad[c=0,q=1,[0]=EOF,s=STREAM] addContent EOF
2018-02-04 15:55:45.743 [DEBUG] [org.eclipse.jetty.server.HttpInput ] - HttpInputOverHTTP@742cb8de[c=0,q=1,[0]=Content@6011a452{HeapByteBufferR@33ca5514[p=272,l=282,c=8192,r=10]={POST /rest/items/...khttp/3.6.0\r\n\r\n<<<hello cats>>>Range: bytes=0-\r\n...\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00}},s=STREAM] addContent Content@6011a452{HeapByteBufferR@33ca5514[p=272,l=282,c=8192,r=10]={POST /rest/items/...khttp/3.6.0\r\n\r\n<<<hello cats>>>Range: bytes=0-\r\n...\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00}}
2018-02-04 15:55:45.768 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'Temperature' for widget org.eclipse.smarthome.model.sitemap.Group
2018-02-04 15:55:45.838 [DEBUG] [org.eclipse.jetty.server.HttpInput ] - HttpInputOverHTTP@742cb8de[c=0,q=2,[0]=Content@6011a452{HeapByteBufferR@33ca5514[p=272,l=282,c=8192,r=10]={POST /rest/items/...khttp/3.6.0\r\n\r\n<<<hello cats>>>Range: bytes=0-\r\n...\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00}},s=STREAM] addContent EOF
2018-02-04 15:55:45.865 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'Temperature' for widget org.eclipse.smarthome.model.sitemap.Group
2018-02-04 15:55:45.925 [DEBUG] [org.eclipse.jetty.server.HttpInput ] - HttpInputOverHTTP@742cb8de[c=10,q=2,[0]=Content@6011a452{HeapByteBufferR@33ca5514[p=282,l=282,c=8192,r=0]={POST /rest/items/...0\r\n\r\nhello cats<<<>>>Range: bytes=0-\r\n...\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00}},s=STREAM] read 10 from Content@6011a452{HeapByteBufferR@33ca5514[p=282,l=282,c=8192,r=0]={POST /rest/items/...0\r\n\r\nhello cats<<<>>>Range: bytes=0-\r\n...\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00}}
2018-02-04 15:55:45.953 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item for widget org.eclipse.smarthome.model.sitemap.Group
2018-02-04 15:55:46.026 [DEBUG] [org.eclipse.jetty.server.HttpInput ] - HttpInputOverHTTP@742cb8de[c=10,q=1,[0]=EOF,s=STREAM] consumed Content@6011a452{HeapByteBufferR@33ca5514[p=282,l=282,c=8192,r=0]={POST /rest/items/...0\r\n\r\nhello cats<<<>>>Range: bytes=0-\r\n...\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00}}
2018-02-04 15:55:46.051 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item for widget org.eclipse.smarthome.model.sitemap.Group
2018-02-04 15:55:46.103 [DEBUG] [org.eclipse.jetty.server.HttpInput ] - HttpInputOverHTTP@742cb8de[c=10,q=0,[0]=null,s=STREAM] consumed EOF
2018-02-04 15:55:46.128 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'Luminance' for widget org.eclipse.smarthome.model.sitemap.Group
2018-02-04 15:55:46.161 [INFO ] [pse.smarthome.model.script.Voice.Rec] - VoiceCommand received 1
2018-02-04 15:55:46.180 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'Luminance' for widget org.eclipse.smarthome.model.sitemap.Group
2018-02-04 15:55:46.226 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item for widget org.eclipse.smarthome.model.sitemap.Group
2018-02-04 15:55:46.265 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item for widget org.eclipse.smarthome.model.sitemap.Group
2018-02-04 15:55:46.282 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'Battery' for widget org.eclipse.smarthome.model.sitemap.Group
2018-02-04 15:55:46.300 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'Battery' for widget org.eclipse.smarthome.model.sitemap.Group
2018-02-04 15:55:46.318 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item for widget org.eclipse.smarthome.model.sitemap.Group
2018-02-04 15:55:46.335 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item for widget org.eclipse.smarthome.model.sitemap.Group
2018-02-04 15:55:46.352 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'Motion' for widget org.eclipse.smarthome.model.sitemap.Group
2018-02-04 15:55:46.369 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'Motion' for widget org.eclipse.smarthome.model.sitemap.Group
2018-02-04 15:55:46.387 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item for widget org.eclipse.smarthome.model.sitemap.Group
2018-02-04 15:55:46.404 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item for widget org.eclipse.smarthome.model.sitemap.Group
2018-02-04 15:55:46.421 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'Status' for widget org.eclipse.smarthome.model.sitemap.Group
2018-02-04 15:55:46.438 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'Status' for widget org.eclipse.smarthome.model.sitemap.Group
2018-02-04 15:55:46.456 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item for widget org.eclipse.smarthome.model.sitemap.Group
2018-02-04 15:55:46.462 [DEBUG] [org.eclipse.jetty.server.HttpInput ] - HttpInputOverHTTP@3134c347[c=0,q=1,[0]=EOF,s=STREAM] addContent EOF
2018-02-04 15:55:46.473 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item for widget org.eclipse.smarthome.model.sitemap.Group
2018-02-04 15:55:46.555 [DEBUG] [org.eclipse.jetty.server.HttpInput ] - HttpInputOverHTTP@4f99d2ad[c=0,q=1,[0]=EOF,s=STREAM] addContent EOF
2018-02-04 15:55:46.592 [DEBUG] [org.eclipse.jetty.server.HttpInput ] - HttpInputOverHTTP@64d58ced[c=0,q=1,[0]=EOF,s=STREAM] addContent EOF
2018-02-04 15:55:46.594 [DEBUG] [org.eclipse.jetty.server.HttpInput ] - HttpInputOverHTTP@6b84f398[c=0,q=1,[0]=EOF,s=STREAM] addContent EOF
2018-02-04 15:55:47.260 [INFO ] [eclipse.smarthome.model.script.TTS_1] - 1
Anyone know what I might be doing wrong? or is this a bug. I think it happens more often when I say the commands straight after each other.