Simulator displaying incorrect logs


(Mike Maxwell) #1

Device simulator logs are now showing the main activity logs for my hub, nothing to do with the device I’m working on.
Yea, logged out and in again, same delio.
Anyone else having this issue?


(Mike Maxwell) #2

OK, PEBKAS…

Don’t ever do this in a device driver…

def updated() {
    //initial device state init, set to defaults
    if (!state.param80) state.param80 = 2
    if (!state.param120) state.param120 = 1
    
   >>>>>>>log.debug "prefs updated..." + updated()<<<<<<<<<<

    log.debug "settings: ${settings.inspect()}, state: ${state.inspect()}"
    //returns  settings: ['param120':'2', 'param80':'2'], state: [:]
}

Being that updated is so well documented, does it return any parameters?
For whatever reason it seems to run twice (prior to invoking that nice infinite recursion…), which is annoying…


(Mike Maxwell) #3

Ha, thought someone else was saving the same issue, but no, the title’s been "Politically Corrected…"
At lease I’ve not been banned…