I'm slowly learning more Hubitat/Groovy and have a question on two lines of code I found in existing Zigbee device drivers:
-
what is the significance of "new" in the below snippet?
def sendCommand(String msg) { if (txtEnable) log.info "sendCommand - ${msg}" sendHubCommand(new HubAction(sendtodevice(msg), Protocol.ZIGBEE)) }
-
In several examples I see the parse code include tests for the existence of either "catchall:" or "read attr -' at the beginning of a received message description. While I understand the definition of the words I couldn't find the significance of these messages. I looked through all the Zigbee documents I have with no luck.
Can someone help me with these?
Thanks
John