sub main() 'RGB Led Device 'Enver Tanriverdi 'Versie 1.01 'http://www.hashop.nl 'Maak een virtuele Device aan in Homeseer met de optie status only. 'Verander HDC code in de gewenste code van de net aangemaakte virtuele device. 'Verander LDC Code in de gewenste code van de led driver. 'Run script een keer via Homeseer Events om de toetsen aan te maken. 'Comport van de PC interface opgeven. 'Maak twee homeseer events voor Open / Close van de compoort 'Open Event moet na herstart van Homeseer een keer draaien. 'Close event enkel gebruiken als er met de bijgeleverde software getest wordt. 'inhoud open event &hs.opencomport 7 'Inhoud close event &hs.opencomport (7, "57600,N,8,1", 1, "", "") 'In dit voorbeeld is 7 de compoort 'Zie voorbeeld schermen op http://www.tane.nl/shop/domation/homeseer/Screen%20Snap/ Dim HDC Dim LDC Dim ID Dim ComPort '================================ 'Volgende drie codes aanpassen 'Homeseer Device Code HDC ="R1" 'Led Driver Code let op enkel de laatste twee posties veranderen LDC= "&H01" 'PC Interface compoort Let op altijd twee cijfers ComPort = "07" '================================== 'Remove hs.DeviceButtonRemove HDC,"Off" hs.DeviceButtonRemove HDC,"Red" hs.DeviceButtonRemove HDC,"Green" hs.DeviceButtonRemove HDC,"Blue" hs.DeviceButtonRemove HDC,"White" hs.DeviceButtonRemove HDC,"Turquoise"&"
" hs.DeviceButtonRemove HDC,"Yellow" hs.DeviceButtonRemove HDC,"Magenta" hs.DeviceButtonRemove HDC,"Orange" hs.DeviceButtonRemove HDC,"Lt. Red" hs.DeviceButtonRemove HDC,"Salmon" hs.DeviceButtonRemove HDC,"Lt. Orange"&"
" hs.DeviceButtonRemove HDC,"Gold" hs.DeviceButtonRemove HDC,"Lt. Yellow" hs.DeviceButtonRemove HDC,"Khaki" hs.DeviceButtonRemove HDC,"Lt. Green" hs.DeviceButtonRemove HDC,"Green Yellow" hs.DeviceButtonRemove HDC,"Lt. Cyan"&"
" hs.DeviceButtonRemove HDC,"Aquamarine" hs.DeviceButtonRemove HDC,"Cyan" hs.DeviceButtonRemove HDC,"Lt. Blue" hs.DeviceButtonRemove HDC,"Sky Blue" hs.DeviceButtonRemove HDC,"Lt. Magenta" hs.DeviceButtonRemove HDC,"Violet" ID = ComPort + HDC + LDC 'Create hs.DeviceButtonAdd HDC,"rgb.txt(""Main"","""&ID&"off"")","Off" hs.DeviceButtonAdd HDC,"rgb.txt(""Main"","""&ID&"red"")","Red" hs.DeviceButtonAdd HDC,"rgb.txt(""Main"","""&ID&"green"")","Green" hs.DeviceButtonAdd HDC,"rgb.txt(""Main"","""&ID&"blue"")","Blue" hs.DeviceButtonAdd HDC,"rgb.txt(""Main"","""&ID&"white"")","White" hs.DeviceButtonAdd HDC,"rgb.txt(""Main"","""&ID&"turquoise"")","Turquoise"&"
" hs.DeviceButtonAdd HDC,"rgb.txt(""Main"","""&ID&"yellow"")","Yellow" hs.DeviceButtonAdd HDC,"rgb.txt(""Main"","""&ID&"magenta"")","Magenta" hs.DeviceButtonAdd HDC,"rgb.txt(""Main"","""&ID&"orange"")","Orange" hs.DeviceButtonAdd HDC,"rgb.txt(""Main"","""&ID&"ltred"")","Lt. Red" hs.DeviceButtonAdd HDC,"rgb.txt(""Main"","""&ID&"salmon"")","Salmon" hs.DeviceButtonAdd HDC,"rgb.txt(""Main"","""&ID&"ltorange"")","Lt. Orange"&"
" hs.DeviceButtonAdd HDC,"rgb.txt(""Main"","""&ID&"gold"")","Gold" hs.DeviceButtonAdd HDC,"rgb.txt(""Main"","""&ID&"ltyello"")","Lt. Yellow" hs.DeviceButtonAdd HDC,"rgb.txt(""Main"","""&ID&"khaki"")","Khaki" hs.DeviceButtonAdd HDC,"rgb.txt(""Main"","""&ID&"ltgreen"")","Lt. Green" hs.DeviceButtonAdd HDC,"rgb.txt(""Main"","""&ID&"greenyellow"")","Green Yellow" hs.DeviceButtonAdd HDC,"rgb.txt(""Main"","""&ID&"ltcyan"")","Lt. Cyan"&"
" hs.DeviceButtonAdd HDC,"rgb.txt(""Main"","""&ID&"aquamarine"")","Aquamarine" hs.DeviceButtonAdd HDC,"rgb.txt(""Main"","""&ID&"cyan"")","Cyan" hs.DeviceButtonAdd HDC,"rgb.txt(""Main"","""&ID&"skyblue"")","Sky Blue" hs.DeviceButtonAdd HDC,"rgb.txt(""Main"","""&ID&"ltblue"")","Lt. Blue" hs.DeviceButtonAdd HDC,"rgb.txt(""Main"","""&ID&"ltmagenta"")","Lt. Magenta" hs.DeviceButtonAdd HDC,"rgb.txt(""Main"","""&ID&"violet"")","Violet" end sub