Harmony, Google Home and SmartThins

Hi everyone

I am still very new to Home Automation but I have a pretty good grip on how to do the easy stuff. Lately I have been trying to get, what I believe, is a simple thing done but I can’t for the life of me figure it out.

I have my Harmony hub and have made a few activities that work fine. That being said, the other day I was thinking to myself that it would be fun to be able to just ask Google to turn off the TV. When I use the activity to start the TV and close it it works just fine but I would like to simply be able to say “Ok Google turn off the TV” and it turns it off regardless of if any Activities has been started.

I tried to great a simple activity with just a that only includes the TV and just has an On and Off with nothing else. I set up an IFTTT to say when I say Trun off TV it ends the activity. Which works fine if I use the Activity to turn on the TV but if I turned it on manually using the remote and try to end the activity the TV stays on and for some reason the PS3 turns on (despite it not being part of the activity).

Basically I just wanted to hit a specific button on a harmony remote. I did a lot of searching and reading on this site and I can’t seem to get anything I need to work. I have a Raspberry Pi (1st Gen, Model B) that I am trying to get set up with node.js and Kuku Harmony but my knowledge of this stuff is pretty limited so I am basically entering commands until something works.

Does anyone have any suggestions at all? Is the Pi 1st gen still usable for these setups or do I need to move to a Pi3? Does the Pi have a huge amount of advantages once set up? I am starting to feel like it may not be worth setting it all up for this one use case.

Thanks in advance

-Mike

With IFTTT are you ending the individual activity that you started? Or are you calling the ‘Power Off AV’ activity? I’ve been using the ‘Power Off AV’ activity from IFTTT for months and it works almost every time to end whatever activity I’ve got running. Every once in a while there’s a hiccup and I have to say the command twice, but it’s not very often.

I am calling the individual activity. I guess what I am trying to do is if the TV gets turned on with the original remote I want to be able to shut it off using google home or smartthings. I just wish it wasn’t so rigid. I wish I could use a voice command to shut off a TV even if it wasn’t turned on via activity. More like a vocal remote. Hope that make sense.

Easy.

Just create a virtual switch and use the following rule in webCoRE.

If any of “selected Harmony activities” are on
Then using Virtual Switch
Turn On

If Virtual switch is Off
Then using Harmony Hub
Wait 5 Seconds
All Off

If all of “selected Harmony activities” are off
Then using Virtual Switch
Wait 10 Seconds
Turn Off

This way whenever an activity turns on then the Virtual Switch will indicate that an activity is in use. You will be able to tell Google to turn off the Virtual Switch and no matter what activity is on, it will send an All Off command to the Harmony Hub turning everything off.

I just installed WebCore the other day but I find it rather daunting so far.
Is there any samples of this kind of code?

Will this allow me to turn off the TV even if not turned On via activity?

So, the question is, if the Virtual Switch is off and you send an off command to a device that is already off, does the command still get sent to the device…Answer…Sometimes…

However, there is a setting in webCoRE that you can say, “Always Execute”…This is located under the Task Cancellation Policy when you click the “With” in the webCoRE Piston.

It has also been my practice to use a Smart Socket with an Energy Monitor on entertainment devices (power strip). That way, even if someone turns on something without actually using the Harmony Activity, I still know that something is on and it does not just stay on just because someone turned it on manually. Measuring wattage, the Virtual Switch the governs that “Room” will turn on…This allows me to set up rules easily for the Room to turn off if no one is in there…

Each room in my home has a Virtual Switch for that room. If any device is on in that room, then the Virtual Switch turns on. If all of the devices are off then the Virtual Switch turns off. If I turn off the Virtual Switch, then all devices in that room turns off.

This has been one of the best ways for me to turn off everything in one Room all at once.

To take it even further,:rofl: each room has an Automation Virtual Switch that acts as a kill switch for automations in that room…I can easily say, Alexa, Turn Off Den Automation and then no rule, that has the restriction “Den Automation Switch is On”, will work. Of course being the OCDian that I am, I have a Piston that governs how long each Room Automation Switch can be off before it automatically turns back on.

Here’s the Piston the governs my Den Master Switch:
Switch 50 is the Den (Virtual) Switch
Unknown Device 2 is the Den Harmony Hub

You can easily import this Piston by using the code at the top of the Piston