tims Posted October 9, 2017 Share Posted October 9, 2017 Hi Guys, I got Josh appliance and love it but I would love to see some code samples of what you guys are doing with this and your bringing In other Scenes into C4 using a Virtual driver? As it stands right now I am using the Chipsal_232 Driver. I will post some samples here too but I thought a new thread with Coding ideas and examples might be good. Thanks guysJosh sent this to me earlier and this is what I use right now but I think you guys might have some other thoughts and samples of what your doing HomeKit does not currently support any *native* AV system modules. So you can't represent a TV as a "TV" in HomeKit. What you *can* do is use virtual switches to turn things on and off, and that gives you some really powerful programming options. The general idea is that you use the Clipsal Legacy Relay Light V2 driver as a "hidden switch" in C4 and hide it from navigators. Then you use programming to set the switch state and receive commands from HomeKit. You can use programming to immediately turn the switch off after it's been turned on, to represent a "momentary press" (like changing channels on a TV, although that gets weird with Siri voice control, but does work well in the Home app). > > I use this myself to do things like: > > 1) Have a switch that represents my "Apple TV" view in my theater. I can say, "Hey Siri, turn on the Apple TV in the theater" and that turns on the "Apple TV" switch in the theater room. Then I use programming to select the video source and turn on the room appropriately. When the switch turns off, I turn the room off. > > 2) Start audio playback. I have a "Josh's Pandora" switch in the office. I can say, "Hey Siri, turn on Josh's Pandora in the Office" and it starts playing back my favorite Pandora channel. Turning off the switch turns the room off. > > 3) Use virtual switches for presence awareness. I have a "switch" for each person's device in the home. When Apple's "automations" triggers that a user is home or away, I turn their appropriate switch on or off. In iOS 11, they also have a "all users gone" or "first user home" state, which also has switches. I can then use programming to trigger C4 automations appropriately. > > 4) Setup trigger-based alarm clocks for the kids. I have an "alarm on" switch for each kid. At the appropriate wake-up time, if the alarm on switch is enabled, then it turns on the kids pandora stations in their rooms. I have a "Is Tomorrow A School Day" driver that links into my kid's school's calendar, and automatically sets the switches states based on whether each kid has school the next day. If one kid's alarm is on, then the parent's alarm also turns on. If both alarms are off, then the parent's alarm also turns off. This also lets me easily turn off the kids alarms if we get snow day notices. > > There's a lot of power to this system, if you get creative. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.