From fda6769f36e17eeb1b94e6ddb958f162dc396d65 Mon Sep 17 00:00:00 2001 From: gemu Date: Sun, 28 Jul 2019 19:40:59 +0200 Subject: [PATCH] Updated Script Cookbook (markdown) --- Script-Cookbook.md | 120 ++++++++++++++++++++++----------------------- 1 file changed, 60 insertions(+), 60 deletions(-) diff --git a/Script-Cookbook.md b/Script-Cookbook.md index 6fb037ef..2adc7d85 100644 --- a/Script-Cookbook.md +++ b/Script-Cookbook.md @@ -625,77 +625,77 @@ next \>R ------------------------------------------------------------------------------ -#### Multiple IR Receiver Synchronization -since i own a magic home with ir receiver i made a script to show how it works -i have 2 magic home devices that should be synchronized so i send the commands also to a second magic home via websend +#### Multiple IR Receiver Synchronization +since i own a magic home with ir receiver i made a script to show how it works +i have 2 magic home devices that should be synchronized so i send the commands also to a second magic home via websend -; define (expand string section to 25 chars) ->D 25 -istr="" -ws="websend [192.168.178.84]" +; define (expand string section to 25 chars) +\>D 25 +istr="" +ws="websend [192.168.178.84]" -; event section -\>E -; get ir data -istr=IrReceived#Data +; event section +\>E +; get ir data +istr=IrReceived#Data -; on -if istr=="0x00F7C03F" -then -=>wakeup -=>%ws% wakeup -endif +; on +if istr=="0x00F7C03F" +then +=>wakeup +=>%ws% wakeup +endif -; off -if istr=="0x00F740BF" -then -=>power1 0 -=>%ws% power1 0 -endif +; off +if istr=="0x00F740BF" +then +=>power1 0 +=>%ws% power1 0 +endif -;white -if istr=="0x00F7E01F" -then -=>color 000000ff -=>%ws% color 000000ff -endif +;white +if istr=="0x00F7E01F" +then +=>color 000000ff +=>%ws% color 000000ff +endif -;red -if istr=="0x00F720DF" -then -=>color ff000000 -=>%ws% color ff000000 -endif +;red +if istr=="0x00F720DF" +then +=>color ff000000 +=>%ws% color ff000000 +endif -;green -if istr=="0x00F7A05F" -then -=>color 00ff0000 -=>%ws% color 00ff0000 -endif +;green +if istr=="0x00F7A05F" +then +=>color 00ff0000 +=>%ws% color 00ff0000 +endif -;blue -if istr=="0x00F7609F" -then -=>color 0000ff00 -=>%ws% color 0000ff00 -endif +;blue +if istr=="0x00F7609F" +then +=>color 0000ff00 +=>%ws% color 0000ff00 +endif -; dimmer up -if istr=="0x00F700FF" -then -=>dimmer + -=>%ws% dimmer + -endif +; dimmer up +if istr=="0x00F700FF" +then +=>dimmer + +=>%ws% dimmer + +endif -;dimmer down -if istr=="0x00F7807F" -then -=>dimmer - -=>%ws% dimmer - -endif +;dimmer down +if istr=="0x00F7807F" +then +=>dimmer - +=>%ws% dimmer - +endif -istr="" +istr="" [Back To Top](#top)