Closed rrauenza closed 5 years ago
It very well could be confusing it. Have you tried with a value of 1?
Oh... I thought maybe I did .. I can try again. I wasn't always being methodical. I've switched to GCODE delay instead which I think is what I wanted anyway. Does the gcode delay wait in octopi or does it delay in the switch itself as well?
It waits in the pi side and then sends the command.
Ah, yes found it -- Timer:
if plug["gcodeEnabled"]:
t = threading.Timer(int(plug["gcodeOnDelay"]),self.gcode_turn_on,[plug])
t.start()
return
I'd rather that anyway (via gcode) because if I manually turn it on/off, I want it off/on now.
btw, my use case for this is I bought a Thordsen filament dryer at Maker Faire this last weekend. I want to shut it on at starts of prints and then off again when done. And I want the printer off also after it goes through its cool down.
Your use case then is better served with gcode triggers. Then you can add @TPLINKON 192.168.0.2
in your start gcode and @TPLINKOFF 192.168.0.2
in your end gcode settings of your slicer for the filament dryer. You would probably want to disable the warn while printing option for this socket, as that will block the off command from being sent if the printer is in a printing state.
I actually saw that dryer on 3DPrinting Nerd's last video and thought it was a neat idea. They are a little more open about what's inside over the FilaDry.
Yes, I did exactly that with tplinkon and tplinkoff, but added /# of course.
Regarding the filament dryer I’m still trying to convince myself the warmed filament doesn’t stretch when pulled... (maybe I’m just using some narrow filament today)
Test version available with your countdown timer fixes incorporated along with some tweaks to fix sidebar issues for the HS300 and the status will now check status of plug 5 seconds after the countdown timers to give the plug a little bit of time to actually change it's state. You can test by installing the 0.9.17 version using the url below in plugin manager.
https://github.com/jneilliii/OctoPrint-TPLinkSmartplug/archive/0.9.17.zip
Let me know if this resolves your issue with countdown timers.
Ok, I've upgraded. (I was already running my countdown patch already in a locally modified installation).
I now have populated graphs/select dropdown! Thanks!!
Actually -- closed wrong bug. I haven't tested this.
Setting ON countdown to 0 seems to never turn the printer on. 1 does. So yeah, you may want to send a regular ON when countdown is 0.
Just pushed an update to resolve this to some degree. Now checks for a delay larger than 0 as well as some UI changes to limit delays to a number larger than 0 and sets new plug defaults to 1. You can still manually override the countdown timer delays to 0, which is now handled in the on command, but still doesn't work in the off command. Hopefully these changes are enough to resolve this issue. Install using the same URL below in plugin manager.
https://github.com/jneilliii/OctoPrint-TPLinkSmartplug/archive/0.9.17.zip
This issue has been automatically marked as stale because it has not had activity in 14 days. It will be closed if no further activity occurs in 7 days.
Again using the HS300 if relevant.
Printer never turns on if I had Countdown Timer enabled and off set to 300, on set to 0. If I disabled countdown timer, printer came immediately on. I had GCODE timer on instead.
Could countdown delay of 0 for on be confusing the device?