Tuicemen.com

Advanced search  

News:

Alex10  (Build 1.5.3.5 ) is now  available for download ~:0~

Pages: [1]

Author Topic: Macro ideas for PCC and Ihosue with the Kinect  (Read 1222 times)

KENRAD

  • Moderator
  • Hero Member
  • ****
  • Helpful Rating: 4
  • Offline Offline
  • Posts: 480
Macro ideas for PCC and Ihosue with the Kinect
« on: March 05, 2013, 12:10:35 pm »

Here are some of the macros I am using with the kinect to give you an idea

'************ New Macro ***********
'j1 tests brightness in the room used this as opposed to a flag so i had a visual icon on the screen
[kinectofficelighton]
ShowMacroInUserList,False
If,X10DeviceStateByAddress,j1,IsOff
ExitMacro
ENDIF
X10DeviceByAddress,A12,CommandState,On
END


'************ New Macro ***********
[kinectofficelightoff]
ShowMacroInUserList,True
PauseInSeconds,2
X10DeviceByAddress,A12,CommandState,Off
END


'************ New Macro ***********
' turns j1 on when the light level is low from kinect sensor
[officelightpositive]
ShowMacroInUserList,False
PauseInSeconds,1
X10DeviceByAddress,j1,CommandState,On
END

'************ New Macro ***********
'turns j1 off when the office is bright enough
[officelightnegative]
ShowMacroInUserList,False
PauseInSeconds,1
X10DeviceByAddress,J1,CommandState,Off
END

'************ New Macro ***********
' turns off desk lamp and tv in office when kinect desk zone is vacant
[kincet desk lamp control off]
ShowMacroInUserList,False
Shell,C:\Program Files (x86)\PcCompanion\PcCompanion.exe >office_tv_on< 0,NormalFocus,DontWait
X10DeviceByName,office desk lamp,CommandState,Off
END

'============= New Macro===============
'turns on the desk lamp, tv and checks email when desk lamp zone is occupied
[kincet desk lamp control on]
ShowMacroInUserList,False
If,X10DeviceStateByAddress,j1,IsOff
Shell,C:\Program Files (x86)\PcCompanion\PcCompanion.exe >office_tv_on< 0,NormalFocus,DontWait
PauseInSeconds,1
Shell,C:\Program Files (x86)\PcCompanion\PcCompanion.exe >kinect_g_mail< 0,NormalFocus,DontWait
ExitMacro
ENDIF
X10DeviceByAddress,A13,CommandState,On

'************ New Macro ***********
' check flags fo see if anyone is in bed to avoid turning on macro at night
'only runs at night (soon to add brightness sensing)
' if conditions are not met it turns on the master bedroom light
[masterkinectmain]
ShowMacroInUserList,False
If,Flag,heatherinbed,true
ExitMacro
ENDIF
If,Flag,keninbed,true
ExitMacro
ENDIF
If,IsNight,False
ExitMacro
ENDIF
ZWaveDeviceByAddress,15,CommandLevel,99
END

'************ New Macro ***********
'Triggered by kinect zone to turn off the master bed room light
[masterkinectmainoff]
ShowMacroInUserList,False
ZWaveDeviceByAddress,15,CommandLevel,0
END




'************ New Macro ***********
' triggered by a zone covering my bed
' checks conditions to ensure no one is in bed to avoid lighting when some one is sleeping
'Turns off teh main light and sets the wall sconces above tthe bed to 50%
'tell us good night
'triggers another delayed macro
[mastbedkinect]
ShowMacroInUserList,True
If,Flag,heatherinbed,true
ExitMacro
ENDIF
If,Flag,keninbed,true
ExitMacro
ENDIF
If,IsNight,False
ExitMacro
ENDIF
ZWaveDeviceByAddress,15,CommandLevel,0
PauseInSeconds,1
X10DeviceByAddress,c3,CommandState,On
PauseInSeconds,1
X10DeviceByAddress,c4,CommandState,On
PauseInSeconds,1
X10DeviceByAddress,c4,CommandState,Dim,50
PauseInSeconds,1
X10DeviceByAddress,c3,CommandState,Dim,50
PauseInSeconds,1
SetFlag,heatherinbed,true
PauseInSeconds,1
SetFlag,keninbed,true
PauseInSeconds,1
Say, good night I will see you in the morning
Shell,C:\Program Files (x86)\iHouseV0.9.6.7\qmacro.exe "mastbedzoneqmacro" "60000", Hide, DontWait
END

'************ New Macro ***********
'triggered by bed zone macro delayed one minute
'ensures the main light is out
'Turns off the wall sconces
[mastbedzoneqmacro]
ShowMacroInUserList,False
ZWaveDeviceByAddress,15,CommandLevel,0
PauseInSeconds,1
X10DeviceByAddress,c3,CommandState,Off
PauseInSeconds,1
X10DeviceByAddress,c4,CommandState,Off
PauseInSeconds,1
X10DeviceByAddress,c1,CommandState,On
END

************ New Macro ***********
' triggered by a zone near my closet doors that reads my agendaa and emails when I approach the closet in the moring
[kinectagenda]
Shell,C:\Program Files (x86)\PcCompanion\PcCompanion.exe >Agenda< 0,NormalFocus,DontWait
PauseInSeconds,10
Shell,C:\Program Files (x86)\PcCompanion\PcCompanion.exe >G_mail< 0,NormalFocus,DontWait
END

'************ New Macro ***********
[heatherlampkinectoff]
ShowMacroInUserList,False
X10DeviceByAddress,j3,CommandState,Off
END

'************ New Macro ***********
[heatherlampkinecton]
ShowMacroInUserList,False
If,X10DeviceStateByAddress,j1,IsOff
ExitMacro
ENDIF
X10DeviceByAddress,j3,CommandState,On
END

'************ New Macro ***********
[keninbed]
SetFlag,keninbed,true
END

'************ New Macro ***********
[heatherinbed]
SetFlag,heatherinbed,true
END

'************ New Macro ***********
[kenoutbed]
SetFlag,keninbed,false
END

'************ New Macro ***********
[heatheroutbed]
SetFlag,heatherinbed,false
END

'+++++++++++++++ New Macro +++++++++++++++
[Bed Flag Reset]
RunAtTime,21:00
SetFlag,heatherinbed,false
PauseInSeconds,1
SetFlag,keninbed,false
END

Hope this sparks some interest in the kinect with PCC and  Ihouse. I also welcome other ideas from users. on what you would like to see tried with the kinect I am willing to test your macro ideas and post the results. I'll even try to get it on video so you can see it in action, before you make a decision to invest in the setup or not. I am hoping this will help me as well to spark new ideas to add to my setup

Cheers Ken
Logged
I have no clue how to do this but its a lot of fun trying.
Win 8.1, win 7 64 and 32 bit,
XTBR, CM15A, ZTroller
PCC, T.A.C ,HS3, Nitrogenlogic remote, Bluewatch(BT), Bluewatch(WIFI), all plug ins
Microsoft kinect,
Nitrogen logic depth controllers
Phillips Hue, Global Cache, Hyperion, Kodi
Pages: [1]