433Utils suddenly stopped working

I have a number of lights in my items file that use UK 3-pin 433Mhz controller switches.

I use the 433Utils to send RF codes from my BananaPi. I captured these codes from a remote that came with the original plugs.

I then have these in my items file as below. I’ve removed the unique send code.

Switch Light_GF_Living_Room_Table "Table Lamp" (Living_Room_Lights, All_Lights) {exec="OFF:sudo /usr/local/bin/433Utils/RPi_utils/codesend 00000000, ON:sudo /usr/local/bin/433Utils/RPi_utils/codesend 00000000"}

I’m not aware that anything has changed, but the switches in openHAB web and iOS interfaces no longer cause any action to happen with the lights. I’ve checked the openhab.log and events.log and it shows the code being sent via the 433Utils send command.

Furthermore, when I run 433Utils send command as a user via SSH, the lights turn on and off as expected. So it would seem this issue is localised to openHAB.

This happened to me, but from the very beginning. Meaning, it never would work, though it looked like it should have. What ended up fixing it for me is actually moving the script into my /home/pi/ location in a folder called oh_custom_scripts (meaning, moved my 433Utils there). This fixed it immediately. However, since it worked for you previously, doesn’t sound like this would help very much. Worth a shot anyway.

Your best bet for debugging this is to move the calls from the Exec binding into a Rule and use executeCommandLine. If you use the version of executeCommandLine that takes a timeout it returns whatever the script wrote to stout and stderr. This way you can at least see what error is throwing.

I solved a problem where the files in my .ssh folder we having their permissions reset and ssh wouldn’t let me log in to the remote machine with a group readable private key. I never would have figured that out without seeing the error printed by the script.

Fixed it. The issue was being caused by a change to the /etc/sudoers file. This meant that the the user openhab was being run with, couldn’t execute the 433utils apps without a password.