My nightstand lights are connected to a surge protector plugged into a Zigbee smart plug plugged into a dumb wall outlet controlled by a single dumb wall switch.

I have the smart plug set to default=On, so the wall switch works fine, and I can also turn the lights off from my phone or via an automation. All good so far.

What I WANT is to be able to turn the lights ON without getting out of bed, and irrespective of the position of the switch.

I tried putting a second smart plug in the switch-controlled outlet and making an automation to toggle the surge protector’s smart plug when the switch’s empty smart plug powers off/on via the wall switch, but it looks like it’s not simple to detect a Zigbee device “disappearing”. I found some integrations that detect zigbee devices disappearing, but those seemed more for running health checks to detect and repair moved devices than for live detection.

Any suggestions?

  • eddiereasoner@lemmus.org
    link
    fedilink
    English
    arrow-up
    0
    ·
    3 hours ago

    Assuming technically possible, this solution requires no other hardware:

    Is it possible to make the smart plug default to the opposite of the last state? You could use the wall switch like a pushbutton (cut and restore power) and it would toggle, then maintain control from HASS. You might be able to save the last state of the smart plug, detect when it comes online after a power failure (theoretically), and set it to the opposite of the previous state in an automation.

    • Clay_pidgin@sh.itjust.worksOP
      link
      fedilink
      English
      arrow-up
      0
      ·
      3 hours ago

      That’s probably possible, but doesn’t solve my problem. That said, some commentors found my explanation confusing.

      When the switch is toggled ON, I want the lights to go ON.

      When the switch is toggled OFF, I want the lights to go OFF.

      Irrespective of the switch position, I want to be able to turn the lights ON or OFF with Home Assistant.

      It sounds like a zigbee relay behind the switch will be the way to detect the switch position.

        • Clay_pidgin@sh.itjust.worksOP
          link
          fedilink
          English
          arrow-up
          0
          ·
          2 hours ago

          The second one that I attempted to use as a switch position detector, you mean? Because I think I’d still need the one in the un-switched outlet to turn the lights on and off.

      • eddiereasoner@lemmus.org
        link
        fedilink
        English
        arrow-up
        0
        ·
        3 hours ago

        My point is, you would keep the switch on no matter what and flick it off and on again when switching the lights on/off

  • Godnroc@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    4 hours ago

    So, I’ve been looking at Shelley’s smart switch modules which actually get wired in behind the light switch and use it as an input to control the smart switch. It involves simple wiring, requires a neutral in the switch box, but would give you control from either the switch or otherwise.

    For me, it would let me control the lamps in my apartment and not show anyone that I had made all the switches smart.

    • Matt The Horwood@lemmy.horwood.cloud
      link
      fedilink
      English
      arrow-up
      0
      ·
      3 hours ago

      Shelly relays are amazing, you wire the load and switches to it. Making a dumb light smart

      Here in the UK we don’t have a neutral wire the light switch, so I have a shelly in the light fitting

      • Godnroc@lemmy.world
        link
        fedilink
        English
        arrow-up
        0
        ·
        3 hours ago

        Oh, that’s genius! I know a light I had to skip making smart because it didn’t have a neutral, but putting it in the light is a great solution!

  • jonathan7luke@lemmy.zip
    link
    fedilink
    English
    arrow-up
    0
    ·
    4 hours ago

    If I’m reading this correctly, it sounds like what you want is a Shelly relay installed behind the dumb switch. Then you wouldn’t even need the Zigbee wall plug at all.

  • Joelk111@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    5 hours ago

    They do make button pressers, if your switch is the flat kind that could work I suppose.

    I dunno what you expect us to tell you though, the switch is gonna turn off power to the circuit.

  • paks@feddit.uk
    link
    fedilink
    English
    arrow-up
    0
    ·
    5 hours ago

    You may have better luck with a smart zigbee switch to replace the switch. Be careful that it complies with your local regulations etc.

    If you want the aesthetic of the current switch, you can alternatively get relay modules which would sit in the box behind the switch and connect both to the switch and the socket.

    If you don’t want to mess with the in wall wiring, you can get covers that sit over a wall switch and contain/mount a battery smart switch.

    If none of that suits, sounds like you’re on the right track with powering the light from a non switched socket and using the presence/absence of a second device to identify the switch position. But I don’t have advice on the fine details.

    • Clay_pidgin@sh.itjust.worksOP
      link
      fedilink
      English
      arrow-up
      0
      ·
      3 hours ago

      I like the relay idea better, thank you. I’ve done outlet and switch wiring before, but never for HA and not yet in this house.

      Detecting the missing device seemed like it would be the easiest way as it wouldn’t require wiring, but it seems that that’s actually the more complicated option!

  • Onomatopoeia@lemmy.cafe
    link
    fedilink
    English
    arrow-up
    0
    ·
    5 hours ago

    What?

    As I read through that Goldbergian stream of connectedness, I’m left wondering:

    1. Whatever you really trying to accomplish that brought this on

    2. Won’t that wall switch always be a manual interrupt for the automation

    Basically, don’t you want to automate the wall switch of lock it to being always on? (There are wall plates for this).

    • slazer2au@lemmy.world
      link
      fedilink
      English
      arrow-up
      0
      ·
      4 hours ago

      Kinda sounds like the setup is

      Ac mains -> dumb switch -> ZigBee switch -> power board -> light. 
      

      And they want to turn the light on while the wall switch is off, which sounds like it won’t work because the power would be off, also turning power off to the ZigBee switch and the light.

      • Clay_pidgin@sh.itjust.worksOP
        link
        fedilink
        English
        arrow-up
        0
        ·
        3 hours ago

        The goal is correct, but the current setup is incorrect. Right now, I have:

        AC mains -> dumb switch -> zigbee smart plug

        AND

        AC mains -> zigbee smart plug -> surge strip with two lights on it