ziirish / OctoPrint-TuyaSmartplug

Tuya Smartplug plugin for OctoPrint
Other
19 stars 15 forks source link

GCODE support not working #24

Open t3chguy opened 3 years ago

t3chguy commented 3 years ago

Manually clicking the button in the header works great, but when trying from GCODE the following shows up in debug and the printer remains on:

[2020-12-13 00:08:59,643] DEBUG: Received M81 command, attempting power off of 192.168.1.88.
[2020-12-13 00:08:59,645] DEBUG: {'autoConnect': True, 'v33': False, 'ip': '192.168.1.88', 'btnColor': '#808080', 'autoDisconnectDelay': 0, 'sysCmdOff': False, 'gcodeEnabled': True, 'gcodeOnDelay': 0, 'id': '$ID', 'slot': 1, 'countdownOnDelay': 0, 'label': 'E3V2', 'warnPrinting': True, 'gcodeOffDelay': '180', 'sysCmdOnDelay': 0, 'localKey': '$KEY', 'countdownOffDelay': '0', 'sysRunCmdOff': '', 'useCountdownRules': False, 'autoDisconnect': False, 'sysRunCmdOn': '', 'icon': 'icon-bolt', 'displayWarning': True, 'autoConnectDelay': '5', 'currentState': 'on', 'sysCmdOn': False, 'sysCmdOffDelay': 0}
[2020-12-13 00:11:59,662] DEBUG: Turning off E3V2.
[2020-12-13 00:11:59,663] DEBUG: Sending command: info to E3V2
[2020-12-13 00:12:00,226] DEBUG: Status: {u'devId': u'$ID', u'dps': {u'24': 19028, u'25': 1095, u'20': 2299, u'21': 1, u'22': 692, u'23': 28500, u'19': 79, u'18': 81, u'1': True, u'9': 0}}
[2020-12-13 00:12:00,230] DEBUG: {'autoConnect': True, 'v33': False, 'ip': '192.168.1.88', 'btnColor': '#808080', 'autoDisconnectDelay': 0, 'sysCmdOff': False, 'gcodeEnabled': True, 'gcodeOnDelay': 0, 'id': '$ID', 'slot': 1, 'countdownOnDelay': 0, 'label': 'E3V2', 'warnPrinting': True, 'gcodeOffDelay': '180', 'sysCmdOnDelay': 0, 'localKey': '$KEY', 'countdownOffDelay': '0', 'sysRunCmdOff': '', 'useCountdownRules': False, 'autoDisconnect': False, 'sysRunCmdOn': '', 'icon': 'icon-bolt', 'displayWarning': True, 'autoConnectDelay': '5', 'currentState': 'on', 'sysCmdOn': False, 'sysCmdOffDelay': 0}
[2020-12-13 00:12:00,231] DEBUG: Sending command: off to E3V2
[2020-12-13 00:12:08,043] DEBUG: Status: json obj data unvalid
[2020-12-13 00:12:08,044] DEBUG: Checking status of E3V2.
[2020-12-13 00:12:53,682] DEBUG: Checking status of E3V2.
[2020-12-13 00:12:53,683] DEBUG: Sending command: info to E3V2
[2020-12-13 00:12:54,213] DEBUG: Status: {u'devId': u'$ID', u'dps': {u'24': 19028, u'25': 1095, u'20': 2299, u'21': 1, u'22': 692, u'23': 28500, u'19': 74, u'18': 80, u'1': True, u'9': 0}}

How can I debug json obj data unvalid?

Thanks