Problems with exec binding: control a 433 MHz socket (ENGLISCH / GERMAN)

Hey there !

My goal is to control 433 MHz sockets with OH2 from my tablet using a raspberry pi 3 as a central station.
I installes OH2 with apt-get and I think this works without a mistake.

I also installes exec binding with apt-get (hopefully without mistakes, too). Now, the problems start.

I’m not really sure, if I understand the general structure how OH2 works. First, I made “freitag.item” in which stands:

Switch funkdose111 “DDDose 1” {exec=">[OFF:sudo /opt/raspberry-remote/send 00011 1 0] >[ON:sudo /opt/raspberry-remote/sen$
Switch funkdose2 “D23ose 2” {exec=">[OFF:/opt/raspberry-remote/send 00011 2 0] >[ON:/opt/raspberry-remote/send 00011 2 $
Switch funkdose3 “Ddfsose 3” {exec=">[OFF:sudo /opt/raspberry-remote/send 00011 3 0] >[ON:sudo /opt/raspberry-remote/se$
Switch funkdose4 “Ddfose 4” {exec=">[OFF:sudo /opt/raspberry-remote/send 00011 4 0] >[ON:sudo /tmp/openhab]"}

Don’t get confused with my convention of “sudo / no sudo” and the names “DDDose 1”, etc. I just tried some different opportunities so see, if the changes work or work not.

Then I changes the default.sitemaps data to:

sitemap default label=“Dominik und Helena” {
Frame label=“Funkdosen” {
Switch item=funkdose111
Switch item=funkdose2
Switch item=funkdose3
Switch item=funkdose4
Switch item=funkdose5
Switch item=LivingRoom_AC_command label=“Interrupteur” mappings=[ “ON”=“ON”, “OFF”=“OFF” ]

Again, I tried different opportunities, as you can see.
I installed the “openHAB” App for my iPhone and logged in, this works. I also can see the switches “funksteckdose111 - funksteckdose5” and “Interrupter”. When I want to switch on or of the sockets, nothing happens. I changed the rights of the user openhab with “sudo nano /etc/suers”: “openhab ALL=NOPASSWD: /opt/raspberry-remote/send*”

I’m not sure if I have just a little problem (with rights of openhab?) or I’m standing in front of a big problem and haven’t unserdtood the general structure.

I would be so happy, if we could solve the problem together !!

PS: I read and tried the tutorial of Rich, but unhappily I don’t get everything.
And sorry for starting a new toping while existing a lot of similar solved problems in the web - I just don’t get them. Sorry for this !

If some Germans like me read my post, they are welcomes to answer in German, so it’s easier for me to follow them.

Installing a binding in OH2 should be done using PaperUI.
What kind of device do you use to SEND the 433mhz signal. I’m using a CUL stick. This stick and the Intertechno-Binding is all that is needed in order to switch my plus ( they are not from intertechno, but most RC plugs use a compatible message format).

Hey and thanks for your answer.
I use a 433 MHz interface which is connected to the GPIO. The tool is raspberry-remote.
Do I have to install the binding in PaperUI on the raspberry or can I also install it on any PC ?

Maybe a stupid question, but do the /opt/raspberry-remote/send commands work, if you execute them directly on the command line of your RPi?

The contents of your freitag.item file is wrong or badly copy-pasted here. Could you please check it? Some lines end with a dollar sign?!

Did you take a look into the openhab logfile when trying to switch the sockets?

A binding used by OpenHAB should be on the device running OpenHAB. PaperUI does that.

Thank’s for your answer, Lars.

The commands work well with the terminal.
And you are right, my freitag.items isn’t copied correctly, it should be:

Switch funkdose111 “DDDose 1” {exec=">[OFF:sudo /opt/raspberry-remote/send 00011 1 0] >[ON:sudo /opt/raspberry-remote/send 00011 1 1]"}
Switch funkdose2 “D23ose 2” {exec=">[OFF:/opt/raspberry-remote/send 00011 2 0] >[ON:/opt/raspberry-remote/send 00011 2 1]"}
Switch funkdose3 “Ddfsose 3” {exec=">[OFF:sudo /opt/raspberry-remote/send 00011 3 0] >[ON:sudo /opt/raspberry-remote/send 00011 3 1]"}
Switch funkdose4 “Ddfose 4” {exec=">[OFF:sudo /opt/raspberry-remote/send 00011 4 0] >[ON:sudo /tmp/openhab]"}


sitemap default label=“Home” {
Frame label=“Funkdosen” {
Switch item=dose_1 mappings=[ “1”=“ON”, “0”=“OFF” ]
Switch item=dose_2 mappings=[ “1”=“ON”, “0”=“OFF” ]


String dose_1 “Dose 1” (group_location_livingroom) [ “Switchable” ] { channel=“exec:command:funkdose_control_1:input”, channel=“exec:command:device-nas-status:output”, autoupdate=“false” }
String dose_2 “Dose 2” (group_location_livingroom) [ “Switchable” ] { channel=“exec:command:funkdose_control_2:input”, channel=“exec:command:device-nas-status:output”, autoupdate=“false” }


Thing exec:command:funkdose_control_1 [ command=“sudo /opt/raspberry-remote/send 00011 1 %2$s”, interval=0, autorun=true ]
Thing exec:command:funkdose_control_2 [ command=“sudo /opt/raspberry-remote/send 00011 2 %2$s”, interval=0, autorun=true ]

with the upper syntax, I can control my sockets, but I’m noch 100% happy with it.

I can control the sockets from the App, but I don’t know how to control them with the HABPanel, which would be much more beautiful.

The App has to buttons for each socket: on and off. It would be nicer to have no buttons but a switch, which turns the sockets on or off.

My goal is to control the sockets from HABPanel, so I can edit the weather etc.

What do I have to do, for being able to control the sockets with HABPanel ?
Do you think the upper syntax is okay the way it is or is there a better solution ?

And thank you so much for the answers!

I can now turn off the sockets in HABPanel with editing a widget an select as openHAB item “dose_2”.
The turning off works great, but is there a way to turn the socket on, too ?