jneilliii / OctoPrint-TPLinkSmartplug

105 stars 57 forks source link

[BUG]: one device doesn't start at print start, but seems configured the same as others that do. #247

Closed rrauenza closed 3 years ago

rrauenza commented 3 years ago

Describe the bug I have four plugs, all on a tplink power strip. Three are all configured the same, one is the printer itself. One of the three doesn't turn on when a print starts, but the others do:

image

To Reproduce Steps to reproduce the behavior:

I CAN manually turn the fan on and off with the icon on main page.

Expected behavior

Fan should turn on just like the other two devices.

Desktop (please complete the following information):

Additional context

I looked at the config diff ... and I noticed that emeter and status are missing in the yaml -- although the icons do turn green/red for the fans when I click on them.

Config:

    tplinksmartplug:
        _config_version: 13
        abortTimeout: '60'
        arrSmartplugs:
        -   autoConnect: true
            autoConnectDelay: '5'
            autoDisconnect: true
            autoDisconnectDelay: 0
            automaticShutdownEnabled: false
            btnColor: '#808080'
            countdownOffDelay: '1'
            countdownOnDelay: '0'
            currentState: 'on'
            displayWarning: false
            emeter:
                get_realtime:
                    current_ma: 118
                    err_code: 0
                    power_mw: 8830
                    total_wh: 193
                    voltage_mv: 123243
            event_on_disconnect: false
            event_on_error: false
            event_on_startup: false
            event_on_upload: false
            gcodeEnabled: false
            gcodeOffDelay: '600'
            gcodeOnDelay: 0
            icon: icon-print
            ip: 3dprinterswitch/0
            label: Prusa Mk3
            sysCmdOff: false
            sysCmdOffDelay: 0
            sysCmdOn: false
            sysCmdOnDelay: 0
            sysRunCmdOff: ''
            sysRunCmdOn: ''
            thermal_runaway: false
            useCountdownRules: false
            warnPrinting: true
        -   autoConnect: false
            autoConnectDelay: 10
            autoDisconnect: false
            autoDisconnectDelay: 0
            automaticShutdownEnabled: true
            btnColor: '#808080'
            countdownOffDelay: 0
            countdownOnDelay: 0
            currentState: 'off'
            displayWarning: false
            emeter:
                get_realtime:
                    current_ma: 4
                    err_code: 0
                    power_mw: 0
                    total_wh: 10
                    voltage_mv: 122696
            event_on_disconnect: false
            event_on_error: false
            event_on_startup: false
            event_on_upload: false
            gcodeEnabled: true
            gcodeOffDelay: 0
            gcodeOnDelay: 0
            icon: fas fa-dragon
            ip: 3dprinterswitch/1
            label: Thordsen
            sysCmdOff: false
            sysCmdOffDelay: 0
            sysCmdOn: false
            sysCmdOnDelay: 0
            sysRunCmdOff: ''
            sysRunCmdOn: ''
            thermal_runaway: false
            useCountdownRules: false
            warnPrinting: false
        -   autoConnect: false
            autoConnectDelay: 10
            autoDisconnect: false
            autoDisconnectDelay: 0
            automaticShutdownEnabled: true
            btnColor: '#808080'
            countdownOffDelay: 0
            countdownOnDelay: 0
            currentState: 'off'
            displayWarning: false
            emeter:
                get_realtime:
                    current_ma: 3
                    err_code: 0
                    power_mw: 0
                    total_wh: 9
                    voltage_mv: 123425
            event_on_disconnect: false
            event_on_error: false
            event_on_startup: false
            event_on_upload: false
            gcodeEnabled: true
            gcodeOffDelay: 0
            gcodeOnDelay: 0
            icon: icon-lightbulb
            ip: 3dprinterswitch/2
            label: Light
            sysCmdOff: false
            sysCmdOffDelay: 0
            sysCmdOn: false
            sysCmdOnDelay: 0
            sysRunCmdOff: ''
            sysRunCmdOn: ''
            thermal_runaway: false
            useCountdownRules: false
            warnPrinting: false
        -   autoConnect: false
            autoConnectDelay: 10
            autoDisconnect: false
            autoDisconnectDelay: 0
            automaticShutdownEnabled: true
            btnColor: '#808080'
            countdownOffDelay: '0'
            countdownOnDelay: '0'
            currentState: unknown
            displayWarning: false
            emeter:
                get_realtime: {}
            event_on_disconnect: false
            event_on_error: false
            event_on_startup: false
            event_on_upload: false
            gcodeEnabled: true
            gcodeOffDelay: 0
            gcodeOnDelay: 0
            icon: fas fa-recycle
            ip: 3dprinterswitch/3
            label: Fans
            sysCmdOff: false
            sysCmdOffDelay: 0
            sysCmdOn: false
            sysCmdOnDelay: 0
            sysRunCmdOff: ''
            sysRunCmdOn: ''
            thermal_runaway: false
            useCountdownRules: false
            warnPrinting: false
        debug_logging: true
        pollingEnabled: true

Logs:

pi@octopi:~/.octoprint $ cat logs/plugin_tplinksmartplug_debug.log
[2021-01-31 17:32:45,043] DEBUG: ImmutableMultiDict([('checkStatus', '3dprinterswitch/0')])
[2021-01-31 17:32:45,045] DEBUG: Checking status of 3dprinterswitch/0.
[2021-01-31 17:32:45,045] DEBUG: {'system': {'get_sysinfo': {}}}
[2021-01-31 17:32:45,045] DEBUG: Invalid ip 3dprinterswitch trying hostname.
[2021-01-31 17:32:45,133] DEBUG: Hostname 3dprinterswitch is valid.
[2021-01-31 17:32:45,134] DEBUG: {'system': {'get_sysinfo': {}}}
[2021-01-31 17:32:45,135] DEBUG: Invalid ip 3dprinterswitch trying hostname.
[2021-01-31 17:32:45,146] DEBUG: Hostname 3dprinterswitch is valid.
[2021-01-31 17:32:45,147] DEBUG: Sending command {'system': {'get_sysinfo': {}}} to 3dprinterswitch
[2021-01-31 17:32:48,810] DEBUG: Ǧb"system":{"get_sysinfo":{"sw_ver":"1.0.19 Build 200224 Rel.090814","hw_ver":"1.0","model":"HS300(US)","deviceId":"800671B8B6CC08249B39955E766F0C281B1C1245","oemId":"5C9E6254BEBAED63B2B6102966D24C17","hwId":"34C41AA028022D0CCEA5E678E8547C54","rssi":-73,"longitude_i":-1220547,"latitude_i":373498,"alias":"TP-LINK_Power Strip_CE34","status":"new","mic_type":"IOT.SMARTPLUGSWITCH","feature":"TIM:ENE","mac":"D8:0D:17:BA:CE:34","updating":0,"led_off":0,"children":[{"id":"800671B8B6CC08249B39955E766F0C281B1C124500","state":1,"alias":"Printer","on_time":1118667,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124501","state":0,"alias":"Dryer","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124502","state":0,"alias":"Light","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124503","state":0,"alias":"Fans","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124504","state":0,"alias":"Plug 5","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124505","state":1,"alias":"Cat Light","on_time":225,"next_action":{"type":-1}}],"child_num":6,"err_code":0}}}
[2021-01-31 17:32:48,821] DEBUG: get_device_id response: 800671B8B6CC08249B39955E766F0C281B1C124500
[2021-01-31 17:32:48,823] DEBUG: Sending command {'system': {'get_sysinfo': {}}, 'context': {'child_ids': ['800671B8B6CC08249B39955E766F0C281B1C124500']}} to 3dprinterswitch
[2021-01-31 17:32:49,129] DEBUG: Ǧb"system":{"get_sysinfo":{"sw_ver":"1.0.19 Build 200224 Rel.090814","hw_ver":"1.0","model":"HS300(US)","deviceId":"800671B8B6CC08249B39955E766F0C281B1C1245","oemId":"5C9E6254BEBAED63B2B6102966D24C17","hwId":"34C41AA028022D0CCEA5E678E8547C54","rssi":-73,"longitude_i":-1220547,"latitude_i":373498,"alias":"TP-LINK_Power Strip_CE34","status":"new","mic_type":"IOT.SMARTPLUGSWITCH","feature":"TIM:ENE","mac":"D8:0D:17:BA:CE:34","updating":0,"led_off":0,"children":[{"id":"800671B8B6CC08249B39955E766F0C281B1C124500","state":1,"alias":"Printer","on_time":1118667,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124501","state":0,"alias":"Dryer","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124502","state":0,"alias":"Light","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124503","state":0,"alias":"Fans","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124504","state":0,"alias":"Plug 5","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124505","state":1,"alias":"Cat Light","on_time":225,"next_action":{"type":-1}}],"child_num":6,"err_code":0}}}
[2021-01-31 17:32:49,139] DEBUG: TIM:ENE
[2021-01-31 17:32:49,140] DEBUG: Invalid ip 3dprinterswitch trying hostname.
[2021-01-31 17:32:49,213] DEBUG: Hostname 3dprinterswitch is valid.
[2021-01-31 17:32:49,214] DEBUG: {'system': {'get_sysinfo': {}}}
[2021-01-31 17:32:49,215] DEBUG: Invalid ip 3dprinterswitch trying hostname.
[2021-01-31 17:32:49,252] DEBUG: Hostname 3dprinterswitch is valid.
[2021-01-31 17:32:49,253] DEBUG: Sending command {'system': {'get_sysinfo': {}}} to 3dprinterswitch
[2021-01-31 17:32:49,548] DEBUG: Ǧb"system":{"get_sysinfo":{"sw_ver":"1.0.19 Build 200224 Rel.090814","hw_ver":"1.0","model":"HS300(US)","deviceId":"800671B8B6CC08249B39955E766F0C281B1C1245","oemId":"5C9E6254BEBAED63B2B6102966D24C17","hwId":"34C41AA028022D0CCEA5E678E8547C54","rssi":-73,"longitude_i":-1220547,"latitude_i":373498,"alias":"TP-LINK_Power Strip_CE34","status":"new","mic_type":"IOT.SMARTPLUGSWITCH","feature":"TIM:ENE","mac":"D8:0D:17:BA:CE:34","updating":0,"led_off":0,"children":[{"id":"800671B8B6CC08249B39955E766F0C281B1C124500","state":1,"alias":"Printer","on_time":1118668,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124501","state":0,"alias":"Dryer","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124502","state":0,"alias":"Light","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124503","state":0,"alias":"Fans","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124504","state":0,"alias":"Plug 5","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124505","state":1,"alias":"Cat Light","on_time":226,"next_action":{"type":-1}}],"child_num":6,"err_code":0}}}
[2021-01-31 17:32:49,559] DEBUG: get_device_id response: 800671B8B6CC08249B39955E766F0C281B1C124500
[2021-01-31 17:32:49,560] DEBUG: Sending command {'emeter': {'get_realtime': {}}, 'context': {'child_ids': ['800671B8B6CC08249B39955E766F0C281B1C124500']}} to 3dprinterswitch
[2021-01-31 17:32:49,875] DEBUG: «p "emeter":{"get_realtime":{"voltage_mv":123905,"current_ma":126,"power_mw":10862,"total_wh":3827,"err_code":0}}}
[2021-01-31 17:32:49,931] DEBUG: ImmutableMultiDict([('checkStatus', '3dprinterswitch/1')])
[2021-01-31 17:32:49,932] DEBUG: Checking status of 3dprinterswitch/1.
[2021-01-31 17:32:49,933] DEBUG: {'system': {'get_sysinfo': {}}}
[2021-01-31 17:32:49,934] DEBUG: Invalid ip 3dprinterswitch trying hostname.
[2021-01-31 17:32:50,067] DEBUG: Hostname 3dprinterswitch is valid.
[2021-01-31 17:32:50,069] DEBUG: {'system': {'get_sysinfo': {}}}
[2021-01-31 17:32:50,070] DEBUG: Invalid ip 3dprinterswitch trying hostname.
[2021-01-31 17:32:50,172] DEBUG: Hostname 3dprinterswitch is valid.
[2021-01-31 17:32:50,173] DEBUG: Sending command {'system': {'get_sysinfo': {}}} to 3dprinterswitch
[2021-01-31 17:32:50,387] DEBUG: Ǧb"system":{"get_sysinfo":{"sw_ver":"1.0.19 Build 200224 Rel.090814","hw_ver":"1.0","model":"HS300(US)","deviceId":"800671B8B6CC08249B39955E766F0C281B1C1245","oemId":"5C9E6254BEBAED63B2B6102966D24C17","hwId":"34C41AA028022D0CCEA5E678E8547C54","rssi":-73,"longitude_i":-1220547,"latitude_i":373498,"alias":"TP-LINK_Power Strip_CE34","status":"new","mic_type":"IOT.SMARTPLUGSWITCH","feature":"TIM:ENE","mac":"D8:0D:17:BA:CE:34","updating":0,"led_off":0,"children":[{"id":"800671B8B6CC08249B39955E766F0C281B1C124500","state":1,"alias":"Printer","on_time":1118669,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124501","state":0,"alias":"Dryer","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124502","state":0,"alias":"Light","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124503","state":0,"alias":"Fans","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124504","state":0,"alias":"Plug 5","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124505","state":1,"alias":"Cat Light","on_time":227,"next_action":{"type":-1}}],"child_num":6,"err_code":0}}}
[2021-01-31 17:32:50,392] DEBUG: get_device_id response: 800671B8B6CC08249B39955E766F0C281B1C124501
[2021-01-31 17:32:50,393] DEBUG: Sending command {'system': {'get_sysinfo': {}}, 'context': {'child_ids': ['800671B8B6CC08249B39955E766F0C281B1C124501']}} to 3dprinterswitch
[2021-01-31 17:32:50,544] DEBUG: Ǧb"system":{"get_sysinfo":{"sw_ver":"1.0.19 Build 200224 Rel.090814","hw_ver":"1.0","model":"HS300(US)","deviceId":"800671B8B6CC08249B39955E766F0C281B1C1245","oemId":"5C9E6254BEBAED63B2B6102966D24C17","hwId":"34C41AA028022D0CCEA5E678E8547C54","rssi":-73,"longitude_i":-1220547,"latitude_i":373498,"alias":"TP-LINK_Power Strip_CE34","status":"new","mic_type":"IOT.SMARTPLUGSWITCH","feature":"TIM:ENE","mac":"D8:0D:17:BA:CE:34","updating":0,"led_off":0,"children":[{"id":"800671B8B6CC08249B39955E766F0C281B1C124500","state":1,"alias":"Printer","on_time":1118669,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124501","state":0,"alias":"Dryer","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124502","state":0,"alias":"Light","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124503","state":0,"alias":"Fans","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124504","state":0,"alias":"Plug 5","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124505","state":1,"alias":"Cat Light","on_time":227,"next_action":{"type":-1}}],"child_num":6,"err_code":0}}}
[2021-01-31 17:32:50,549] DEBUG: TIM:ENE
[2021-01-31 17:32:50,549] DEBUG: Invalid ip 3dprinterswitch trying hostname.
[2021-01-31 17:32:50,648] DEBUG: Hostname 3dprinterswitch is valid.
[2021-01-31 17:32:50,649] DEBUG: {'system': {'get_sysinfo': {}}}
[2021-01-31 17:32:50,649] DEBUG: Invalid ip 3dprinterswitch trying hostname.
[2021-01-31 17:32:50,726] DEBUG: Hostname 3dprinterswitch is valid.
[2021-01-31 17:32:50,727] DEBUG: Sending command {'system': {'get_sysinfo': {}}} to 3dprinterswitch
[2021-01-31 17:32:50,978] DEBUG: Ǧb"system":{"get_sysinfo":{"sw_ver":"1.0.19 Build 200224 Rel.090814","hw_ver":"1.0","model":"HS300(US)","deviceId":"800671B8B6CC08249B39955E766F0C281B1C1245","oemId":"5C9E6254BEBAED63B2B6102966D24C17","hwId":"34C41AA028022D0CCEA5E678E8547C54","rssi":-73,"longitude_i":-1220547,"latitude_i":373498,"alias":"TP-LINK_Power Strip_CE34","status":"new","mic_type":"IOT.SMARTPLUGSWITCH","feature":"TIM:ENE","mac":"D8:0D:17:BA:CE:34","updating":0,"led_off":0,"children":[{"id":"800671B8B6CC08249B39955E766F0C281B1C124500","state":1,"alias":"Printer","on_time":1118669,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124501","state":0,"alias":"Dryer","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124502","state":0,"alias":"Light","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124503","state":0,"alias":"Fans","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124504","state":0,"alias":"Plug 5","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124505","state":1,"alias":"Cat Light","on_time":227,"next_action":{"type":-1}}],"child_num":6,"err_code":0}}}
[2021-01-31 17:32:50,983] DEBUG: get_device_id response: 800671B8B6CC08249B39955E766F0C281B1C124501
[2021-01-31 17:32:50,984] DEBUG: Sending command {'emeter': {'get_realtime': {}}, 'context': {'child_ids': ['800671B8B6CC08249B39955E766F0C281B1C124501']}} to 3dprinterswitch
[2021-01-31 17:32:51,360] DEBUG: «i¹"emeter":{"get_realtime":{"voltage_mv":123309,"current_ma":4,"power_mw":0,"total_wh":282,"err_code":0}}}
[2021-01-31 17:32:51,413] DEBUG: ImmutableMultiDict([('checkStatus', '3dprinterswitch/2')])
[2021-01-31 17:32:51,415] DEBUG: Checking status of 3dprinterswitch/2.
[2021-01-31 17:32:51,415] DEBUG: {'system': {'get_sysinfo': {}}}
[2021-01-31 17:32:51,416] DEBUG: Invalid ip 3dprinterswitch trying hostname.
[2021-01-31 17:32:51,653] DEBUG: Hostname 3dprinterswitch is valid.
[2021-01-31 17:32:51,655] DEBUG: {'system': {'get_sysinfo': {}}}
[2021-01-31 17:32:51,656] DEBUG: Invalid ip 3dprinterswitch trying hostname.
[2021-01-31 17:32:51,673] DEBUG: Hostname 3dprinterswitch is valid.
[2021-01-31 17:32:51,674] DEBUG: Sending command {'system': {'get_sysinfo': {}}} to 3dprinterswitch
[2021-01-31 17:32:51,862] DEBUG: Ǧb"system":{"get_sysinfo":{"sw_ver":"1.0.19 Build 200224 Rel.090814","hw_ver":"1.0","model":"HS300(US)","deviceId":"800671B8B6CC08249B39955E766F0C281B1C1245","oemId":"5C9E6254BEBAED63B2B6102966D24C17","hwId":"34C41AA028022D0CCEA5E678E8547C54","rssi":-73,"longitude_i":-1220547,"latitude_i":373498,"alias":"TP-LINK_Power Strip_CE34","status":"new","mic_type":"IOT.SMARTPLUGSWITCH","feature":"TIM:ENE","mac":"D8:0D:17:BA:CE:34","updating":0,"led_off":0,"children":[{"id":"800671B8B6CC08249B39955E766F0C281B1C124500","state":1,"alias":"Printer","on_time":1118670,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124501","state":0,"alias":"Dryer","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124502","state":0,"alias":"Light","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124503","state":0,"alias":"Fans","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124504","state":0,"alias":"Plug 5","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124505","state":1,"alias":"Cat Light","on_time":228,"next_action":{"type":-1}}],"child_num":6,"err_code":0}}}
[2021-01-31 17:32:51,874] DEBUG: get_device_id response: 800671B8B6CC08249B39955E766F0C281B1C124502
[2021-01-31 17:32:51,875] DEBUG: Sending command {'system': {'get_sysinfo': {}}, 'context': {'child_ids': ['800671B8B6CC08249B39955E766F0C281B1C124502']}} to 3dprinterswitch
[2021-01-31 17:32:52,172] DEBUG: Ǧb"system":{"get_sysinfo":{"sw_ver":"1.0.19 Build 200224 Rel.090814","hw_ver":"1.0","model":"HS300(US)","deviceId":"800671B8B6CC08249B39955E766F0C281B1C1245","oemId":"5C9E6254BEBAED63B2B6102966D24C17","hwId":"34C41AA028022D0CCEA5E678E8547C54","rssi":-73,"longitude_i":-1220547,"latitude_i":373498,"alias":"TP-LINK_Power Strip_CE34","status":"new","mic_type":"IOT.SMARTPLUGSWITCH","feature":"TIM:ENE","mac":"D8:0D:17:BA:CE:34","updating":0,"led_off":0,"children":[{"id":"800671B8B6CC08249B39955E766F0C281B1C124500","state":1,"alias":"Printer","on_time":1118670,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124501","state":0,"alias":"Dryer","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124502","state":0,"alias":"Light","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124503","state":0,"alias":"Fans","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124504","state":0,"alias":"Plug 5","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124505","state":1,"alias":"Cat Light","on_time":228,"next_action":{"type":-1}}],"child_num":6,"err_code":0}}}
[2021-01-31 17:32:52,182] DEBUG: TIM:ENE
[2021-01-31 17:32:52,183] DEBUG: Invalid ip 3dprinterswitch trying hostname.
[2021-01-31 17:32:52,243] DEBUG: Hostname 3dprinterswitch is valid.
[2021-01-31 17:32:52,245] DEBUG: {'system': {'get_sysinfo': {}}}
[2021-01-31 17:32:52,246] DEBUG: Invalid ip 3dprinterswitch trying hostname.
[2021-01-31 17:32:52,320] DEBUG: Hostname 3dprinterswitch is valid.
[2021-01-31 17:32:52,321] DEBUG: Sending command {'system': {'get_sysinfo': {}}} to 3dprinterswitch
[2021-01-31 17:32:52,440] DEBUG: Ǧb"system":{"get_sysinfo":{"sw_ver":"1.0.19 Build 200224 Rel.090814","hw_ver":"1.0","model":"HS300(US)","deviceId":"800671B8B6CC08249B39955E766F0C281B1C1245","oemId":"5C9E6254BEBAED63B2B6102966D24C17","hwId":"34C41AA028022D0CCEA5E678E8547C54","rssi":-73,"longitude_i":-1220547,"latitude_i":373498,"alias":"TP-LINK_Power Strip_CE34","status":"new","mic_type":"IOT.SMARTPLUGSWITCH","feature":"TIM:ENE","mac":"D8:0D:17:BA:CE:34","updating":0,"led_off":0,"children":[{"id":"800671B8B6CC08249B39955E766F0C281B1C124500","state":1,"alias":"Printer","on_time":1118671,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124501","state":0,"alias":"Dryer","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124502","state":0,"alias":"Light","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124503","state":0,"alias":"Fans","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124504","state":0,"alias":"Plug 5","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124505","state":1,"alias":"Cat Light","on_time":229,"next_action":{"type":-1}}],"child_num":6,"err_code":0}}}
[2021-01-31 17:32:52,452] DEBUG: get_device_id response: 800671B8B6CC08249B39955E766F0C281B1C124502
[2021-01-31 17:32:52,453] DEBUG: Sending command {'emeter': {'get_realtime': {}}, 'context': {'child_ids': ['800671B8B6CC08249B39955E766F0C281B1C124502']}} to 3dprinterswitch
[2021-01-31 17:32:52,756] DEBUG: «i¹"emeter":{"get_realtime":{"voltage_mv":123938,"current_ma":4,"power_mw":0,"total_wh":199,"err_code":0}}}
[2021-01-31 17:32:52,810] DEBUG: ImmutableMultiDict([('checkStatus', '3dprinterswitch/3')])
[2021-01-31 17:32:52,811] DEBUG: Checking status of 3dprinterswitch/3.
[2021-01-31 17:32:52,812] DEBUG: {'system': {'get_sysinfo': {}}}
[2021-01-31 17:32:52,813] DEBUG: Invalid ip 3dprinterswitch trying hostname.
[2021-01-31 17:32:52,858] DEBUG: Hostname 3dprinterswitch is valid.
[2021-01-31 17:32:52,863] DEBUG: {'system': {'get_sysinfo': {}}}
[2021-01-31 17:32:52,864] DEBUG: Invalid ip 3dprinterswitch trying hostname.
[2021-01-31 17:32:52,936] DEBUG: Hostname 3dprinterswitch is valid.
[2021-01-31 17:32:52,937] DEBUG: Sending command {'system': {'get_sysinfo': {}}} to 3dprinterswitch
[2021-01-31 17:32:53,925] DEBUG: Ǧb"system":{"get_sysinfo":{"sw_ver":"1.0.19 Build 200224 Rel.090814","hw_ver":"1.0","model":"HS300(US)","deviceId":"800671B8B6CC08249B39955E766F0C281B1C1245","oemId":"5C9E6254BEBAED63B2B6102966D24C17","hwId":"34C41AA028022D0CCEA5E678E8547C54","rssi":-73,"longitude_i":-1220547,"latitude_i":373498,"alias":"TP-LINK_Power Strip_CE34","status":"new","mic_type":"IOT.SMARTPLUGSWITCH","feature":"TIM:ENE","mac":"D8:0D:17:BA:CE:34","updating":0,"led_off":0,"children":[{"id":"800671B8B6CC08249B39955E766F0C281B1C124500","state":1,"alias":"Printer","on_time":1118672,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124501","state":0,"alias":"Dryer","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124502","state":0,"alias":"Light","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124503","state":0,"alias":"Fans","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124504","state":0,"alias":"Plug 5","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124505","state":1,"alias":"Cat Light","on_time":230,"next_action":{"type":-1}}],"child_num":6,"err_code":0}}}
[2021-01-31 17:32:53,936] DEBUG: get_device_id response: 800671B8B6CC08249B39955E766F0C281B1C124503
[2021-01-31 17:32:53,937] DEBUG: Sending command {'system': {'get_sysinfo': {}}, 'context': {'child_ids': ['800671B8B6CC08249B39955E766F0C281B1C124503']}} to 3dprinterswitch
[2021-01-31 17:32:54,188] DEBUG: Ǧb"system":{"get_sysinfo":{"sw_ver":"1.0.19 Build 200224 Rel.090814","hw_ver":"1.0","model":"HS300(US)","deviceId":"800671B8B6CC08249B39955E766F0C281B1C1245","oemId":"5C9E6254BEBAED63B2B6102966D24C17","hwId":"34C41AA028022D0CCEA5E678E8547C54","rssi":-73,"longitude_i":-1220547,"latitude_i":373498,"alias":"TP-LINK_Power Strip_CE34","status":"new","mic_type":"IOT.SMARTPLUGSWITCH","feature":"TIM:ENE","mac":"D8:0D:17:BA:CE:34","updating":0,"led_off":0,"children":[{"id":"800671B8B6CC08249B39955E766F0C281B1C124500","state":1,"alias":"Printer","on_time":1118672,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124501","state":0,"alias":"Dryer","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124502","state":0,"alias":"Light","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124503","state":0,"alias":"Fans","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124504","state":0,"alias":"Plug 5","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124505","state":1,"alias":"Cat Light","on_time":230,"next_action":{"type":-1}}],"child_num":6,"err_code":0}}}
[2021-01-31 17:32:54,197] DEBUG: TIM:ENE
[2021-01-31 17:32:54,201] DEBUG: Invalid ip 3dprinterswitch trying hostname.
[2021-01-31 17:32:54,275] DEBUG: Hostname 3dprinterswitch is valid.
[2021-01-31 17:32:54,276] DEBUG: {'system': {'get_sysinfo': {}}}
[2021-01-31 17:32:54,277] DEBUG: Invalid ip 3dprinterswitch trying hostname.
[2021-01-31 17:32:54,410] DEBUG: Hostname 3dprinterswitch is valid.
[2021-01-31 17:32:54,411] DEBUG: Sending command {'system': {'get_sysinfo': {}}} to 3dprinterswitch
[2021-01-31 17:32:54,788] DEBUG: Ǧb"system":{"get_sysinfo":{"sw_ver":"1.0.19 Build 200224 Rel.090814","hw_ver":"1.0","model":"HS300(US)","deviceId":"800671B8B6CC08249B39955E766F0C281B1C1245","oemId":"5C9E6254BEBAED63B2B6102966D24C17","hwId":"34C41AA028022D0CCEA5E678E8547C54","rssi":-73,"longitude_i":-1220547,"latitude_i":373498,"alias":"TP-LINK_Power Strip_CE34","status":"new","mic_type":"IOT.SMARTPLUGSWITCH","feature":"TIM:ENE","mac":"D8:0D:17:BA:CE:34","updating":0,"led_off":0,"children":[{"id":"800671B8B6CC08249B39955E766F0C281B1C124500","state":1,"alias":"Printer","on_time":1118673,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124501","state":0,"alias":"Dryer","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124502","state":0,"alias":"Light","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124503","state":0,"alias":"Fans","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124504","state":0,"alias":"Plug 5","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124505","state":1,"alias":"Cat Light","on_time":231,"next_action":{"type":-1}}],"child_num":6,"err_code":0}}}
[2021-01-31 17:32:54,799] DEBUG: get_device_id response: 800671B8B6CC08249B39955E766F0C281B1C124503
[2021-01-31 17:32:54,800] DEBUG: Sending command {'emeter': {'get_realtime': {}}, 'context': {'child_ids': ['800671B8B6CC08249B39955E766F0C281B1C124503']}} to 3dprinterswitch
[2021-01-31 17:32:55,133] DEBUG: «i¹"emeter":{"get_realtime":{"voltage_mv":123458,"current_ma":3,"power_mw":58,"total_wh":16,"err_code":0}}}
[2021-01-31 17:33:06,170] DEBUG: {'energy_data': [('2021-01-31 17:32:45.045515', 0.126, 10.862, 3.827, 123.905), ('2021-01-30 16:47:39.311163', 0.121, 9.897, 3.07, 123.143), ('2021-01-29 17:52:48.267121', 0.842, 70.288, 2.074, 122.348), ('2021-01-29 17:37:34.897835', 0.911, 124.061, 2.051, 123.508), ('2021-01-29 17:22:32.068403', 0.884, 77.971, 2.028, 123.491), ('2021-01-29 17:07:18.998239', 0.76, 101.147, 2.004, 123.375), ('2021-01-29 16:52:15.180972', 0.992, 96.497, 1.98, 122.961), ('2021-01-29 16:37:11.392734', 0.839, 94.254, 1.957, 123.325), ('2021-01-29 16:22:08.475248', 0.967, 91.353, 1.933, 123.011), ('2021-01-29 16:07:05.451597', 0.973, 119.353, 1.91, 123.624)]}
[2021-01-31 17:36:35,620] DEBUG: Received @TPLINKON command, attempting power on of 3dprinterswitch/2.
[2021-01-31 17:36:35,622] DEBUG: {'autoConnect': False, 'autoConnectDelay': 10, 'autoDisconnect': False, 'autoDisconnectDelay': 0, 'automaticShutdownEnabled': True, 'btnColor': '#808080', 'countdownOffDelay': 0, 'countdownOnDelay': 0, 'currentState': 'off', 'displayWarning': False, 'emeter': {'get_realtime': {'current_ma': 3, 'err_code': 0, 'power_mw': 0, 'total_wh': 9, 'voltage_mv': 123425}}, 'event_on_disconnect': False, 'event_on_error': False, 'event_on_startup': False, 'event_on_upload': False, 'gcodeEnabled': True, 'gcodeOffDelay': 0, 'gcodeOnDelay': 0, 'icon': 'icon-lightbulb', 'ip': '3dprinterswitch/2', 'label': 'Light', 'sysCmdOff': False, 'sysCmdOffDelay': 0, 'sysCmdOn': False, 'sysCmdOnDelay': 0, 'sysRunCmdOff': '', 'sysRunCmdOn': '', 'thermal_runaway': False, 'useCountdownRules': False, 'warnPrinting': False}
[2021-01-31 17:36:35,626] DEBUG: Turning on 3dprinterswitch/2.
[2021-01-31 17:36:35,637] DEBUG: {'autoConnect': False, 'autoConnectDelay': 10, 'autoDisconnect': False, 'autoDisconnectDelay': 0, 'automaticShutdownEnabled': True, 'btnColor': '#808080', 'countdownOffDelay': 0, 'countdownOnDelay': 0, 'currentState': 'off', 'displayWarning': False, 'emeter': {'get_realtime': {'current_ma': 3, 'err_code': 0, 'power_mw': 0, 'total_wh': 9, 'voltage_mv': 123425}}, 'event_on_disconnect': False, 'event_on_error': False, 'event_on_startup': False, 'event_on_upload': False, 'gcodeEnabled': True, 'gcodeOffDelay': 0, 'gcodeOnDelay': 0, 'icon': 'icon-lightbulb', 'ip': '3dprinterswitch/2', 'label': 'Light', 'sysCmdOff': False, 'sysCmdOffDelay': 0, 'sysCmdOn': False, 'sysCmdOnDelay': 0, 'sysRunCmdOff': '', 'sysRunCmdOn': '', 'thermal_runaway': False, 'useCountdownRules': False, 'warnPrinting': False}
[2021-01-31 17:36:35,641] DEBUG: Invalid ip 3dprinterswitch trying hostname.
[2021-01-31 17:36:35,657] DEBUG: Received @TPLINKON command, attempting power on of 3dprinterswitch/1.
[2021-01-31 17:36:35,659] DEBUG: {'autoConnect': False, 'autoConnectDelay': 10, 'autoDisconnect': False, 'autoDisconnectDelay': 0, 'automaticShutdownEnabled': True, 'btnColor': '#808080', 'countdownOffDelay': 0, 'countdownOnDelay': 0, 'currentState': 'off', 'displayWarning': False, 'emeter': {'get_realtime': {'current_ma': 4, 'err_code': 0, 'power_mw': 0, 'total_wh': 10, 'voltage_mv': 122696}}, 'event_on_disconnect': False, 'event_on_error': False, 'event_on_startup': False, 'event_on_upload': False, 'gcodeEnabled': True, 'gcodeOffDelay': 0, 'gcodeOnDelay': 0, 'icon': 'fas fa-dragon', 'ip': '3dprinterswitch/1', 'label': 'Thordsen', 'sysCmdOff': False, 'sysCmdOffDelay': 0, 'sysCmdOn': False, 'sysCmdOnDelay': 0, 'sysRunCmdOff': '', 'sysRunCmdOn': '', 'thermal_runaway': False, 'useCountdownRules': False, 'warnPrinting': False}
[2021-01-31 17:36:35,677] DEBUG: Hostname 3dprinterswitch is valid.
[2021-01-31 17:36:35,677] DEBUG: Turning on 3dprinterswitch/1.
[2021-01-31 17:36:35,686] DEBUG: Received @TPLINKON command, attempting power on of 3dprinterswitch/0.
[2021-01-31 17:36:35,698] DEBUG: {'system': {'get_sysinfo': {}}}
[2021-01-31 17:36:35,714] DEBUG: {'autoConnect': False, 'autoConnectDelay': 10, 'autoDisconnect': False, 'autoDisconnectDelay': 0, 'automaticShutdownEnabled': True, 'btnColor': '#808080', 'countdownOffDelay': 0, 'countdownOnDelay': 0, 'currentState': 'off', 'displayWarning': False, 'emeter': {'get_realtime': {'current_ma': 4, 'err_code': 0, 'power_mw': 0, 'total_wh': 10, 'voltage_mv': 122696}}, 'event_on_disconnect': False, 'event_on_error': False, 'event_on_startup': False, 'event_on_upload': False, 'gcodeEnabled': True, 'gcodeOffDelay': 0, 'gcodeOnDelay': 0, 'icon': 'fas fa-dragon', 'ip': '3dprinterswitch/1', 'label': 'Thordsen', 'sysCmdOff': False, 'sysCmdOffDelay': 0, 'sysCmdOn': False, 'sysCmdOnDelay': 0, 'sysRunCmdOff': '', 'sysRunCmdOn': '', 'thermal_runaway': False, 'useCountdownRules': False, 'warnPrinting': False}
[2021-01-31 17:36:35,725] DEBUG: {'autoConnect': True, 'autoConnectDelay': '5', 'autoDisconnect': True, 'autoDisconnectDelay': 0, 'automaticShutdownEnabled': False, 'btnColor': '#808080', 'countdownOffDelay': '1', 'countdownOnDelay': '0', 'currentState': 'on', 'displayWarning': False, 'emeter': {'get_realtime': {'current_ma': 118, 'err_code': 0, 'power_mw': 8830, 'total_wh': 193, 'voltage_mv': 123243}}, 'event_on_disconnect': False, 'event_on_error': False, 'event_on_startup': False, 'event_on_upload': False, 'gcodeEnabled': False, 'gcodeOffDelay': '600', 'gcodeOnDelay': 0, 'icon': 'icon-print', 'ip': '3dprinterswitch/0', 'label': 'Prusa Mk3', 'sysCmdOff': False, 'sysCmdOffDelay': 0, 'sysCmdOn': False, 'sysCmdOnDelay': 0, 'sysRunCmdOff': '', 'sysRunCmdOn': '', 'thermal_runaway': False, 'useCountdownRules': False, 'warnPrinting': True}
[2021-01-31 17:36:35,739] DEBUG: Invalid ip 3dprinterswitch trying hostname.
[2021-01-31 17:36:35,745] DEBUG: Invalid ip 3dprinterswitch trying hostname.
[2021-01-31 17:36:35,800] DEBUG: Hostname 3dprinterswitch is valid.
[2021-01-31 17:36:35,800] DEBUG: Hostname 3dprinterswitch is valid.
[2021-01-31 17:36:35,811] DEBUG: {'system': {'get_sysinfo': {}}}
[2021-01-31 17:36:35,814] DEBUG: Sending command {'system': {'get_sysinfo': {}}} to 3dprinterswitch
[2021-01-31 17:36:35,821] DEBUG: Invalid ip 3dprinterswitch trying hostname.
[2021-01-31 17:36:35,897] DEBUG: Hostname 3dprinterswitch is valid.
[2021-01-31 17:36:35,903] DEBUG: Sending command {'system': {'get_sysinfo': {}}} to 3dprinterswitch
[2021-01-31 17:36:36,109] DEBUG: Ǧb"system":{"get_sysinfo":{"sw_ver":"1.0.19 Build 200224 Rel.090814","hw_ver":"1.0","model":"HS300(US)","deviceId":"800671B8B6CC08249B39955E766F0C281B1C1245","oemId":"5C9E6254BEBAED63B2B6102966D24C17","hwId":"34C41AA028022D0CCEA5E678E8547C54","rssi":-74,"longitude_i":-1220547,"latitude_i":373498,"alias":"TP-LINK_Power Strip_CE34","status":"new","mic_type":"IOT.SMARTPLUGSWITCH","feature":"TIM:ENE","mac":"D8:0D:17:BA:CE:34","updating":0,"led_off":0,"children":[{"id":"800671B8B6CC08249B39955E766F0C281B1C124500","state":1,"alias":"Printer","on_time":1118894,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124501","state":0,"alias":"Dryer","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124502","state":0,"alias":"Light","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124503","state":0,"alias":"Fans","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124504","state":0,"alias":"Plug 5","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124505","state":1,"alias":"Cat Light","on_time":452,"next_action":{"type":-1}}],"child_num":6,"err_code":0}}}
[2021-01-31 17:36:36,116] DEBUG: get_device_id response: 800671B8B6CC08249B39955E766F0C281B1C124501
[2021-01-31 17:36:36,116] DEBUG: Sending command {'system': {'set_relay_state': {'state': 1}}, 'context': {'child_ids': ['800671B8B6CC08249B39955E766F0C281B1C124501']}} to 3dprinterswitch
[2021-01-31 17:36:36,247] DEBUG: «-ý"system":{"set_relay_state":{"err_code":0}}}
[2021-01-31 17:36:36,248] DEBUG: 0
[2021-01-31 17:36:36,249] DEBUG: Checking status of 3dprinterswitch/1.
[2021-01-31 17:36:36,250] DEBUG: {'system': {'get_sysinfo': {}}}
[2021-01-31 17:36:36,250] DEBUG: Invalid ip 3dprinterswitch trying hostname.
[2021-01-31 17:36:36,280] DEBUG: Hostname 3dprinterswitch is valid.
[2021-01-31 17:36:36,288] DEBUG: {'system': {'get_sysinfo': {}}}
[2021-01-31 17:36:36,289] DEBUG: Invalid ip 3dprinterswitch trying hostname.
[2021-01-31 17:36:36,305] DEBUG: Hostname 3dprinterswitch is valid.
[2021-01-31 17:36:36,306] DEBUG: Sending command {'system': {'get_sysinfo': {}}} to 3dprinterswitch
[2021-01-31 17:36:36,398] DEBUG: Ǧb"system":{"get_sysinfo":{"sw_ver":"1.0.19 Build 200224 Rel.090814","hw_ver":"1.0","model":"HS300(US)","deviceId":"800671B8B6CC08249B39955E766F0C281B1C1245","oemId":"5C9E6254BEBAED63B2B6102966D24C17","hwId":"34C41AA028022D0CCEA5E678E8547C54","rssi":-74,"longitude_i":-1220547,"latitude_i":373498,"alias":"TP-LINK_Power Strip_CE34","status":"new","mic_type":"IOT.SMARTPLUGSWITCH","feature":"TIM:ENE","mac":"D8:0D:17:BA:CE:34","updating":0,"led_off":0,"children":[{"id":"800671B8B6CC08249B39955E766F0C281B1C124500","state":1,"alias":"Printer","on_time":1118895,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124501","state":1,"alias":"Dryer","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124502","state":0,"alias":"Light","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124503","state":0,"alias":"Fans","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124504","state":0,"alias":"Plug 5","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124505","state":1,"alias":"Cat Light","on_time":453,"next_action":{"type":-1}}],"child_num":6,"err_code":0}}}
[2021-01-31 17:36:36,410] DEBUG: get_device_id response: 800671B8B6CC08249B39955E766F0C281B1C124501
[2021-01-31 17:36:36,411] DEBUG: Sending command {'system': {'get_sysinfo': {}}, 'context': {'child_ids': ['800671B8B6CC08249B39955E766F0C281B1C124501']}} to 3dprinterswitch
[2021-01-31 17:36:36,553] DEBUG: Ǧb"system":{"get_sysinfo":{"sw_ver":"1.0.19 Build 200224 Rel.090814","hw_ver":"1.0","model":"HS300(US)","deviceId":"800671B8B6CC08249B39955E766F0C281B1C1245","oemId":"5C9E6254BEBAED63B2B6102966D24C17","hwId":"34C41AA028022D0CCEA5E678E8547C54","rssi":-74,"longitude_i":-1220547,"latitude_i":373498,"alias":"TP-LINK_Power Strip_CE34","status":"new","mic_type":"IOT.SMARTPLUGSWITCH","feature":"TIM:ENE","mac":"D8:0D:17:BA:CE:34","updating":0,"led_off":0,"children":[{"id":"800671B8B6CC08249B39955E766F0C281B1C124500","state":1,"alias":"Printer","on_time":1118895,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124501","state":1,"alias":"Dryer","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124502","state":0,"alias":"Light","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124503","state":0,"alias":"Fans","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124504","state":0,"alias":"Plug 5","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124505","state":1,"alias":"Cat Light","on_time":453,"next_action":{"type":-1}}],"child_num":6,"err_code":0}}}
[2021-01-31 17:36:36,562] DEBUG: TIM:ENE
[2021-01-31 17:36:36,563] DEBUG: Invalid ip 3dprinterswitch trying hostname.
[2021-01-31 17:36:36,573] DEBUG: Hostname 3dprinterswitch is valid.
[2021-01-31 17:36:36,575] DEBUG: {'system': {'get_sysinfo': {}}}
[2021-01-31 17:36:36,576] DEBUG: Invalid ip 3dprinterswitch trying hostname.
[2021-01-31 17:36:36,581] DEBUG: Hostname 3dprinterswitch is valid.
[2021-01-31 17:36:36,581] DEBUG: Sending command {'system': {'get_sysinfo': {}}} to 3dprinterswitch
[2021-01-31 17:36:36,685] DEBUG: Ǧb"system":{"get_sysinfo":{"sw_ver":"1.0.19 Build 200224 Rel.090814","hw_ver":"1.0","model":"HS300(US)","deviceId":"800671B8B6CC08249B39955E766F0C281B1C1245","oemId":"5C9E6254BEBAED63B2B6102966D24C17","hwId":"34C41AA028022D0CCEA5E678E8547C54","rssi":-74,"longitude_i":-1220547,"latitude_i":373498,"alias":"TP-LINK_Power Strip_CE34","status":"new","mic_type":"IOT.SMARTPLUGSWITCH","feature":"TIM:ENE","mac":"D8:0D:17:BA:CE:34","updating":0,"led_off":0,"children":[{"id":"800671B8B6CC08249B39955E766F0C281B1C124500","state":1,"alias":"Printer","on_time":1118895,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124501","state":1,"alias":"Dryer","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124502","state":0,"alias":"Light","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124503","state":0,"alias":"Fans","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124504","state":0,"alias":"Plug 5","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124505","state":1,"alias":"Cat Light","on_time":453,"next_action":{"type":-1}}],"child_num":6,"err_code":0}}}
[2021-01-31 17:36:36,690] DEBUG: get_device_id response: 800671B8B6CC08249B39955E766F0C281B1C124501
[2021-01-31 17:36:36,691] DEBUG: Sending command {'emeter': {'get_realtime': {}}, 'context': {'child_ids': ['800671B8B6CC08249B39955E766F0C281B1C124501']}} to 3dprinterswitch
[2021-01-31 17:36:36,882] DEBUG: «k»"emeter":{"get_realtime":{"voltage_mv":121951,"current_ma":20,"power_mw":66,"total_wh":282,"err_code":0}}}
[2021-01-31 17:36:36,982] DEBUG: Ǧb"system":{"get_sysinfo":{"sw_ver":"1.0.19 Build 200224 Rel.090814","hw_ver":"1.0","model":"HS300(US)","deviceId":"800671B8B6CC08249B39955E766F0C281B1C1245","oemId":"5C9E6254BEBAED63B2B6102966D24C17","hwId":"34C41AA028022D0CCEA5E678E8547C54","rssi":-74,"longitude_i":-1220547,"latitude_i":373498,"alias":"TP-LINK_Power Strip_CE34","status":"new","mic_type":"IOT.SMARTPLUGSWITCH","feature":"TIM:ENE","mac":"D8:0D:17:BA:CE:34","updating":0,"led_off":0,"children":[{"id":"800671B8B6CC08249B39955E766F0C281B1C124500","state":1,"alias":"Printer","on_time":1118895,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124501","state":1,"alias":"Dryer","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124502","state":0,"alias":"Light","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124503","state":0,"alias":"Fans","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124504","state":0,"alias":"Plug 5","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124505","state":1,"alias":"Cat Light","on_time":453,"next_action":{"type":-1}}],"child_num":6,"err_code":0}}}
[2021-01-31 17:36:36,988] DEBUG: get_device_id response: 800671B8B6CC08249B39955E766F0C281B1C124502
[2021-01-31 17:36:36,989] DEBUG: Sending command {'system': {'set_relay_state': {'state': 1}}, 'context': {'child_ids': ['800671B8B6CC08249B39955E766F0C281B1C124502']}} to 3dprinterswitch
[2021-01-31 17:36:37,126] DEBUG: «-ý"system":{"set_relay_state":{"err_code":0}}}
[2021-01-31 17:36:37,126] DEBUG: 0
[2021-01-31 17:36:37,127] DEBUG: Checking status of 3dprinterswitch/2.
[2021-01-31 17:36:37,127] DEBUG: {'system': {'get_sysinfo': {}}}
[2021-01-31 17:36:37,127] DEBUG: Invalid ip 3dprinterswitch trying hostname.
[2021-01-31 17:36:37,155] DEBUG: Hostname 3dprinterswitch is valid.
[2021-01-31 17:36:37,156] DEBUG: {'system': {'get_sysinfo': {}}}
[2021-01-31 17:36:37,156] DEBUG: Invalid ip 3dprinterswitch trying hostname.
[2021-01-31 17:36:37,189] DEBUG: Hostname 3dprinterswitch is valid.
[2021-01-31 17:36:37,189] DEBUG: Sending command {'system': {'get_sysinfo': {}}} to 3dprinterswitch
[2021-01-31 17:36:37,283] DEBUG: Ǧb"system":{"get_sysinfo":{"sw_ver":"1.0.19 Build 200224 Rel.090814","hw_ver":"1.0","model":"HS300(US)","deviceId":"800671B8B6CC08249B39955E766F0C281B1C1245","oemId":"5C9E6254BEBAED63B2B6102966D24C17","hwId":"34C41AA028022D0CCEA5E678E8547C54","rssi":-74,"longitude_i":-1220547,"latitude_i":373498,"alias":"TP-LINK_Power Strip_CE34","status":"new","mic_type":"IOT.SMARTPLUGSWITCH","feature":"TIM:ENE","mac":"D8:0D:17:BA:CE:34","updating":0,"led_off":0,"children":[{"id":"800671B8B6CC08249B39955E766F0C281B1C124500","state":1,"alias":"Printer","on_time":1118896,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124501","state":1,"alias":"Dryer","on_time":1,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124502","state":1,"alias":"Light","on_time":1,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124503","state":0,"alias":"Fans","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124504","state":0,"alias":"Plug 5","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124505","state":1,"alias":"Cat Light","on_time":454,"next_action":{"type":-1}}],"child_num":6,"err_code":0}}}
[2021-01-31 17:36:37,288] DEBUG: get_device_id response: 800671B8B6CC08249B39955E766F0C281B1C124502
[2021-01-31 17:36:37,289] DEBUG: Sending command {'system': {'get_sysinfo': {}}, 'context': {'child_ids': ['800671B8B6CC08249B39955E766F0C281B1C124502']}} to 3dprinterswitch
[2021-01-31 17:36:37,416] DEBUG: Ǧb"system":{"get_sysinfo":{"sw_ver":"1.0.19 Build 200224 Rel.090814","hw_ver":"1.0","model":"HS300(US)","deviceId":"800671B8B6CC08249B39955E766F0C281B1C1245","oemId":"5C9E6254BEBAED63B2B6102966D24C17","hwId":"34C41AA028022D0CCEA5E678E8547C54","rssi":-74,"longitude_i":-1220547,"latitude_i":373498,"alias":"TP-LINK_Power Strip_CE34","status":"new","mic_type":"IOT.SMARTPLUGSWITCH","feature":"TIM:ENE","mac":"D8:0D:17:BA:CE:34","updating":0,"led_off":0,"children":[{"id":"800671B8B6CC08249B39955E766F0C281B1C124500","state":1,"alias":"Printer","on_time":1118896,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124501","state":1,"alias":"Dryer","on_time":1,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124502","state":1,"alias":"Light","on_time":1,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124503","state":0,"alias":"Fans","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124504","state":0,"alias":"Plug 5","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124505","state":1,"alias":"Cat Light","on_time":454,"next_action":{"type":-1}}],"child_num":6,"err_code":0}}}
[2021-01-31 17:36:37,426] DEBUG: TIM:ENE
[2021-01-31 17:36:37,427] DEBUG: Invalid ip 3dprinterswitch trying hostname.
[2021-01-31 17:36:37,454] DEBUG: Hostname 3dprinterswitch is valid.
[2021-01-31 17:36:37,456] DEBUG: {'system': {'get_sysinfo': {}}}
[2021-01-31 17:36:37,457] DEBUG: Invalid ip 3dprinterswitch trying hostname.
[2021-01-31 17:36:37,520] DEBUG: Hostname 3dprinterswitch is valid.
[2021-01-31 17:36:37,521] DEBUG: Sending command {'system': {'get_sysinfo': {}}} to 3dprinterswitch
[2021-01-31 17:36:38,024] DEBUG: Ǧb"system":{"get_sysinfo":{"sw_ver":"1.0.19 Build 200224 Rel.090814","hw_ver":"1.0","model":"HS300(US)","deviceId":"800671B8B6CC08249B39955E766F0C281B1C1245","oemId":"5C9E6254BEBAED63B2B6102966D24C17","hwId":"34C41AA028022D0CCEA5E678E8547C54","rssi":-73,"longitude_i":-1220547,"latitude_i":373498,"alias":"TP-LINK_Power Strip_CE34","status":"new","mic_type":"IOT.SMARTPLUGSWITCH","feature":"TIM:ENE","mac":"D8:0D:17:BA:CE:34","updating":0,"led_off":0,"children":[{"id":"800671B8B6CC08249B39955E766F0C281B1C124500","state":1,"alias":"Printer","on_time":1118896,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124501","state":1,"alias":"Dryer","on_time":1,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124502","state":1,"alias":"Light","on_time":1,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124503","state":0,"alias":"Fans","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124504","state":0,"alias":"Plug 5","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124505","state":1,"alias":"Cat Light","on_time":454,"next_action":{"type":-1}}],"child_num":6,"err_code":0}}}
[2021-01-31 17:36:38,036] DEBUG: get_device_id response: 800671B8B6CC08249B39955E766F0C281B1C124502
[2021-01-31 17:36:38,037] DEBUG: Sending command {'emeter': {'get_realtime': {}}, 'context': {'child_ids': ['800671B8B6CC08249B39955E766F0C281B1C124502']}} to 3dprinterswitch
[2021-01-31 17:36:38,227] DEBUG: «m½"emeter":{"get_realtime":{"voltage_mv":122713,"current_ma":52,"power_mw":5859,"total_wh":199,"err_code":0}}}
[2021-01-31 17:38:27,405] DEBUG: Turning on 3dprinterswitch/3.
[2021-01-31 17:38:27,411] DEBUG: {'autoConnect': False, 'autoConnectDelay': 10, 'autoDisconnect': False, 'autoDisconnectDelay': 0, 'automaticShutdownEnabled': True, 'btnColor': '#808080', 'countdownOffDelay': '0', 'countdownOnDelay': '0', 'currentState': 'unknown', 'displayWarning': False, 'emeter': {'get_realtime': {}}, 'event_on_disconnect': False, 'event_on_error': False, 'event_on_startup': False, 'event_on_upload': False, 'gcodeEnabled': True, 'gcodeOffDelay': 0, 'gcodeOnDelay': 0, 'icon': 'fas fa-recycle', 'ip': '3dprinterswitch/3', 'label': 'Fans', 'sysCmdOff': False, 'sysCmdOffDelay': 0, 'sysCmdOn': False, 'sysCmdOnDelay': 0, 'sysRunCmdOff': '', 'sysRunCmdOn': '', 'thermal_runaway': False, 'useCountdownRules': False, 'warnPrinting': False}
[2021-01-31 17:38:27,425] DEBUG: Invalid ip 3dprinterswitch trying hostname.
[2021-01-31 17:38:27,437] DEBUG: Hostname 3dprinterswitch is valid.
[2021-01-31 17:38:27,440] DEBUG: {'system': {'get_sysinfo': {}}}
[2021-01-31 17:38:27,441] DEBUG: Invalid ip 3dprinterswitch trying hostname.
[2021-01-31 17:38:27,449] DEBUG: Hostname 3dprinterswitch is valid.
[2021-01-31 17:38:27,451] DEBUG: Sending command {'system': {'get_sysinfo': {}}} to 3dprinterswitch
[2021-01-31 17:38:27,646] DEBUG: «²f"system":{"get_sysinfo":{"sw_ver":"1.0.19 Build 200224 Rel.090814","hw_ver":"1.0","model":"HS300(US)","deviceId":"800671B8B6CC08249B39955E766F0C281B1C1245","oemId":"5C9E6254BEBAED63B2B6102966D24C17","hwId":"34C41AA028022D0CCEA5E678E8547C54","rssi":-72,"longitude_i":-1220547,"latitude_i":373498,"alias":"TP-LINK_Power Strip_CE34","status":"new","mic_type":"IOT.SMARTPLUGSWITCH","feature":"TIM:ENE","mac":"D8:0D:17:BA:CE:34","updating":0,"led_off":0,"children":[{"id":"800671B8B6CC08249B39955E766F0C281B1C124500","state":1,"alias":"Printer","on_time":1119006,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124501","state":1,"alias":"Dryer","on_time":111,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124502","state":1,"alias":"Light","on_time":111,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124503","state":0,"alias":"Fans","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124504","state":0,"alias":"Plug 5","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124505","state":1,"alias":"Cat Light","on_time":564,"next_action":{"type":-1}}],"child_num":6,"err_code":0}}}
[2021-01-31 17:38:27,660] DEBUG: get_device_id response: 800671B8B6CC08249B39955E766F0C281B1C124503
[2021-01-31 17:38:27,661] DEBUG: Sending command {'system': {'set_relay_state': {'state': 1}}, 'context': {'child_ids': ['800671B8B6CC08249B39955E766F0C281B1C124503']}} to 3dprinterswitch
[2021-01-31 17:38:27,787] DEBUG: «-ý"system":{"set_relay_state":{"err_code":0}}}
[2021-01-31 17:38:27,789] DEBUG: 0
[2021-01-31 17:38:27,790] DEBUG: Checking status of 3dprinterswitch/3.
[2021-01-31 17:38:27,791] DEBUG: {'system': {'get_sysinfo': {}}}
[2021-01-31 17:38:27,791] DEBUG: Invalid ip 3dprinterswitch trying hostname.
[2021-01-31 17:38:27,809] DEBUG: Hostname 3dprinterswitch is valid.
[2021-01-31 17:38:27,811] DEBUG: {'system': {'get_sysinfo': {}}}
[2021-01-31 17:38:27,812] DEBUG: Invalid ip 3dprinterswitch trying hostname.
[2021-01-31 17:38:27,824] DEBUG: Hostname 3dprinterswitch is valid.
[2021-01-31 17:38:27,825] DEBUG: Sending command {'system': {'get_sysinfo': {}}} to 3dprinterswitch
[2021-01-31 17:38:27,946] DEBUG: «²f"system":{"get_sysinfo":{"sw_ver":"1.0.19 Build 200224 Rel.090814","hw_ver":"1.0","model":"HS300(US)","deviceId":"800671B8B6CC08249B39955E766F0C281B1C1245","oemId":"5C9E6254BEBAED63B2B6102966D24C17","hwId":"34C41AA028022D0CCEA5E678E8547C54","rssi":-73,"longitude_i":-1220547,"latitude_i":373498,"alias":"TP-LINK_Power Strip_CE34","status":"new","mic_type":"IOT.SMARTPLUGSWITCH","feature":"TIM:ENE","mac":"D8:0D:17:BA:CE:34","updating":0,"led_off":0,"children":[{"id":"800671B8B6CC08249B39955E766F0C281B1C124500","state":1,"alias":"Printer","on_time":1119006,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124501","state":1,"alias":"Dryer","on_time":111,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124502","state":1,"alias":"Light","on_time":111,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124503","state":1,"alias":"Fans","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124504","state":0,"alias":"Plug 5","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124505","state":1,"alias":"Cat Light","on_time":564,"next_action":{"type":-1}}],"child_num":6,"err_code":0}}}
[2021-01-31 17:38:27,957] DEBUG: get_device_id response: 800671B8B6CC08249B39955E766F0C281B1C124503
[2021-01-31 17:38:27,958] DEBUG: Sending command {'system': {'get_sysinfo': {}}, 'context': {'child_ids': ['800671B8B6CC08249B39955E766F0C281B1C124503']}} to 3dprinterswitch
[2021-01-31 17:38:28,087] DEBUG: «²f"system":{"get_sysinfo":{"sw_ver":"1.0.19 Build 200224 Rel.090814","hw_ver":"1.0","model":"HS300(US)","deviceId":"800671B8B6CC08249B39955E766F0C281B1C1245","oemId":"5C9E6254BEBAED63B2B6102966D24C17","hwId":"34C41AA028022D0CCEA5E678E8547C54","rssi":-73,"longitude_i":-1220547,"latitude_i":373498,"alias":"TP-LINK_Power Strip_CE34","status":"new","mic_type":"IOT.SMARTPLUGSWITCH","feature":"TIM:ENE","mac":"D8:0D:17:BA:CE:34","updating":0,"led_off":0,"children":[{"id":"800671B8B6CC08249B39955E766F0C281B1C124500","state":1,"alias":"Printer","on_time":1119006,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124501","state":1,"alias":"Dryer","on_time":111,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124502","state":1,"alias":"Light","on_time":111,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124503","state":1,"alias":"Fans","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124504","state":0,"alias":"Plug 5","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124505","state":1,"alias":"Cat Light","on_time":564,"next_action":{"type":-1}}],"child_num":6,"err_code":0}}}
[2021-01-31 17:38:28,096] DEBUG: TIM:ENE
[2021-01-31 17:38:28,097] DEBUG: Invalid ip 3dprinterswitch trying hostname.
[2021-01-31 17:38:28,112] DEBUG: Hostname 3dprinterswitch is valid.
[2021-01-31 17:38:28,114] DEBUG: {'system': {'get_sysinfo': {}}}
[2021-01-31 17:38:28,115] DEBUG: Invalid ip 3dprinterswitch trying hostname.
[2021-01-31 17:38:28,154] DEBUG: Hostname 3dprinterswitch is valid.
[2021-01-31 17:38:28,155] DEBUG: Sending command {'system': {'get_sysinfo': {}}} to 3dprinterswitch
[2021-01-31 17:38:28,256] DEBUG: «²f"system":{"get_sysinfo":{"sw_ver":"1.0.19 Build 200224 Rel.090814","hw_ver":"1.0","model":"HS300(US)","deviceId":"800671B8B6CC08249B39955E766F0C281B1C1245","oemId":"5C9E6254BEBAED63B2B6102966D24C17","hwId":"34C41AA028022D0CCEA5E678E8547C54","rssi":-72,"longitude_i":-1220547,"latitude_i":373498,"alias":"TP-LINK_Power Strip_CE34","status":"new","mic_type":"IOT.SMARTPLUGSWITCH","feature":"TIM:ENE","mac":"D8:0D:17:BA:CE:34","updating":0,"led_off":0,"children":[{"id":"800671B8B6CC08249B39955E766F0C281B1C124500","state":1,"alias":"Printer","on_time":1119007,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124501","state":1,"alias":"Dryer","on_time":112,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124502","state":1,"alias":"Light","on_time":112,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124503","state":1,"alias":"Fans","on_time":1,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124504","state":0,"alias":"Plug 5","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124505","state":1,"alias":"Cat Light","on_time":565,"next_action":{"type":-1}}],"child_num":6,"err_code":0}}}
[2021-01-31 17:38:28,268] DEBUG: get_device_id response: 800671B8B6CC08249B39955E766F0C281B1C124503
[2021-01-31 17:38:28,269] DEBUG: Sending command {'emeter': {'get_realtime': {}}, 'context': {'child_ids': ['800671B8B6CC08249B39955E766F0C281B1C124503']}} to 3dprinterswitch
[2021-01-31 17:38:28,427] DEBUG: «jº"emeter":{"get_realtime":{"voltage_mv":122265,"current_ma":11,"power_mw":40,"total_wh":16,"err_code":0}}}
[2021-01-31 17:44:23,314] DEBUG: Turning off 3dprinterswitch/3.
[2021-01-31 17:44:23,315] INFO: Turning off 3dprinterswitch/3 at 2021-01-31 17:44:23.313823
[2021-01-31 17:44:23,320] DEBUG: {'autoConnect': False, 'autoConnectDelay': 10, 'autoDisconnect': False, 'autoDisconnectDelay': 0, 'automaticShutdownEnabled': True, 'btnColor': '#808080', 'countdownOffDelay': '0', 'countdownOnDelay': '0', 'currentState': 'unknown', 'displayWarning': False, 'emeter': {'get_realtime': {}}, 'event_on_disconnect': False, 'event_on_error': False, 'event_on_startup': False, 'event_on_upload': False, 'gcodeEnabled': True, 'gcodeOffDelay': 0, 'gcodeOnDelay': 0, 'icon': 'fas fa-recycle', 'ip': '3dprinterswitch/3', 'label': 'Fans', 'sysCmdOff': False, 'sysCmdOffDelay': 0, 'sysCmdOn': False, 'sysCmdOnDelay': 0, 'sysRunCmdOff': '', 'sysRunCmdOn': '', 'thermal_runaway': False, 'useCountdownRules': False, 'warnPrinting': False}
[2021-01-31 17:44:23,322] DEBUG: Invalid ip 3dprinterswitch trying hostname.
[2021-01-31 17:44:23,327] DEBUG: Hostname 3dprinterswitch is valid.
[2021-01-31 17:44:23,329] DEBUG: {'system': {'get_sysinfo': {}}}
[2021-01-31 17:44:23,330] DEBUG: Invalid ip 3dprinterswitch trying hostname.
[2021-01-31 17:44:23,335] DEBUG: Hostname 3dprinterswitch is valid.
[2021-01-31 17:44:23,336] DEBUG: Sending command {'system': {'get_sysinfo': {}}} to 3dprinterswitch
[2021-01-31 17:44:23,623] DEBUG: «¼h"system":{"get_sysinfo":{"sw_ver":"1.0.19 Build 200224 Rel.090814","hw_ver":"1.0","model":"HS300(US)","deviceId":"800671B8B6CC08249B39955E766F0C281B1C1245","oemId":"5C9E6254BEBAED63B2B6102966D24C17","hwId":"34C41AA028022D0CCEA5E678E8547C54","rssi":-73,"longitude_i":-1220547,"latitude_i":373498,"alias":"TP-LINK_Power Strip_CE34","status":"new","mic_type":"IOT.SMARTPLUGSWITCH","feature":"TIM:ENE","mac":"D8:0D:17:BA:CE:34","updating":0,"led_off":0,"children":[{"id":"800671B8B6CC08249B39955E766F0C281B1C124500","state":1,"alias":"Printer","on_time":1119362,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124501","state":1,"alias":"Dryer","on_time":467,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124502","state":1,"alias":"Light","on_time":467,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124503","state":1,"alias":"Fans","on_time":356,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124504","state":0,"alias":"Plug 5","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124505","state":1,"alias":"Cat Light","on_time":920,"next_action":{"type":-1}}],"child_num":6,"err_code":0}}}
[2021-01-31 17:44:23,637] DEBUG: get_device_id response: 800671B8B6CC08249B39955E766F0C281B1C124503
[2021-01-31 17:44:23,644] DEBUG: Sending command {'system': {'set_relay_state': {'state': 0}}, 'context': {'child_ids': ['800671B8B6CC08249B39955E766F0C281B1C124503']}} to 3dprinterswitch
[2021-01-31 17:44:23,765] DEBUG: «-ý"system":{"set_relay_state":{"err_code":0}}}
[2021-01-31 17:44:23,766] DEBUG: 0
[2021-01-31 17:44:23,767] DEBUG: Checking status of 3dprinterswitch/3.
[2021-01-31 17:44:23,768] DEBUG: {'system': {'get_sysinfo': {}}}
[2021-01-31 17:44:23,769] DEBUG: Invalid ip 3dprinterswitch trying hostname.
[2021-01-31 17:44:23,792] DEBUG: Hostname 3dprinterswitch is valid.
[2021-01-31 17:44:23,794] DEBUG: {'system': {'get_sysinfo': {}}}
[2021-01-31 17:44:23,795] DEBUG: Invalid ip 3dprinterswitch trying hostname.
[2021-01-31 17:44:23,799] DEBUG: Hostname 3dprinterswitch is valid.
[2021-01-31 17:44:23,800] DEBUG: Sending command {'system': {'get_sysinfo': {}}} to 3dprinterswitch
[2021-01-31 17:44:23,906] DEBUG: «²f"system":{"get_sysinfo":{"sw_ver":"1.0.19 Build 200224 Rel.090814","hw_ver":"1.0","model":"HS300(US)","deviceId":"800671B8B6CC08249B39955E766F0C281B1C1245","oemId":"5C9E6254BEBAED63B2B6102966D24C17","hwId":"34C41AA028022D0CCEA5E678E8547C54","rssi":-73,"longitude_i":-1220547,"latitude_i":373498,"alias":"TP-LINK_Power Strip_CE34","status":"new","mic_type":"IOT.SMARTPLUGSWITCH","feature":"TIM:ENE","mac":"D8:0D:17:BA:CE:34","updating":0,"led_off":0,"children":[{"id":"800671B8B6CC08249B39955E766F0C281B1C124500","state":1,"alias":"Printer","on_time":1119362,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124501","state":1,"alias":"Dryer","on_time":467,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124502","state":1,"alias":"Light","on_time":467,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124503","state":0,"alias":"Fans","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124504","state":0,"alias":"Plug 5","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124505","state":1,"alias":"Cat Light","on_time":920,"next_action":{"type":-1}}],"child_num":6,"err_code":0}}}
[2021-01-31 17:44:23,917] DEBUG: get_device_id response: 800671B8B6CC08249B39955E766F0C281B1C124503
[2021-01-31 17:44:23,924] DEBUG: Sending command {'system': {'get_sysinfo': {}}, 'context': {'child_ids': ['800671B8B6CC08249B39955E766F0C281B1C124503']}} to 3dprinterswitch
[2021-01-31 17:44:24,050] DEBUG: «²f"system":{"get_sysinfo":{"sw_ver":"1.0.19 Build 200224 Rel.090814","hw_ver":"1.0","model":"HS300(US)","deviceId":"800671B8B6CC08249B39955E766F0C281B1C1245","oemId":"5C9E6254BEBAED63B2B6102966D24C17","hwId":"34C41AA028022D0CCEA5E678E8547C54","rssi":-73,"longitude_i":-1220547,"latitude_i":373498,"alias":"TP-LINK_Power Strip_CE34","status":"new","mic_type":"IOT.SMARTPLUGSWITCH","feature":"TIM:ENE","mac":"D8:0D:17:BA:CE:34","updating":0,"led_off":0,"children":[{"id":"800671B8B6CC08249B39955E766F0C281B1C124500","state":1,"alias":"Printer","on_time":1119362,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124501","state":1,"alias":"Dryer","on_time":467,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124502","state":1,"alias":"Light","on_time":467,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124503","state":0,"alias":"Fans","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124504","state":0,"alias":"Plug 5","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124505","state":1,"alias":"Cat Light","on_time":920,"next_action":{"type":-1}}],"child_num":6,"err_code":0}}}
[2021-01-31 17:44:24,066] DEBUG: TIM:ENE
[2021-01-31 17:44:24,068] DEBUG: Invalid ip 3dprinterswitch trying hostname.
[2021-01-31 17:44:24,116] DEBUG: Hostname 3dprinterswitch is valid.
[2021-01-31 17:44:24,118] DEBUG: {'system': {'get_sysinfo': {}}}
[2021-01-31 17:44:24,119] DEBUG: Invalid ip 3dprinterswitch trying hostname.
[2021-01-31 17:44:24,167] DEBUG: Hostname 3dprinterswitch is valid.
[2021-01-31 17:44:24,169] DEBUG: Sending command {'system': {'get_sysinfo': {}}} to 3dprinterswitch
[2021-01-31 17:44:24,718] DEBUG: «²f"system":{"get_sysinfo":{"sw_ver":"1.0.19 Build 200224 Rel.090814","hw_ver":"1.0","model":"HS300(US)","deviceId":"800671B8B6CC08249B39955E766F0C281B1C1245","oemId":"5C9E6254BEBAED63B2B6102966D24C17","hwId":"34C41AA028022D0CCEA5E678E8547C54","rssi":-73,"longitude_i":-1220547,"latitude_i":373498,"alias":"TP-LINK_Power Strip_CE34","status":"new","mic_type":"IOT.SMARTPLUGSWITCH","feature":"TIM:ENE","mac":"D8:0D:17:BA:CE:34","updating":0,"led_off":0,"children":[{"id":"800671B8B6CC08249B39955E766F0C281B1C124500","state":1,"alias":"Printer","on_time":1119363,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124501","state":1,"alias":"Dryer","on_time":468,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124502","state":1,"alias":"Light","on_time":468,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124503","state":0,"alias":"Fans","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124504","state":0,"alias":"Plug 5","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124505","state":1,"alias":"Cat Light","on_time":921,"next_action":{"type":-1}}],"child_num":6,"err_code":0}}}
[2021-01-31 17:44:24,724] DEBUG: get_device_id response: 800671B8B6CC08249B39955E766F0C281B1C124503
[2021-01-31 17:44:24,724] DEBUG: Sending command {'emeter': {'get_realtime': {}}, 'context': {'child_ids': ['800671B8B6CC08249B39955E766F0C281B1C124503']}} to 3dprinterswitch
[2021-01-31 17:44:24,917] DEBUG: «h¸"emeter":{"get_realtime":{"voltage_mv":122928,"current_ma":4,"power_mw":0,"total_wh":16,"err_code":0}}}
[2021-01-31 17:44:37,863] DEBUG: Turning on 3dprinterswitch/3.
[2021-01-31 17:44:37,865] DEBUG: {'autoConnect': False, 'autoConnectDelay': 10, 'autoDisconnect': False, 'autoDisconnectDelay': 0, 'automaticShutdownEnabled': True, 'btnColor': '#808080', 'countdownOffDelay': '0', 'countdownOnDelay': '0', 'currentState': 'unknown', 'displayWarning': False, 'emeter': {'get_realtime': {}}, 'event_on_disconnect': False, 'event_on_error': False, 'event_on_startup': False, 'event_on_upload': False, 'gcodeEnabled': True, 'gcodeOffDelay': 0, 'gcodeOnDelay': 0, 'icon': 'fas fa-recycle', 'ip': '3dprinterswitch/3', 'label': 'Fans', 'sysCmdOff': False, 'sysCmdOffDelay': 0, 'sysCmdOn': False, 'sysCmdOnDelay': 0, 'sysRunCmdOff': '', 'sysRunCmdOn': '', 'thermal_runaway': False, 'useCountdownRules': False, 'warnPrinting': False}
[2021-01-31 17:44:37,865] DEBUG: Invalid ip 3dprinterswitch trying hostname.
[2021-01-31 17:44:37,892] DEBUG: Hostname 3dprinterswitch is valid.
[2021-01-31 17:44:37,893] DEBUG: {'system': {'get_sysinfo': {}}}
[2021-01-31 17:44:37,893] DEBUG: Invalid ip 3dprinterswitch trying hostname.
[2021-01-31 17:44:37,907] DEBUG: Hostname 3dprinterswitch is valid.
[2021-01-31 17:44:37,907] DEBUG: Sending command {'system': {'get_sysinfo': {}}} to 3dprinterswitch
[2021-01-31 17:44:38,076] DEBUG: «²f"system":{"get_sysinfo":{"sw_ver":"1.0.19 Build 200224 Rel.090814","hw_ver":"1.0","model":"HS300(US)","deviceId":"800671B8B6CC08249B39955E766F0C281B1C1245","oemId":"5C9E6254BEBAED63B2B6102966D24C17","hwId":"34C41AA028022D0CCEA5E678E8547C54","rssi":-73,"longitude_i":-1220547,"latitude_i":373498,"alias":"TP-LINK_Power Strip_CE34","status":"new","mic_type":"IOT.SMARTPLUGSWITCH","feature":"TIM:ENE","mac":"D8:0D:17:BA:CE:34","updating":0,"led_off":0,"children":[{"id":"800671B8B6CC08249B39955E766F0C281B1C124500","state":1,"alias":"Printer","on_time":1119376,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124501","state":1,"alias":"Dryer","on_time":481,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124502","state":1,"alias":"Light","on_time":481,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124503","state":0,"alias":"Fans","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124504","state":0,"alias":"Plug 5","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124505","state":1,"alias":"Cat Light","on_time":934,"next_action":{"type":-1}}],"child_num":6,"err_code":0}}}
[2021-01-31 17:44:38,082] DEBUG: get_device_id response: 800671B8B6CC08249B39955E766F0C281B1C124503
[2021-01-31 17:44:38,082] DEBUG: Sending command {'system': {'set_relay_state': {'state': 1}}, 'context': {'child_ids': ['800671B8B6CC08249B39955E766F0C281B1C124503']}} to 3dprinterswitch
[2021-01-31 17:44:38,214] DEBUG: «-ý"system":{"set_relay_state":{"err_code":0}}}
[2021-01-31 17:44:38,215] DEBUG: 0
[2021-01-31 17:44:38,215] DEBUG: Checking status of 3dprinterswitch/3.
[2021-01-31 17:44:38,216] DEBUG: {'system': {'get_sysinfo': {}}}
[2021-01-31 17:44:38,216] DEBUG: Invalid ip 3dprinterswitch trying hostname.
[2021-01-31 17:44:38,229] DEBUG: Hostname 3dprinterswitch is valid.
[2021-01-31 17:44:38,230] DEBUG: {'system': {'get_sysinfo': {}}}
[2021-01-31 17:44:38,230] DEBUG: Invalid ip 3dprinterswitch trying hostname.
[2021-01-31 17:44:38,236] DEBUG: Hostname 3dprinterswitch is valid.
[2021-01-31 17:44:38,237] DEBUG: Sending command {'system': {'get_sysinfo': {}}} to 3dprinterswitch
[2021-01-31 17:44:38,374] DEBUG: «²f"system":{"get_sysinfo":{"sw_ver":"1.0.19 Build 200224 Rel.090814","hw_ver":"1.0","model":"HS300(US)","deviceId":"800671B8B6CC08249B39955E766F0C281B1C1245","oemId":"5C9E6254BEBAED63B2B6102966D24C17","hwId":"34C41AA028022D0CCEA5E678E8547C54","rssi":-73,"longitude_i":-1220547,"latitude_i":373498,"alias":"TP-LINK_Power Strip_CE34","status":"new","mic_type":"IOT.SMARTPLUGSWITCH","feature":"TIM:ENE","mac":"D8:0D:17:BA:CE:34","updating":0,"led_off":0,"children":[{"id":"800671B8B6CC08249B39955E766F0C281B1C124500","state":1,"alias":"Printer","on_time":1119377,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124501","state":1,"alias":"Dryer","on_time":482,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124502","state":1,"alias":"Light","on_time":482,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124503","state":1,"alias":"Fans","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124504","state":0,"alias":"Plug 5","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124505","state":1,"alias":"Cat Light","on_time":935,"next_action":{"type":-1}}],"child_num":6,"err_code":0}}}
[2021-01-31 17:44:38,380] DEBUG: get_device_id response: 800671B8B6CC08249B39955E766F0C281B1C124503
[2021-01-31 17:44:38,380] DEBUG: Sending command {'system': {'get_sysinfo': {}}, 'context': {'child_ids': ['800671B8B6CC08249B39955E766F0C281B1C124503']}} to 3dprinterswitch
[2021-01-31 17:44:38,549] DEBUG: «²f"system":{"get_sysinfo":{"sw_ver":"1.0.19 Build 200224 Rel.090814","hw_ver":"1.0","model":"HS300(US)","deviceId":"800671B8B6CC08249B39955E766F0C281B1C1245","oemId":"5C9E6254BEBAED63B2B6102966D24C17","hwId":"34C41AA028022D0CCEA5E678E8547C54","rssi":-73,"longitude_i":-1220547,"latitude_i":373498,"alias":"TP-LINK_Power Strip_CE34","status":"new","mic_type":"IOT.SMARTPLUGSWITCH","feature":"TIM:ENE","mac":"D8:0D:17:BA:CE:34","updating":0,"led_off":0,"children":[{"id":"800671B8B6CC08249B39955E766F0C281B1C124500","state":1,"alias":"Printer","on_time":1119377,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124501","state":1,"alias":"Dryer","on_time":482,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124502","state":1,"alias":"Light","on_time":482,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124503","state":1,"alias":"Fans","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124504","state":0,"alias":"Plug 5","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124505","state":1,"alias":"Cat Light","on_time":935,"next_action":{"type":-1}}],"child_num":6,"err_code":0}}}
[2021-01-31 17:44:38,582] DEBUG: TIM:ENE
[2021-01-31 17:44:38,591] DEBUG: Invalid ip 3dprinterswitch trying hostname.
[2021-01-31 17:44:38,599] DEBUG: Hostname 3dprinterswitch is valid.
[2021-01-31 17:44:38,601] DEBUG: {'system': {'get_sysinfo': {}}}
[2021-01-31 17:44:38,604] DEBUG: Invalid ip 3dprinterswitch trying hostname.
[2021-01-31 17:44:38,631] DEBUG: Hostname 3dprinterswitch is valid.
[2021-01-31 17:44:38,632] DEBUG: Sending command {'system': {'get_sysinfo': {}}} to 3dprinterswitch
[2021-01-31 17:44:38,818] DEBUG: «²f"system":{"get_sysinfo":{"sw_ver":"1.0.19 Build 200224 Rel.090814","hw_ver":"1.0","model":"HS300(US)","deviceId":"800671B8B6CC08249B39955E766F0C281B1C1245","oemId":"5C9E6254BEBAED63B2B6102966D24C17","hwId":"34C41AA028022D0CCEA5E678E8547C54","rssi":-73,"longitude_i":-1220547,"latitude_i":373498,"alias":"TP-LINK_Power Strip_CE34","status":"new","mic_type":"IOT.SMARTPLUGSWITCH","feature":"TIM:ENE","mac":"D8:0D:17:BA:CE:34","updating":0,"led_off":0,"children":[{"id":"800671B8B6CC08249B39955E766F0C281B1C124500","state":1,"alias":"Printer","on_time":1119377,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124501","state":1,"alias":"Dryer","on_time":482,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124502","state":1,"alias":"Light","on_time":482,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124503","state":1,"alias":"Fans","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124504","state":0,"alias":"Plug 5","on_time":0,"next_action":{"type":-1}},{"id":"800671B8B6CC08249B39955E766F0C281B1C124505","state":1,"alias":"Cat Light","on_time":935,"next_action":{"type":-1}}],"child_num":6,"err_code":0}}}
[2021-01-31 17:44:38,824] DEBUG: get_device_id response: 800671B8B6CC08249B39955E766F0C281B1C124503
[2021-01-31 17:44:38,824] DEBUG: Sending command {'emeter': {'get_realtime': {}}, 'context': {'child_ids': ['800671B8B6CC08249B39955E766F0C281B1C124503']}} to 3dprinterswitch
[2021-01-31 17:44:38,996] DEBUG: «i¹"emeter":{"get_realtime":{"voltage_mv":122431,"current_ma":10,"power_mw":1,"total_wh":16,"err_code":0}}}
rrauenza commented 3 years ago

So... after having this issue for as long as I can remember, it worked correctly this morning when I started a print. I just rebooted the pi ... which maybe is related.

I wouldn't look too deep into this until I reproduce it again.

jneilliii commented 3 years ago

Thanks for following up @rrauenza. I'll leave this one open for now, and the stale bot will grab it and auto-close after a bit. If I don't hear back from you I'll just let it do its job.

rrauenza commented 3 years ago

I think this is user error. I can't explain why it worked that one time, though!

I just realized I'm using GCODE Trigger and have these two scripts:

pi@octopi:~/.octoprint/logs $ less ../scripts/gcode/beforePrintStarted 
@TPLINKON 3dprinterswitch/2
@TPLINKON 3dprinterswitch/1
@TPLINKON 3dprinterswitch/0

pi@octopi:~/.octoprint/logs $ less ../scripts/gcode/afterPrintDone 
@TPLINKOFF 3dprinterswitch/2
@TPLINKOFF 3dprinterswitch/1
@TPLINKOFF 3dprinterswitch/0
pi@octopi:~/.octoprint/logs $ 
realbadfox commented 3 years ago

I have the same Issue, with one plug no problem. But with two plugs the automatic shutdown doesn't work anymore!

jneilliii commented 3 years ago

Thanks for adding in @realbadfox there very well could be a bug here, I just haven't had the time to try and reproduce yet. Can you verify if it doesn't work at all or only works on one?

realbadfox commented 3 years ago

i seems that it doesn't work at all

jneilliii commented 3 years ago

Well, that definitely seems like a different issue. You have the idle options enabled both on the general settings area and on the device itself? Please enable debug logging and restart OctoPrint and then provide your plugin_tplinksmartplug_debug.log file for further analysis. You can just drag the whole file here into a comment on github. Make sure you've waiting long enough for the idle timeout to supposedly trigger.

realbadfox commented 3 years ago

Yes both enabled.

And where do i find the logfile?

-------- Ursprüngliche Nachricht -------- Von: jneilliii notifications@github.com Datum: 05.02.21 16:22 (GMT+01:00) An: jneilliii/OctoPrint-TPLinkSmartplug OctoPrint-TPLinkSmartplug@noreply.github.com Cc: realbadfox pueler_christoph@hotmail.com, Mention mention@noreply.github.com Betreff: Re: [jneilliii/OctoPrint-TPLinkSmartplug] [BUG]: one device doesn't start at print start, but seems configured the same as others that do. (#247)

Well, that definitely seems like a different issue. You have the idle options enabled both on the general settings area and on the device itself? Please enable debug logging and restart OctoPrint and then provide your plugin_tplinksmartplug_debug.log file for further analysis. You can just drag the whole file here into a comment on github. Make sure you've waiting long enough for the idle timeout to supposedly trigger.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/jneilliii/OctoPrint-TPLinkSmartplug/issues/247#issuecomment-774098205, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ARNXBPMTUACWMTIIVFES6KDS5QEKLANCNFSM4W36LR2A.

jneilliii commented 3 years ago

In OctoPrint's settings under logging.

jneilliii commented 3 years ago

Hey, just had a possible test for you guys to run for me in the above linked issue. That user was experiencing the same thing I think and once they disabled gcode triggers the idle timer worked. Could you guys verify you too have gcode triggers enabled and test with those turned off as well to see if the idle timers work or not then?

realbadfox commented 3 years ago

here is my logging of yesterday, where it should turn of with idle. but haven't octoprint.log

jneilliii commented 3 years ago

I need the file plugin_tplinksmartplug_debug.log file as well @realbadfox. I notice a bunch of errors in your log relative to the octopi support plugin and temps. are you running on a pi or not?

jneilliii commented 3 years ago

Oh it looks like that's a different plugin...Opitemp Plugin.

realbadfox commented 3 years ago

yes of course, I am using a PI! Why it is a different plugin? i use TPLink Smartplug! here is the second log file plugin_tplinksmartplug_debug.log

jneilliii commented 3 years ago

I was just mentioning that the only thing I saw in the octoprint.log was errors with that other plugin OpiTemp. This is what I find interesting in this log though...

[2021-02-06 07:45:48,731] DEBUG: Waiting for heaters() before shutting power off...
[2021-02-06 07:45:52,957] DEBUG: Turning on 192.168.0.221.
[2021-02-06 07:45:52,959] DEBUG: {'autoConnect': True, 'ip': '192.168.0.221', 'btnColor': '#808080', 'autoDisconnectDelay': '5', 'sysCmdOff': False, 'gcodeEnabled': True, 'gcodeOnDelay': '0', 'emeter': {'get_realtime': {}}, 'countdownOnDelay': 1, 'label': '3DDruckerSteckdose', 'warnPrinting': True, 'thermal_runaway': False, 'gcodeOffDelay': '0', 'sysCmdOnDelay': 0, 'event_on_error': False, 'countdownOffDelay': 1, 'sysRunCmdOff': 'M81 192.168.0.221', 'sysRunCmdOn': '', 'autoDisconnect': True, 'automaticShutdownEnabled': True, 'event_on_upload': False, 'useCountdownRules': False, 'event_on_startup': False, 'icon': 'icon-bolt', 'displayWarning': False, 'autoConnectDelay': '5', 'event_on_disconnect': False, 'sysCmdOn': False, 'currentState': 'unknown', 'sysCmdOffDelay': '10'}
[2021-02-06 07:45:52,960] DEBUG: IP 192.168.0.221 is valid.
[2021-02-06 07:45:52,960] DEBUG: Sending command {'system': {'set_relay_state': {'state': 1}}} to 192.168.0.221
[2021-02-06 07:45:53,049] DEBUG: «  -ý"system":{"set_relay_state":{"err_code":0}}}
[2021-02-06 07:45:53,052] DEBUG: 0
[2021-02-06 07:45:53,054] DEBUG: Resetting idle timer since plug 192.168.0.221 was just turned on.
[2021-02-06 07:45:53,055] DEBUG: Checking status of 192.168.0.221.
[2021-02-06 07:45:53,056] DEBUG: {'system': {'get_sysinfo': {}}}
[2021-02-06 07:45:53,056] DEBUG: IP 192.168.0.221 is valid.
[2021-02-06 07:45:53,057] DEBUG: Sending command {'system': {'get_sysinfo': {}}} to 192.168.0.221
[2021-02-06 07:45:53,108] DEBUG: « 1ã"system":{"get_sysinfo":{"sw_ver":"1.1.5 Build 200828 Rel.081157","hw_ver":"4.0","model":"HS100(EU)","deviceId":"80063CB163C0D1EA2F477018FFE5076D1C54E216","oemId":"76ABF4259BE3FBA5A287BFE55D1848D7","hwId":"4CF2439894182E79E641A055C0519425","rssi":-48,"longitude_i":163728,"latitude_i":482185,"alias":"3DDrucker","status":"new","mic_type":"IOT.SMARTPLUGSWITCH","feature":"TIM","mac":"74:DA:88:FD:26:65","updating":0,"led_off":0,"relay_state":1,"on_time":0,"active_mode":"none","icon_hash":"","dev_name":"Smart Wi-Fi Plug","next_action":{"type":-1},"err_code":0}}}
[2021-02-06 07:45:53,141] DEBUG: TIM
[2021-02-06 07:45:53,736] DEBUG: Aborted power off due to activity.

It seems at the end of the wait for heaters part when it would be powering off it's powering on, and then there's an abort due to activity. I was hoping to look into this today to see if I can reproduce with my HS300.

realbadfox commented 3 years ago

I turn the light (192.168.0.221) on 15sec after print. Make a picture and turn them off.

And the printer (192.168.0.220) should turn off 2min after idle.

-------- Ursprüngliche Nachricht -------- Von: jneilliii notifications@github.com Datum: 06.02.21 20:00 (GMT+01:00) An: jneilliii/OctoPrint-TPLinkSmartplug OctoPrint-TPLinkSmartplug@noreply.github.com Cc: realbadfox pueler_christoph@hotmail.com, Mention mention@noreply.github.com Betreff: Re: [jneilliii/OctoPrint-TPLinkSmartplug] [BUG]: one device doesn't start at print start, but seems configured the same as others that do. (#247)

I was just mentioning that the only thing I saw in the octoprint.log was errors with that other plugin OpiTemp. This is what I find interesting in this log though...

[2021-02-06 07:45:48,731] DEBUG: Waiting for heaters() before shutting power off...

[2021-02-06 07:45:52,957] DEBUG: Turning on 192.168.0.221.

[2021-02-06 07:45:52,959] DEBUG: {'autoConnect': True, 'ip': '192.168.0.221', 'btnColor': '#808080', 'autoDisconnectDelay': '5', 'sysCmdOff': False, 'gcodeEnabled': True, 'gcodeOnDelay': '0', 'emeter': {'get_realtime': {}}, 'countdownOnDelay': 1, 'label': '3DDruckerSteckdose', 'warnPrinting': True, 'thermal_runaway': False, 'gcodeOffDelay': '0', 'sysCmdOnDelay': 0, 'event_on_error': False, 'countdownOffDelay': 1, 'sysRunCmdOff': 'M81 192.168.0.221', 'sysRunCmdOn': '', 'autoDisconnect': True, 'automaticShutdownEnabled': True, 'event_on_upload': False, 'useCountdownRules': False, 'event_on_startup': False, 'icon': 'icon-bolt', 'displayWarning': False, 'autoConnectDelay': '5', 'event_on_disconnect': False, 'sysCmdOn': False, 'currentState': 'unknown', 'sysCmdOffDelay': '10'}

[2021-02-06 07:45:52,960] DEBUG: IP 192.168.0.221 is valid.

[2021-02-06 07:45:52,960] DEBUG: Sending command {'system': {'set_relay_state': {'state': 1}}} to 192.168.0.221

[2021-02-06 07:45:53,049] DEBUG: « -ý"system":{"set_relay_state":{"err_code":0}}}

[2021-02-06 07:45:53,052] DEBUG: 0

[2021-02-06 07:45:53,054] DEBUG: Resetting idle timer since plug 192.168.0.221 was just turned on.

[2021-02-06 07:45:53,055] DEBUG: Checking status of 192.168.0.221.

[2021-02-06 07:45:53,056] DEBUG: {'system': {'get_sysinfo': {}}}

[2021-02-06 07:45:53,056] DEBUG: IP 192.168.0.221 is valid.

[2021-02-06 07:45:53,057] DEBUG: Sending command {'system': {'get_sysinfo': {}}} to 192.168.0.221

[2021-02-06 07:45:53,108] DEBUG: « �1ã"system":{"get_sysinfo":{"sw_ver":"1.1.5 Build 200828 Rel.081157","hw_ver":"4.0","model":"HS100(EU)","deviceId":"80063CB163C0D1EA2F477018FFE5076D1C54E216","oemId":"76ABF4259BE3FBA5A287BFE55D1848D7","hwId":"4CF2439894182E79E641A055C0519425","rssi":-48,"longitude_i":163728,"latitude_i":482185,"alias":"3DDrucker","status":"new","mic_type":"IOT.SMARTPLUGSWITCH","feature":"TIM","mac":"74:DA:88:FD:26:65","updating":0,"led_off":0,"relay_state":1,"on_time":0,"active_mode":"none","icon_hash":"","dev_name":"Smart Wi-Fi Plug","next_action":{"type":-1},"err_code":0}}}

[2021-02-06 07:45:53,141] DEBUG: TIM

[2021-02-06 07:45:53,736] DEBUG: Aborted power off due to activity.

It seems at the end of the wait for heaters part when it would be powering off it's powering on, and then there's an abort due to activity. I was hoping to look into this today to see if I can reproduce with my HS300.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/jneilliii/OctoPrint-TPLinkSmartplug/issues/247#issuecomment-774525030, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ARNXBPP3DXEBQ3WFZ4EW6S3S5WGUVANCNFSM4W36LR2A.

realbadfox commented 3 years ago

Always same. Lights go off but not the printer

jneilliii commented 3 years ago

This should be fixed in the latest 1.0.0rc3 release candidate. If you want to test it out and confirm that would be great, just go into software update settings and change the release channel to Release Candidate for the plugin and you should get an update notification.

realbadfox commented 3 years ago

ok i will try

realbadfox commented 3 years ago

still running and running, i turn 2 min idle timing on, but still didn't turn off. octoprint.log

jneilliii commented 3 years ago

Something looks messed up with your settings possibly.

Could not convert '' to a valid integer when getting option ['plugins', 'tplinksmartplug', 'idleTimeoutWaitTemp']

can you check your temperature setting for the idle section please?

image

realbadfox commented 3 years ago

Oh yes. I have nothing in there. I thought with no value it won't be restricted for the idle mode. I will try again.

realbadfox commented 3 years ago

Now it is working! Perfect, thank you.