Hi all,
i am completly new to OH2.
I found a project on github with which i would like to control my rollershutters.
My installation:
Raspberry Pi 3
433 mhz Transmitter (this one)
Project:
It just has a tutorial for openHAB 1.x and i would like to use it with OH2.
How do i do this in OH2? I translated the German tutorial to english
Integration in openHAB 1.x
Item-Definition (defined as virtual switch):
Rollershutter Rollershutter_WZ_Garden "Garden"<rollershutter>
Sitemap-integration:
Switch item=Rollershutter_WZ_Garden mappings=[UP="ROLLUP", STOP="X", DOWN="ROLLDOWN"]
Rule-definition:
rule Rollershutter_WZ_Garden
when
Item Rollershutter_WZ_Garden received command
then
switch (receivedCommand) {
case UP: (1..5).forEach[executeCommandLine("/usr/share/openhab/configurations/scripts/FernotronSend <code>",5000)]
case STOP: (1..5).forEach[executeCommandLine("/usr/share/openhab/configurations/scripts/FernotronSend <code>",5000)]
case DOWN: (1..5).forEach[executeCommandLine("/usr/share/openhab/configurations/scripts/FernotronSend <code>",5000)]
}
end