- Platform information:
-
Hardware: CPUArchitecture/RAM/storage
Raspberry Pi 3 + -
OS: what OS is used and which version
PRETTY_NAME=“Raspbian GNU/Linux 9 (stretch)”
NAME=“Raspbian GNU/Linux”
VERSION_ID=“9”
VERSION=“9 (stretch)”
ID=raspbian
ID_LIKE=debian -
Java Runtime Environment: which java platform is used and what version
openjdk version “1.8.0_202”
OpenJDK Runtime Environment (Zulu8.36.0.152-CA-linux_aarch32hf) (build 1.8.0_202-b152)
OpenJDK Client VM (Zulu8.36.0.152-CA-linux_aarch32hf) (build 25.202-b152, mixed mode, Evaluation) -
openHAB version:
Repository Version
-
openhab-distro : 2.4.0
smarthome : 0.10.0.oh240
openhab-core : 2.4.0
openhab1-addons : 1.13.0
openhab2-addons : 2.4.0
karaf : 4.2.1
- Issue of the topic: please be detailed explaining your issue
When a subscribed topic is received from snips, the rules are not triggered. When a text thing is created linking to the item, the rules are triggered.
- Items configuration related to the issue
String snipsIntent "snipsIntent" { mqtt="<[127.0.0.1:1883:hermes/intent/steynaj:garageDoor:state:default]" }
Switch garageDoor "garageDoor" { mqtt=">[127.0.0.1:1883:home/garage/:command:OFF:default]" ,expire="1s,command=OFF",autoupdate="true" }
* Rules code related to the issue
rule "Snips"
when
Item snipsIntent received update
then
//logInfo("Snips Intent", Snips_Intent.toString)
var String snipsInput = transform("JSONPATH", "$.['input']", snipsIntent.state.toString)
logInfo("snips.rule", "input: " + snipsInput)
var String Value = ("open garage door")
if
(Value == snipsInput) {
logInfo("snips.rule", "correct: " + snipsInput)
garageDoor.postUpdate("ON")
}
else {
logInfo("snips.rule", "wrong: " + snipsInput)
}
end
- If logs where generated please post these here using code fences:
No logs as rules are not triggered except when using a text thing linked to the item:
2019-04-14 19:00:06.664 [vent.ItemStateChangedEvent] - snipsIntent changed from close garage door to open garage door
==> /var/log/openhab2/openhab.log <==
2019-04-14 19:00:06.724 [INFO ] [se.smarthome.model.script.snips.rule] - input: open garage door
2019-04-14 19:00:06.735 [INFO ] [se.smarthome.model.script.snips.rule] - correct: open garage door
==> /var/log/openhab2/events.log <==
2019-04-14 19:00:06.749 [vent.ItemStateChangedEvent] - garageDoor changed from OFF to ON
2019-04-14 19:00:07.944 [ome.event.ItemCommandEvent] - Item 'garageDoor' received command OFF
2019-04-14 19:00:07.968 [vent.ItemStateChangedEvent] - garageDoor changed from ON to OFF
2019-04-14 19:00:07.980 [ome.event.ItemCommandEvent] - Item 'garageDoor' received command OFF
Any assistance or comments will be very welcome.