Hi, I would like to control in total 12 rollershutters in my flat
I was reading in the following documentations but I still do not get the concept behind the story
My goal is to keep the item config file clean and tight and not repeat similar code. I use modules that are controllable by http get post put messages like the following example to switch my light:
Switch sw_bad_decke "EIN/AUS" <light> (bad, gAllrooms) ["Switchable"] {http=">[ON:POST:http://192.168.x.x/zrap/chctrl/ch1:cmd=on] >[OFF:POST:http://192.168.x.x/zrap/chctrl/ch1:cmd=off]" }
Switch sw_ein_bad_decke "EIN" <light> (bad, gAllrooms) ["Switchable"] {http=">[*:POST:http://192.168.x./zrap/chctrl/ch1:cmd=on]"}
Switch sw_aus_bad_decke "AUS" <light> (bad, gAllrooms) ["Switchable"] {http=">[*:POST:http://192.168.x.x/zrap/chctrl/ch1:cmd=off]"}
Switch sw_scene1_bad_decke "SCENE1/AUS" <light> (bad, gAllrooms) ["Switchable"] {http=">[*:POST:http://192.168.x.x/zrap/chctrl/ch1:cmd=recall_s1]"}
Switch sw_scene2_bad_decke "SCENE2/AUS" <light> (bad, gAllrooms) ["Switchable"] {http=">[*:POST:http://192.168.x.x/zrap/chctrl/ch1:cmd=recall_s2]"}
Switch sw_scene3_bad_decke "SCENE3/AUS" <light> (bad, gAllrooms) ["Switchable"] {http=">[*:POST:http://192.168.x.x/zrap/chctrl/ch1:cmd=recall_s3]"}
Switch sw_scene4_bad_decke "SCENE4/AUS" <light> (bad, gAllrooms) ["Switchable"] {http=">[*:POST:http://192.168.x.x/zrap/chctrl/ch1:cmd=recall_s4]"}
With bash I would use a reusable function for this. I do not have any java coding skills so I raise my question here at the community how to code and implement such a function to control my lights and blinds
Maybe some can point me the following questions out:
-Simple sample function code to control the shutters to control up/down, stop, close up/down and moving the blind.
-What files need to edited inside folders: items,rules etc. where do need to place the code?
-How variables can be passed into the functions
Thank you very much!
Chris
// cmd close close shutters
// cmd open open shutters
// cmd stop stop dimming lights or moving blinds
// cmd move_close move shutters to close (use stop to hold)
// cmd move_open move shutters to open (use stop to hold)
// cmd move_close_(t) move blind and stop after time (t) (t = 100Â32000 milliseconds)
// cmd move_open_(t) move blind and stop after time (t) (t = 100Â32000 milliseconds)