Feature request: Turn off HDMI on pi3 after print


#1

Don’t know if this is even possible, but I’ll ask anyway. For those of us that use DLP projectors, we want to turn them off after a print. Sure, some projectors have a serial interface, but if we haven’t gotten that working, we must be there to turn it off manually after the print to save bulb life. Almost all projectors have an automatic shutdown feature if the video input shuts off. If there were a command we could add to turn off HDMI after completion of a print, then our projectors would automatically shutdown.

Starting a projector manually is not a big deal, since you have to be at your printer to make sure it is ready to print anyway.


#2

The HDMI output will continue to output the Linux console, even if the X server used to display graphics is stopped (and since the X server is launched outside of the Photonic3D server, we can’t really control that from inside).

When you say “turn off HDMI” what specifically would you need to be run? Some kind of DPMS command?


#3

I only know that when a black screen is shown, the projector still sees it as an active display and remains on. If you unplug the pi, the projector turns off automatically after a minute because it lost the video signal. Perhaps there could be a command to shut down the pi after a print? My only reason for the question is the fact that I’m not ready to connect the projector to a serial port, but eventually will. Some people might not be able to.


#4

This would be a pretty straightforword code change, but you’ll need to download the cec_client first:
https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=53481

Then you would do the following

  1. Implement a new org.area515.resinprinter.notification.Notifier
  2. In the org.area515.resinprinter.notification.Notifier.jobChanged(Printer, PrintJob) method check to see if the print is over by checking: printJob.isPrintInProgress(). If false, then execute a new Native process to run the HDMI close command against the cec_client.
  3. Add the name of your notifier to config.properties like the rest of the notifiers.

#5

I see you are adopting the “teach a man to fish” philosophy. I don’t mind
that at all, and it will be a good exercise for me to get my feet wet in
the programming. Question though… Do you use a HDMI open command in all of your routines or would my shutting off HDMI after a print keep me
in the dark? It will probably be a week before I can dive into this.


#6

Yep and I can step you through each stage you would need to take from a Java perspective including how best to accomplish running an external command like this. However, when it comes to HDMI, you’ll need to follow the cec_client documentation and it’s community, because I can’t take you to the end of that path. We don’t operate at the HDMI level, that’s what keeps our logic portable across platforms(we aren’t even tied to X Windows) This is also why I suggested to make this a plugin rather than an embedded fixture of the app.

If you’d like me to guess, I’d bet that your HDMI close would keep you down, but I would guess that you could also start HDMI back up when Photonic3d notifies you that a print is started. I have no idea how X-Windows/Java would like all of these events happening behind the scenes. Before you go to far, you might want to just download the cec_client and see what happens to Photonic3d when you start to fiddle around with HDMI. That way you wouldn’t waste any time dealing with Java before you know it’s going to work.