I'm having trouble understanding the CAPI interface. All I want to do is set a particular dim level of an Insteon device. Here's my script so far:
It doesn't work... I'm not sure what to use for the 3rd parameter to CAPIGetSingleControl().
Any hints?
Code:
Public Sub Main(ByVal Parms As Object) Dim intDevRef as Integer = hs.GetDeviceRef("26.D9.B8:1") if intDevRef <= 0 Then hs.writelog( "Error", "setDevValueByAddr: device not found!" ) else hs.writelog( "Error", "Got device ref" ) hs.CAPIControlHandler(hs.CAPIGetSingleControl(intDevRef,true ,"Dim 10%",false,true)) end If End Sub
Any hints?
Comment