[advice] on/off detection in a projector

I have a projector which I control with an ESPHome ESP32 over IR. The ESP32 is powered by the projector’s always-on USB port. The infrared is great, but not 100% reliable and it’s often turned on by remote control rather than via HA. So I’d like to add some power state detection to that ESP32. I’d like the community’s advice on how to do it.

I figure it’s probably a binary sensor, but based on what?

  • a light sensor would block the lens
  • vibration sensor for the built in fan? But I have kids running around and so do the upstairs neighbors, so there are some false-positives to weed out.
  • noise sensor for the built-in fan? Same problem.
  • I can’t use the USB port, it’s in always-on mode to power the IR transmitter (and I don’t have another power source up there).
  • maybe a dupont pin stuck into the VGA out port?

Suggestions welcome!

I use IR with ESPHome for my Christmas lights. I find i need to repeat the signal quite a few times to make it reliable for all lamps.

  - platform: template
    type: binary
    id: krinner_on_a
    write_action:
      - remote_transmitter.transmit_raw:
          code: []
          carrier_frequency: 38kHz
          repeat:
            times: 15
            wait_time: 16ms

But on your question, could you consider another device to measure Wattage? Like a switch on the powerline reporting wattage over Zigbee, wifi, Bluetooth, zwave or similar?

If the fan is on all the time, connect it to a gpio with a voltage divider

2 Likes

Does the projector have a LED indicating it’s ON/OFF state? Monitoring that might be a path. Good hunting!

2 Likes

Depending on your skill level in hacking electronics you may not have many options and sticking a jumper wire in VGA? Oh, please dont do that. Like other have said, just use a smart plug between the projector and the outlet. Depending on your skill level and whether or not you can afford to replace it in the event you break it, opening it up and messing around in there, it should be your last resort. Im not a big projector user but if i recall, they get pretty warm when theyre on, right? Get a DS18B20 temp sensor and you should be able to clearly distinguish on and off based on how high or low. It gives you the other benefit of catching a fan failure or overhearing right away because youll have a normal range for ON.

2 Likes

Lol amazed by all crazy solutions proposed while there is an easy and efficient one ! Use the RS-232 port of the projector to control it properly :wink:
Careful you can’t do RS-232 straight from ESP GPIO, you need an electrical adapter to get proper electrical levels :slight_smile:

They’re not very crazy to those of us that read the OP and what they wanted. Controlling the projector was never something asked by the OP. They asked about how to tell if the projector is running/on. Teaching ones self how to communicate with a projector via serial over rs-232 for this simple request kind of seems out there to me.

yeah but if you want status you need to use a more advanced control system than just IR :wink: good luck with other solutions offered :smiley:

You and my grandpa would have been fast friends! He thought all that wireless stuff was just a fad too. You might like getting up and walking to your tv to change stations but the rest of us like IR.

hall effect

Sorry if I try to give a solution, find out solution by yourself then as I’m not there to be insulted for giving help !

Thank you for all the advice and good ideas! I think an RS232 connector is just the thing I need. I cam buy one off the shelf, use the ESPHome serial capability, and actually query the projector to see of it’s on. Every other approach is just inferring state. Though admittedly they’re all better than sticking a pin into the vga port. :smiley:

Apparently you couldn’t tell i was joking. I do think if someone already possess the knowledge and skill to establish communication and control over RS232, thats a good idea and would be very cool. I just dont think this particular project warrants that much work, it seems a little overkill.

How do you query the projector? I admittedly know jack $hit about serial communication but. I assume the language and syntax is very specific and possibly specific to that device? Do manufacturers make all of that information available to the public?

Yep, I did a quick google. I need this esphome component, and the codes are in their public documentation apparently in the same format. I 'll need an RS232 to TTL module though.

I’m sure there will be gotchas but it looks like the easiest, proper way to do this. Way better than taping my IR transmitter to the projector’s receiver or a pin in the vga port. :smiley:

1 Like

That’s great the protocol is two way and you can read the power status. And that it is documented quite well. This is the way to do it if you don’t mind doing the software work.

Sometimes the protocols for these things mimick the remote and are one way only (like an Air Con unit), and so you can’t confirm the actual state and you are in “optimistic mode”.

It would be worth digging around and seeing what has already been done;)

This too!

Im happy to admit I was wrong. Not only would it be very cool to do but, you can find RS232 ports on tons of devices so, looking at the big picture, this is probably a good skill to learn and has a lot of uses. Id love to hear how this progresses or any useful links/documentation you find helpful.