Unexpected input to `parse()` in custom device driver

Working on a custom driver: lifxcode/LIFXTile.groovy at 03e4937a21947bc60c06c931675ebe3b3d6909be · dkilgore90/lifxcode · GitHub - somehow, somewhere, it seems that parse is getting called with an invalid input - 3 Longs, generating this error log:

2020-06-04 13:32:52.245 errorgroovy.lang.MissingMethodException: No signature of method: user_driver_robheyes_LIFX_Tile_292.parse() is applicable for argument types: (java.lang.Long, java.lang.Long, java.lang.Long) values: [333, 63437, 65480] Possible solutions: parse(java.lang.String), wait(), run(), poll(), run(), any() (parse)

These values look like the input to determineRotation - any ideas why this would be passed into parse? Is there a list somewhere of when/where parse() might be called?

If any communication comes to the hub over port 39501 and comes from the IP address (in hex) or MAC address (also hex, all caps, no separator characters), the it will go to the parse() method of that LAN device. So...if all that applies and the LIFX bulb happens to be sending this, that could be one way. I don't know enough about LIFX to say whether that is possible, but it seems unlikely. If this device is a child device of some parent app or device/driver, perhaps the parent is manually calling parse() on the child device? You may have seen this in some of Hubitat's parent/component driver examples; this is how they handle event generation between parent and child through careful, coordinated calling and implementation of this method in both parent and child/component drivers, though there's no reason you have to follow that convention.

Just a few guesses. Other people may have better ones. :slight_smile:

1 Like

I've checked the parent app and child driver code, nowhere does it explicitly call parse() - but there are some child.sendEvent() calls - does this indirectly get passed to parse()?

Not to my knowledge. However, there are lots of things I don't know. :slight_smile: I think that should just create an event on the child device.

2 Likes