Lights don't always switch on, even though UI says they're on

I’m having issues turning lights on via openHAB. When switching them on and off via the iOS app, the UI switch will change state but the light usually won’t turn on or will turn on after 10-30s.

I have openHAB running on a BannaPi, with a set of rules in place that automatically turn the lights on and off. More often than not, the lights aren’t on when they’re meant to be. And the UI switch shows them as being on.

The lights are connected via a Energenie 433mhz 3 pin UK wall sock withy the light plugged into it. Then I’ve wired a 433mhz transimitter onto the BananPi header pins via jumper cables.

Can anyone help?

Then it could be possible that the problem is not in openhab, but in your transmitter. Put receiver and transmitter closer together and see what happens …

Right i had this kind of issues but not due to openhab the problems were coming from the 433 rf transmission. Here si what you can check:

  • do you have an antenna on the transmitter side with the good length; 17,3cm
  • which library are you using on banana pi side ? If you use rcswitch you could increase the number of sending the signal
  • you could be on overcrowded frequency and having some perturbations from other transmitter.

I have no antenna on the transmitter. 1technophile – are you suggesting it should be 17.3cm long? And should it be straight or coiled?

– I’m using the 433Utils for BananaPi and using the RPi_Utils/codesend app to send the correct RF code.

– What’s odd is that, a remote in another room on the 1st floor of my property turns on no problem every time. And that has a floor a 2 walls between the transmitter and remote plug. The plug that always seems to fail only has a sofa in the way of direct line-of-sight. The remote switch turns on every time when I used the remote control that came in the original bundle.

Yes you should add an antenna, either home made with a copper wire of 17.3cm, it can be straight or coiled, or you can buy it

The library that you are using is based on RCSwitch, so as to increase the number of sending you can add:
mySwitch.setRepeatTransmit(10); //increase transmit repeat to avoid lost of rf sendings

The remote switch has maybe an antenna in it and the power of the transmitting module may be more powerfull

Thanks for the code snippet… it looks like it should be used in a rules file rather than in the {} binding for each light item in my home.items file. Is that correct?

I’ve soldered an antenna onto the transmitter so will test over the coming days. After playing around with the plugs and remote a little more, it seems that the sofa in the way of line-of-sight may have been causing the issue.

With pleasure,
You should put the code directly on the codesend.cpp (https://github.com/ninjablocks/433Utils/blob/master/RPi_utils/codesend.cpp) before the send command
and recompile the library (make command).

Be carefull about the size it must be 17.3cm

I had a similar problem with a light controlled between two mysensors arduinos (one as node sensor connected to the light and one as gateway connected to OH). The light controller position was the problem: in a metallic shelf; even with an antenna sometimes the node couldn’t receive the command from the gateway. So I created a script in OH that every time it sends a command to that light, after few seconds it checks the status (sending a specific command) and it re-sends the command until the status has actually changed.

I’ve added the additional code snippet and recompiled and added the antenna, which appears to be working consitently. Thanks for the tip!

Why does it need to be such a specific length?

Thanks mortommy, that’s a great idea. Unfortunatley my 3 pin 433mhz wall sockets are 1-way comm link. So I can only check their state by physically checking them in person.

Physical law, should be a quarter of the length wave 70cm for 433Mhz = 17,25cm