OctoPrint-TuyaSmartplug icon indicating copy to clipboard operation
OctoPrint-TuyaSmartplug copied to clipboard

Unknown command:"M81 192.168.178.39"

Open tarsonis123 opened this issue 3 years ago • 0 comments

Since some time I try to figure out why my Octo or Tuya don't like to play with each other. Using the Tuya power button in the interface works nearly always. Powering on/off through Gcode not 2 from 10 times. I also have it in my End Gcode but it does never work.

If I type @TUYAOFF "123...." I get not response from the terminal at all. If I send the plugin default configured Gcode:

Send: M81 192.168.178.39 Recv: // Unknown command:"M81 192.168.178.39"

There is something shady going on. I activated the debugging.. The printer was on and I send M81 to power it off The debug said: 'currentState': 'off'. So it seems Tuya thought the printer was off thought it wasn't. Shouldn't be there a logic implemented if prior a "wake" signal was send to ignore any "wake" attempts and ideally send a message saying already on or off?

[2021-03-15 21:35:35,690] DEBUG: Received M81 command, attempting power off of 192.168.178.39. [2021-03-15 21:35:35,691] DEBUG: {'autoConnect': True, 'autoConnectDelay': '3', 'autoDisconnect': True, 'autoDisconnectDelay': '3', 'btnColor': '#808080', 'countdownOffDelay': 0, 'countdownOnDelay': 0, 'currentState': 'off', 'displayWarning': True, 'gcodeEnabled': True, 'gcodeOffDelay': '720', 'gcodeOnDelay': 0, 'icon': 'icon-bolt', 'id': 'bfac0f79f26880108c8qo8', 'ip': '192.168.178.39', 'label': 'SmartEnder', 'localKey': '06d33106d4f525cd', 'slot': 1, 'sysCmdOff': False, 'sysCmdOffDelay': '3600', 'sysCmdOn': True, 'sysCmdOnDelay': '2', 'sysRunCmdOff': 'sudo shutdown -h now', 'sysRunCmdOn': 'RESTART', 'useCountdownRules': False, 'v33': True, 'warnPrinting': True}

tarsonis123 avatar Mar 15 '21 21:03 tarsonis123