I'm the plugin author, the side panel will display only for a short period while the web interface is loading and then hide completely if the device isn't energy monitoring compatible.
It is still possible that if @Iain_Morrison upgraded there may be some backend issues causing the unit to not power cycle properly. It would be great if you could post an issue in the repo with logs, settings configuration, etc. for better tracking.
If you want to get rid of the 5V DC power the raspberry is giving to your ender 5 you can easily use a piece of scotch tape covering the 5V line in the USB socket. The 5V line is not needed for communication to the printer.
Works very well for my ender 3 pro.
@MisterQ It's good to read the documentation so as to avoid frustration. Right there in the first post on the forum regarding the OctoPrint-USBControl plugin there's a Spoiler Alert. Reading further into the thread, you see that for the Raspberry Pi 3B the internal USB hub is "ganged". You toggle USB Port 2 and all four of the Type A connectors are toggled together.
So the behavior you described is consistent with reality. Also in the documentation it mentions that the ports aren't geographically located, they're issued dynamically by the underlying operating system and it's likely based upon first-seen-lowest-idProduct (if I were to guess).
And finally, if you read that thread all the way to the bottom, you'll see that today I just purchased a couple of the newer varieties of the Raspberry Pi for additional testing and adjustments to this very new plugin.
So, if the Pi doesn't predictably assign port numbers, what is the value in being able to switch ports be it port 2 (ganged with the rest) or ports 3 4 and 5, if you dont know or can't predict what will be in those (soft) ports ergo what will be switched.
If the port assignment is consistent, as in with a "first-seen-lowestid" then perhaps presenting a human compatible version of what is in each port, alongside the toggles, may be worth doing.
Or I can go the piece of tape route.
Most people leave everything plugged into their Raspberry so it boots in a consistent way and then assigns the same ports.
The tape solution works for some people but it depends on a number of factors like the controller board model.
I note that on my own printer, physically removing that 5V line prevents my rig from communicating on that serial line resulting in a red popup in OctoPrint.
If you're into non-software toggling of the 5V line then this appears to be a reasonable solution.
hmm, so, with the challenge being that the PI is most likely to determine that it's connection to the Printer is port 2, is a possible solution, bluffing it into thinking that there is something else (not of consequence) in port 2, so that then the printer connection (and webcam) move into the ports 3/4/5 space, and are then individually switchable - I was thing of plugging a old USB memory stick (finally, a use for the old 256Mb sticks) in, the hope that it "picks up" the port 2 assignment, freeing everything else to be separately controllable? Any thoughts/ideas/references as to what/where/how the Pi Port prioritization happens... Heck, even plugging in an arduino that does nothing more than asserting a high priority level, might be a solution....
Uh, no. It doesn't work like this for the Raspberry Pi 3B.
- Port 1 is the power for both wi-fi and network adapaters
- Port 2 is the power for all four of the USB Type A connectors
You would think that it would work in a more intuitive way but that's just not how they did it at the Raspberry Pi Foundation. They put two USB (ganged) buses internally and connected them to what I've suggested above. There is no individual switching as a feature.
In theory, one could connect a smart external hub and then switch on/off the individual ports of same.
Note that the Raspberry Pi 3B+ is expected to behave slightly better; I will know when mine arrives.
I need another pi (like 5 already isn't enough) - might put in an order on a 3B+ on spec, anyway... Even if it doesn't do this as hoped, I can find another use for it...
I also purchased a Raspberry Pi 3A+ for testing. Unfortunately it has no smart hubs inside. So this one can't be compatible.
I connected both my pi and the printer to a meross smart plug. I can turn either on and off from anywhere. Amazon sells them for about 15 dollars each.
Hi there - I'm completely new here but have a question about using @jneilliii Wemo plugin. Is it possible to trigger the switch if the printer sends an Emergency Stop command? Specifically what I'm looking to do is turn off power to the printer completely (trigger Wemo Off) if there is a thermal fault detected by the printer.
Thanks!
My plugin can't do it currently. I have feature requests to add that functionality, just haven't had the time to work on it.
Oh - Awesome! Thanks.
And thanks for the quick reply!
Here is what I do. I have a TP-smart plug plugged into mains. It has an extension cord with 5 outlets on it. My optopi pi is plugged into that and my printer is alwo plugged into it.
I have node-red installed on the pi running octoprint. This node-red has a flow that is listening for a suttdown command. When it gets that is issues a shutdown of the Pi.
I have another pi (a pi zero w running mqtt and node-red) This node-red can shutdown everything one of two ways: Manually or automatically. The automatic mode works by listening for an end of print message (remember this is the pi zero w) from octoprint and then it waits 20 minutes for any more activity. If there is more, it goes back to listening for an end of print message. If it doesn't hear anything for 20 minutes, it sends the shutdown message to NR runing on the octopi.
It then waits a minute and then sends a poweroff command to the TP-smart plug which turns off power to the Pi and the printer.
The manual method does the same thing. I go to the NR dashboard of the pi zero w and press the poweroff button and it sends the ssshutdown commane then the power off command. Works great.
If anyone wants the two flows just let me know.
That's cool.
I currently use the TP-Link HS style of smart outlets myself. I was just mentioning on here that they now have an individually-controllable power strip which you might be interested in.
I'm working on adapting control of the strip into the TPLink-Smartplug plugin this weekend.
Thanks to the wonderful assistance and debugging from @ridencww I just released a new version of TPLinkSmartplug that supports the strip. For the ip address enter in the ip of the strip connected to wifi followed by a slash and the 0 based index of the socket itself on the strip. For example 192.168.0.2/0
would be the first socket in the strip, 192.168.0.2/1
would be the second, etc.
I just installed the latest update of the plug-in and see that the Thermal Runaway Monitoring is there now. AWESOME!! Thanks so much for working on it! Been loving the plug-in as it was so far. Will let you know if there's any issues with this version. Do you have any recommendations for max temps? I set them to 20C above stated max temps from the MFG. Any thoughts?
Not really. I'm still working on updating that 0.9.16 version after finding some bugs and making a couple of more improvements to the graphing for energy monitoring and some TouchUI compatibility related changes.