Hi!

So I’m using an LG C2 42" TV as a monitor for my PC. In the same room there’s a FP2 motion sensor with two zones defined:

  • Presence 2 = in front of the PC
  • Presence 3 = rest of the room

Since the TV does not have a “wakeup on signal” function and my PCs sleep/standby behaviour is extremely unreliable I want to use the motion sensor to conrol the screen.

I already have the presence states in ha and managed to get screen on/off and power on/off to work.

Now my question is how to go about automating it all: I’d like the screen to blank(screen off) as soon as nobody is in the room and resume(screen on) when I return. This could be instantly because there is little delay for resuming and the FP2 seems quite fast at changing the states as well. That on its own seems manageable at my experience level :)

The tricky part: I also want the TV to power down if there is nobody in the room for x minutes but only power up again if somebody is in front of the pc.

Could you give me some pointers on how to go about it? The more elaborate the better but I’m mostly interested in the approach you would take (and struggle from there…).

Thx!

  • GreatAlbatross@feddit.ukM
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    1 year ago

    If full power off is not possible in the WebOS integration, then your best bet is to use CEC, or an IR transmitter.

    For CEC, you’d need to have a device physically connected by HDMI that can send the power off signal, and you’d need to enable it on the TV (I think LG calls it SimpLink). CEC can be an absolute bastard to work with, I will warn you. It’s fine for simple stuff, but goes weird a lot.

    For IR, you’d need to source a blaster that works with HASS, then train it on the codes from the remote. For example, you could add the “power on/off” code for the on/off, and do something like putting blank screen on one of the quick menu shortcuts on the screen, then having the blaster press the buttons in sequence for blanking. (Edit: It looks like you might be able to press Menu over the integration, which might make things easier than a multi-code from the blaster)

    On the automation side, once you have the actions working in HASS, it’s pretty simple.

    To blank the screen, an automation that detects when there is no presence for 60 seconds.

    To power off, same, just with no presence for say 300 seconds.

    Power on, just have it do the action when motion is detected for 5 seconds.

  • jgkawell@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    1 year ago

    If you can’t control the monitor, could you connect it to a smart plug and just hard-shut it off?

    • fry@laguna.chatOP
      link
      fedilink
      English
      arrow-up
      0
      ·
      1 year ago

      I can control everything about the monitor that I need. My question is how to implement the automations that i want.

      • humantorchbankloan@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 year ago

        if you label the entities chat gpt could get you an automation pretty easily with this one. you need to use the fp2 sensors as triggers and potentially conditions with the switch.turn_on and turn_off service calls as actions