I feel like I’ve hit a brick wall when it comes to communicating with my custom device via a smart app.
I’m getting an error in my logs that looks like this: groovy.lang.MissingMethodException: No signature of method: java.util.ArrayList.notification() is applicable for argument types: (java.lang.String) values: (my JSON string here)
I’ll post some abstracted code to illustrate the flow of what I’m trying to do:
The device has the “Switch” capability and even calling on() or off() doesn’t work from my SmartApp.
tgauchat
(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy)
4
Does this cause the same error in Live Logging?
Unfortunately, SmartThings has no debugging tools, and/or bugs are often caused by a bug on the platform, not our own code.
More than once I’ve had to strip a Device Type or SmartApp to the bone and build it up again or even start in a new copy entirely.
Since Capability Switch (on/off) is standard, I suggest stripping down the device type bit by bit until you isolate and fix on/off… (or start with on/off and build up until something breaks, testing every step of the way).
This might be a wild goose chase or good recollection of a past thread, but I see you’re selecting your custom device by searching directly for devices of its type. For some reason, I recall there being an issue where this method doesn’t actually return the actual device object, and only a stripped down version of its attributes or something.
If it has Switch capability, try using that as your filter in the input line and see if it works.
Alright, that’s a serious bug they need to sort out.
Sure enough I changed it to capability.switch from device.customdevice and sure enough it worked like a dream.
Time for me to pick some random capability (maybe Sleep Sensor?! haha) to add to my custom device so that all my switches don’t come up.
2 Likes
tgauchat
(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy)
7
I do this with one of my custom Device Types and it works fine. But, yes, I’ve heard of issues. Just don’t think I’ve experienced any such problem. Not sure if my situation is the same though.