Reason why I can't control lights via SmartApp?

I’m sure I’m missing something obvious, but I can’t control the lights from a SmartApp I’m writing. The command = “on” and I get the debug message with the correct name. Even with the .on() that I added directly it won’t turn on the light. I also tried applying it to all the lights, nothing works. Any help would be greatly appreciated.

void updateSwitches() {
    def command = params.command
    def name = params.name

    if (command) {
        switches.each {
            it.on()
        
            if (it.displayName == name) {
                log.debug "sent command: Name: $name"
                it."$command"()
            }
        }
        switches."$command"()
    }
}

Several of my SmartApps that control lights are no longer working (just noticed today). Right now, it appears that there may be some kind of bug in the SmartThings backend.

Platform problems today resulted in many devices being unavailable. This is being tracked in the known issue section of the community created wiki:

http://thingsthataresmart.wiki/index.php?title=Bug:External_Integrations_fail(Echo,_Harmony,_IFTTT,_SmartTiles)

There was also a post to the official status page. You can subscribe to that page for updates, although it’s not always very detailed.

http://status.smartthings.com