Connecting Devices to Custom SmartApp

I’m trying to create a custom SmartApp for a cloud connected device. I’m following the limited example in the document for the ecobee thermostat.

I can create and remove my devices from the SmartApp, but I’m having issues with the custom DeviceType calling methods of the SmartApp.

I have a DeviceType that implements polling and has been created (successfully) via my SmartApp.

void poll() 
{
    log.debug "Executing 'poll' using parent SmartApp"
    def results = parent.pollChild(this)
    parseEventData(results)
}

The poll is called, but the parent method is not. (using debug statements in the SmartApp pollChild method).

If I look at my devices on the web, the device all looks fine. However, one thing I noticed is that the section SmartApps is empty. Should I expect to see a connection back to my SmartApp here?

So I’ll answer myself here… I wasn’t able to do anything along these lines as seen in many examples and documents. The only way I could talk to the smartapp was via messages.

I was able to make calls from a smartapp to devicetype, but only for defined commands. So, if you want to make a direct call, you define your custom command, and then you can call it direct.