OpenHAB +433MHz script

Hi!

I have recently started a home automation project but now I´m stuck…

I can send On and OFF comanand thru RPI command-line with “sudo piHomeEasy 0 31418 -1 on” to activate my NEXA powerplugs but i can’t figure out how to integrate my script with OpenHAB.

The RF transmitter is directly connected to the RPI GPIO Pins

Hi,

you can use exec Binding in OH.

create a ahort script:

#!/bin/sh
echo isF0F000FFFFFF > /dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0
sleep 1
exit

(you must adapt it to your solution)

create a thing

Thing exec:command:dose_a_an [command=“/etc/openhab2/scripts/script.sh”, interval=0, timeout=5]

and then in my case I execute with a switch

Switch dose_b_an (Test) { channel=“exec:command:dose_b_an:run”}

1 Like

Sorry but i dont understand whre to put this lines…

have you done the Tutorial?
http://docs.openhab.org/tutorials/beginner/index.html

2 Likes

Yes, but I really do not understand what to do…

how do I adapt the script in to my solution and should the script be in /etc/openhab2/scripts?
What parts do I need to modify?

The script needs to be in /etc/openhab2/scrit’s AND needs to be adapted in order to suit the codes of your device and device adress needs to match yours.

In other words the “is…” string needs to fit your device settings and the “dev/serial…” needs to fit the adress of your device.

1 Like