I want to fire the event from the SmartApp with custom data to keep track of the action / workflow that caused this event. I tried using sendEvent after reading the docs:
void sendEvent(Map properties) void sendEvent(Device device, Map properties)
but its not working for me.
Here’s what I am doing: (I have two Cree bulbs)
def evtProp = [name: “switch”, value: “on”, data:[“CustomEventId”: “12345”], descriptionText: “turned on!”]
the following error occurs:
[error]: groovy.lang.MissingMethodException: No signature of method: script14636722357482134563699.isChildMessage() is applicable for argument types: (java.util.LinkedHashMap) values: [[name:switch, value:on, data:[CustomEventId:12345], …]]
Possible solutions: isChildMessage(java.lang.String)
if I try,
it gives the error
[error] java.lang.IllegalArgumentException: Command ‘sendEvent’ is not supported by device of type ‘Cree Bulb’. Supported commands: [on, off, poll, configure, setLevel, refresh]
and when I try:
evtProp[“Device”] = it
the code executes without giving any error but nothing happens.
So what am I missing here ?