Switches turn off and on repeatedly

Hi,

Home Assistant (0.89.2) on Raspbian on a RPI 3B+.

I have a number of Nexa 433 MHz EYCR-2300 plug-ins (http://www.nexa.se/vara-produkter/system-nexa/mottagare-paav/eycr-2300) and a couple of Nexa 433 MHz remotes plus a Fibaro FGWPE/F Wall Plug Gen 5 (https://www.fibaro.com/en/products/wall-plug/). All controlled by Telldus TellStick Znet Lite v2 (https://telldus.com/produkt/z-wave-gateway-tellstick-znet-lite-ver-2/) and Aeotec’s Z-Stick Gen5 (https://aeotec.com/z-wave-usb-stick). The Telldus is used only for the 433 MHz thingys (I’m not using the Z-wave part of it), so the Fibaro Wall Plug is controlled by the Z-Stick form Aeotec.

The 433 MHz remotes are used to turn the Fibaro wall plugs on and off (via the TellStick to Home Assistant to the Z-Stick) and I also have an automation that turns all the plugs on in the morning and off in the night. It’s a little messy, I guess, but mostly works well.

Some nights, when the automation triggers, the plugs switch off and on (and off and on) a few times, and sometimes the Fibaro Wall Plug ends up in the on state, while all the 433 MHz plugs consistently end up in the off state.

The Home Assistant log (from last night) looks like this:

For easier reading of the log (but more difficult to see what is a switch, automation, group etc), here it is again in text format:

11:00 PM FIBARO System FGWPE/F Wall Plug Gen5 Switch turned on
11:00 PM Fjernkontroll trapp I-3 på->Tenn stålampe i kjellerstue has been triggered
11:00 PM Fjernkontroll trapp I-3 turned on
11:00 PM Lys gang og trapp nede turned off
11:00 PM Fjernkontroll01 på->Tenn stålampe i kjellerstue has been triggered
11:00 PM Lys gang nede turned off
11:00 PM Gang nede trapp turned off
11:00 PM Fjernkontroll01 turned on
11:00 PM Gang nede midten turned off
11:00 PM Gang nede bordlampe turned off
11:00 PM FIBARO System FGWPE/F Wall Plug Gen5 Switch turned off
11:00 PM Fjernkontroll01 av->Slukk stålampe i kjellerstue has been triggered
11:00 PM Fjernkontroll trapp I-3 av->Slukk stålampe i kjellerstue has been triggered
11:00 PM Gang nede utgang turned off
11:00 PM Fjernkontroll01 turned off
11:00 PM Fjernkontroll trapp I-3 turned off
11:00 PM FIBARO System FGWPE/F Wall Plug Gen5 Switch turned on
11:00 PM Fjernkontroll01 på->Tenn stålampe i kjellerstue has been triggered
11:00 PM Fjernkontroll01 turned on
11:00 PM Lys gang og trapp nede turned on
11:00 PM Fjernkontroll trapp I-3 på->Tenn stålampe i kjellerstue has been triggered
11:00 PM Lys gang nede turned on
11:00 PM Gang nede trapp turned on
11:00 PM Gang nede utgang turned on
11:00 PM Gang nede midten turned on
11:00 PM Fjernkontroll trapp I-3 turned on
11:00 PM Gang nede bordlampe turned on
11:00 PM Lys gang og trapp nede turned off
11:00 PM Lys gang nede turned off
11:00 PM Gang nede bordlampe turned off
11:00 PM Gang nede trapp turned off
11:00 PM Gang nede midten turned off
11:00 PM Fjernkontroll trapp I-3 av->Slukk stålampe i kjellerstue has been triggered
11:00 PM Fjernkontroll trapp I-3 turned off
11:00 PM FIBARO System FGWPE/F Wall Plug Gen5 Switch turned off
11:00 PM Gang nede utgang turned off
11:00 PM Fjernkontroll01 av->Slukk stålampe i kjellerstue has been triggered
11:00 PM Fjernkontroll01 turned off
11:00 PM Slukk belysning i gang nede kl 23 son-tor has been triggered

Here’s the automation that triggers it all:

- id: slukk_belysning_i_gang_nede_kl_23_son_tor
  alias: Slukk belysning i gang nede kl 23 son-tor
  trigger:
    platform: time
    at: '23:00:00'
  condition:
    condition: time
    weekday:
    - mon
    - tue
    - wed
    - thu
    - sun
  action:
    service: switch.turn_off
    entity_id:
    - group.lys_nede
    - switch.fibaro_system_fgwpef_wall_plug_gen5_switch
    - switch.fjernkontroll01
    - switch.fjernkontroll_trapp_i3

This automation turns off a group of plugs (group.lys_nede) that are all 433 MHz plugs controlled by the TellStick as well as the Fibaro Wall Plug and two 433 MHz remotes (Norwegian: “fjernkontroll”) that are used to control the Fibaro manually (the remotes have an on and an off switch and unless I turn them off in the automation, the TellStick will show them as on and later I have to press off first and then on on the remotes to turn the Fibaro on manually).

Relevant groups:

  lys_gang_nede:
    name: Lys gang nede
    entities:
      - switch.gang_nede_utgang
      - switch.gang_nede_midten
      - switch.gang_nede_bordlampe
  lys_nede:
    name: Lys gang og trapp nede
    entities:
      - switch.gang_nede_trapp
      - group.lys_gang_nede

The turning off of the remotes triggers another two automations (this is the messy part) that are intended to allow manual control of the Fibaro Wall Plug:

- id: fjernkontroll_trapp_i3_avslukk_stalampe_i_kjellerstue
  alias: Fjernkontroll trapp I-3 av->Slukk stålampe i kjellerstue
  trigger:
    platform: state
    entity_id: switch.fjernkontroll_trapp_i3
    from: 'on'
    to: 'off'
  action:
    service: switch.turn_off
    entity_id:
    - switch.fibaro_system_fgwpef_wall_plug_gen5_switch
    - switch.fjernkontroll01

- id: fjernkontroll01_avslukk_stalampe_i_kjellerstue
  alias: Fjernkontroll01 av->Slukk stålampe i kjellerstue
  trigger:
    platform: state
    entity_id: switch.fjernkontroll01
    from: 'on'
    to: 'off'
  action:
    service: homeassistant.turn_off
    entity_id:
    - switch.fjernkontroll_trapp_i3

As I mentioned, most nights all switches end up in the off state, but sometimes the Fibaro Wall Plug ends up in the on state. I wonder if anyone would know why?

I suspect that it may be something to do with the Tellstick. I have configured Home Assistant to use the local API with 5 s polling time and wonder if Home Assistant (or TellStick) gets confused by the possibly inconsistent states of the remotes (set in Home Assistant, but possibly not updated in the TellStick until 5 s have passed)?

Any pointers would be appreciated.

1 Like

This happens to me randomly with Broadlink TC2 switches (RF) and a Broadlink RMPRO. Automation or no automation, they used to start turning on and off repeatedly for a few seconds and then they stop.
Cause? Unknown. Fix? Unknown. I forgot to check the logs when this used to happen.

Then my LED lights went bad one after another in the same circuit. One went bad (blinking), I replaced it and then the next one on the circuit went bad… Then the third one. When I replaced them I also upgraded HA and cleaned-organized my YAML files. It somehow stabilized and in a period of two months it has only happened once.

A couple of months ago the ones in my bedroom where driving me crazy, they used to start turning on and off in the middle of the night while I was trying to sleep or when my girlfriend was around, she thought I was pranking her. I ended up replacing the switch for the mechanical ones at 3AM.
Sometimes the switch wasn’t responding or when it was off the fan keep running on but very slowly and making a loud buzzing noise (leaking electricity perhaps?).

I have a few of these switches, they all had the same behavior and happened at random times, some often others almost never. Sometimes I had to relearn the RF code (I thought the RF code didn’t change in these).

In my case I blame the switches, they must haunted. Some had sensitivity issues so I had to take the cover off and out a piece of paper between the glass cover and the touch sensor behind it or clean them very thoroughly since if I touched them sometimes they would go into learning mode (like if you had kept your finger on the switch pressed for a few seconds).
Sometimes I thought it was interference.

When I replaced the broken LED lights I noticed the switch didn’t like one of my LED lights drivers as it had some funny behavior and wasn’t working correctly until I replaced all the LED lights on the circuit, but still it doesn’t explain why in other rooms this doesn’t happen anymore if I haven’t changed the automations or LED lights in these rooms and they identical: same switches, same automations, same LED lights.

The switches I have require no neutral cable and are touch switches. Right now they have been working flawlessly and I haven’t replaced a single one of these switches since I got them about two years ago. Up to this day I still wonder why they had such an erratic behavior. A few times I almost ended up ordering a new one then they started working correctly again… Some I thought were indefinitely broken like the one making my fan have a loud buzzing sound and run slowly when turned off (happened until I put the mechanical switch back in and the next day I put it back and it was fine). Or the one who was turned off (power indicator was a bit brighter than usual) more like kinda in-between states because of the LED driver in my circuit. I swapped it with another one switch I had in another room, they both had the same behavior so I thought I screwed up something in my circuit but then I put them back where they were originally and they started working but I also replaced the remaining lights on the circuit so this might have helped.

Next time I’m getting a switch that requires neutral and isn’t touch. These switches are passive and might leak some electricity, the vendor even says that the light needs to be more than 10-15 watts, something like that and they give you some resistors to put on the LED lights if they use less than that or if they start powering on but I noticed these resistors get a bit too hot so I never used them.

Just sharing my story with these light switches, now I love them because they are working but they had driven me completely mad. I wonder if they’re still broken and going crazy or I’m the one dreaming that these switches are working fine now.

“Unprovoked” turning on and off is not occuring in my system. The on and off behavior only occurs in connection with an automation turning the switches off.